/api/v1/, the same request and response shapes. Every endpoint is listed in the sidebar, generated from the OpenAPI specification and backed by an interactive playground.
This page covers what is specific to calling that API against Cognee Cloud: where to point it, how to authenticate, and which failures you should expect to see. For the self-hosted setup β running the server under Docker, enabling local authentication, and the environment variables behind these behaviors β see the API Reference.
Base URL
Your tenant has its own host:your-tenant is a placeholder, not a live host.
Authentication
All requests carry your API key in a header:POST /api/v1/auth/login belong to self-hosted instances with authentication enabled β on Cloud, the API key is the credential.
Quick example
POST /api/v1/add and POST /api/v1/remember take multipart form data. Send string inputs through the repeated raw_data form field, and files through data. See Data Ingestion.Core endpoints
Data Ingestion
POST /api/v1/addAdd text, documents, or structured data to a dataset.Knowledge Processing
POST /api/v1/cognifyTurn ingested data into a knowledge graph of entities and relationships.Ingest and Process
POST /api/v1/rememberDo both in one call, with control over chunking, ontologies, and the graph model.Search
POST /api/v1/searchQuery the graph in natural language. Pick a search_type to trade depth for latency β see Search and Recall.Dataset Management
/api/v1/datasets/*List datasets, inspect their contents, and delete a data item or a whole dataset. See Dataset Management.Recall
POST /api/v1/recallRetrieve memory for an agent turn, including session context. See Search and Recall.Trying a request from these docs
Each endpoint page carries a playground. Open Try it, then:- Under Server, fill the
tenantfield. It is prefilled with the placeholderyour-tenant, which is not a live host β replace it with your own. - Add your
X-Api-Key.
api.aws.cognee.ai/docs, and your tenantβs own at https://your-tenant.aws.cognee.ai/docs.
Error handling
When a request fails inside Cognee, the response carries that errorβs HTTP status and adetail field holding the message followed by the error class name:
remediation key next to it β a short prescriptive hint, not a restatement of detail. It is optional and additive: the key is simply absent when no fix is known, so read detail and treat remediation as a hint to show a human or an agent rather than something to branch on.
A few routes still return a generic body for unexpected errors: 500 with {"error": "Internal server error", "detail": "..."} for search, and 409 with {"error": "..."} for recall, remember, and improve. These never carry remediation.
400 Bad Request
400 Bad Request
The request shape is invalid. Check that the body is valid JSON with the documented field names, that JSON requests set
Content-Type: application/json, and that required fields are present β POST /api/v1/search and POST /api/v1/recall both require a query string, and a body omitting it is rejected rather than answered against a default question.A custom graph_model schema may only reference its own document. A $ref that does not start with # β a URL, a file:// URI, or a filesystem path β is rejected instead of fetched, so the server never makes a network request on your behalf. Inline the referenced schema under $defs and point the $ref at it, for example #/$defs/Node.402 Payment Required
402 Payment Required
The token budget for the request is exhausted, on either the LLM or the embedding path:This status is terminal. The request is excluded from automatic retries and re-submitting it fails the same way until credits are restored β add credits on the Billing page (workspace owners only β see Account and Billing), then re-run it. Do not confuse it with
429, which is transient throttling to back off on.POST /api/v1/cognify still returns the legacy body {"error": "Token budget exhausted", "detail": "..."} β see Knowledge Processing.403 Forbidden
403 Forbidden
You are authenticated but lack the required permission on a dataset the request touches:The bracketed permission reflects the operation β
read for search and recall, write for remember and improve, and delete as a separate grant. When you pass datasets or dataset_ids, every entry must be accessible: one inaccessible entry fails the whole request. See Permissions and Access Control.404 Not Found
404 Not Found
The route or resource does not exist. Check the
/api/v1/... prefix, the HTTP method, and the resource id.POST /api/v1/search and POST /api/v1/recall resolve dataset names strictly: a name matching no dataset you own in the current tenant fails the whole request before any retrieval runs, listing every unresolved name. The other named datasets are not searched. Fix the name, or send dataset_ids with the UUID β a dataset shared with you is only reachable by UUID, never by name.413 Request Entity Too Large
413 Request Entity Too Large
The add would push you past your workspace limits. Cognee Cloud caps each member at 1 GB and 50,000 documents, checked by The whole call is rejected and none of its files are stored, so retrying it unchanged fails the same way. Check
POST /api/v1/add before anything is stored:GET /api/v1/quotas/usage, then delete data you no longer need or send fewer files per call. POST /api/v1/remember is not subject to these limits β see Storage and document limits.429 Too Many Requests
429 Too Many Requests
You have hit a rate limit. Retry with backoff, spread large batches out instead of sending them at once, and build the retry into your client. Unlike
402, this one clears on its own.Next steps
Quick Start
Upload data, build a graph, and search it in under five minutes.
Use the SDK instead
Point a local Cognee process at your tenant and skip the HTTP layer.