Collections and compile

A compile carries up to 12 documents; a run carries up to 128.

A compile takes between 1 and 12 documents. That is one Core request and one artifact, and it is not the limit on how much you can compile: a selection larger than that is partitioned server-side into parts of that size and answered as a corpus, up to 128 documents in one run.

Corpora and their parts

Each part of a corpus is an ordinary compile job with its own id, state and event stream. The parts are not merged into one World: deciding that an entity in one part and an entity in another are the same thing is identity resolution with its own evidence requirements, and joining the ontologies without it would manufacture duplicates.

Starting a compile and reading a corpus

POST/compile-jobsScope collections:compile

Records the intent to compile and returns immediately. The job advances on the server whether or not the caller stays connected, which is the difference between this and /v1/collections/compile. Submitting the same document set again returns the job that already exists rather than starting a second compile. A selection larger than one compile can carry is partitioned server-side into parts and answered with COMPILE_CORPUS_ACCEPTED and a corpusId instead of a jobId; each part is an ordinary compile job with its own id, state and event stream.

curl -sS -X POST https://tavonel.com/api/compile-jobs \
  -H "Authorization: Bearer $TAVONEL_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "documentIds": [ "<documentIds>" ] }'
Request body
{
  "documentIds": [
    "<documentIds>"
  ]
}
StatusResponse
202Accepted. A single job returns { code: COMPILE_JOB_ACCEPTED, jobId, state, documentsTotal }; a partitioned selection returns { code: COMPILE_CORPUS_ACCEPTED, corpusId, batchCount, parts } instead, and each part is an ordinary compile job with its own id. Location names whichever resource was created.
400DOCUMENT_IDS_REQUIRED — The request carried no document id array. DOCUMENT_SET_EMPTY — Nothing was selected to compile. DOCUMENT_SET_UNQUALIFIED — A value in documentIds was not a document id. CORPUS_TOO_LARGE — More documents than one run carries. SPLIT_PART_LIMIT_EXCEEDED — Partitioning the selection would make more parts than a run holds. INVALID_JSON — The body was not parseable JSON.
401AUTH_REQUIRED — No credential was presented, or the bearer token is not a key TAVONEL issued. This is what an unauthenticated request to any scoped route returns.
402STUDIO_SUBSCRIPTION_REQUIRED — The operation needs the higher plan tier — activation, rollback and retrieval-index rebuild are the three. TRIAL_WORLD_LIMIT_REACHED — The free evaluation's compiled-World count is spent. GPU_CREDITS_REQUIRED — The workspace has no processing balance left to reserve against.
403API_SCOPE_REQUIRED — The key authenticated and does not carry the scope this operation requires. The request was refused rather than answered with less. PILOT_ACCESS_REQUIRED — The credential is valid and the workspace it names is not admitted to TAVONEL.
409COMPILE_JOB_SLOT_CONFLICT — A part of this corpus is already held by a job over a different document set. Retrying does not clear it. SOURCE_VERSION_AMBIGUOUS — Two source versions carry the same identity and the request did not say which.
415METADATA_ONLY_ENDPOINT — Document bytes were POSTed to a route that accepts only metadata. Bytes go direct to storage, never through the application server.
429API_RATE_LIMITED — The key has used its per-minute allowance for this scope. The window is a fixed clock minute per key and scope; the allowances are on /docs/billing-and-limits. WORKSPACE_CONCURRENCY_LIMIT — The workspace already has as many compiles in flight as it may. COMPILE_JOB_WORKSPACE_LIMIT_REACHED — The workspace is at its compile-job ceiling.
503COMPILE_JOB_STORE_NOT_CONFIGURED — The durable job store is not configured. COMPILE_JOB_STORE_WRITE_FAILED — The durable job store could not be written, so the intent was not recorded. COMPILE_JOB_RPC_UNDEFINED — The job store is missing a procedure this build expects — a deployment mismatch.
GET/compile-jobs/corpus/{corpusId}Scope collections:read

A partitioned run, summarised from its parts. There is no stored roll-up: the state is computed from the part rows every time, so it cannot disagree with them. `partial` means some parts compiled and at least one did not -- the Worlds that exist are usable, and reporting that as ready would hide missing sources.

curl -sS -X GET https://tavonel.com/api/compile-jobs/corpus/{corpusId} \
  -H "Authorization: Bearer $TAVONEL_API_KEY"
StatusResponse
200Corpus state, part list and aggregate progress.
400CORPUS_ID_INVALID — The corpus id did not match corpus-<32 hex>.
401AUTH_REQUIRED — No credential was presented, or the bearer token is not a key TAVONEL issued. This is what an unauthenticated request to any scoped route returns.
404NOT_FOUND — The addressed resource does not exist in this workspace. Deliberately uniform across tenants: the same answer for an id that is not yours and an id that is nobody's.
503COMPILE_JOB_STORE_READ_FAILED — The durable job store could not be read.
POST/collections/compileScope collections:compile

Compiles a single document set and waits for the artifact. Bounded to what one compile carries; a larger selection belongs on POST /compile-jobs, which partitions it server-side and survives a closed tab. The result is a candidate: `candidatePromotion` is always false, because activation is a human decision in a signed-in session and no key holds it.

curl -sS -X POST https://tavonel.com/api/v1/collections/compile \
  -H "Authorization: Bearer $TAVONEL_API_KEY" \
  -H "content-type: application/json" \
  -d '{ "documentIds": [ "<documentIds>" ] }'
Request body
{
  "documentIds": [
    "<documentIds>"
  ]
}
StatusResponse
200An immutable candidate package receipt. candidatePromotion is always false.
400DOCUMENT_IDS_REQUIRED — The request carried no document id array. DOCUMENT_SET_EMPTY — Nothing was selected to compile. DOCUMENT_SET_UNQUALIFIED — A value in documentIds was not a document id. DOCUMENT_SET_TOO_LARGE — More documents than one compile carries were sent to the single-compile route. INVALID_JSON — The body was not parseable JSON.
401AUTH_REQUIRED — No credential was presented, or the bearer token is not a key TAVONEL issued. This is what an unauthenticated request to any scoped route returns.
402STUDIO_SUBSCRIPTION_REQUIRED — The operation needs the higher plan tier — activation, rollback and retrieval-index rebuild are the three. TRIAL_DURABLE_COMPILE_REQUIRED — The free evaluation compiles through the durable job route only. GPU_CREDITS_REQUIRED — The workspace has no processing balance left to reserve against.
403API_SCOPE_REQUIRED — The key authenticated and does not carry the scope this operation requires. The request was refused rather than answered with less. PILOT_ACCESS_REQUIRED — The credential is valid and the workspace it names is not admitted to TAVONEL.
409OCR_NOT_READY — The sources have not finished being read. SOURCE_VERSION_AMBIGUOUS — Two source versions carry the same identity and the request did not say which.
415METADATA_ONLY_ENDPOINT — Document bytes were POSTed to a route that accepts only metadata. Bytes go direct to storage, never through the application server.
429API_RATE_LIMITED — The key has used its per-minute allowance for this scope. The window is a fixed clock minute per key and scope; the allowances are on /docs/billing-and-limits. WORKSPACE_CONCURRENCY_LIMIT — The workspace already has as many compiles in flight as it may.
503CORE_NOT_CONFIGURED — The compile runtime is unavailable. The request was not charged. CORE_UNAVAILABLE — The compile runtime was reachable and did not answer.

Picking a run back up

A client that lost its job id does not have to start again: the workspace's recent compiles are listable, newest first.

GET/compile-jobsScope collections:read

The workspace's recent compiles, newest first, so a client that lost its job id can pick a run back up. Takes no paging parameters.

curl -sS -X GET https://tavonel.com/api/compile-jobs \
  -H "Authorization: Bearer $TAVONEL_API_KEY"
StatusResponse
200{ code: OK, jobs }, newest first.
401AUTH_REQUIRED — No credential was presented, or the bearer token is not a key TAVONEL issued. This is what an unauthenticated request to any scoped route returns.
403API_SCOPE_REQUIRED — The key authenticated and does not carry the scope this operation requires. The request was refused rather than answered with less. PILOT_ACCESS_REQUIRED — The credential is valid and the workspace it names is not admitted to TAVONEL.
429API_RATE_LIMITED — The key has used its per-minute allowance for this scope. The window is a fixed clock minute per key and scope; the allowances are on /docs/billing-and-limits.
503COMPILE_JOB_STORE_READ_FAILED — The durable job store could not be read. COMPILE_JOB_STORE_NOT_CONFIGURED — The durable job store is not configured.

Submitting the same set twice

Note Submitting the same document set again returns the job that already exists. A retried request, a double-clicked button and an at-least-once redelivery converge on one compile. Idempotency here is derived from the document set rather than from an Idempotency-Key header: there is no such header on this API, and a client expecting the Stripe convention should send the same set rather than a key.

API version 2026-09-02.1 · reviewed 11 September 2026

Something here out of date or wrong? Report an issue with this page.