The API
The hosted API is the PRME HTTP API with an API key in front of it. This page covers what is different from the HTTP API reference, which describes running the server yourself.
Base URL and routes
https://api.prismemory.comEvery route in the PRME HTTP API reference is available, apart from the changes listed below. The full list of routes, with request and response shapes, is the service’s own interactive page at /docs. Its machine-readable form is /openapi.json. Neither needs a key.
GET /v1/health and GET /v1/relations (see Concept maps) also need no key. Every other route needs one.
Authentication
Send the key of one project as a bearer token:
Authorization: Bearer prm_live_<32 characters>The service stores only a hash of the key and never logs it. A key works for one project only. Revoking a key, or deleting its project, stops it within a minute. If the service briefly cannot reach its database, a key it checked in the last minute keeps working for up to one more minute, so a key revoked during such an outage can take about two minutes to stop.
A refused key gets 401 and WWW-Authenticate: Bearer, with a reason_code:
reason_code | Meaning |
|---|---|
api_key_missing | The request had no Authorization header. |
api_key_invalid | The key is not one the service knows. |
api_key_revoked | The key was revoked. Deleting a project revokes its keys. |
project_deleted | The key belongs to a project that was deleted. |
Who is user_id?
A key acts for the whole project. The user_id in a body or a query names one of your own end users. The engine does not check it, so a program that serves several end users must send the right one each time.
user_id is an identifier, not a name. To give the engine the user’s name, send it as speaker on each of the user’s own messages (role user) when you ingest a chat; see Name the user in a chat. The engine then attaches the user’s claims to one entity with that name. speaker does not choose whose memories are read or written; only user_id does. A user who is never named and never says who they are gets an “I” entity for each message, so their claims are not connected through one person.
Error format
Errors that the hosted layer raises have this shape:
{ "detail": "Invalid or missing API key", "reason_code": "api_key_missing" }Errors that the engine raises on its own routes keep the engine’s shape, { "detail": "..." }. Use reason_code when it is there, and the HTTP status when it is not. The Limits and errors page lists the codes.
Every response has an X-Request-ID header. Include it when you contact the maintainer about a request. The service chooses this id itself and does not use one that you send.
Changes from PRME
These requests are refused with 422 before they do any work. A refused request is not counted against your limits.
| Request | reason_code | Why |
|---|---|---|
POST /v1/ingest with wait_for_extraction: true | wait_for_extraction_unsupported | A waiting request would hold a project’s engine for minutes. An ingest answers once it is saved. |
A policy on store or ingest, or any call of POST /v1/privacy/policy | privacy_policy_unsupported | The engine’s evidence privacy options are off in the alpha. |
POST /v1/reembed | reembed_unsupported | The service uses one fixed embedding model. |
entity_profile in the metadata of a store, ingest, or fast ingest item | profile_metadata_reserved | This key marks the profiles the service builds. Only a profile build writes it. entity_name alone is stored like any other key. |
To follow an ingest’s extraction, call GET /v1/events/{event_id}/extraction-status. It reports pending, running, complete, or failed. This status read, GET /v1/reingest/{run_id} and GET /v1/jobs have a rate limit of their own, 60 a minute per key and per project by default, so polling them does not use up the requests your writes need. Polling one event every two seconds uses half of it, so poll many events less often, or one after another. See Limits and errors. POST /v1/events/{event_id}/retry-extraction makes a failed or pending job due again. It counts as one ingest call.
Re-ingest runs in the background
POST /v1/reingest processes one user’s stored memories again, for example after an engine change, and replaces the claims derived from them. It never changes or deletes the original memories. The hosted service runs it as a background job, so the request answers at once:
- Send
{"user_id": "...", "dry_run": true}. The answer is a preview with counts and an estimated cost. Nothing is done or counted. - Send the same body with
"dry_run": false. The answer is202with arun_id. - Read
GET /v1/reingest/{run_id}untilstateiscompleteorfailed. Once every five seconds is enough.
A run takes up to 500 memories by default. Each memory it takes is one ingest call. A second run for the same user while one is working is 409 with reason_code reingest_running, and the body’s run_id is the run that is working (null when the service cannot name it), which GET /v1/reingest/{run_id} reads.
If you lose a run’s id, for example because the answer to the start never arrived, GET /v1/reingest?user_id=... answers the user’s newest run in the same shape as GET /v1/reingest/{run_id}, whether it is still working or has ended, so you can read how it ended or keep polling it by its run_id. The newest run is not always the one you lost: another caller, or the console, may have started a newer one for the same user since, and a start that wrote no run (nothing needed re-deriving, or the start was refused or never arrived) leaves an older one as the newest. Compare its started_at and scope with the start you sent before you treat it as that run. A user with no run in your project is 404 with reason_code reingest_run_not_found. It counts against the key’s ordinary request rate limit, so poll a working run by its id instead.
Organize and process runs that outlive the request
POST /v1/organize, POST /v1/extractions/process and POST /v1/materializations/process, and their MCP tools memory_organize, memory_process_extractions and memory_process_materializations, run a job for the project. A job works for its budget_ms (at most 30 seconds) and then finishes the step it started last, such as one model call, which can take a few minutes on a slow provider. A run locks the user_id it names: each user of a project runs one job at a time, and a run of one user does not refuse another user’s, so a loop over your users is not held up by one long run (the service may still run them one after another, so a later user’s request can also be answered 202). A job that names no user_id (an organize of the whole project, or memory_process_extractions, which takes no user_id) locks the whole project: it is refused while any user’s run is going, and every user’s run is refused while it is going. So it starts only when no user’s run is going: pause a loop over your users to run one.
Each server runs at most 4 job runs of one project at once. A job request past that, for example for a fifth user while four of the project’s users have runs going, is 503 with reason_code job_requests_busy and a Retry-After of 5 to 15 seconds. Nothing runs and nothing is counted, and the request is not queued. So a loop over your users should run at most 4 users at a time, and send a request answered job_requests_busy again after the seconds in its Retry-After. A run answered 202 is still going and still counts toward the 4, so wait for it to end before you start another user in its place.
- Most runs end within their budget, and the request answers as PRME’s route does.
- When a run is still going after about 45 seconds, the service answers before the connection times out:
202with the run’s status,{"run_id": "...", "job": "/v1/extractions/process", "state": "running", "started_at": "...", "finished_at": null, "user_id": "user-1"}, and aLocationof/v1/jobs?user_id=user-1(/v1/jobsfor a run over the whole project). Over MCP the tool’s result is the same status as JSON text, with adetailthat says the run goes on. The run is not cancelled: it goes on in the background and finishes its work. The request is counted as it would have been. Your client must wait at least 45 seconds for this answer; with a shorter timeout it gives up first, and the run goes on just the same. - A job request while a run of the same
user_id, or a run over the whole project, is still going, from any key of the project, is409withreason_codejob_running. So is a job request that names no user while any run of the project is still going. The answer carries the running run’s id asrun_idand aRetry-Afterheader: 15 seconds when the run is another request’s, and, when the run is one the service started on its own (below), the seconds until that run is expected to end, at most 30. Nothing runs and nothing is counted. Do not send a job request again after a timeout or a202until the run has ended. GET /v1/jobsanswers the project’s newest run in the same shape, whether it is still going or has ended, and starts nothing.GET /v1/jobs?user_id=user-1answers the newest run that user’s next job request would wait for: the user’s own run, or a run over the whole project, whichever started last.user_idin the answer is the user the run locks,nullfor the whole project.stateisrunninguntil the run ends, thensucceeded(its request ended with a2xxanswer and, over MCP, a tool result that is not an error) orfailed(it ended with an error, or the server running it stopped), withfinished_atset. Read it with theuser_idyour job request named (none for a request over the whole project), as the202’sLocationdoes: then a differentrun_idfrom the one you were given means your run ended and a newer one started. Withoutuser_idthe newest run can be another user’s, which says nothing about yours. The newest run can also be one the service started on its own (below): itsjobisautomatic_organize, never the path or tool name of a request, so it is not yours even when it has youruser_id. One that found your project’s engine busy does nothing and endssucceeded, and the service tries again later; it endsfailedwhen the organize failed or the service could not finish it, for example when a server stopped. A project (or, withuser_id, a user) that has run no job is404withreason_codejob_run_not_found. Once every five seconds is enough.
The run’s own answer, such as the counts an extraction run returns, is not kept. Read what a run did with the usual reads, such as GET /v1/events/{event_id}/extraction-status or GET /v1/stats.
The service also organizes your project on its own, so your memories are organized without an organize request. Every 10 minutes it looks for the users of your project whose memories are new or changed since it last organized them, and once a day it organizes every other user too, so decay and promotion still move. It runs an organize for one user at a time, for at most about 20 seconds, with every organize job except consolidate, and it leaves your project alone while any of your job runs is going and for 20 seconds after one ends, and after one of its own runs at least until 5 seconds past the Retry-After it gave a refused request. When a user’s organize does not fit in one run, as the first one of a user with many memories may not, it goes on with that user in further runs within the same 10 minutes, once the users with new or changed memories have had theirs, with the same 20 seconds between runs in your project. While it does, which can take a few hours for a user with many thousands of memories, a job request for that user, or one that names no user, meets 409 job_running more often than usual. Such a run locks its user as any run does: a job request for that user while it is going, or one that names no user, is 409 with reason_code job_running and its run_id, and GET /v1/jobs?user_id=... answers it with job automatic_organize. Its Retry-After is the seconds until that run is expected to end, at most about 23 at the start of a run: send the request again after that many seconds and it is admitted, unless one of your own runs that it overlaps has started in the meantime (for a request that names no user, any run of your project). A run that takes longer than expected refuses it once more with a short Retry-After, which grows each time the run is still going, up to 15 seconds. Compare run_id with the one your own request returned. Because the service keeps only the newest run of each user, GET /v1/jobs answers the automatic run, not your earlier one, once it has started; read what an automatic run did with GET /v1/auto-organize (below). A run that did nothing, because the engine was busy or the user had just been organized, is not in that answer: last_run keeps the run before it, and due_since stays set until a later run finishes. It makes no model call and is not counted against your monthly limits. You can still send POST /v1/organize whenever you like.
On the service, organize is incremental. The deduplicate and alias_resolve jobs look only at the memories created or changed since that job last finished for the same user_id, and a run that reaches its budget_ms first records where it stopped, so the next run goes on from there instead of starting over. This holds for your POST /v1/organize and memory_organize calls as well as for the automatic runs, and both share the same progress: once either has organized a user, the other looks only at what changed since. The other jobs look at all of the user’s memories every time. The first organize of a user after this change looks at all of their memories once. A job that the budget stopped can show "status": "budget_exhausted" and "stopped_on_budget": true in the run’s per_job answer; send the call again to let it continue. Items saved with POST /v1/ingest/fast become memories in the background. An organize looks only at the items that are already memories, and a later organize looks at the others once they are. To include them in an organize right after a fast ingest, first call POST /v1/materializations/process for that user_id until pending in its answer is no more than failed (pending counts the failed ones too, which are retried later).
To see when the service last organized a user’s memories, and what it did, call GET /v1/auto-organize?user_id=user-1. It starts nothing and counts as one request. The answer has user_id, due_since, last_run and failing_jobs:
{
"user_id": "user-1",
"due_since": null,
"last_run": {
"run_id": "8c2d4e6f-1a3b-4c5d-9e7f-0a1b2c3d4e5f",
"started_at": "2026-11-09T10:00:00Z",
"finished_at": "2026-11-09T10:00:04Z",
"outcome": "finished",
"error": null,
"duration_ms": 4012.5,
"jobs": [
{
"job": "deduplicate",
"nodes_processed": 60,
"nodes_modified": 1,
"errors": 0,
"duration_ms": 3990.5,
"details": { "duplicates_found": 2, "nodes_merged": 1 }
}
],
"jobs_skipped": [],
"pending_jobs": [],
"resumes": []
},
"failing_jobs": []
}last_runis the newest automatic organize of the user, ornullbefore the first one.outcomeisfinishedwhen every job of its pass ran,budgetwhen its time ran out first (the next run goes on withpending_jobs), orfailed(a later run tries again;errorsays why and never quotes a memory).jobslists each job that ran, in order, with the memories it looked at (nodes_processed) and changed (nodes_modified), itserrors, its time, and its own counts indetails.jobs_skippednames the jobs it did not run.resumeslists the jobs ofpending_jobsthat stopped on their time partway through the memories they look at, so the next run goes on from where they stopped, each withruns(the runs in a row that ran it and left it so),nodes_processed(the memories it looked at in the newest of them) andnodes_processed_total(in all of them); a failed run keeps what the run before it recorded, and the list is empty when no job stopped that way.due_sinceis when the service first found the user’s memories needing an organize that has not finished yet, ornullwhen nothing is waiting.failing_jobslists the jobs that stopped on an error in the latest runs that reached them while the other jobs worked, each withfailures(the runs in a row) andretry_after: from the third failure in a row the service leaves that job out until then (an hour, twice as long after each further failure, up to a day) and keeps running the user’s other jobs, andretry_afterisnullbefore that; a job leaves the list once a run that reaches it works, and the list is empty when no job is failing that way.- Organize requests you send yourself are not in it. The console’s memory explorer shows the same answer under a user’s memories.
Bounds on request size and work
The service holds a few parameters to a ceiling:
| Where | Allowed | Error |
|---|---|---|
limit on GET /v1/nodes | 0 to 1,000 | 422 limit_out_of_range |
budget_ms on organize and the two process routes | 0 to 30,000 | 422 budget_ms_out_of_range |
jobs on POST /v1/organize | at most 32 names | 422 jobs_too_many |
max_hops on the neighborhood route | 1 to 3 | 422 max_hops_out_of_range |
direction on the chain route | forward or backward | 422 direction_invalid |
limit on POST /v1/reingest | 1 to 20,000 | 422 limit_out_of_range |
entity_names on POST /v1/profiles/build | at most 20 names | 422 entity_names_too_many |
concepts on POST /v1/retrieve and the memory_retrieve tool | at most 200 words | 422 concepts_too_many |
user_id on organize, the two process routes and their MCP tools | at most 512 characters | 422 user_id_too_long |
| Request body | 256 KiB | 413 body_too_large |
Request body of POST /v1/ingest/fast and the learning batch routes | 4 MiB | 413 body_too_large |
| Time to send the request body | 10 seconds | 408 body_timeout |
| Time to send the body of a batch route or an MCP message | 30 seconds | 408 body_timeout |
content of one store or ingest | 32 KiB | 413 content_too_large |
A path segment, such as {event_id} or {node_id} | no encoded slash (%2F) | 404 path_invalid |
Profiles
A profile is what the memory knows about one person, in one record instead of a list of turns. It quotes the user’s stored memories that mention the person by name, whole and with their dates, up to about 500 tokens, and lists the memories it quotes. Profiles are built from stored memories only. Building one makes no model call, so it does not count toward the monthly ingest calls. A profile is also stored as a memory of the user, so retrieval can find it.
These two routes are the service’s own. They are not in the PRME HTTP API reference.
POST /v1/profiles/buildwith{"user_id": "...", "entity_names": ["Theo", "Nico"]}builds one profile per name and answers{"user_id": "...", "scope": null, "names": ["Theo", "Nico"], "published": 2, "kept_stale": [], "skipped": []}. Leave outentity_namesto profile the people that extraction found in the user’s memories, at most 20, the ones the most memories are about;namessays which. A memory is about a person when it mentions their name, or when it is a claim extraction linked to them, such as what they said about themselves. A user whose memories were stored without extraction has none, so name the people instead. Addscopeto build from one scope only; without it, each scope gets its own profiles. A name that fewer than two memories are about, in a scope, gets no profile there.GET /v1/profiles?user_id=...&name=Theoanswers the current profile:id,name,scope,text,sources(the ids of the memories it quotes),sources_available(how many memories are about the person),built_at, andstale. The name is compared without case. Addscopeto read one scope; without it, the newest profile of that name is returned. A user with no profile of that name gets404withreason_codeprofile_not_found.
A profile does not change when the user’s memories change. It keeps quoting a memory that was later archived or replaced, and it does not show newer ones. Build it again after new turns, for example at the end of a chat session, and after you archive a memory the profile quotes. The read tells you when it quotes a memory that is gone: stale is true when a memory in sources was archived, replaced, deprecated, deleted, or marked contested since the build, and a build quotes only active memories. A build that finds no memory short enough to quote keeps the profile as it was, so it stays stale. The build says so: kept_stale lists each profile it kept that way, as {"name": "Theo", "scope": "personal", "reason": "no_source_fits", "built_at": "..."}, with the kept profile’s built_at. When a build answers no_source_fits for a profile, stop rebuilding it on stale until the user’s memories change, for example when you store or archive a memory that mentions the name; until then every rebuild answers the same. GET /v1/profiles does not repeat the reason, so keep the build’s answer, and hold off only while the read still answers the same scope and built_at as the entry. A memory saved with fast ingest counts once it is processed, and the build cannot see changes your application did not make, so still rebuild such a profile now and then, for example once a day. A build refused with 422 profile_sources_too_many changes nothing either, and the profile stays stale; do not rebuild in a loop on stale alone. stale does not see newer memories, so a profile that is not stale can still miss recent turns. Search leaves out a profile that quotes a memory that was archived, replaced, or deleted, until a build replaces it; a profile whose memories are all still active is searched as before. A retrieve with mode explicit still returns a profile whose memory was archived or replaced rather than deleted. A build brings the profile back into search only when it publishes a new one, so a profile kept as no_source_fits, or one whose build is refused with 422 profile_sources_too_many, stays out of search until the user’s memories change. The console’s Profile panel shows the text too, and marks the profile Out of date when the memories it read show that one the profile quotes was archived, replaced, deprecated, deleted, or marked contested. Rebuild profile beside the mark builds that name only. For a user with more memories than the console reads, the panel cannot always tell, and it then marks the profile May be out of date; read stale to be sure. A rebuild replaces the profile, so there is one current profile of a name in a scope. A name is built under the spelling its profile already has, so theo rebuilds the profile of Theo. A rebuild that changes a profile gives it a new id and archives the old one. A rebuild that would change nothing keeps the profile with its id and built_at, and still counts it in published, including a profile that quotes claims extraction linked to the person, such as what they said about themselves; a profile not built or reinforced in the last day is built again anyway, because a profile counts for less in search as it ages. Memories saved with fast ingest are read once they are processed into memories.
Each call counts as one request. A build adds at most one memory per name and scope, so it is refused with 429 max_nodes_exceeded when the project is at its memory cap. One build per project runs at a time; another answers 409 profile_build_running, so send it again when the first one ends. When the server is already running as many builds as it can for other projects, the build waits a few seconds for its turn, and if none comes it gets the same 409 with at_capacity set to true in the body and a Retry-After header; send it again after that many seconds, since your build did not run. A project whose build was running when another project’s build was refused this way can get the same answer for its next build until that project’s retry has its turn. at_capacity is false when your project’s own build is the one running or waiting. A build can take up to a minute, longer than a 30 second client timeout. Give the call a timeout of at least 90 seconds; SDK releases after nenavi 0.1.0a2 (Python) and 0.1.0-alpha.2 (TypeScript) already wait that long for profiles.build() by default. A build is refused with 422 profile_sources_too_many when the user has more than 10,000 memories or 2,000,000 characters of text, or when the names appear in so much of it that the build would take too long; build fewer names at a time, or one scope at a time. A build without names stops adding people before it gets that far, so a profile of someone outside the people it built stays as it was until you name them. A build answers 409 profile_stale when a memory changed while it ran; send it again. A summary memory saved before the service reserved entity_profile, with an entity_profile value such as "yes" or 1 instead of true, would make every build of its name fail. A build that names that person is refused with 422 profile_metadata_invalid, and the body’s node_ids lists those memories; archive them with PUT /v1/nodes/{node_id}/archive and build again. A build without names leaves that person out, builds the rest, and lists the person in skipped, as {"name": "Theo", "reason": "profile_metadata_invalid", "node_ids": ["..."]}; archive the memories in node_ids the same way, and that person’s profile is built again on the next build. Archiving cannot be undone and takes the memory out of search, so check that your application no longer needs those memories first. The console’s Profile panel lists those memories in both cases, with a link to each one among the memories it read.
The memory graph
GET /v1/graph?user_id=... answers one user’s newest memories and the links between them. The console’s Memory tab reads it. nodes holds the newest memories first, each in the shape GET /v1/nodes answers. limit is 1 to 1,000, and 500 by default. edges holds the links whose two ends are both in nodes, at most 5,000, and edges_truncated is true when some were left out. node_total is how many memories the user has in the states read, and truncated is true when that is more than nodes holds. It reads the active states (tentative, stable, and contested). Add include_inactive=true to read superseded, deprecated, and archived memories too. It reads only and counts as one request.
Archived profiles are not in the graph. A rebuild archives the profile it replaces (see Profiles), so the archived profiles are often a user’s newest memories. With include_inactive=true, a user whose profiles were rebuilt many times used to get a page of old profiles, and their older memories fell out of it. Now GET /v1/graph leaves archived profiles out of nodes and out of node_total, with or without include_inactive, so the page holds the user’s other memories and node_total does not count archived profiles. Other archived memories are still read. To list a user’s archived profiles, call GET /v1/nodes?user_id=...&state=archived.
Concept maps
A question about “my dependents” or “the household” names a group of people, not a person, so text search alone may not find the memories about them. Retrieval can follow relations instead: the engine knows that a spouse is partner_of and a son is kin_of with the role child, and it routes a question that uses a word it knows to the memories those relations link. A concept map tells it what the words of your domain mean, so your users’ questions route to the right memories without your application rewriting them.
A concept map is a project setting. It maps each concept word to the relations it stands for. A relation is written alone (partner_of) or with a role after a colon (kin_of:child). A benefits assistant might use this map:
{
"dependents": ["partner_of", "kin_of:child"],
"household": ["partner_of", "kin_of"],
"beneficiaries": ["partner_of", "kin_of:child", "kin_of:parent"],
"employer": ["works_at"]
}With it, “What are the names of my dependents?” routes to the user’s spouse and children, and “Who is in my household?” to their spouse and every relative.
To set the map, open the project in the console, go to Settings, and fill in the Concepts table: one row per concept, with its relations separated by commas. Only an owner of the organization can change it; a member can read it. A saved map reaches the API within a minute.
The rules:
- A concept is one word of letters, digits and apostrophes, such as
dependents. Two words with the same singular, such aschildandchildren, are one concept, so keep one of them. - Each relation must be one of the engine’s relations:
allergic_to,decided,friend_of,involved_in,kin_of,lives_in,located_in,manager_of,member_of,owns,part_of,partner_of,prefers,uses,visitsandworks_at.GET /v1/relationsgives each one’s definition. A role is one word, such aschildorsister. The rolechildalso matches a son or a daughter;GET /v1/relationslists these role groups. - A project can map at most 200 concepts, and the map can be at most 64 KB.
- A map that breaks a rule is not saved, and the message names the concept and the relation that is wrong.
An engine update can stop accepting a word you saved earlier, for example when it retires a relation. Retrieval then stops using your relations for that word (a word the engine has a meaning of its own for, such as spouse, falls back to that meaning), and the project’s other words keep routing; retrieves never fail because of it. The Concepts section lists each such word with the reason, and we tell the owners of the projects affected. Change or remove the word and save.
The engine has a few concepts of its own, such as dependents, family, spouse, children and home. A word in your map adds to them, and a word that is already built in takes your relations instead.
The map is used on every POST /v1/retrieve and every memory_retrieve MCP call of the project. A request can still send its own concepts in the same shape, at most 200 words; for each word it sends, it replaces the project’s word with the same singular, and the project’s other words still apply. The retrieval receipt (GET /v1/retrievals/{request_id}?user_id=...) records the concepts the question used and the route it took, under execution.features.relation_routing. A question that no concept, people word or relation word routes is ranked as before.
GET /v1/relations answers what a map may use, and needs no key:
relations: each relation’sname, thekindsof thing it links, and itsdefinitionroles: the role words that stand for a group, such aschildfor a son or a daughterconcepts: the built-in conceptsrouting_version: the version of the routing rule that receipts record
Retries
POST /v1/storeandPOST /v1/ingestare not safe to retry. A retry stores the text again.POST /v1/ingest/fastwith anIdempotency-Keyis safe to retry. See the quick start.- A
503withreason_codedatabase_unavailableorlease_unavailablemeans the service was busy or a database was waking up. Wait a moment and send the request again. - A
409withreason_codejob_runninganswers organize, extraction processing, materialization processing, or one of their MCP tools while a run it overlaps is still going: a run of the sameuser_id, a run over the whole project, or, for a request that names no user, any run of the project. Nothing ran. ReadGET /v1/jobs(with the request’suser_id) until the run has ended, or wait the seconds in theRetry-Afterheader, then send the request again. See Organize and process runs that outlive the request. - A
503withreason_codejob_requests_busyanswers organize, extraction processing, materialization processing, or one of their MCP tools when the server is already running such requests for as many projects as it can at once, or already has 4 runs of your project going. Nothing ran. Wait the seconds in theRetry-Afterheader and send the request again. See Organize and process runs that outlive the request. - A
503with noreason_code, often with an HTML body, comes from the load balancer in front of the service when no server can answer. The service runs more than one server, so one server restarting does not cause it, but an outage that stops every server can last a few minutes. Send the request again later if it is safe to retry. - A
429with aRetry-Afterheader means you hit a rate limit. Wait that many seconds. On a status read, it is the status reads’ own limit, and your other calls are not affected.
The Python and TypeScript SDKs follow these rules for you:
- They retry by themselves every
GETcall andPOST /v1/ingest/fast, which they always send with anIdempotency-Keyand the same key on every retry. They retry a429rate_limitedafter theRetry-Afterseconds, a503database_unavailableorlease_unavailable, a503with noreason_code, and a request that got no answer, at most twice by default. Without aRetry-Afterheader the retries span about a second and a half, so a longer interruption, such as an outage that stops every server, still reaches your code as an error. - They never retry
POST /v1/store,POST /v1/ingest,POST /v1/retrieve(each call writes a retrieval receipt), or any other call that is not aGET, apart from fast ingest. They never retry a timeout, a429for a monthly limit or the memory cap, a429or503whoseRetry-Afteris more than 60 seconds, or any other error.
What the service keeps
- Your memory is kept in a private space for the project. Deleting a project revokes its keys within a minute, or about two if the service briefly cannot reach its database. Its memory is scheduled for removal after seven days. In the alpha, the team runs that removal by hand, so it can take longer. To restore a project within the seven days, use the contact address on the privacy page .
- Keys are stored only as a hash.
- Logs have one line per request with the method, path, status, duration, and project. They never contain request or response bodies or keys. Your
user_idis logged only as a hash. - Usage counts are kept per project and per day, as numbers. See Limits and errors.