API reference · API
Distill this key's captured traffic into a small fine tuned model
POST/v1/distillAPI key
Chat scope. The training is held on a funded balance at the provider's published price per training token times tokens times epochs, marked up; then the training file is uploaded. Settled at the provider's estimate, never above the hold; released on failure. 402 insufficient_credits for an unfunded account or a balance short of the hold; 409 with code dataset_too_small for a thin window. A 404 at every path while the operator has not turned distillation on.
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| key_idrequired | integer | The key whose captures are read. Over /v1/distill it is always the calling key. At most 9007199254740991. |
| teacherrequired | string | The model whose answers are learnt: captured requests it answered with a 2xx. At most 200 characters. |
| base_modelrequired | string | The base model trained: meta-llama/Meta-Llama-3.1-8B-Instruct-Reference, Qwen/Qwen3.5-9B, openai/gpt-oss-20b, Qwen/Qwen3.5-27B, meta-llama/Llama-3.3-70B-Instruct-Reference. At most 200 characters. |
| fromrequired | integer | The window's start, unix seconds; the window is at most 30 days wide. From 0 to 9007199254740991. |
| torequired | integer | The window's end, unix seconds. From 0 to 9007199254740991. |
| holdout | number | The newest share held out for the proof, 0.1 unless set. From 0.05 to 0.3. |
| epochs | integer | Passes over the training set, 3 unless set. From 1 to 10. |
| name | string | At most 80 characters. |
| compare | object | How the proof compares answers: auto unless set, or embedding or judge with a model you name, billed. |
| compare. | string | One of "auto", "embedding", "judge". |
| compare. | string | At most 200 characters. |
Example
{
"key_id": 0,
"teacher": "string",
"base_model": "string",
"from": 0,
"to": 0
}Answer 201
The distillation.
| Field | Type | What it is |
|---|---|---|
| id | string | |
| object | "distill.job" | |
| world | string | antimatter/distilled/<id>, nameable by the owner's keys only. |
| teacher | string | |
| base_model | string | |
| status | any | One of "uploading", "validating", "training", "completed", "failed", "cancelled". |
| training | object | |
| loss | array of object | |
| loss[] | any | One of "train", "eval". |
| loss[] | integer | |
| loss[] | number | |
| world_state | object | |
| world_state. | any | One of "dark", "lighting", "lit", "darkening". |
| world_state. | integer or null | |
| world_state. | integer or null | |
| world_state. | integer | |
| proof | object or null | Agreement on the held out slice with its 95% Wilson interval, latency beside the teacher's, and a request's cost before and after at the key's own rate. |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 402OpenAI shaped error.
- 403OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
- 429Rate limited, or a spent budget or spend cap. The type distinguishes rate_limit_error, policy_exceeded, and spend_cap_exceeded.
- 502OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.