curl --request POST \
--url https://api.unize.org/v1/storage/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"text": "<string>",
"source_title": "<string>",
"source_url": "<string>",
"source_author": "<string>",
"source_article_date": "<string>",
"override_extraction_criteria": "<string>"
}
],
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"graph_name": "<string>",
"extraction_criteria": "<string>",
"system": "st-0.75",
"extraction_mode": "normal"
}
'import requests
url = "https://api.unize.org/v1/storage/"
payload = {
"documents": [
{
"text": "<string>",
"source_title": "<string>",
"source_url": "<string>",
"source_author": "<string>",
"source_article_date": "<string>",
"override_extraction_criteria": "<string>"
}
],
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"graph_name": "<string>",
"extraction_criteria": "<string>",
"system": "st-0.75",
"extraction_mode": "normal"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [
{
text: '<string>',
source_title: '<string>',
source_url: '<string>',
source_author: '<string>',
source_article_date: '<string>',
override_extraction_criteria: '<string>'
}
],
graph_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
graph_name: '<string>',
extraction_criteria: '<string>',
system: 'st-0.75',
extraction_mode: 'normal'
})
};
fetch('https://api.unize.org/v1/storage/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.unize.org/v1/storage/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'documents' => [
[
'text' => '<string>',
'source_title' => '<string>',
'source_url' => '<string>',
'source_author' => '<string>',
'source_article_date' => '<string>',
'override_extraction_criteria' => '<string>'
]
],
'graph_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'graph_name' => '<string>',
'extraction_criteria' => '<string>',
'system' => 'st-0.75',
'extraction_mode' => 'normal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.unize.org/v1/storage/"
payload := strings.NewReader("{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.unize.org/v1/storage/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unize.org/v1/storage/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Generate Graph
Generate a knowledge graph from a document or a list of documents
curl --request POST \
--url https://api.unize.org/v1/storage/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"documents": [
{
"text": "<string>",
"source_title": "<string>",
"source_url": "<string>",
"source_author": "<string>",
"source_article_date": "<string>",
"override_extraction_criteria": "<string>"
}
],
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"graph_name": "<string>",
"extraction_criteria": "<string>",
"system": "st-0.75",
"extraction_mode": "normal"
}
'import requests
url = "https://api.unize.org/v1/storage/"
payload = {
"documents": [
{
"text": "<string>",
"source_title": "<string>",
"source_url": "<string>",
"source_author": "<string>",
"source_article_date": "<string>",
"override_extraction_criteria": "<string>"
}
],
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"graph_name": "<string>",
"extraction_criteria": "<string>",
"system": "st-0.75",
"extraction_mode": "normal"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
documents: [
{
text: '<string>',
source_title: '<string>',
source_url: '<string>',
source_author: '<string>',
source_article_date: '<string>',
override_extraction_criteria: '<string>'
}
],
graph_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
graph_name: '<string>',
extraction_criteria: '<string>',
system: 'st-0.75',
extraction_mode: 'normal'
})
};
fetch('https://api.unize.org/v1/storage/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.unize.org/v1/storage/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'documents' => [
[
'text' => '<string>',
'source_title' => '<string>',
'source_url' => '<string>',
'source_author' => '<string>',
'source_article_date' => '<string>',
'override_extraction_criteria' => '<string>'
]
],
'graph_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'graph_name' => '<string>',
'extraction_criteria' => '<string>',
'system' => 'st-0.75',
'extraction_mode' => 'normal'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.unize.org/v1/storage/"
payload := strings.NewReader("{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.unize.org/v1/storage/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unize.org/v1/storage/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"documents\": [\n {\n \"text\": \"<string>\",\n \"source_title\": \"<string>\",\n \"source_url\": \"<string>\",\n \"source_author\": \"<string>\",\n \"source_article_date\": \"<string>\",\n \"override_extraction_criteria\": \"<string>\"\n }\n ],\n \"graph_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"graph_name\": \"<string>\",\n \"extraction_criteria\": \"<string>\",\n \"system\": \"st-0.75\",\n \"extraction_mode\": \"normal\"\n}"
response = http.request(request)
puts response.read_body{
"graph_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Send the API generated from the Playground:
Authorization: <api_key>
Body
List of documents to be processed. A minimum of 1 document is required.
1Show child attributes
Show child attributes
An alphanumeric string that uniquely identifies a generated knowledge graph. Provide the graph_id of an existing knoweldge graph to add new data to it. If omitted, a new knoweldge graph will be created instead of updating an existing one.
A unique identifier or label for the knowledge graph being imported. It should be descriptive enough to indicate the graph's content, purpose, or source (e.g., 'medical_research_graph' or 'customer_support_kg'). If not provided, defaults to source_title of the first document.
Specify the criteria that the system must follow when generating the knoweldge graph. This parameter is only applicable when extraction_mode is set to user_defined. If extraction_criteria is provided while extraction_mode is set to any value other than user_defined, the API will return an error.
10 - 750st-0.75(default) - newest, more accurate, and cheapest Storage systemst-0.5(legacy) - only works with normal and user-defined extraction modes
st-0.75, st-0.5 normal- extracts all key entities (e.g. 'John Doe') and their relationshipsdetailed- extracts all entities and relationshipsuser_defined- extracts all entities and relationships based on theextraction_criteriaprovided by the user
normal, detailed, user_defined Response
An alphanumeric string that uniquely identifies the generated knowledge graph.