{"openapi":"3.1.0","info":{"title":"DecisionOne workbench","description":"Native decisions, immutable datasets, adaptation and shared-base deployment. Authenticate with `Authorization: Bearer d1_sk_...` when accounts are on. A short guide for coding agents is at /llms.txt.","version":"0.1.0"},"paths":{"/v1/labeling/teachers":{"get":{"tags":["Labeling"],"summary":"List teacher models and whether labelling is on","operationId":"listTeachers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/sources":{"post":{"tags":["Labeling"],"summary":"Upload unlabelled queries as JSONL","operationId":"uploadLabelingSource","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","default":"Uploaded queries","title":"Name"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"requestBody":{"required":true,"description":"One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}}},"get":{"tags":["Labeling"],"summary":"List your query sources","operationId":"listLabelingSources","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/sources/{source_id}":{"get":{"tags":["Labeling"],"summary":"Get one query source","operationId":"getLabelingSource","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/jobs":{"post":{"tags":["Labeling"],"summary":"Ask teacher models to label a source","operationId":"createLabelingJob","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelJobCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Labeling"],"summary":"List your labelling jobs","operationId":"listLabelingJobs","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["queued","running","cancelling","review_ready","finalized","failed","cancelled"],"type":"string"}},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/jobs/{job_id}":{"get":{"tags":["Labeling"],"summary":"Get one labelling job","operationId":"getLabelingJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/jobs/{job_id}/results":{"get":{"tags":["Labeling"],"summary":"Page through teacher labels for review","operationId":"listLabelingResults","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/jobs/{job_id}/cancel":{"post":{"tags":["Labeling"],"summary":"Ask a labelling job to stop","operationId":"cancelLabelingJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/labeling/jobs/{job_id}/finalize":{"post":{"tags":["Labeling"],"summary":"Turn the rows you accepted into a dataset","operationId":"finalizeLabelingJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FinalizeLabels"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/prompt-tuning/jobs":{"post":{"tags":["Prompt tuning"],"summary":"Start tuning one decision's wording","description":"Start tuning one decision's wording. The job page shows its progress.","operationId":"createPromptTuningJob","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptTuningCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"get":{"tags":["Prompt tuning"],"summary":"List your prompt-tuning jobs","operationId":"listPromptTuningJobs","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"type":"string"}},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/prompt-tuning/jobs/{job_id}":{"get":{"tags":["Prompt tuning"],"summary":"Get a job, with its tested result when done","operationId":"getPromptTuningJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/prompt-tuning/jobs/{job_id}/cancel":{"post":{"tags":["Prompt tuning"],"summary":"Ask a prompt-tuning job to stop","operationId":"cancelPromptTuningJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/auth/config":{"get":{"tags":["Accounts"],"summary":"Which sign-in methods and referral rules are on","operationId":"getAuthConfig","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/auth/logout":{"post":{"tags":["Accounts"],"summary":"End the browser session","operationId":"logout","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account":{"get":{"tags":["Accounts"],"summary":"Your account, waitlist place, referrals and credits","operationId":"getAccount","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/usage":{"get":{"tags":["Accounts"],"summary":"Daily usage, errors and server time, against the period before","description":"Daily usage and exact USD costs, with model and API-key breakdowns.\n\nUTC days, today included, with the preceding period for comparison.\nrequests counts successes; total_requests includes recorded 4xx/5xx failures.\ncost_usd is an exact decimal string. Key metadata never contains credentials.","operationId":"getUsage","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/usage/requests":{"get":{"tags":["Accounts"],"summary":"Completed requests, including fallback model and reason","description":"Completed request metadata, newest first, within inclusive UTC dates.\n\nRetained for 90 days; older usage has daily aggregates only. No prompts or\nanswers or credentials. Includes required cost_usd and non-secret API-key identity.\nA successful fallback includes both model versions and its reason.","operationId":"listUsageRequests","parameters":[{"name":"start","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Start"}},{"name":"end","in":"query","required":true,"schema":{"type":"string","format":"date","title":"End"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/keys":{"get":{"tags":["Accounts"],"summary":"List your API keys","operationId":"listApiKeys","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Accounts"],"summary":"Create an API key, shown once in the response","operationId":"createApiKey","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/account/keys/{key_id}":{"delete":{"tags":["Accounts"],"summary":"Revoke an API key","operationId":"revokeApiKey","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/early-access":{"post":{"tags":["Accounts"],"summary":"Ask to try a model that is in early access","description":"Ask to try a model we cannot serve to everyone yet. Waitlisted people may ask too.","operationId":"requestEarlyAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarlyAccess"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/early-access":{"get":{"tags":["Admin"],"summary":"List requests for early access","operationId":"listEarlyAccessRequests","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/users":{"get":{"tags":["Admin"],"summary":"List users, with the waitlist in queue order","operationId":"listUsers","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(waitlisted|active|blocked)$"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/users/{user_id}/admit":{"post":{"tags":["Admin"],"summary":"Let someone in from the waitlist","operationId":"admitUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/users/{user_id}/block":{"post":{"tags":["Admin"],"summary":"Block an account","operationId":"blockUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/admin/credits":{"post":{"tags":["Admin"],"summary":"Add or remove credits for a user","operationId":"grantCredits","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditGrant"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/healthz":{"get":{"summary":"Check the server is up","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["System"]}},"/v1/decisionone":{"get":{"summary":"List models, recipes and limits, and whether training is on","operationId":"discover","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["System"]}},"/v1/recipes":{"get":{"summary":"List the ready-made decisions, without signing in","description":"The ready-made decisions, without their labelled examples. Public, so people can\ntry every one in the playground before they sign in.","operationId":"listRecipes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/models":{"get":{"summary":"List base models, your adapters and your named models","operationId":"listModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{model_id}":{"get":{"summary":"Get a model, or a named model with its versions","operationId":"getModel","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{model_id}/ready":{"get":{"summary":"Check whether this model can run decisions now","operationId":"getModelReadiness","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{model_id}/deploy":{"post":{"summary":"Load and check an adapter","operationId":"deployModel","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{name}/promote":{"post":{"summary":"Make a version the production version","operationId":"promoteModel","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Promote"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{name}/rollback":{"post":{"summary":"Swap production with the previous version","operationId":"rollbackModel","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{name}/keep-warm":{"post":{"summary":"Keep the production version loaded between requests","operationId":"keepModelWarm","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepWarm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{name}/wake":{"post":{"summary":"Start loading a version that is asleep","description":"Start loading an asleep version: a named model's production version, or a\nversion such as router@3. It answers at once, and calling it again is harmless;\nGET /v1/models/{name} shows each version's state.","operationId":"wakeModel","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/models/{name}/learning":{"post":{"summary":"Train a new version after enough new labelled decisions","description":"Train the next version after `after` new labelled decisions, and promote it if\n`auto_promote` and it passes the gate. {\"enabled\": false} turns it off. learning.py.","operationId":"keepModelLearning","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Learning"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Models"]}},"/v1/admin/engines":{"get":{"summary":"List the GPU engines in every pool, and which take requests","description":"Every engine in every pool, and whether it takes requests now.","operationId":"listEngines","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Admin"]}},"/v1/engines/status":{"get":{"summary":"Each pool's engines and their load, with the engine token","description":"Each pool's engines and how busy they are, for the pool keeper (docs/serving.md,\n\"Keeping enough engines\"), and how fresh the backups are, for the watchdog\n(docs/deploy.md, \"Alerts\"). Read-only, and it takes the engine token, which the keeper\nholds anyway to give to the engines it starts, so the keeper needs no admin account.","operationId":"getEngineStatus","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["System"]}},"/v1/decide":{"post":{"summary":"Run decisions about one context","operationId":"decide","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideRequest"},"examples":{"support-triage":{"summary":"Route a support ticket","description":"The 200 example is the real answer, recorded on 26 September 2026.","value":{"model":"sqwish-d1-diet","context":"Our billing export has failed for two days. We need it for today's audit.","decisions":[{"id":"team","kind":"single","question":"Which team should handle this ticket?","outcomes":{"billing":"Charges, invoices, and financial exports.","technical":"Other application failures.","sales":"New purchases."}},{"id":"urgent","kind":"binary","question":"Does the ticket state a deadline within one day?","outcomes":{"yes":"An explicit deadline is today or within the next 24 hours.","no":"The deadline is later, absent, or unclear."}},{"id":"impact","kind":"ordinal","question":"How severe is the reported impact on the customer's work?","outcomes":["0","1","2"],"rubric":["Minor inconvenience; the task can still be completed.","The task is impaired, but a workable alternative is stated.","An important task is blocked and no workable alternative is stated."]}]}}}}},"required":true},"responses":{"200":{"description":"One probability distribution for each decision.","content":{"application/json":{"schema":{},"example":{"id":"dec_963b7180cbd24e69a09870f8","model":"sqwish-d1-diet","decisions":{"team":{"kind":"single","probabilities":{"billing":0.9268172836638902,"technical":0.05394723671050278,"sales":0.019235479625606948},"top":"billing","p_top":0.9268172836638902,"margin":0.8728700469533874,"entropy":0.3039487736089271,"action":"billing","abstained":false},"urgent":{"kind":"binary","probabilities":{"yes":0.9124361664296878,"no":0.08756383357031215},"top":"yes","p_top":0.9124361664296878,"margin":0.8248723328593757,"entropy":0.2968648920244629,"p_yes":0.9124361664296878,"action":"yes","abstained":false},"impact":{"kind":"ordinal","probabilities":{"0":0.05066966056527368,"1":0.105604641144301,"2":0.8437256982904253},"top":"2","p_top":0.8437256982904253,"margin":0.7381210571461243,"entropy":0.5318959230835276,"expected_level":1.7930560377251517,"legend":{"0":"Minor inconvenience; the task can still be completed.","1":"The task is impaired, but a workable alternative is stated.","2":"An important task is blocked and no workable alternative is stated."},"median_level":"2","action":"2","abstained":false}},"render":{"layout":"idea061","reads":2,"independent":false},"usage":{"input_tokens":648,"decisions":3},"timing_ms":{"render":3.829091787338257,"score":221.20973281562328},"provenance":{"base_model":"Qwen/Qwen3.5-9B","base_revision":"c202236235762e1c871ad0ccb60c8ee5ba337b9a","base_id":"d1-diet-pilot-640","base_artifact_sha256":"dd420ca652cfaa10279eabb54d15afd50fe9d24d357498c4dbc512b1c3d73bb2","compute_dtype":"float16","serving_artifact_sha256":null,"serving_master_artifact_sha256":null,"serving_execution_artifact_sha256":null,"engine_dtype":"float16","engine_quantization":null,"adapter":null,"artifact_sha256":null,"probabilities":"conditional_on_declared_outcomes","calibration":"not_established"}}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/hooks/claude-code":{"post":{"summary":"Check a Claude Code tool call before it runs","description":"A Claude Code PreToolUse hook. See docs/claude-code-hook.md.\n\nAlways answers in the hook's format. If we cannot decide, the answer is \"ask\",\nso Claude Code falls back to asking the person.","operationId":"claudeCodeHook","parameters":[{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(guard|auto)$","default":"guard","title":"Mode"}},{"name":"store","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Store"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Integrations"]}},"/v1/lint":{"post":{"summary":"Check how decisions are asked, without running a model","description":"Warnings about how the decisions are asked. No model runs; it is free.","operationId":"lintDecisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/playground/decide":{"post":{"summary":"Try a base model without an account","description":"Try a decision on one of our base models without an account.\n\nRate-limited per address, at most 8 decisions, and never stored.","operationId":"playgroundDecide","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/feedback":{"post":{"summary":"Report what happened after a stored decision","operationId":"recordFeedback","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Feedback"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Feedback"]}},"/v1/models/{name}/feedback-dataset":{"post":{"summary":"Turn new feedback on a model into a dataset","description":"Turn new feedback on this model's decisions into a dataset for its next version.\nSend {\"metadata\": {...}} to use only one segment's decisions. A retry with the same\nIdempotency-Key returns the same dataset.","operationId":"createFeedbackDataset","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FeedbackDataset"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Feedback"]}},"/v1/systemone":{"post":{"summary":"Run decisions sent in TypeSafe's Jev request shape","operationId":"systemone","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JevRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/systemone/translate":{"post":{"summary":"Turn a Jev request into the native one, free","description":"The native /v1/decide request for a Jev request, with notes on what changed.\n\nNo model runs, so it is free and needs no key.","operationId":"translateJevRequest","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JevRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Decisions"]}},"/v1/datasets":{"post":{"summary":"Create a dataset from JSON examples, up to 1 MiB","operationId":"createDataset","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]},"get":{"summary":"List your datasets, newest first","operationId":"listDatasets","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]}},"/v1/datasets/upload":{"post":{"summary":"Upload a JSONL dataset, up to 16 MiB","operationId":"uploadDataset","parameters":[{"name":"x-dataset-name","in":"header","required":false,"schema":{"type":"string","default":"Uploaded dataset","title":"X-Dataset-Name"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"],"requestBody":{"required":true,"description":"One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}}}},"/v1/datasets/{dataset_id}":{"get":{"summary":"Get one dataset","operationId":"getDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]},"delete":{"summary":"Remove a dataset from new work, retaining historical data","description":"Remove a dataset from new work; retain its data and historical references.","operationId":"deleteDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]}},"/v1/datasets/{dataset_id}/download":{"get":{"summary":"Download validated examples as JSONL","description":"Download validated training examples as JSONL, including historical datasets.","operationId":"downloadDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/x-ndjson":{"schema":{"type":"string","format":"binary"}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]}},"/v1/datasets/{dataset_id}/rows":{"get":{"summary":"Page through the rows of one of your datasets","operationId":"listDatasetRows","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Datasets"]}},"/v1/fine-tuning/jobs":{"post":{"summary":"Start a fine-tune, optionally as a named version","operationId":"createFineTuningJob","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]},"get":{"summary":"List your fine-tunes, newest first","operationId":"listFineTuningJobs","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":200,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"type":"string"}},{"type":"null"}],"title":"Status"}},{"name":"dataset_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]}},"/v1/fine-tuning/jobs/{job_id}":{"get":{"summary":"Get a fine-tune with its status, metrics and gate","operationId":"getFineTuningJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]}},"/v1/fine-tuning/jobs/{job_id}/events":{"get":{"summary":"List a fine-tune's events in order","operationId":"listFineTuningEvents","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]}},"/v1/fine-tuning/jobs/{job_id}/records":{"get":{"summary":"Page through a fine-tune's held-out records","description":"One page of a finished fine-tune's held-out records. Each gives a validation\ndecision's probability for every outcome, by name, beside the row's own label and\nthe decision's metrics. `group` picks the model that was scored: this fine-tune\n(adapted), the model it started from (base) or the version a continuation started\nfrom (parent).","operationId":"listFineTuningRecords","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}},{"name":"group","in":"query","required":false,"schema":{"enum":["adapted","base","parent"],"type":"string","default":"adapted","title":"Group"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]}},"/v1/fine-tuning/jobs/{job_id}/cancel":{"post":{"summary":"Ask a fine-tune to stop","operationId":"cancelFineTuningJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"Client error. On a 422, `error.details` lists each field that failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"5XX":{"description":"Server error. A 503 names what is not running on this server.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}},"tags":["Fine-tuning"]}}},"components":{"schemas":{"Abstain":{"properties":{"min_probability":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min Probability"},"cost":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost"}},"additionalProperties":false,"type":"object","title":"Abstain"},"CreditGrant":{"properties":{"user_id":{"type":"string","maxLength":64,"minLength":1,"title":"User Id"},"amount_cents":{"type":"integer","maximum":1000000.0,"minimum":-1000000.0,"title":"Amount Cents"},"note":{"type":"string","maxLength":64,"minLength":1,"title":"Note","default":"admin_grant"}},"additionalProperties":false,"type":"object","required":["user_id","amount_cents"],"title":"CreditGrant"},"DatasetCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"examples":{"items":{"$ref":"#/components/schemas/Example"},"type":"array","maxItems":20000,"minItems":2,"title":"Examples"}},"additionalProperties":false,"type":"object","required":["name","examples"],"title":"DatasetCreate"},"DecideRequest":{"properties":{"model":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Model"},"context":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Context"},"decisions":{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","maxItems":64,"minItems":1,"title":"Decisions"},"independent":{"type":"boolean","title":"Independent","default":false},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"fallback":{"anyOf":[{"type":"string","enum":["auto","none"]},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback"}},"additionalProperties":false,"type":"object","required":["context","decisions"],"title":"DecideRequest"},"Decision":{"properties":{"id":{"type":"string","maxLength":128,"minLength":1,"title":"Id"},"question":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Question"},"kind":{"type":"string","enum":["single","binary","ordinal"],"title":"Kind","default":"single"},"outcomes":{"title":"Outcomes"},"rubric":{"anyOf":[{"items":{},"type":"array"},{"type":"null"}],"title":"Rubric"},"weights":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Weights"},"costs":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Costs"},"abstain":{"anyOf":[{"$ref":"#/components/schemas/Abstain"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","question"],"title":"Decision"},"EarlyAccess":{"properties":{"model":{"type":"string","pattern":"^sqwish-d1-[a-z0-9-]{2,40}$","title":"Model"},"working_on":{"type":"string","maxLength":2000,"minLength":1,"title":"Working On"},"why":{"type":"string","maxLength":2000,"minLength":1,"title":"Why"}},"additionalProperties":false,"type":"object","required":["model","working_on","why"],"title":"EarlyAccess"},"Example":{"properties":{"model":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Model"},"context":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Context"},"decisions":{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","maxItems":64,"minItems":1,"title":"Decisions"},"independent":{"type":"boolean","title":"Independent","default":false},"store":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Store"},"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Metadata"},"fallback":{"anyOf":[{"type":"string","enum":["auto","none"]},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback"},"targets":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Targets"},"rewards":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Rewards"}},"additionalProperties":false,"type":"object","required":["context","decisions"],"title":"Example"},"Feedback":{"properties":{"decision_id":{"type":"string","pattern":"^dec_[a-f0-9]{24}$","title":"Decision Id"},"outcomes":{"additionalProperties":{"type":"string"},"type":"object","maxProperties":64,"minProperties":1,"title":"Outcomes"}},"additionalProperties":false,"type":"object","required":["decision_id","outcomes"],"title":"Feedback"},"FeedbackDataset":{"properties":{"metadata":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object","maxProperties":16},{"type":"null"}],"title":"Metadata"}},"additionalProperties":false,"type":"object","title":"FeedbackDataset"},"FinalizeLabels":{"properties":{"row_indices":{"items":{"type":"integer"},"type":"array","maxItems":2000,"minItems":2,"title":"Row Indices"}},"additionalProperties":false,"type":"object","required":["row_indices"],"title":"FinalizeLabels"},"Hyperparameters":{"properties":{"steps":{"anyOf":[{"type":"integer","maximum":2000.0,"minimum":1.0},{"type":"null"}],"title":"Steps"},"learning_rate":{"type":"number","maximum":0.01,"exclusiveMinimum":0.0,"title":"Learning Rate","default":5e-05},"lora_rank":{"type":"integer","enum":[8,16],"title":"Lora Rank","default":8},"seed":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Seed","default":42},"checkpoint_every":{"type":"integer","maximum":1000.0,"minimum":1.0,"title":"Checkpoint Every","default":10},"kl_coefficient":{"type":"number","maximum":10.0,"minimum":0.0,"title":"Kl Coefficient","default":0.05}},"additionalProperties":false,"type":"object","title":"Hyperparameters"},"JevQuestion":{"properties":{"type":{"type":"string","enum":["noul","choice","score"],"title":"Type"},"instructions":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Instructions"},"criteria":{"title":"Criteria"}},"additionalProperties":false,"type":"object","required":["type","instructions"],"title":"JevQuestion"},"JevRequest":{"properties":{"model":{"type":"string","maxLength":128,"minLength":1,"title":"Model"},"state":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"State"},"questions":{"additionalProperties":{"$ref":"#/components/schemas/JevQuestion"},"type":"object","maxProperties":64,"minProperties":1,"title":"Questions"}},"additionalProperties":false,"type":"object","required":["model","state","questions"],"title":"JevRequest"},"JobCreate":{"properties":{"dataset_id":{"type":"string","pattern":"^ds_[a-f0-9]{24}$","title":"Dataset Id"},"model":{"type":"string","enum":["sqwish-d1-diet","sqwish-d1-nibble","sqwish-d1-crumb"],"title":"Model","default":"sqwish-d1-diet"},"method":{"type":"string","enum":["sft","reward"],"title":"Method","default":"sft"},"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters"},"validation_fraction":{"type":"number","maximum":0.5,"minimum":0.1,"title":"Validation Fraction","default":0.2},"model_name":{"anyOf":[{"type":"string","pattern":"^[a-z][a-z0-9-]{1,62}$"},{"type":"null"}],"title":"Model Name"},"parent":{"anyOf":[{"type":"string","maxLength":140,"minLength":1},{"type":"null"}],"title":"Parent"},"replay":{"type":"number","maximum":4.0,"minimum":0.0,"title":"Replay","default":1.0}},"additionalProperties":false,"type":"object","required":["dataset_id"],"title":"JobCreate"},"KeepWarm":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"KeepWarm"},"KeyCreate":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"KeyCreate"},"LabelJobCreate":{"properties":{"source_id":{"type":"string","pattern":"^src_[a-f0-9]{24}$","title":"Source Id"},"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Name"},"decisions":{"anyOf":[{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","maxItems":64,"minItems":1},{"type":"null"}],"title":"Decisions"},"teacher_models":{"items":{"type":"string","enum":["kimi-k3","glm-5.3"]},"type":"array","maxItems":2,"minItems":1,"title":"Teacher Models"}},"additionalProperties":false,"type":"object","required":["source_id"],"title":"LabelJobCreate"},"Learning":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"after":{"type":"integer","maximum":20000.0,"minimum":150.0,"title":"After","default":200},"auto_promote":{"type":"boolean","title":"Auto Promote","default":false}},"additionalProperties":false,"type":"object","title":"Learning","description":"POST /v1/models/{name}/learning. Each call sets the whole setting."},"Promote":{"properties":{"version":{"type":"string","pattern":"^(candidate|previous|\\d{1,6})$","title":"Version","default":"candidate"},"force":{"type":"boolean","title":"Force","default":false}},"additionalProperties":false,"type":"object","title":"Promote"},"PromptTuningCreate":{"properties":{"dataset_id":{"type":"string","pattern":"^ds_[a-f0-9]{24}$","title":"Dataset Id"},"decision":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Decision"},"model":{"anyOf":[{"type":"string","maxLength":140,"minLength":1},{"type":"null"}],"title":"Model"},"effort":{"type":"string","enum":["standard","thorough"],"title":"Effort","default":"standard"}},"additionalProperties":false,"type":"object","required":["dataset_id"],"title":"PromptTuningCreate"},"ErrorBody":{"properties":{"code":{"description":"A stable code to branch on, such as invalid_request.","title":"Code","type":"string"},"message":{"description":"What went wrong and what to change, in plain words.","title":"Message","type":"string"},"retryable":{"description":"True when sending the same request again later can succeed. Retry only then, after Retry-After when it is sent, with the same Idempotency-Key.","title":"Retryable","type":"boolean"},"request_id":{"description":"Also sent as X-Request-ID. Quote it in bug reports.","title":"Request Id","type":"string"},"details":{"anyOf":[{"items":{"$ref":"#/components/schemas/ErrorDetail"},"type":"array"},{"type":"null"}],"default":null,"description":"On validation errors, one entry for each field that failed.","title":"Details"}},"required":["code","message","retryable","request_id"],"title":"ErrorBody","type":"object"},"ErrorDetail":{"properties":{"path":{"description":"Where the problem is, such as [\"body\", \"decisions\", 0, \"outcomes\"].","items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Path","type":"array"},"message":{"title":"Message","type":"string"},"type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Type"}},"required":["path","message"],"title":"ErrorDetail","type":"object"},"ErrorResponse":{"description":"The body of every error. app.failure() builds it; this model documents it.","properties":{"error":{"$ref":"#/components/schemas/ErrorBody"}},"required":["error"],"title":"ErrorResponse","type":"object"}}},"tags":[{"name":"Decisions","description":"Probabilities for questions with fixed outcomes."},{"name":"Feedback","description":"Report outcomes and turn them into training data."},{"name":"Models","description":"Base models, adapters and named models with versions."},{"name":"Datasets","description":"Validated training examples. A dataset never changes."},{"name":"Fine-tuning","description":"Training jobs, their events and held-out results."},{"name":"Prompt tuning","description":"Better wording for a decision, tested on your rows. Words, not weights."},{"name":"Labeling","description":"Teacher labels for real queries, reviewed by you."},{"name":"Accounts","description":"Sign-in, your account and API keys."},{"name":"Admin","description":"Waitlist, early access, credits and engines. Admins only."},{"name":"Integrations","description":"Endpoints other tools call, such as Claude Code."},{"name":"System","description":"Health and discovery."}]}