Publish an edit as the pack's next immutable version
const url = 'https://api.vocapable.com/v1/knowledge-packs/example/versions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"sources":[{"kind":"pdf","label":"example","text":"example","uri":"example"}],"compiled_token_count":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.vocapable.com/v1/knowledge-packs/example/versions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "sources": [ { "kind": "pdf", "label": "example", "text": "example", "uri": "example" } ], "compiled_token_count": 1 }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”POST /v1/knowledge-packs/{id}/versions - publish an edit as a new version.
compiled_token_count is measured by whatever compiled the pack - the distillation
job, or the authoring editor’s live token meter. The control plane holds no model
tokenizer (the tokenizer lives with the serving model on the GPU plane), so it
validates the declared count against the budget rather than recomputing it. The count
is checked, never clamped: over the hard cap the request is refused and no version is
written.
object
One distilled section of a pack, plus where it came from.
text is the artifact, not a summary of one: knowledge_pack_versions carries
sources and no separate body column, so these sections are the compiled pack.
Phrase them spoken-answer-ready - short declaratives an agent can say verbatim.
Responses
Section titled “Responses”Successful Response
A compiled version. Immutable once ready - an edit is the next version.
object
One distilled section of a pack, plus where it came from.
text is the artifact, not a summary of one: knowledge_pack_versions carries
sources and no separate body column, so these sections are the compiled pack.
Phrase them spoken-answer-ready - short declaratives an agent can say verbatim.
Compiled above the 8k default budget but inside the 16k hard cap.
Permitted, and worth telling the tenant: a cap-size pack roughly doubles cold prefill and halves the number of warm pack prefixes a node holds.
Example
{ "status": "compiling", "sources": [ { "kind": "pdf" } ]}Validation Error
object
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}