Base URL

All API requests are made to the following base URL:
https://api.unize.org

Unize API Key

The Unize API uses API keys for authenticating requests. Here is a step-by-step guide on how to generate an API Key:
1

Create an account

To begin accessing Unize AI, you have to create an API account first. You can sign up for an account here. After signing up, you must verify your account by following the verification link in your email. You will be asked to create a password for your account.
2

Generate an API Key

To use the Unize API, you need an API key. You can generate an API key by navigating to the API Keys page and clicking on the “Create New Secret Key” button. You will be asked to provide a name for your API key. After providing a name, click on the “Create” button.
Keep a copy of your API key in a secure place. Do not share it with anyone!
How to generate an API key

Unize Storage

Generating a Knowledge Graph

Once you have your API key and a positive credit balance, you can start generating knowledge graphs. When generating a knowledge graph by providing input text, you need to make a POST request to the /v1/storage/ endpoint. Include your API key in the request header to authenticate your call and pass to the body the following required parameters: documents.text and documents.source_title. Here is an example of how to create a knowledge graph from text using Python:
import requests

url = "https://api.unize.org/v1/storage/"

payload = {
    "system": "st-0.75",
    "extraction_mode": "normal",
    "documents": [
        {
            "text": "Joanne is an employee of Unize.",
            "source_title": "Diary of Joanne"
        }
    ]
}
headers = {
    "Authorization": "enter-your-api-key-here",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
The response will contain an graph_id which you can use to visualize the graph or review the generated nodes and relationships.
The graph_id is a unique identifier for the generated graph. If you want to update an existing graph with new data, you can use the generated graph_id for that existing graph the next time you make a POST request to the /v1/storage/ endpoint.
{
  "graph_id": "3c90c3cc-0d44-4b50-8888-graph-id"
}

Exporting a Knowledge Graph

Once you have the graph_id of the generated graph, you can export the graph by making a GET request to the /v1/storage/{graph_id}/ endpoint. Include your API key in the request header to authenticate your call and pass to the path parameter the following required parameters: graph_id. The cypher_query parameter is optional and defaults to false. When false, the API returns a JSON object with arrays of nodes and relationships. If set to true, the response will be a JSON object containing a Cypher Query string instead. Check out the tabs below to see how to call the /v1/storage/{graph_id}/ endpoint and how the responses would look like depending on the value passed to cypher_query parameter.
Request
import requests

url = "https://api.unize.org/v1/storage/enter-your-graph-id-here/"

headers = {"Authorization": "enter-your-api-key-here"}

response = requests.get(url, headers=headers)

print(response.json())
ResponseThe sample request above will return a graph object that contain the nodes and relationships of the generated graph. Here is a sample response:
{
  "graph": {
    "nodes": [
      {
        "node_label": "Person",
        "node_name": "Joanne",
        "node_var": "4:3c90c3cc-0d44-4b50-8888-graph-id:5585",
        "node_properties": {
          "snippet": "Joanne is a Unize employee.",
          "graph_id": "3c90c3cc-0d44-4b50-8888-graph-id",
          "name": "Tracy"
        },
        "snippet": null
      },
      {
        "node_label": "Company",
        "node_name": "Unize",
        "node_var": "4:3c90c3cc-0d44-4b50-8888-graph-id:5586",
        "node_properties": {
          "snippet": "Joanne is a Unize employee.",
          "graph_id": "3c90c3cc-0d44-4b50-8888-graph-id",
          "name": "Unize"
        },
        "snippet": null
      }
    ],
    "relationships": [
      {
        "rel_type": "EMPLOYEE_OF",
        "start_node": "4:3c90c3cc-0d44-4b50-8888-graph-id:5585",
        "end_node": "4:3c90c3cc-0d44-4b50-8888-graph-id:5586",
        "rel_properties": {
          "graph_id": "3c90c3cc-0d44-4b50-8888-graph-id"
        }
      }
    ]
  },
  "latest_graph_merge_data": {
    "extraction_criteria": "null",
    "status": "completed",
    "timestamp": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "sysytem": "st_0_75",
    "extraction_mode": "detailed"
  }
}

Unize Retrieval

Asking Questions to a Knowledge Graph

To ask a question to a knowledge graph, you need to make a POST request to the /v1/storage/{graph_id}/retrieval/ endpoint. To successfuly ask a question you need to follow these three requirements:
  1. Include your API key in the request header to authenticate your call;
  2. Pass the graph_id to the path parameter; and
  3. Pass to the request body the following required parameters: question.
Here is an example of how to ask a question using Python:
import requests

url = "https://api.unize.org/v1/storage/enter-your-graph-id-here/retrieval/"

payload = {
    "system": "rt-0.5",
    "question": "Count the number of people"
}
headers = {
    "Authorization": "enter-your-api-key-here",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
The response will contain a retrieval_id which you can use to check the status of the request and fetch the answer to your question once completed.
{
  "retrieval_id":"07e382e9-7407-43fd-8888-retrieval-id"
}

Fetching Answers to Your Questions

Once you have a retrieval_id, you can fetch the answer by making a GET request to the /v1/storage/{graph_id}/retrieval/{retrieval_id}/ endpoint. Include your API key in the request header to authenticate your call and pass to the path parameters the following: graph_id and retrieval_id. Here is an example of how to fetch an answer using Python:
import requests

url = "https://api.unize.org/v1/storage/enter-your-graph-id-here/retrieval/enter-your-retrieval-id-here/"

headers = {"Authorization": "enter-your-api-key-here"} # Replace with your API key

response = requests.get(url, headers=headers)

print(response.json())
The response will contain the status of your request and the answer to your question once it’s completed. Here is a sample response:
{
  "retrieval_id":"07e382e9-7407-43fd-8888-retrieval-id",
  "question":"Count the number of people",
  "answer":"There is 1 person.",
  "status":"success",
  "timestamp":"2025-08-27T08:04:32.515801Z",
  "completed_at":"2025-08-27T08:05:01.097963Z",
  "system":"rt-0.5"
}

Importing a Knowledge Graph

You can also import an existing knowledge graph into Unize by making a POST request to the v1/storage/import/ endpoint. Include your API key in the request header to authenticate your call and pass to the body the following required parameters: graph_name and cypher. You can also pass an graph_id to the body if you want to assign a specific ID to the imported graph; otherwise, one will be auto-generated for you. If the graph_id already exists, the imported graph will be merged with the existing graph.
If you are passing an graph_id, make sure it is a valid UUID4 string. Otherwise, the request will fail.
Here is an example of how to import a knowledge graph using Python:
import requests

url = "https://api.unize.org/v1/storage/import/"

payload = {
    "cypher": "CREATE (a:Person {firstName: \"Alice\"}) CREATE (b:Person {firstName: \"Jason\"}) CREATE (a)-[:FRIENDS]->(b)",
    "graph_name": "Sample Imported Graph"
}
headers = {
    "Authorization": "enter-your-api-key-here", # Replace with your API key
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
The response will contain the graph_id of the imported graph.
{
  "graph_id": "3c90c3cc-0d44-4b50-8888-sample-graph-id"
}