Create an inference
POST /v1/inferences — answer using the subject's active adapter and only the messages you send.
Requires the inference scope and an Idempotency-Key. Inference is asynchronous: the admission response contains a job ID, and the completed answer is retrieved from that job.
Customer scope
Supply optional tenant_id in the body or X-Internalize-Tenant in the headers. If both are present they must match. A tenant-restricted key supplies its own tenant when omitted and rejects another tenant. Without either, an unrestricted key uses the separate project namespace. Use the same tenant for learning, inference, job reads, and version changes. See Serve multiple customers.
Request
{
"subject_id": "support-policy",
"messages": [
{
"role": "system",
"content": "Answer clearly and do not invent policy details."
},
{ "role": "user", "content": "Who pays for a return label?" }
],
"max_output_tokens": 2048,
"temperature": 0
}| Field | Type | Default | Constraint |
|---|---|---|---|
subject_id | string | Required | Valid subject ID |
messages | array | Required | 1–64 messages; final turn must be a user or completed tool-result block |
messages[].role | string | Required | system, user, assistant, or tool |
messages[].content | string | Required | At most 16,000 units; may be empty for tool-call messages or tool results |
max_output_tokens | integer | 2048 | 1–4096, including reasoning |
temperature | number | 0 | Between 0 and 1 |
Serialized messages and tools together must fit 64,000 string-length units. Native messages use string content, including tool results and assistant tool_calls. Optional tools, tool_choice, parallel_tool_calls, and response_format follow the supported Chat Completions fields. adapter_version pins a retained version for this subject, or explicitly selects base. Omit it to use the active version. Images, audio, model, and stream are not accepted on this native endpoint.
Context and memory
Send the question, relevant instructions, and any conversation history the application needs. Internalize does not store an implicit conversation thread and append earlier messages for you. An assistant message in the array is history supplied by your application, not a request to generate an answer twice.
For knowledge already internalized into the active adapter, leave the original learning passage out of these messages. The adapter supplies learned behavior. If you reinsert the source, you are evaluating a context-assisted answer rather than source-free learned behavior.
Routing
At admission, the platform resolves the subject's current active version and records it on the job. If a new version activates a moment later, the already-admitted inference keeps its original snapshot.
A new subject starts from base. An existing subject whose active adapter has expired fails with adapter_expired; it does not silently start over. Use adapter_version to pin a retained version or clean base explicitly; there is no automatic fallback model.
Response and completion
{ "id": "YOUR_JOB_ID", "status_url": "/v1/jobs/YOUR_JOB_ID" }Poll until the job settles. For status: "succeeded", read result.text, result.finish_reason, adapter_version, and usage. A finish reason can indicate the output ceiling was reached, so a transport-level success does not imply an untruncated answer. Inspect the result before displaying it as complete.
The output limit covers generated reasoning as well as visible answer tokens. The API does not return raw reasoning. A very low ceiling can leave little room for a final answer even when the visible response looks short.
Cost and recovery
Input tokens cost 12 micro-USD each, output including reasoning costs 30, and verified cached input costs 2.5. Cached tokens replace, rather than add to, ordinary input charges. Admission reserves a conservative input bound plus the maximum output allowance. Final settlement uses measured tokens and releases the unused reservation. If generation occurred but answer extraction failed, known usage can still be charged.
A failed HTTP connection does not prove no generation occurred. Recover with the same idempotency key and payload, then poll the original job. See Billing for arithmetic and Polling for a durable integration pattern.