HTTP operations
Customer backend operations by origin, method, path, credential and request fields.
Choose the origin before you build a request. Identity tokens, platform metadata and inference are served at different addresses. All operations below use a server-side bearer access token. IDs in braces are path parameters; replace the braces and their contents.
Download the inference OpenAPI contract · Download the platform OpenAPI contract
Inference URL
Section titled “Inference URL”Use the URL from the endpoint’s Connect tab. See chat requests and streaming for response examples and the success marker.
Create a chat completion
Section titled “Create a chat completion”POST /v2/organizations/{organization_id}/endpoints/{endpoint_id}/chat/completions
Submit one logical generation with your retained key. Returns a completion or, with stream: true, server-sent events.
Caller: Endpoint credential or authorized Application.
Parameters: Idempotency-Key (header, required).
JSON fields: model (required), messages (required), max_tokens (required), stream, temperature, top_p, smol_context, smol_context_mode.
Success: 200.
Read gateway request status
Section titled “Read gateway request status”GET /v2/organizations/{organization_id}/endpoints/{endpoint_id}/requests/{request_id}
Inspect retained status on the inference origin using the Smol request ID. This does not generate or replay an answer.
Caller: Endpoint credential or authorized Application.
Success: 200.
Platform API origin
Section titled “Platform API origin”Use the environment’s platform API address, not the console or inference address. See Context Space requests for a complete write/read example.
Read endpoint integration
Section titled “Read endpoint integration”GET /v2/organizations/{organization_id}/endpoints/{endpoint_id}/integration
Use the returned inference URL and exact model. A missing URL does not indicate a callable endpoint.
Caller: Endpoint credential or authorized Application.
Success: 200.
List endpoint activity
Section titled “List endpoint activity”GET /v2/organizations/{organization_id}/endpoints/{endpoint_id}/requests
Newest first. Continue with the returned cursor and the same endpoint. Machine identities see their own requests.
Caller: Endpoint credential or authorized Application.
Parameters: limit (query), cursor (query).
Success: 200.
Inspect a request
Section titled “Inspect a request”GET /v2/organizations/{organization_id}/endpoints/{endpoint_id}/requests/{request_id}
Reads retained metadata, not the original prompt or answer. Check execution and delivery separately.
Caller: Endpoint credential or authorized Application.
Success: 200.
Recover a request ID
Section titled “Recover a request ID”POST /v2/organizations/{organization_id}/endpoints/{endpoint_id}/requests/lookup
Read-only lookup by the caller’s workload ID and original request key. A missing result does not authorize replay.
Caller: Endpoint credential or authorized Application.
JSON fields: idempotency_key (required), workload_id (required).
Success: 200.
List accessible spaces
Section titled “List accessible spaces”GET /v1/organizations/{organization_id}/lineages
Returns spaces granted to this Application. No inference endpoint is required.
Caller: Application.
Success: 200.
Inspect a space
Section titled “Inspect a space”GET /v1/organizations/{organization_id}/lineages/{lineage_id}
Read the space name, status, admitted content count and policy version.
Caller: Application with a Context Space grant.
Success: 200.
Add content
Section titled “Add content”POST /v1/organizations/{organization_id}/lineages/{lineage_id}/artefacts
Submit text or JSON; retain the returned handle. Labels must match if the same content already exists.
Caller: Application with a Context Space grant.
JSON fields: artefact_type (required), content (required), labels.
Success: 201.
Read content by handle
Section titled “Read content by handle”GET /v1/organizations/{organization_id}/lineages/{lineage_id}/artefacts
URL-encode the complete handle. Returns the admitted content and admission metadata.
Caller: Application with a Context Space grant.
Parameters: handle (query, required).
Success: 200.
Prepare a request snapshot
Section titled “Prepare a request snapshot”POST /v1/organizations/{organization_id}/lineages/{lineage_id}/requests
Bind a task and selected handles under a retained Idempotency-Key. This prepares context; it does not generate an answer.
Caller: Application with a Context Space grant.
Parameters: idempotency-key (header, required).
JSON fields: handles (required), task (required).
Success: 201.
Read a snapshot request
Section titled “Read a snapshot request”GET /v1/organizations/{organization_id}/requests/{request_id}
Inspect the caller’s retained preparation. This is not an inference request lookup.
Caller: Application with a Context Space grant.
Success: 200.
List named sources
Section titled “List named sources”GET /v1/organizations/{organization_id}/lineages/{lineage_id}/sources
Read the source IDs and version information for a space. Keep the same scope and page size when following a cursor.
Caller: Application with a Context Space grant.
Parameters: limit (query), cursor (query).
Success: 200.
Register a source
Section titled “Register a source”POST /v1/organizations/{organization_id}/lineages/{lineage_id}/sources
Name content already admitted to this space. Keep the returned source ID to publish later versions.
Caller: Application with a Context Space grant.
JSON fields: handle (required), name (required).
Success: 201.
Publish a source version
Section titled “Publish a source version”POST /v1/organizations/{organization_id}/lineages/{lineage_id}/sources/{source_id}/versions
Supply the new admitted handle and the current expected version. Reload if another writer changed the source.
Caller: Application with a Context Space grant.
JSON fields: expected_version (required), handle (required).
Success: 201.
List prepared evidence
Section titled “List prepared evidence”GET /v1/organizations/{organization_id}/lineages/{lineage_id}/evidence
Inspect preparation status before consuming an outcome.
Caller: Application with a Context Space grant.
Parameters: limit (query), cursor (query).
Success: 200.
Inspect evidence
Section titled “Inspect evidence”GET /v1/organizations/{organization_id}/lineages/{lineage_id}/evidence/{evidence_id}
The result includes preparation metadata and the output when available.
Caller: Application with a Context Space grant.
Success: 200.
Use prepared evidence
Section titled “Use prepared evidence”POST /v1/organizations/{organization_id}/lineages/{lineage_id}/evidence/{evidence_id}/consume
Uses a prepared result without a new generation. Supply a stable key in the body. Stale results are rejected by default.
Caller: Application with a Context Space grant.
JSON fields: allow_stale, idempotency_key (required).
Success: 200.
Read evidence activity
Section titled “Read evidence activity”GET /v1/organizations/{organization_id}/lineages/{lineage_id}/evidence-activity
Retrieve scoped source and evidence activity; follow the returned cursor when present.
Caller: Application with a Context Space grant.
Parameters: limit (query), cursor (query).
Success: 200.