{ "openapi": "3.1.0", "info": { "title": "Circlemind API", "version": "0.0.4" }, "servers": [ { "url": "https://api.circlemind.co" } ], "paths": { "/plan": { "get": { "summary": "User plan", "description": "Return the active plan for the current user and its usage metrics.", "operationId": "get_user_plan_plan_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlanResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ] }, "x-speakeasy-name-override": "get_user_plan" }, "/graph/{graph_name}/configuration": { "get": { "summary": "Graph configuration (get)", "description": "Retrieve the configuration details of a specific graph by its name.", "operationId": "get_graph_configuration_graph__graph_name__configuration_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "get_graph_configuration" }, "post": { "summary": "Graph configuration (set)", "description": "Update the configuration details of a specific graph by its name.", "operationId": "post_graph_configuration_graph__graph_name__configuration_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "x-speakeasy-name-override": "set_graph_configuration" } }, "/graph": { "get": { "summary": "List graphs", "description": "Return the list of all existing graphs for the current user.", "operationId": "get_graph_list_graph_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GraphListResponse" } } } } }, "security": [ { "APIKeyHeader": [] } ], "x-speakeasy-name-override": "list_graphs" } }, "/graph/{graph_name}": { "post": { "summary": "Create new graph", "description": "Create a new graph", "operationId": "create_graph_graph__graph_name__post", "x-speakeasy-name-override": "create_graph", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/delete": { "post": { "summary": "Delete existing graph", "description": "Delete the selected graph.", "x-speakeasy-name-override": "delete_graph", "operationId": "delete_graph_graph__graph_name__delete_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/graphml": { "get": { "summary": "Download graphml", "description": "Generate a download URL for the graph in graphml format.", "x-speakeasy-name-override": "download_graphml", "operationId": "get_graphml_graph__graph_name__graphml_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DownloadGraphResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/query": { "post": { "summary": "Query memory", "description": "Send a query request to the graph.", "x-speakeasy-name-override": "query", "operationId": "post_query_graph__graph_name__query_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QueryResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/query/{request_id}": { "get": { "summary": "Check query request status", "description": "Return the status of an existing query request.", "x-speakeasy-name-override": "get_query_status", "operationId": "get_query_status_graph__graph_name__query__request_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } }, { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "requestTime", "in": "query", "required": true, "schema": { "type": "integer", "title": "Requesttime" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/insert": { "post": { "summary": "Add memory", "description": "Create a new memory in the graph using raw text.", "x-speakeasy-name-override": "add", "operationId": "post_insert_graph__graph_name__insert_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InsertRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InsertResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/files": { "post": { "summary": "Add memory (from files)", "description": "Create a new memory in the graph from files.", "x-speakeasy-name-override": "add_from_files", "operationId": "post_insert_files_graph__graph_name__files_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_post_insert_files_graph__graph_name__files_post" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InsertResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/graph/{graph_name}/insert/{request_id}": { "get": { "summary": "Check add request status", "description": "Return the status of an existing add request.", "x-speakeasy-name-override": "get_add_status", "operationId": "get_insert_status_graph__graph_name__insert__request_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "graph_name", "in": "path", "required": true, "schema": { "type": "string", "title": "Graph Name" } }, { "name": "request_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Request Id" } }, { "name": "requestTime", "in": "query", "required": true, "schema": { "type": "integer", "title": "Requesttime" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RequestStatus" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "Body_post_insert_files_graph__graph_name__files_post": { "properties": { "files": { "items": { "type": "string", "format": "binary" }, "type": "array", "title": "Files" } }, "type": "object", "required": [ "files" ], "title": "Body_post_insert_files_graph__graph_name__files_post" }, "ConfigureRequest": { "properties": { "domain": { "type": "string", "title": "Domain" }, "exampleQueries": { "type": "string", "title": "Examplequeries" }, "entityTypes": { "items": { "type": "string" }, "type": "array", "title": "Entitytypes" } }, "type": "object", "required": [ "domain", "exampleQueries", "entityTypes" ], "title": "ConfigureRequest", "description": "Data model for graph configuration request." }, "ConfigureResponse": { "properties": { "domain": { "type": "string", "title": "Domain" }, "exampleQueries": { "type": "string", "title": "Examplequeries" }, "entityTypes": { "items": { "type": "string" }, "type": "array", "title": "Entitytypes" } }, "type": "object", "required": [ "domain", "exampleQueries", "entityTypes" ], "title": "ConfigureResponse", "description": "Data model for graph configuration response." }, "DownloadGraphResponse": { "properties": { "presignedUrl": { "type": "string", "title": "Presignedurl" }, "last_modified": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Last Modified" } }, "type": "object", "required": [ "presignedUrl" ], "title": "DownloadGraphResponse", "description": "Data model for graph download response." }, "GraphListResponse": { "properties": { "graphs": { "items": { "type": "string" }, "type": "array", "title": "Graphs", "description": "List of existing graphs" } }, "type": "object", "required": [ "graphs" ], "title": "GraphListResponse", "description": "Data model for graph list response." }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "InsertRequest": { "properties": { "memory": { "type": "string", "title": "Memory", "description": "Raw text to be inserted into the graph" }, "metadata": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Metadata", "description": "Stringified JSON dictionary containing any metadata to link to the given memory.\n\n(i.e., `'{\"id\": \"asdash-234fdsc-erwer-wqes2\", \"url\": \"https://example.com\"}'`)" }, "memoryId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Memoryid", "description": "Reserved" } }, "type": "object", "required": [ "memory" ], "title": "InsertRequest", "description": "Data model for insert request." }, "InsertResponse": { "properties": { "requestId": { "type": "string", "title": "Requestid", "description": "Unique request ID to be used to track the request status" }, "requestTime": { "type": "integer", "title": "Requesttime", "description": "Further value to provide to track the request status" }, "memoryId": { "type": "string", "title": "Memoryid", "description": "Reserved" } }, "type": "object", "required": [ "requestId", "requestTime", "memoryId" ], "title": "InsertResponse", "description": "Data model for insert response." }, "PlanResponse": { "properties": { "requestsCount": { "type": "number", "title": "Requestscount", "description": "Total number of requests used for the current period" }, "requestsMax": { "type": "integer", "title": "Requestsmax", "description": "Number of available requests for the active plan" }, "planId": { "type": "string", "title": "Planid" }, "planTTL": { "type": "integer", "title": "Planttl" } }, "type": "object", "required": [ "requestsCount", "requestsMax", "planId", "planTTL" ], "title": "PlanResponse", "description": "Data model for plan response." }, "QueryRequest": { "properties": { "query": { "type": "string", "title": "Query string" }, "parameters": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Parameters", "description": "Optional stringified JSON parameters:\n - only_context (bool = false): return only the context of the query instead of processing it via an LLM;\n - with_references (bool = false): include references in the response.\n\n(i.e., `'{\"only_context\": true}'`)" } }, "type": "object", "required": [ "query" ], "title": "QueryRequest", "description": "Data model for query request." }, "QueryResponse": { "properties": { "requestId": { "type": "string", "title": "Requestid", "description": "Unique request ID to be used to track the request status" }, "requestTime": { "type": "integer", "title": "Requesttime", "description": "Further value to provide to track the request status" } }, "type": "object", "required": [ "requestId", "requestTime" ], "title": "QueryResponse", "description": "Data model for query response." }, "RequestStatus": { "properties": { "status": { "type": "string", "title": "Status" }, "answer": { "type": "string", "title": "Answer" }, "context": { "type": "string", "title": "Context" } }, "type": "object", "required": [ "status", "answer", "context" ], "title": "RequestStatus" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" } }, "securitySchemes": { "APIKeyHeader": { "type": "apiKey", "in": "header", "name": "apiKey" } } }, "x-speakeasy-retries": { "strategy": "backoff", "backoff": { "initialInterval": 500, "maxInterval": 60000, "maxElapsedTime": 3600000, "exponent": 1.5 }, "statusCodes": [ "5XX" ], "retryConnectionErrors": true } }