{"openapi":"3.1.0","info":{"title":"OneHot workbench","description":"Native decisions, versioned datasets, adaptation and shared-base deployment. Authenticate with `Authorization: Bearer onehot_sk_...` when accounts are on. A short guide for coding agents is at /llms.txt. Hosted account APIs accept a Bearer API key or a browser session. A full or read-only API key reads its account, and no key can change it: keys, billing and settings change in the console. Browser mutations require the configured Origin and X-CSRF-Token from /auth/session. Account recovery and history remain available to blocked accounts. Waitlisted accounts can read their account summary and model catalogue and request early access; private member APIs require admission. Money fields ending in _usd are exact decimal strings; never interpret them as integer cents. Authenticated customer reads and existing-operation replays share read_rpm, and other customer writes except decisions and their estimates share write_rpm. Exhausted budgets return 429 with Retry-After; unavailable admission storage returns 503.","version":"0.1.0"},"paths":{"/v1/recipes":{"get":{"summary":"List recipes","description":"List ready-made decisions for the playground, excluding labelled examples.\nNo sign-in is required.","operationId":"listRecipes","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Recipe"},"title":"Data","type":"array"},"object":{"const":"list","title":"Object","type":"string"}},"required":["data","object"],"title":"Listing","type":"object"}}}},"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"],"x-internal":false,"security":[]}},"/v1/decide":{"post":{"summary":"Run decisions","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":"kettei-core","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":{"properties":{"id":{"title":"Id","type":"string"},"model":{"title":"Model","type":"string"},"decisions":{"additionalProperties":{"$ref":"#/components/schemas/DecisionResult"},"title":"Decisions","type":"object"},"usage":{"$ref":"#/components/schemas/DecisionUsage"},"timing_ms":{"$ref":"#/components/schemas/Timing"},"temperature":{"additionalProperties":{"type":"number"},"description":"The temperature T each decision's probabilities were given, p^(1/T) renormalised, for the decisions that have one: the request's own temperature, or the model's default for that kind of decision. Absent when every answer is as the engine scored it. The top answer never changes.","title":"Temperature","type":"object"},"version":{"title":"Version","type":"string"},"fallback":{"$ref":"#/components/schemas/Fallback"},"charge":{"$ref":"#/components/schemas/Charge"}},"required":["id","model","decisions","usage","timing_ms"],"title":"DecideResponse","type":"object"},"example":{"id":"dec_963b7180cbd24e69a09870f8","model":"kettei-core","decisions":{"team":{"kind":"single","probabilities":{"billing":0.9268172836638902,"technical":0.05394723671050278,"sales":0.019235479625606948},"top":"billing","p_top":0.9268172836638902},"urgent":{"kind":"binary","probabilities":{"yes":0.9124361664296878,"no":0.08756383357031215},"top":"yes","p_top":0.9124361664296878},"impact":{"kind":"ordinal","probabilities":{"0":0.05066966056527368,"1":0.105604641144301,"2":0.8437256982904253},"top":"2","p_top":0.8437256982904253,"expected_level":1.7930560377251517}},"usage":{"input_tokens":648,"decisions":3,"tokenizer":{"name":"nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16","revision":"a9904d24bcc1d289a1950fa9d2b978c47cf903b9"}},"timing_ms":{"render":3.829091787338257,"score":221.20973281562328}}}},"headers":{"Idempotency-Replayed":{"description":"`true` when this response replays an earlier request that used the same `Idempotency-Key`. Absent when the request ran.","schema":{"type":"string","enum":["true"]}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!-~]+$"},"description":"Reuse the same key and body after a lost response. A successful replay does not execute or charge again. Changed request bodies conflict; expired replay bodies are not executed again under the old key."}],"description":"Score fixed outcomes for each decision against one shared context. Inspect each result's probabilities and policy before acting, and check the returned model and fallback details. Scores are normalized across the outcomes you supply; they are not a guarantee that the selected outcome is correct.\n\nReuse an Idempotency-Key and identical body after a lost response. The original operation is replayed without executing or charging again. Responses are retained for 24 hours; afterward the same key returns an expired-response error.\n\nThe response example is a historical pilot recording from 26 September 2026; its model, timing and probabilities describe that run."}},"/v1/decide/estimate":{"post":{"summary":"Estimate billable input and maximum cost without executing","operationId":"estimateDecisions","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DecideRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"currency":{"const":"USD","title":"Currency","type":"string"},"input_tokens":{"title":"Input Tokens","type":"integer"},"tokenizer":{"$ref":"#/components/schemas/Tokenizer"},"maximum_charge_usd":{"title":"Maximum Charge Usd","type":"string"},"models":{"items":{"$ref":"#/components/schemas/ModelQuote"},"title":"Models","type":"array"}},"required":["currency","input_tokens","tokenizer","maximum_charge_usd","models"],"title":"Estimate","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}],"description":"Counts customer input using the pinned billing tokenizer and resolves the current model and fallback price. Reserves no credit and runs no model. Estimates consume their own account token budget; the execution policy and available balance are checked again when the request is submitted."}},"/v1/lint":{"post":{"summary":"Lint decisions","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":{"properties":{"warnings":{"items":{"$ref":"#/components/schemas/LintWarning"},"title":"Warnings","type":"array"}},"required":["warnings"],"title":"LintResponse","type":"object"}}}},"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"],"x-internal":false,"security":[]}},"/v1/systemone":{"post":{"summary":"Run Jev decisions","description":"Run decisions using TypeSafe's Jev request and response format.","operationId":"systemone","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JevRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"model":{"title":"Model","type":"string"},"answers":{"additionalProperties":{"anyOf":[{"$ref":"#/components/schemas/JevBoolean"},{"$ref":"#/components/schemas/JevChoice"},{"$ref":"#/components/schemas/JevScore"}]},"title":"Answers","type":"object"},"usage":{"$ref":"#/components/schemas/JevUsage"},"timing_ms":{"$ref":"#/components/schemas/Timing"},"version":{"title":"Version","type":"string"},"fallback":{"$ref":"#/components/schemas/Fallback"},"charge":{"$ref":"#/components/schemas/Charge"}},"required":["model","answers","usage","timing_ms"],"title":"JevResponse","type":"object"}}},"headers":{"Idempotency-Replayed":{"description":"`true` when this response replays an earlier request that used the same `Idempotency-Key`. Absent when the request ran.","schema":{"type":"string","enum":["true"]}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!-~]+$"},"description":"Reuse the same key and body after a lost response. A successful replay does not execute or charge again. Changed request bodies conflict; expired replay bodies are not executed again under the old key."}]}},"/v1/systemone/estimate":{"post":{"summary":"Estimate a Jev request without executing","operationId":"estimateSystemone","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JevRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"currency":{"const":"USD","title":"Currency","type":"string"},"input_tokens":{"title":"Input Tokens","type":"integer"},"tokenizer":{"$ref":"#/components/schemas/Tokenizer"},"maximum_charge_usd":{"title":"Maximum Charge Usd","type":"string"},"models":{"items":{"$ref":"#/components/schemas/ModelQuote"},"title":"Models","type":"array"}},"required":["currency","input_tokens","tokenizer","maximum_charge_usd","models"],"title":"Estimate","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}],"description":"Counts customer input using the pinned billing tokenizer and resolves the current model and fallback price. Reserves no credit and runs no model. Estimates consume their own account token budget; the execution policy and available balance are checked again when the request is submitted."}},"/v1/systemone/translate":{"post":{"summary":"Translate Jev requests","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":{"properties":{"request":{"$ref":"#/components/schemas/DecideRequest"},"notes":{"items":{"type":"string"},"title":"Notes","type":"array"}},"required":["request","notes"],"title":"Translation","type":"object"}}}},"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"],"x-internal":false,"security":[]}},"/v1/models":{"get":{"summary":"List models","description":"List base models, plus your adapters after admission. Families are listed by\nGET /v1/families.","operationId":"listModels","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Model"},"title":"Data","type":"array"},"object":{"const":"list","title":"Object","type":"string"}},"required":["data","object"],"title":"Listing","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/models/{model_id}":{"get":{"summary":"Get model","description":"Get a base model or a trained model by its number, such as router@3. A family's name\nis refused with 422 invalid_reference: `GET /v1/families/{name}` describes the family.","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":{"description":"A base, an early-access catalogue entry, or a trained adapter.","properties":{"id":{"title":"Id","type":"string"},"status":{"title":"Status","type":"string"},"evaluation_key":{"title":"Evaluation Key","type":"string"},"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"family":{"title":"Family","type":"string"},"size_order":{"title":"Size Order","type":"integer"},"lora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lora"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"max_prompt_tokens":{"title":"Max Prompt Tokens","type":"integer"},"max_questions":{"title":"Max Questions","type":"integer"},"calibration":{"title":"Calibration","type":"string"},"availability_reason":{"description":"Why it can't answer now: no_engine (its pool has no engine right now), not_served (this server doesn't serve it), or, for an adapter, base_mismatch, engine_unconfigured or engine_changed.","title":"Availability Reason","type":"string"},"access_requested":{"title":"Access Requested","type":"boolean"},"adapter_capacity":{"anyOf":[{"$ref":"#/components/schemas/AdapterCapacity"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"deleted_at":{"description":"When its owner deleted it. A deleted model answers and runs nothing.","title":"Deleted At","type":"number"},"discarded_at":{"description":"When a rollback of its family discarded it. A discarded model answers and runs nothing.","title":"Discarded At","type":"number"},"on_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own switch went on: it answers calls to its number, such as router@4. Null while it is off.","title":"On At"},"keep_warm":{"description":"Whether it is kept warm on its own switch. A family's keep warm doesn't set it: see keep_warm_window.","title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for it, through its family or its own switch, or null when nothing is billed."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"job_id":{"title":"Job Id","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"title":"Version","type":"integer"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"decision_price_nano":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact integer string of nano-USD per billed input token from the current billing policy. Zero means free; null means unpriced.","title":"Decision Price Nano"},"base":{"description":"An adapter's base model id: the base whose prices it pays.","title":"Base","type":"string"},"evaluation_set":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSet"},{"type":"null"}]},"request_latency":{"$ref":"#/components/schemas/RequestLatency"}},"required":["id","status","evaluation_key"],"title":"Model","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]},"delete":{"summary":"Delete model version","description":"Delete a fine-tuned model for good, by its number, such as router@3: it no longer\nanswers or runs anything, and it no longer counts against the account's storage. An id,\na name or an alias is refused with 422 invalid_reference. With `adapter`, the id the\ncaller saw, only while the number still names that model: 409 model_changed otherwise.\nA family's latest model is refused with 409 latest_model: roll the family back instead.\nA model whose own switch is on, or that its family serves, is refused: switch it off if\nit is on, and a family's model can be deleted once the family, switched on, has moved to\nits latest model. So is one an evaluation is still scoring, or a prompt-tuning job still tunes for. Its fine-tune's history\nstays. It can't be undone, and deleting again changes nothing.","operationId":"deleteModel","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"adapter","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"description":"The id of the model the caller saw: refused unless the model called is still that one.","title":"Adapter"},"description":"The id of the model the caller saw: refused unless the model called is still that one."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"What a deletion answers: the id, gone for good.","properties":{"id":{"title":"Id","type":"string"},"deleted":{"const":true,"title":"Deleted","type":"boolean"}},"required":["id","deleted"],"title":"Deleted","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/models/{model_id}/ready":{"get":{"summary":"Check model readiness","description":"Check whether a call to a model would go to an engine now: a base model, a family that\nis on, or a model whose switch is on, called by its number such as router@3. It loads and\nruns nothing: a fine-tune that isn't loaded loads on its first call.","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":{"properties":{"model":{"title":"Model","type":"string"},"ready":{"description":"Whether a call to it would run now. Nothing is loaded or run to find out: a fine-tune that isn't loaded loads on its first call.","title":"Ready","type":"boolean"},"reason":{"description":"Why not: the model can't be served yet, no engine of its size takes calls right now, or none of them loads fine-tunes right now.","enum":["model_not_ready","engine_unavailable","no_adapter_engine"],"title":"Reason","type":"string"}},"required":["model","ready"],"title":"Readiness","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/models/{model_id}/activity":{"get":{"summary":"Get model activity","description":"How callers used one of your models, by its number such as router@3, over the last\n`days` UTC days, today included: each day's answered calls through its family and by its\nnumber, the calls another model answered in its place, its first and last answered call,\nand the stretches it was kept warm. Evaluations aren't calls. A family's name or a base\nmodel is refused with 422 invalid_reference, and a deleted model is gone (410).","operationId":"getModelActivity","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"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":{"description":"How callers used a model: its calls by day, through its family or by its number.","properties":{"model":{"description":"The model by its number, such as router@4.","title":"Model","type":"string"},"days":{"title":"Days","type":"integer"},"start":{"title":"Start","type":"string"},"end":{"title":"End","type":"string"},"requests":{"description":"Calls in the period that asked for it and it answered.","title":"Requests","type":"integer"},"fallbacks":{"description":"Calls in the period that asked for it and another model answered, while it couldn't.","title":"Fallbacks","type":"integer"},"first_call_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it first answered a call that asked for it, or null.","title":"First Call At"},"last_call_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it last answered a call that asked for it, or null.","title":"Last Call At"},"last_call_via":{"anyOf":[{"enum":["family","model"],"type":"string"},{"type":"null"}],"description":"Whether that last call named its family or the model itself.","title":"Last Call Via"},"daily":{"items":{"$ref":"#/components/schemas/ModelActivityDay"},"title":"Daily","type":"array"},"kept_warm":{"description":"The stretches it was kept warm, through its own keep warm or its family's, as keep warm billed them in the period, oldest first. Empty where keep warm is free.","items":{"$ref":"#/components/schemas/KeptWarm"},"title":"Kept Warm","type":"array"}},"required":["model","days","start","end","requests","fallbacks","first_call_at","last_call_at","last_call_via","daily","kept_warm"],"title":"ModelActivity","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/models/{model}/switch":{"post":{"summary":"Switch a model","description":"Switch a model's own switch, by its number such as router@4. On, it answers calls to\nthat number, loaded and probed first, which takes a place unless it answers already:\npast the account's limit, 409 live_limit lists what answers, and `switch_off` switches\nfamilies or models off in the same step. Off, calls to its number stop, and so does its\nown keep warm. With `adapter`, only while the number names the model the caller saw: 409\nmodel_changed, which also answers when the model, read as on, was switched off before the\nswitch took hold.","operationId":"switchModel","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelSwitch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"A base, an early-access catalogue entry, or a trained adapter.","properties":{"id":{"title":"Id","type":"string"},"status":{"title":"Status","type":"string"},"evaluation_key":{"title":"Evaluation Key","type":"string"},"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"family":{"title":"Family","type":"string"},"size_order":{"title":"Size Order","type":"integer"},"lora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lora"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"max_prompt_tokens":{"title":"Max Prompt Tokens","type":"integer"},"max_questions":{"title":"Max Questions","type":"integer"},"calibration":{"title":"Calibration","type":"string"},"availability_reason":{"description":"Why it can't answer now: no_engine (its pool has no engine right now), not_served (this server doesn't serve it), or, for an adapter, base_mismatch, engine_unconfigured or engine_changed.","title":"Availability Reason","type":"string"},"access_requested":{"title":"Access Requested","type":"boolean"},"adapter_capacity":{"anyOf":[{"$ref":"#/components/schemas/AdapterCapacity"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"deleted_at":{"description":"When its owner deleted it. A deleted model answers and runs nothing.","title":"Deleted At","type":"number"},"discarded_at":{"description":"When a rollback of its family discarded it. A discarded model answers and runs nothing.","title":"Discarded At","type":"number"},"on_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own switch went on: it answers calls to its number, such as router@4. Null while it is off.","title":"On At"},"keep_warm":{"description":"Whether it is kept warm on its own switch. A family's keep warm doesn't set it: see keep_warm_window.","title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for it, through its family or its own switch, or null when nothing is billed."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"job_id":{"title":"Job Id","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"title":"Version","type":"integer"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"decision_price_nano":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact integer string of nano-USD per billed input token from the current billing policy. Zero means free; null means unpriced.","title":"Decision Price Nano"},"base":{"description":"An adapter's base model id: the base whose prices it pays.","title":"Base","type":"string"},"evaluation_set":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSet"},{"type":"null"}]},"request_latency":{"$ref":"#/components/schemas/RequestLatency"}},"required":["id","status","evaluation_key"],"title":"Model","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/models/{model}/keep-warm":{"post":{"summary":"Keep a model warm","description":"Keep a model loaded between requests on its own, by its number such as router@4, or\nstop. Its own switch must be on: 409 model_off otherwise, and switching it off stops\nkeep warm too. Switching on loads and probes it first, then holds its first hour, at\nmost `max_price_usd`. A model kept warm through its family as well takes one warm place\nand is billed once. `switch_off` stops keep warm on families or models in the same\nstep and leaves their switches on, so a request at the limit can swap. Past the\naccount's limit, 409 warm_limit lists the models still kept warm after that, least\nrecently used first (`used_at`), each with the keep warms that hold it: its own\n(`keep_warm`) and its families' (`families`). A size with no kept-warm place left\nanswers 503 warm_capacity, unless `switch_off` stops a model of that size. With `adapter`, only while the number names the model the caller\nsaw: 409 model_changed otherwise, before anything loads.","operationId":"keepModelWarm","parameters":[{"name":"model","in":"path","required":true,"schema":{"type":"string","title":"Model"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelKeepWarm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"A base, an early-access catalogue entry, or a trained adapter.","properties":{"id":{"title":"Id","type":"string"},"status":{"title":"Status","type":"string"},"evaluation_key":{"title":"Evaluation Key","type":"string"},"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"family":{"title":"Family","type":"string"},"size_order":{"title":"Size Order","type":"integer"},"lora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lora"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"max_prompt_tokens":{"title":"Max Prompt Tokens","type":"integer"},"max_questions":{"title":"Max Questions","type":"integer"},"calibration":{"title":"Calibration","type":"string"},"availability_reason":{"description":"Why it can't answer now: no_engine (its pool has no engine right now), not_served (this server doesn't serve it), or, for an adapter, base_mismatch, engine_unconfigured or engine_changed.","title":"Availability Reason","type":"string"},"access_requested":{"title":"Access Requested","type":"boolean"},"adapter_capacity":{"anyOf":[{"$ref":"#/components/schemas/AdapterCapacity"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"deleted_at":{"description":"When its owner deleted it. A deleted model answers and runs nothing.","title":"Deleted At","type":"number"},"discarded_at":{"description":"When a rollback of its family discarded it. A discarded model answers and runs nothing.","title":"Discarded At","type":"number"},"on_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own switch went on: it answers calls to its number, such as router@4. Null while it is off.","title":"On At"},"keep_warm":{"description":"Whether it is kept warm on its own switch. A family's keep warm doesn't set it: see keep_warm_window.","title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for it, through its family or its own switch, or null when nothing is billed."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"job_id":{"title":"Job Id","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"title":"Version","type":"integer"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"decision_price_nano":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Exact integer string of nano-USD per billed input token from the current billing policy. Zero means free; null means unpriced.","title":"Decision Price Nano"},"base":{"description":"An adapter's base model id: the base whose prices it pays.","title":"Base","type":"string"},"evaluation_set":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSet"},{"type":"null"}]},"request_latency":{"$ref":"#/components/schemas/RequestLatency"}},"required":["id","status","evaluation_key"],"title":"Model","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families":{"get":{"summary":"List families","description":"Your families, by name: each one's switch, the model it serves, its models and keep\nwarm. A family read on its own adds its fine-tunes.","operationId":"listFamilies","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Family"},"title":"Data","type":"array"},"object":{"const":"list","title":"Object","type":"string"}},"required":["data","object"],"title":"Listing","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}":{"get":{"summary":"Get family","description":"A family: its dataset and where it started, its switch and the model it serves, its\nmodels with their own switches, keep warm, its fine-tunes with how each ended, what each\ncost and why it made no model, and what continuing it would do now (`continue`): train\non the dataset's newest version, or why it can't yet, with the rows it would take and\nthe fee it would hold.","operationId":"getFamily","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"continue":{"anyOf":[{"$ref":"#/components/schemas/Continuation"},{"type":"null"}],"description":"What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. A list of families reads no dataset: there `new_data` and `retry` only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out."},"id":{"title":"Id","type":"string"},"object":{"const":"family","title":"Object","type":"string"},"switched_on":{"description":"Whether calls to its name are answered.","title":"Switched On","type":"boolean"},"used_at":{"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At","type":"number"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"dataset_id":{"description":"The dataset it grows on.","title":"Dataset Id","type":"string"},"origin":{"description":"Where it started: a base model, or one of your models.","title":"Origin","type":"string"},"created_at":{"description":"When it was named, as its first fine-tune was queued.","title":"Created At","type":"number"},"served":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"The model calls to its name get while it is switched on, or null for none yet."},"latest":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"Its newest model, neither deleted nor discarded."},"models":{"description":"Every model of its line, oldest first. A deleted one shows only where it stood.","items":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"$ref":"#/components/schemas/DeletedModelVersion"}]},"title":"Models","type":"array"},"keep_warm":{"title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"move":{"anyOf":[{"$ref":"#/components/schemas/FamilyMove"},{"type":"null"}],"description":"The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off."},"moved":{"anyOf":[{"$ref":"#/components/schemas/FamilyMoved"},{"type":"null"}],"description":"When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since."},"jobs":{"description":"Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out.","items":{"$ref":"#/components/schemas/FamilyJob"},"title":"Jobs","type":"array"}},"required":["id","object","switched_on","used_at","switches_off_at","off_reason","off_at","dataset_id","origin","created_at","served","latest","models","keep_warm","keep_warm_window","keep_warm_stopped_at","move","moved"],"title":"Family","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]},"delete":{"summary":"Delete a family","description":"Delete a family. One no model ever joined goes, and its name is free again. A model\nthat failed its gate never joined. Otherwise every model of its line goes with it,\ndiscarded ones included, and you can't bring them back. Its name is never given again,\nand calls to it, and reads and changes of it, get 410 family_deleted. Its dataset and\nits fine-tunes, with their charges, stay. 409 family_answers while it or one of its\nmodels answers calls, naming them: switch them off first. 409 family_training while one\nof its fine-tunes is queued or running, and 409 version_in_use while an evaluation\nscores one of its models. With `dataset_id`, the dataset the family grew on when the\ncaller looked, only while it still does, and with `latest`, the id of its latest model\nthe caller saw, only while it still is: 409 family_changed otherwise. Deleting a family\na model joined again changes nothing; an empty one is gone, so it gets 404 not_found.","operationId":"deleteFamily","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FamilyDelete"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"object":{"const":"family","title":"Object","type":"string"},"deleted":{"const":true,"title":"Deleted","type":"boolean"}},"required":["id","object","deleted"],"title":"DeletedFamily","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}/switch":{"post":{"summary":"Switch a family","description":"Switch a family on or off. On, it answers calls to its name with its latest model,\nloaded and probed first, or with another model it served when the latest fails to load.\nThat takes a place unless the model answers already: past the account's limit, 409\nlive_limit lists what answers, and `switch_off` switches families or models off in the\nsame step. Off, calls to its name stop, and so does its keep warm. With `served`, only\nwhile it serves the model the caller saw: 409 served_changed, which also answers when a\nnewer model joined while the switch was loading a latest model the family didn't serve,\nor when the family, serving a model and read as on, was switched off before the switch\ntook hold.","operationId":"switchFamily","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilySwitch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"continue":{"anyOf":[{"$ref":"#/components/schemas/Continuation"},{"type":"null"}],"description":"What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. A list of families reads no dataset: there `new_data` and `retry` only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out."},"id":{"title":"Id","type":"string"},"object":{"const":"family","title":"Object","type":"string"},"switched_on":{"description":"Whether calls to its name are answered.","title":"Switched On","type":"boolean"},"used_at":{"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At","type":"number"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"dataset_id":{"description":"The dataset it grows on.","title":"Dataset Id","type":"string"},"origin":{"description":"Where it started: a base model, or one of your models.","title":"Origin","type":"string"},"created_at":{"description":"When it was named, as its first fine-tune was queued.","title":"Created At","type":"number"},"served":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"The model calls to its name get while it is switched on, or null for none yet."},"latest":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"Its newest model, neither deleted nor discarded."},"models":{"description":"Every model of its line, oldest first. A deleted one shows only where it stood.","items":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"$ref":"#/components/schemas/DeletedModelVersion"}]},"title":"Models","type":"array"},"keep_warm":{"title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"move":{"anyOf":[{"$ref":"#/components/schemas/FamilyMove"},{"type":"null"}],"description":"The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off."},"moved":{"anyOf":[{"$ref":"#/components/schemas/FamilyMoved"},{"type":"null"}],"description":"When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since."},"jobs":{"description":"Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out.","items":{"$ref":"#/components/schemas/FamilyJob"},"title":"Jobs","type":"array"}},"required":["id","object","switched_on","used_at","switches_off_at","off_reason","off_at","dataset_id","origin","created_at","served","latest","models","keep_warm","keep_warm_window","keep_warm_stopped_at","move","moved"],"title":"Family","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}/keep-warm":{"post":{"summary":"Keep a family warm","description":"Keep the model a family serves loaded between requests, or stop. Switching on a family\nthat serves no model gets 409 family_empty, and one that is switched off 409 family_off.\nWith `served`, the id of the model it served when the caller looked, only while it still\nserves that model: 409 served_changed otherwise. Keep warm follows the family when it\nmoves. `switch_off` stops keep warm on families or models in the same step and leaves\ntheir switches on, so a request at the limit can swap. Past the account's limit, 409\nwarm_limit lists the models still kept warm after that, least recently used first\n(`used_at`), each with the keep warms that hold it: its own (`keep_warm`) and its\nfamilies' (`families`). A size with no kept-warm place left answers 503 warm_capacity,\nunless `switch_off` stops a model of that size.","operationId":"keepFamilyWarm","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeepWarm"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"continue":{"anyOf":[{"$ref":"#/components/schemas/Continuation"},{"type":"null"}],"description":"What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. A list of families reads no dataset: there `new_data` and `retry` only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out."},"id":{"title":"Id","type":"string"},"object":{"const":"family","title":"Object","type":"string"},"switched_on":{"description":"Whether calls to its name are answered.","title":"Switched On","type":"boolean"},"used_at":{"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At","type":"number"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"dataset_id":{"description":"The dataset it grows on.","title":"Dataset Id","type":"string"},"origin":{"description":"Where it started: a base model, or one of your models.","title":"Origin","type":"string"},"created_at":{"description":"When it was named, as its first fine-tune was queued.","title":"Created At","type":"number"},"served":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"The model calls to its name get while it is switched on, or null for none yet."},"latest":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"Its newest model, neither deleted nor discarded."},"models":{"description":"Every model of its line, oldest first. A deleted one shows only where it stood.","items":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"$ref":"#/components/schemas/DeletedModelVersion"}]},"title":"Models","type":"array"},"keep_warm":{"title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"move":{"anyOf":[{"$ref":"#/components/schemas/FamilyMove"},{"type":"null"}],"description":"The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off."},"moved":{"anyOf":[{"$ref":"#/components/schemas/FamilyMoved"},{"type":"null"}],"description":"When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since."},"jobs":{"description":"Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out.","items":{"$ref":"#/components/schemas/FamilyJob"},"title":"Jobs","type":"array"}},"required":["id","object","switched_on","used_at","switches_off_at","off_reason","off_at","dataset_id","origin","created_at","served","latest","models","keep_warm","keep_warm_window","keep_warm_stopped_at","move","moved"],"title":"Family","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}/rollback":{"post":{"summary":"Roll back a family","description":"Take a family back to `to`, one of its older models, such as router@2, and discard for\ngood every newer one, neither deleted nor discarded: each stops answering, its own switch and keep warm\ngo off, calls to it get 410 model_discarded, and its number is never given again. `discard`\nnames exactly those models, as you confirmed: 409 rollback_changed, with what it would\ndiscard and the work it would cancel, when they differ, or when that work started since. A\nfine-tune of the family still training is cancelled, and so is an evaluation of a discarded\nmodel. A family that is on loads and probes `to` first, then serves it, and keep warm\nfollows; a family that is off serves it once switched on. A rollback is never refused at\nthe account's limits: when `to` would have no place, or a kept-warm family no warm place,\nthe newer models are still discarded, the family keeps serving its model, and its `move`\nto `to` waits, as a move does. 409 nothing_to_roll_back when `to` is the latest model, and\n503 warm_capacity when it would leave the engines of its size no slot for models that\naren't kept warm. The same rollback sent\nagain, once its models are discarded, returns the family as it is. With `served`, only\nwhile the family serves the model the caller saw.","operationId":"rollBackFamily","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FamilyRollback"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"continue":{"anyOf":[{"$ref":"#/components/schemas/Continuation"},{"type":"null"}],"description":"What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. A list of families reads no dataset: there `new_data` and `retry` only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out."},"id":{"title":"Id","type":"string"},"object":{"const":"family","title":"Object","type":"string"},"switched_on":{"description":"Whether calls to its name are answered.","title":"Switched On","type":"boolean"},"used_at":{"description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on.","title":"Used At","type":"number"},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model.","title":"Switches Off At"},"off_reason":{"anyOf":[{"enum":["owner","idle"],"type":"string"},{"type":"null"}],"description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise.","title":"Off Reason"},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When it went off, with off_reason. Null otherwise.","title":"Off At"},"dataset_id":{"description":"The dataset it grows on.","title":"Dataset Id","type":"string"},"origin":{"description":"Where it started: a base model, or one of your models.","title":"Origin","type":"string"},"created_at":{"description":"When it was named, as its first fine-tune was queued.","title":"Created At","type":"number"},"served":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"The model calls to its name get while it is switched on, or null for none yet."},"latest":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"Its newest model, neither deleted nor discarded."},"models":{"description":"Every model of its line, oldest first. A deleted one shows only where it stood.","items":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"$ref":"#/components/schemas/DeletedModelVersion"}]},"title":"Models","type":"array"},"keep_warm":{"title":"Keep Warm","type":"boolean"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null.","title":"Keep Warm Stopped At"},"move":{"anyOf":[{"$ref":"#/components/schemas/FamilyMove"},{"type":"null"}],"description":"The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off."},"moved":{"anyOf":[{"$ref":"#/components/schemas/FamilyMoved"},{"type":"null"}],"description":"When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since."},"jobs":{"description":"Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out.","items":{"$ref":"#/components/schemas/FamilyJob"},"title":"Jobs","type":"array"}},"required":["id","object","switched_on","used_at","switches_off_at","off_reason","off_at","dataset_id","origin","created_at","served","latest","models","keep_warm","keep_warm_window","keep_warm_stopped_at","move","moved"],"title":"Family","type":"object"}}}},"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":["Families"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets":{"post":{"tags":["Datasets"],"summary":"Create dataset","description":"Create a dataset from JSON examples. The default request body limit is 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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"tags":["Datasets"],"summary":"List datasets","description":"List your datasets, most recently used first: by when work last started on each\n(`used_at`), or when it was added while nothing has used it. Pages continue with a\ncursor.","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"}},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean","description":"List the datasets we archived instead, which you can restore. A dataset you deleted is in neither list.","default":false,"title":"Archived"},"description":"List the datasets we archived instead, which you can restore. A dataset you deleted is in neither list."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Dataset"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/upload":{"post":{"tags":["Datasets"],"summary":"Upload dataset","description":"Upload a dataset as JSONL. The default upload limit is 16 MiB. X-Max-Price-Usd is the\nmost you agree to pay for its first day of storage, as max_price_usd is elsewhere.","operationId":"uploadDataset","parameters":[{"name":"x-dataset-name","in":"header","required":false,"schema":{"type":"string","default":"Uploaded dataset","title":"X-Dataset-Name"}},{"name":"x-evaluation-fraction","in":"header","required":false,"schema":{"anyOf":[{"type":"number","maximum":1,"minimum":0.1},{"type":"null"}],"title":"X-Evaluation-Fraction"}},{"name":"x-max-price-usd","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Max-Price-Usd"}},{"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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"description":"One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}}}},"/v1/datasets/{dataset_id}/versions":{"post":{"tags":["Datasets"],"summary":"Add rows to a dataset","description":"Add rows to a dataset as its next version. They ask the dataset's own decisions, worded\nas it words them, with its kind of supervision. Rows it holds already are left out, and a\ncontext it holds keeps its side of the split. Earlier versions stay as they were. With\n`family`, one of your families on this dataset, the version records that its page added\nthem: 404 when you have no family of that name, 410 family_deleted when you deleted it,\n422 dataset_mismatch when it doesn't grow on this dataset.","operationId":"addDatasetRows","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset 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/DatasetRows"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"tags":["Datasets"],"summary":"List dataset versions","description":"A dataset's versions, newest first: when each was made, the rows it added, the\ndataset's counts and split at it, how its rows came (`added_via`: api, jsonl, csv or\nlabeling) and the family whose page added them (`added_from`), or null.","operationId":"listDatasetVersions","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/DatasetVersion"},"title":"Data","type":"array"}},"required":["data"],"title":"Items","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/{dataset_id}/versions/upload":{"post":{"tags":["Datasets"],"summary":"Upload rows to a dataset","description":"Add rows to a dataset from a JSONL body, or a CSV one (Content-Type: text/csv) whose\nfirst line is `context` and some of the dataset's decision ids. A CSV cell names the right\noutcome for its decision, written exactly as the dataset names it, and a blank one leaves\nthat decision out. CSV adds to datasets of targets only. The default upload limit is 16\nMiB. X-Max-Price-Usd is the most you agree to pay for a first day of storage, which rows\nthat take the dataset past the free size hold. X-Family names the family whose page adds\nthem, as `family` does for JSON rows.","operationId":"uploadDatasetRows","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"x-max-price-usd","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Max-Price-Usd"}},{"name":"x-family","in":"header","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z](?:-?[a-z0-9]){1,62}$"},{"type":"null"}],"description":"The family whose page adds these rows, such as router: one of your families on this dataset. The version records it, so the family can say where its new data came from.","title":"X-Family"},"description":"The family whose page adds these rows, such as router: one of your families on this dataset. The version records it, so the family can say where its new data came from."},{"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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"description":"One JSON object per line, or a CSV whose first line is `context` and some of the dataset's decision ids, and whose cells name each decision's right outcome.","content":{"application/x-ndjson":{"schema":{"type":"string"}},"text/csv":{"schema":{"type":"string"}}}}}},"/v1/datasets/{dataset_id}":{"get":{"tags":["Datasets"],"summary":"Get 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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"patch":{"tags":["Datasets"],"summary":"Rename dataset","description":"Rename a dataset without changing its examples, split or historical references.","operationId":"renameDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetRename"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"delete":{"tags":["Datasets"],"summary":"Delete dataset","description":"Delete a dataset for good, every version of it: its rows, its original upload, and the\ncopies its fine-tunes and prompt tuning kept. The fine-tunes, their models and their metrics stay. Work still\nreading it refuses the deletion. It can't be undone, and deleting again changes nothing.","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":{"description":"What a deletion answers: the id, gone for good.","properties":{"id":{"title":"Id","type":"string"},"deleted":{"const":true,"title":"Deleted","type":"boolean"}},"required":["id","deleted"],"title":"Deleted","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/{dataset_id}/restore":{"post":{"tags":["Datasets"],"summary":"Restore dataset","description":"Restore a dataset we archived, so it can be selected for new work. A dataset you\ndeleted is gone.","operationId":"restoreDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DatasetRestore"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/{dataset_id}/download":{"get":{"tags":["Datasets"],"summary":"Download dataset","description":"Download validated training examples as JSONL, including historical datasets: every\nrow of `version`, or of the latest, each with its `side` of the split, \"training\" or\n\"evaluation\".","operationId":"downloadDataset","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}}],"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/{dataset_id}/rows":{"get":{"tags":["Datasets"],"summary":"List dataset rows","description":"Page through the validated rows of one of your datasets: those of `version`, or of the\nlatest.","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"}},{"name":"partition","in":"query","required":false,"schema":{"enum":["all","training","evaluation"],"type":"string","default":"all","title":"Partition"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Example"},"title":"Data","type":"array"},"total":{"title":"Total","type":"integer"},"offset":{"title":"Offset","type":"integer"},"limit":{"title":"Limit","type":"integer"},"has_more":{"title":"Has More","type":"boolean"},"version":{"description":"The dataset version these rows are from.","title":"Version","type":"integer"}},"required":["data","total","offset","limit","has_more","version"],"title":"DatasetRowPage","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/datasets/{dataset_id}/labels-to-check":{"get":{"tags":["Datasets"],"summary":"List labels to check","description":"The labels prompt tuning doubted in this dataset, each with its row, until you\ndismiss them on the jobs that flagged them. A row's label never changes: a fix is a new\ndataset.","operationId":"listLabelsToCheck","parameters":[{"name":"dataset_id","in":"path","required":true,"schema":{"type":"string","title":"Dataset Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LabelToCheck"},"title":"Data","type":"array"}},"required":["data"],"title":"Items","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/evaluations":{"post":{"tags":["Evaluations"],"summary":"Evaluate selected models and reuse existing results","description":"Evaluate models on the evaluation rows of a dataset's latest version. Each queued\nevaluation records the model it scores (`model_id`, `model_label`), for a family the\nmodel it served then, and the family or model by its number it was asked by (`named`).\nIt scores that model to its end, even if the family moves or is switched off meanwhile.\nA model evaluated on that version already, or being evaluated, is reused as it stands; a\nfailed or cancelled one runs again only through\n`POST /v1/evaluations/{evaluation_id}/retry`.","operationId":"createEvaluations","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluationCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"dataset_id":{"title":"Dataset Id","type":"string"},"data":{"items":{"$ref":"#/components/schemas/Evaluation"},"title":"Data","type":"array"},"queued":{"title":"Queued","type":"integer"},"reused":{"title":"Reused","type":"integer"}},"required":["dataset_id","data","queued","reused"],"title":"EvaluationSubmission","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"tags":["Evaluations"],"summary":"List model evaluations for a dataset","operationId":"listDatasetEvaluations","parameters":[{"name":"dataset_id","in":"query","required":true,"schema":{"type":"string","maxLength":64,"title":"Dataset Id"}},{"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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/Evaluation"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/evaluations/{evaluation_id}":{"get":{"tags":["Evaluations"],"summary":"Get evaluation progress and results","operationId":"getEvaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"dataset_version":{"description":"The dataset version whose evaluation rows it scores.","title":"Dataset Version","type":"integer"},"model_id":{"title":"Model Id","type":"string"},"model_sha256":{"title":"Model Sha256","type":"string"},"model_label":{"title":"Model Label","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"generation":{"title":"Generation","type":"integer"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id"},"dataset_sha256":{"title":"Dataset Sha256","type":"string"},"evaluation_sha256":{"title":"Evaluation Sha256","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"evaluation_rows":{"title":"Evaluation Rows","type":"integer"},"decisions":{"title":"Decisions","type":"integer"},"named":{"description":"The family, or the model by its number, the request named, whose idle clock the run moves when it finishes.","title":"Named","type":"string"},"completed_rows":{"title":"Completed Rows","type":"integer"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Null until the evaluation succeeds. Then `n`, the decisions scored, with `accuracy`, `loss`, `brier` and `ece` for expected answers or `expected_reward` for rewards, and `latency_ms`, the median server milliseconds per request, when it was measured. A result taken from a fine-tune's own held-out scoring sends no request, so it has none.","title":"Metrics"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"required":["id","dataset_id","dataset_version","model_id","model_sha256","model_label","model_name","version","status","created_at","updated_at","generation","training_job_id","dataset_sha256","evaluation_sha256","method","evaluation_rows","decisions","completed_rows","metrics","error"],"title":"Evaluation","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/evaluations/{evaluation_id}/cancel":{"post":{"tags":["Evaluations"],"summary":"Cancel an evaluation","operationId":"cancelEvaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"dataset_version":{"description":"The dataset version whose evaluation rows it scores.","title":"Dataset Version","type":"integer"},"model_id":{"title":"Model Id","type":"string"},"model_sha256":{"title":"Model Sha256","type":"string"},"model_label":{"title":"Model Label","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"generation":{"title":"Generation","type":"integer"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id"},"dataset_sha256":{"title":"Dataset Sha256","type":"string"},"evaluation_sha256":{"title":"Evaluation Sha256","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"evaluation_rows":{"title":"Evaluation Rows","type":"integer"},"decisions":{"title":"Decisions","type":"integer"},"named":{"description":"The family, or the model by its number, the request named, whose idle clock the run moves when it finishes.","title":"Named","type":"string"},"completed_rows":{"title":"Completed Rows","type":"integer"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Null until the evaluation succeeds. Then `n`, the decisions scored, with `accuracy`, `loss`, `brier` and `ece` for expected answers or `expected_reward` for rewards, and `latency_ms`, the median server milliseconds per request, when it was measured. A result taken from a fine-tune's own held-out scoring sends no request, so it has none.","title":"Metrics"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"required":["id","dataset_id","dataset_version","model_id","model_sha256","model_label","model_name","version","status","created_at","updated_at","generation","training_job_id","dataset_sha256","evaluation_sha256","method","evaluation_rows","decisions","completed_rows","metrics","error"],"title":"Evaluation","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/evaluations/{evaluation_id}/retry":{"post":{"tags":["Evaluations"],"summary":"Resume a failed or cancelled evaluation","operationId":"retryEvaluation","parameters":[{"name":"evaluation_id","in":"path","required":true,"schema":{"type":"string","title":"Evaluation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"dataset_version":{"description":"The dataset version whose evaluation rows it scores.","title":"Dataset Version","type":"integer"},"model_id":{"title":"Model Id","type":"string"},"model_sha256":{"title":"Model Sha256","type":"string"},"model_label":{"title":"Model Label","type":"string"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"generation":{"title":"Generation","type":"integer"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id"},"dataset_sha256":{"title":"Dataset Sha256","type":"string"},"evaluation_sha256":{"title":"Evaluation Sha256","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"evaluation_rows":{"title":"Evaluation Rows","type":"integer"},"decisions":{"title":"Decisions","type":"integer"},"named":{"description":"The family, or the model by its number, the request named, whose idle clock the run moves when it finishes.","title":"Named","type":"string"},"completed_rows":{"title":"Completed Rows","type":"integer"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Null until the evaluation succeeds. Then `n`, the decisions scored, with `accuracy`, `loss`, `brier` and `ece` for expected answers or `expected_reward` for rewards, and `latency_ms`, the median server milliseconds per request, when it was measured. A result taken from a fine-tune's own held-out scoring sends no request, so it has none.","title":"Metrics"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"required":["id","dataset_id","dataset_version","model_id","model_sha256","model_label","model_name","version","status","created_at","updated_at","generation","training_job_id","dataset_sha256","evaluation_sha256","method","evaluation_rows","decisions","completed_rows","metrics","error"],"title":"Evaluation","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs":{"post":{"summary":"Start a family","description":"Start a new family with its first fine-tune, from a base or one of your models\n(`from`), on a dataset. Its model joins the family as family@1 if it passes its gate. While\na large dataset version's training tokens are first counted, it answers 503 tokens_counting\nwith Retry-After and starts nothing.","operationId":"createFineTuningJob","parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"},"description":"Reuse the same key and body after a lost response. A replay returns the job that key queued, with `Idempotency-Replayed: true`. A changed body conflicts."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"hyperparameters":{"$ref":"#/components/schemas/ResolvedHyperparameters"},"dataset_evaluation":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The family the job adds a model to.","title":"Family"},"family_deleted":{"description":"True once you deleted that family. The job and its charge stay.","title":"Family Deleted","type":"boolean"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the model it trains from, or null from a base.","title":"Parent"},"dataset_version":{"description":"The version of its dataset it trains on.","title":"Dataset Version","type":"integer"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"outcome":{"anyOf":[{"enum":["joined","gate_failed","failed","cancelled","rolled_back"],"type":"string"},{"type":"null"}],"description":"How it ended for its family: its model joined the family with the next number, or failed its gate and is not kept for you, or the run failed or was cancelled, or a rollback discarded the model that joined. Only a failed run or a cancellation is free and leaves the data for another try. Null while it runs.","title":"Outcome"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Evaluation groups and the gate, when complete.","title":"Metrics"},"error":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress"},"curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"description":"The training loss over steps, at most 300 points, each the means of a run of consecutive steps. Null until the job succeeds, or when its trainer kept none. Lists of jobs leave it out.","title":"Curve"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"},"split":{"additionalProperties":{"type":"integer"},"description":"train_rows and validation_rows, and trained_tokens: the training tokens the job trains, every rendered training sequence its steps run, each time they run it. A priced fine-tune's fee is its base's fine_tune_million_tokens_usd for them, and at least fine_tune_minimum_usd.","title":"Split","type":"object"},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"},"price_usd":{"description":"The fee held for this job, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged if it succeeds, released if it fails or is cancelled.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"rows_deleted":{"description":"True once a dataset whose rows its specification held was deleted: the job, its model and its metrics stay, but its held-out records are gone.","title":"Rows Deleted","type":"boolean"}},"required":["id","dataset_id","model","method","hyperparameters","family","family_deleted","parent","dataset_version","status","outcome","created_at","updated_at","output_model","metrics","error","progress","limits","split","lineage","price_usd","charge"],"title":"FineTuningJob","type":"object"}}},"headers":{"Idempotency-Replayed":{"description":"`true` when this response replays an earlier request that used the same `Idempotency-Key`. Absent when the request ran.","schema":{"type":"string","enum":["true"]}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"summary":"List fine-tuning jobs","description":"List your fine-tuning jobs, newest first, using cursor pagination. A job of a family\nyou deleted stays, with its charge, and says so (`family_deleted`).","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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/FineTuningJob"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}/continue":{"post":{"summary":"Continue a family","description":"Train a family's next model from its latest, on the rows its dataset gained since the\nfamily last trained. One fine-tune of a family at a time. A deleted family gets 410\nfamily_deleted. A family whose dataset was deleted gets 410 dataset_deleted: start a new\nfamily from its latest model. While a large dataset version's training tokens are first\ncounted, it answers 503 tokens_counting with Retry-After and starts nothing.","operationId":"continueFamily","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"},"description":"Reuse the same key and body after a lost response. A replay returns the job that key queued, with `Idempotency-Replayed: true`. A changed body conflicts."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/FamilyContinue"},{"type":"null"}],"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"hyperparameters":{"$ref":"#/components/schemas/ResolvedHyperparameters"},"dataset_evaluation":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The family the job adds a model to.","title":"Family"},"family_deleted":{"description":"True once you deleted that family. The job and its charge stay.","title":"Family Deleted","type":"boolean"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the model it trains from, or null from a base.","title":"Parent"},"dataset_version":{"description":"The version of its dataset it trains on.","title":"Dataset Version","type":"integer"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"outcome":{"anyOf":[{"enum":["joined","gate_failed","failed","cancelled","rolled_back"],"type":"string"},{"type":"null"}],"description":"How it ended for its family: its model joined the family with the next number, or failed its gate and is not kept for you, or the run failed or was cancelled, or a rollback discarded the model that joined. Only a failed run or a cancellation is free and leaves the data for another try. Null while it runs.","title":"Outcome"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Evaluation groups and the gate, when complete.","title":"Metrics"},"error":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress"},"curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"description":"The training loss over steps, at most 300 points, each the means of a run of consecutive steps. Null until the job succeeds, or when its trainer kept none. Lists of jobs leave it out.","title":"Curve"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"},"split":{"additionalProperties":{"type":"integer"},"description":"train_rows and validation_rows, and trained_tokens: the training tokens the job trains, every rendered training sequence its steps run, each time they run it. A priced fine-tune's fee is its base's fine_tune_million_tokens_usd for them, and at least fine_tune_minimum_usd.","title":"Split","type":"object"},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"},"price_usd":{"description":"The fee held for this job, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged if it succeeds, released if it fails or is cancelled.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"rows_deleted":{"description":"True once a dataset whose rows its specification held was deleted: the job, its model and its metrics stay, but its held-out records are gone.","title":"Rows Deleted","type":"boolean"}},"required":["id","dataset_id","model","method","hyperparameters","family","family_deleted","parent","dataset_version","status","outcome","created_at","updated_at","output_model","metrics","error","progress","limits","split","lineage","price_usd","charge"],"title":"FineTuningJob","type":"object"}}},"headers":{"Idempotency-Replayed":{"description":"`true` when this response replays an earlier request that used the same `Idempotency-Key`. Absent when the request ran.","schema":{"type":"string","enum":["true"]}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs/estimate":{"post":{"summary":"Estimate the fee of starting a family","description":"The exact fee `POST /v1/fine-tuning/jobs` would hold for the same body now, without\nmax_price_usd, and the training tokens and steps it is for. It reads and counts the\ndataset as the start does, and refuses what the start would about the dataset, the family\nname, the base, the rows and the steps. Nothing is queued or held, and credit, storage and\nqueue room are checked when the job starts. The estimate is exact if nothing changes\nbefore you start; pass it as max_price_usd to cap the price. While a large dataset\nversion's training tokens are first counted, it answers 503 tokens_counting with\nRetry-After: ask again then.","operationId":"estimateFineTuningJob","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEstimate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"currency":{"const":"USD","title":"Currency","type":"string"},"price_usd":{"description":"The fee a fine-tune started now with the same body would hold, as exact USD: its base's fine_tune_million_tokens_usd for trained_tokens, and at least fine_tune_minimum_usd. 0 when it would be free. The job's price_usd is this sum while the prices, the account, the dataset and the family stay as they are; send it as max_price_usd, and a job that would cost more is refused with price_changed.","title":"Price Usd","type":"string"},"minimum_applied":{"description":"True when the fee is fine_tune_minimum_usd, which is more than its training tokens cost.","title":"Minimum Applied","type":"boolean"},"trained_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The training tokens it would train, as the job's split.trained_tokens counts them. Null only for a free fine-tune whose rows can't be counted.","title":"Trained Tokens"},"steps":{"description":"Its training steps: the ones sent, or the default passes.","title":"Steps","type":"integer"},"seed":{"description":"Its seed, which orders the rows its steps take.","title":"Seed","type":"integer"},"passes":{"description":"How many times its steps go over its training rows, to two decimals.","title":"Passes","type":"number"},"train_rows":{"description":"The training rows it trains on: a continuation's new rows and the earlier rows sampled with them.","title":"Train Rows","type":"integer"},"dataset_version":{"description":"The dataset version it would train on: its newest.","title":"Dataset Version","type":"integer"}},"required":["currency","price_usd","minimum_applied","trained_tokens","steps","seed","passes","train_rows","dataset_version"],"title":"FineTuneEstimate","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/families/{family}/continue/estimate":{"post":{"summary":"Estimate the fee of continuing a family","description":"The exact fee `POST /v1/families/{family}/continue` would hold for the same body now,\nwithout max_price_usd, worked out as the continuation does: the same new rows and the same\nsample of earlier rows. Nothing is queued or held. The estimate is exact if nothing\nchanges before you start; pass it as max_price_usd to cap the price. While a large dataset\nversion's training tokens are first counted, it answers 503 tokens_counting with\nRetry-After: ask again then.","operationId":"estimateFamilyContinue","parameters":[{"name":"family","in":"path","required":true,"schema":{"type":"string","title":"Family"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ContinueEstimate"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"currency":{"const":"USD","title":"Currency","type":"string"},"price_usd":{"description":"The fee a fine-tune started now with the same body would hold, as exact USD: its base's fine_tune_million_tokens_usd for trained_tokens, and at least fine_tune_minimum_usd. 0 when it would be free. The job's price_usd is this sum while the prices, the account, the dataset and the family stay as they are; send it as max_price_usd, and a job that would cost more is refused with price_changed.","title":"Price Usd","type":"string"},"minimum_applied":{"description":"True when the fee is fine_tune_minimum_usd, which is more than its training tokens cost.","title":"Minimum Applied","type":"boolean"},"trained_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The training tokens it would train, as the job's split.trained_tokens counts them. Null only for a free fine-tune whose rows can't be counted.","title":"Trained Tokens"},"steps":{"description":"Its training steps: the ones sent, or the default passes.","title":"Steps","type":"integer"},"seed":{"description":"Its seed, which orders the rows its steps take.","title":"Seed","type":"integer"},"passes":{"description":"How many times its steps go over its training rows, to two decimals.","title":"Passes","type":"number"},"train_rows":{"description":"The training rows it trains on: a continuation's new rows and the earlier rows sampled with them.","title":"Train Rows","type":"integer"},"dataset_version":{"description":"The dataset version it would train on: its newest.","title":"Dataset Version","type":"integer"}},"required":["currency","price_usd","minimum_applied","trained_tokens","steps","seed","passes","train_rows","dataset_version"],"title":"FineTuneEstimate","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs/{job_id}":{"get":{"summary":"Get fine-tuning job","description":"Get a fine-tuning job's 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":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"hyperparameters":{"$ref":"#/components/schemas/ResolvedHyperparameters"},"dataset_evaluation":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The family the job adds a model to.","title":"Family"},"family_deleted":{"description":"True once you deleted that family. The job and its charge stay.","title":"Family Deleted","type":"boolean"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the model it trains from, or null from a base.","title":"Parent"},"dataset_version":{"description":"The version of its dataset it trains on.","title":"Dataset Version","type":"integer"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"outcome":{"anyOf":[{"enum":["joined","gate_failed","failed","cancelled","rolled_back"],"type":"string"},{"type":"null"}],"description":"How it ended for its family: its model joined the family with the next number, or failed its gate and is not kept for you, or the run failed or was cancelled, or a rollback discarded the model that joined. Only a failed run or a cancellation is free and leaves the data for another try. Null while it runs.","title":"Outcome"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Evaluation groups and the gate, when complete.","title":"Metrics"},"error":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress"},"curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"description":"The training loss over steps, at most 300 points, each the means of a run of consecutive steps. Null until the job succeeds, or when its trainer kept none. Lists of jobs leave it out.","title":"Curve"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"},"split":{"additionalProperties":{"type":"integer"},"description":"train_rows and validation_rows, and trained_tokens: the training tokens the job trains, every rendered training sequence its steps run, each time they run it. A priced fine-tune's fee is its base's fine_tune_million_tokens_usd for them, and at least fine_tune_minimum_usd.","title":"Split","type":"object"},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"},"price_usd":{"description":"The fee held for this job, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged if it succeeds, released if it fails or is cancelled.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"rows_deleted":{"description":"True once a dataset whose rows its specification held was deleted: the job, its model and its metrics stay, but its held-out records are gone.","title":"Rows Deleted","type":"boolean"}},"required":["id","dataset_id","model","method","hyperparameters","family","family_deleted","parent","dataset_version","status","outcome","created_at","updated_at","output_model","metrics","error","progress","limits","split","lineage","price_usd","charge"],"title":"FineTuningJob","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs/{job_id}/events":{"get":{"summary":"List job events","description":"List a fine-tuning job's events in chronological 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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/JobEvent"},"title":"Data","type":"array"}},"required":["data"],"title":"Items","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs/{job_id}/records":{"get":{"summary":"List 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":{"properties":{"data":{"items":{},"title":"Data","type":"array"},"total":{"title":"Total","type":"integer"},"offset":{"title":"Offset","type":"integer"},"limit":{"title":"Limit","type":"integer"},"has_more":{"title":"Has More","type":"boolean"},"group":{"enum":["adapted","base","parent"],"title":"Group","type":"string"},"groups":{"items":{"type":"string"},"title":"Groups","type":"array"}},"required":["data","total","offset","limit","has_more","group","groups"],"title":"HeldoutPage","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/fine-tuning/jobs/{job_id}/cancel":{"post":{"summary":"Cancel fine-tuning job","description":"Request cancellation of a fine-tuning job. Running work may stop asynchronously.","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":{"properties":{"id":{"title":"Id","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"hyperparameters":{"$ref":"#/components/schemas/ResolvedHyperparameters"},"dataset_evaluation":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The family the job adds a model to.","title":"Family"},"family_deleted":{"description":"True once you deleted that family. The job and its charge stay.","title":"Family Deleted","type":"boolean"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The id of the model it trains from, or null from a base.","title":"Parent"},"dataset_version":{"description":"The version of its dataset it trains on.","title":"Dataset Version","type":"integer"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"outcome":{"anyOf":[{"enum":["joined","gate_failed","failed","cancelled","rolled_back"],"type":"string"},{"type":"null"}],"description":"How it ended for its family: its model joined the family with the next number, or failed its gate and is not kept for you, or the run failed or was cancelled, or a rollback discarded the model that joined. Only a failed run or a cancellation is free and leaves the data for another try. Null while it runs.","title":"Outcome"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"description":"Evaluation groups and the gate, when complete.","title":"Metrics"},"error":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress"},"curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"description":"The training loss over steps, at most 300 points, each the means of a run of consecutive steps. Null until the job succeeds, or when its trainer kept none. Lists of jobs leave it out.","title":"Curve"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"},"split":{"additionalProperties":{"type":"integer"},"description":"train_rows and validation_rows, and trained_tokens: the training tokens the job trains, every rendered training sequence its steps run, each time they run it. A priced fine-tune's fee is its base's fine_tune_million_tokens_usd for them, and at least fine_tune_minimum_usd.","title":"Split","type":"object"},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"},"price_usd":{"description":"The fee held for this job, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged if it succeeds, released if it fails or is cancelled.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"rows_deleted":{"description":"True once a dataset whose rows its specification held was deleted: the job, its model and its metrics stay, but its held-out records are gone.","title":"Rows Deleted","type":"boolean"}},"required":["id","dataset_id","model","method","hyperparameters","family","family_deleted","parent","dataset_version","status","outcome","created_at","updated_at","output_model","metrics","error","progress","limits","split","lineage","price_usd","charge"],"title":"FineTuningJob","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/prompt-tuning/jobs":{"post":{"tags":["Prompt tuning"],"summary":"Create prompt-tuning job","description":"Start tuning one decision's wording for a model: a base model, or a fine-tuned model\nthat answers calls now, named by its family while the family is switched on or by its\nnumber, such as router@3, while its own switch is on. The job tunes for that model to its\nend, even if it is switched off meanwhile. 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":{"properties":{"id":{"title":"Id","type":"string"},"object":{"const":"prompt_tuning.job","title":"Object","type":"string"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"decision":{"title":"Decision","type":"string"},"effort":{"enum":["standard","thorough"],"title":"Effort","type":"string"},"price_usd":{"description":"The job's fee, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged for a proven improvement or a rerun, released otherwise.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"test_looks":{"title":"Test Looks","type":"integer"},"progress":{"anyOf":[{"$ref":"#/components/schemas/PromptProgress"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/PromptResult"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"error":{"title":"Error","type":"string"},"label_issues_dismissed_at":{"description":"When you dismissed its label issues, so its dataset no longer lists them.","title":"Label Issues Dismissed At","type":"number"}},"required":["id","object","status","dataset_id","model","decision","effort","price_usd","charge","test_looks","progress","result","created_at","updated_at"],"title":"PromptTuningJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"tags":["Prompt tuning"],"summary":"List prompt-tuning jobs","description":"List your prompt-tuning jobs, newest first, using cursor pagination.","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"}},{"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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/PromptTuningJob"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/prompt-tuning/jobs/{job_id}":{"get":{"tags":["Prompt tuning"],"summary":"Get prompt-tuning job","description":"Get a prompt-tuning job, including its tested result when complete.","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":{"properties":{"id":{"title":"Id","type":"string"},"object":{"const":"prompt_tuning.job","title":"Object","type":"string"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"decision":{"title":"Decision","type":"string"},"effort":{"enum":["standard","thorough"],"title":"Effort","type":"string"},"price_usd":{"description":"The job's fee, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged for a proven improvement or a rerun, released otherwise.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"test_looks":{"title":"Test Looks","type":"integer"},"progress":{"anyOf":[{"$ref":"#/components/schemas/PromptProgress"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/PromptResult"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"error":{"title":"Error","type":"string"},"label_issues_dismissed_at":{"description":"When you dismissed its label issues, so its dataset no longer lists them.","title":"Label Issues Dismissed At","type":"number"}},"required":["id","object","status","dataset_id","model","decision","effort","price_usd","charge","test_looks","progress","result","created_at","updated_at"],"title":"PromptTuningJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"patch":{"tags":["Prompt tuning"],"summary":"Dismiss label issues","description":"Dismiss a succeeded job's label issues, so its dataset no longer lists them as labels\nto check, or show them again. Its result stays as it is.","operationId":"updatePromptTuningJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptTuningUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"object":{"const":"prompt_tuning.job","title":"Object","type":"string"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"decision":{"title":"Decision","type":"string"},"effort":{"enum":["standard","thorough"],"title":"Effort","type":"string"},"price_usd":{"description":"The job's fee, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged for a proven improvement or a rerun, released otherwise.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"test_looks":{"title":"Test Looks","type":"integer"},"progress":{"anyOf":[{"$ref":"#/components/schemas/PromptProgress"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/PromptResult"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"error":{"title":"Error","type":"string"},"label_issues_dismissed_at":{"description":"When you dismissed its label issues, so its dataset no longer lists them.","title":"Label Issues Dismissed At","type":"number"}},"required":["id","object","status","dataset_id","model","decision","effort","price_usd","charge","test_looks","progress","result","created_at","updated_at"],"title":"PromptTuningJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/prompt-tuning/jobs/{job_id}/cancel":{"post":{"tags":["Prompt tuning"],"summary":"Cancel prompt-tuning job","description":"Request cancellation of a prompt-tuning job. Running work may stop asynchronously.","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":{"properties":{"id":{"title":"Id","type":"string"},"object":{"const":"prompt_tuning.job","title":"Object","type":"string"},"status":{"enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status","type":"string"},"dataset_id":{"title":"Dataset Id","type":"string"},"model":{"title":"Model","type":"string"},"decision":{"title":"Decision","type":"string"},"effort":{"enum":["standard","thorough"],"title":"Effort","type":"string"},"price_usd":{"description":"The job's fee, as exact USD.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged for a proven improvement or a rerun, released otherwise.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"test_looks":{"title":"Test Looks","type":"integer"},"progress":{"anyOf":[{"$ref":"#/components/schemas/PromptProgress"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/PromptResult"},{"type":"null"}]},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"error":{"title":"Error","type":"string"},"label_issues_dismissed_at":{"description":"When you dismissed its label issues, so its dataset no longer lists them.","title":"Label Issues Dismissed At","type":"number"}},"required":["id","object","status","dataset_id","model","decision","effort","price_usd","charge","test_looks","progress","result","created_at","updated_at"],"title":"PromptTuningJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/teachers":{"get":{"tags":["Labeling"],"summary":"List teachers","description":"List teacher models, labeling availability, defaults, and source limits.","operationId":"listTeachers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{},"title":"Data","type":"array"},"available":{"title":"Available","type":"boolean"},"reason":{"title":"Reason","type":"string"},"defaults":{"additionalProperties":{"items":{"type":"string"},"type":"array"},"title":"Defaults","type":"object"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"}},"required":["data","available","defaults","limits"],"title":"Teachers","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/sources":{"post":{"tags":["Labeling"],"summary":"Upload queries","description":"Upload unlabelled queries as JSONL for teacher labeling.","operationId":"uploadLabelingSource","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[^\\x00-\\x1f\\x7f]+$","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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"rows":{"title":"Rows","type":"integer"},"sha256":{"title":"Sha256","type":"string"},"input":{"$ref":"#/components/schemas/InputReceipt"},"created_at":{"title":"Created At","type":"number"}},"required":["id","name","rows","sha256","input","created_at"],"title":"LabelingSource","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"description":"One JSON object per line.","content":{"application/x-ndjson":{"schema":{"type":"string"}}}}},"get":{"tags":["Labeling"],"summary":"List 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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LabelingSource"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/sources/{source_id}":{"get":{"tags":["Labeling"],"summary":"Get 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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"rows":{"title":"Rows","type":"integer"},"sha256":{"title":"Sha256","type":"string"},"input":{"$ref":"#/components/schemas/InputReceipt"},"created_at":{"title":"Created At","type":"number"}},"required":["id","name","rows","sha256","input","created_at"],"title":"LabelingSource","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"delete":{"tags":["Labeling"],"summary":"Delete query source","description":"Delete a labelling source for good: its queries, and its jobs' teacher answers. A\ndataset made from it stays until you delete that too. It can't be undone.","operationId":"deleteLabelingSource","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"description":"What a deletion answers: the id, gone for good.","properties":{"id":{"title":"Id","type":"string"},"deleted":{"const":true,"title":"Deleted","type":"boolean"}},"required":["id","deleted"],"title":"Deleted","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs":{"post":{"tags":["Labeling"],"summary":"Create labeling job","description":"Ask teacher models to label a query source for review.","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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"source_id":{"title":"Source Id","type":"string"},"status":{"description":"deleted: you deleted its source, and with it the queries and the teachers' answers. The job and its counts stay.","enum":["queued","running","cancelling","cancelled","review_ready","failed","finalized","discarded","deleted"],"title":"Status","type":"string"},"teacher_models":{"items":{"type":"string"},"title":"Teacher Models","type":"array"},"rows":{"title":"Rows","type":"integer"},"completed_rows":{"title":"Completed Rows","type":"integer"},"valid_rows":{"title":"Valid Rows","type":"integer"},"agreement_rows":{"title":"Agreement Rows","type":"integer"},"error_rows":{"title":"Error Rows","type":"integer"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"price_usd":{"description":"The job's fee, as exact USD: each of its teachers' price for a row, for every row.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged once its labels are ready for review, released if it fails or is cancelled first.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"required":["id","name","source_id","status","teacher_models","rows","completed_rows","valid_rows","agreement_rows","error_rows","created_at","updated_at","price_usd","charge"],"title":"LabelingJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]},"get":{"tags":["Labeling"],"summary":"List labeling 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","discarded","failed","cancelled","deleted"],"type":"string"}},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LabelingJob"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs/{job_id}":{"get":{"tags":["Labeling"],"summary":"Get labeling 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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"source_id":{"title":"Source Id","type":"string"},"status":{"description":"deleted: you deleted its source, and with it the queries and the teachers' answers. The job and its counts stay.","enum":["queued","running","cancelling","cancelled","review_ready","failed","finalized","discarded","deleted"],"title":"Status","type":"string"},"teacher_models":{"items":{"type":"string"},"title":"Teacher Models","type":"array"},"rows":{"title":"Rows","type":"integer"},"completed_rows":{"title":"Completed Rows","type":"integer"},"valid_rows":{"title":"Valid Rows","type":"integer"},"agreement_rows":{"title":"Agreement Rows","type":"integer"},"error_rows":{"title":"Error Rows","type":"integer"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"price_usd":{"description":"The job's fee, as exact USD: each of its teachers' price for a row, for every row.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged once its labels are ready for review, released if it fails or is cancelled first.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"required":["id","name","source_id","status","teacher_models","rows","completed_rows","valid_rows","agreement_rows","error_rows","created_at","updated_at","price_usd","charge"],"title":"LabelingJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs/{job_id}/results":{"get":{"tags":["Labeling"],"summary":"List labeling results","description":"Page through teacher labels for review before creating a dataset. A job's labels can\nbe read once it is review_ready (409 review_required before that, and for a job that\nfailed or was cancelled, which costs nothing).","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":{"properties":{"data":{"items":{"$ref":"#/components/schemas/LabelingResult"},"title":"Data","type":"array"},"total":{"title":"Total","type":"integer"},"offset":{"title":"Offset","type":"integer"},"limit":{"title":"Limit","type":"integer"}},"required":["data","total","offset","limit"],"title":"Rows","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs/{job_id}/cancel":{"post":{"tags":["Labeling"],"summary":"Cancel labeling job","description":"Request cancellation of a labeling job. Running work may stop asynchronously.","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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"source_id":{"title":"Source Id","type":"string"},"status":{"description":"deleted: you deleted its source, and with it the queries and the teachers' answers. The job and its counts stay.","enum":["queued","running","cancelling","cancelled","review_ready","failed","finalized","discarded","deleted"],"title":"Status","type":"string"},"teacher_models":{"items":{"type":"string"},"title":"Teacher Models","type":"array"},"rows":{"title":"Rows","type":"integer"},"completed_rows":{"title":"Completed Rows","type":"integer"},"valid_rows":{"title":"Valid Rows","type":"integer"},"agreement_rows":{"title":"Agreement Rows","type":"integer"},"error_rows":{"title":"Error Rows","type":"integer"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"price_usd":{"description":"The job's fee, as exact USD: each of its teachers' price for a row, for every row.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged once its labels are ready for review, released if it fails or is cancelled first.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"required":["id","name","source_id","status","teacher_models","rows","completed_rows","valid_rows","agreement_rows","error_rows","created_at","updated_at","price_usd","charge"],"title":"LabelingJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs/{job_id}/discard":{"post":{"tags":["Labeling"],"summary":"Discard labeling job","description":"Set labels ready to review aside without making a dataset. They can still be finalized.","operationId":"discardLabelingJob","parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"source_id":{"title":"Source Id","type":"string"},"status":{"description":"deleted: you deleted its source, and with it the queries and the teachers' answers. The job and its counts stay.","enum":["queued","running","cancelling","cancelled","review_ready","failed","finalized","discarded","deleted"],"title":"Status","type":"string"},"teacher_models":{"items":{"type":"string"},"title":"Teacher Models","type":"array"},"rows":{"title":"Rows","type":"integer"},"completed_rows":{"title":"Completed Rows","type":"integer"},"valid_rows":{"title":"Valid Rows","type":"integer"},"agreement_rows":{"title":"Agreement Rows","type":"integer"},"error_rows":{"title":"Error Rows","type":"integer"},"created_at":{"title":"Created At","type":"number"},"updated_at":{"title":"Updated At","type":"number"},"price_usd":{"description":"The job's fee, as exact USD: each of its teachers' price for a row, for every row.","title":"Price Usd","type":"string"},"charge":{"description":"What the fee is doing: held while the job runs, charged once its labels are ready for review, released if it fails or is cancelled first.","enum":["free","reserved","charged","released"],"title":"Charge","type":"string"},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"required":["id","name","source_id","status","teacher_models","rows","completed_rows","valid_rows","agreement_rows","error_rows","created_at","updated_at","price_usd","charge"],"title":"LabelingJob","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/labeling/jobs/{job_id}/finalize":{"post":{"tags":["Labeling"],"summary":"Finalize labeling job","description":"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":{"properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"created_at":{"title":"Created At","type":"number"},"sha256":{"description":"Names every row of the latest version: its first version's file digest, each later one's chained on.","title":"Sha256","type":"string"},"version":{"description":"The latest version. Counts and the split are this version's.","title":"Version","type":"integer"},"rows":{"title":"Rows","type":"integer"},"contexts":{"title":"Contexts","type":"integer"},"duplicates_removed":{"title":"Duplicates Removed","type":"integer"},"method":{"enum":["sft","reward"],"title":"Method","type":"string"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library.","title":"Archived At"},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then.","title":"Used At"},"evaluation_only":{"title":"Evaluation Only","type":"boolean"},"evaluation_fraction":{"title":"Evaluation Fraction","type":"number"},"split":{"additionalProperties":{"type":"integer"},"title":"Split","type":"object"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them.","title":"Labels To Check","type":"integer"}},"required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account":{"get":{"tags":["Accounts"],"summary":"Get account","description":"Account identity, wallet and current policy limits. automatic_tier follows verified purchases net of reversals; minimum_tier is the administrative floor; tier is the effective tier. effective_limits contains rpm, tpm, concurrency, stored_objects, stored_mib, kept_warm, answering, read_rpm, write_rpm, estimate_tokens_per_minute and fine_tunes, shared across this account's keys and browser sessions. storage is what the account keeps now: objects and bytes, archived datasets included.","operationId":"getAccount","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"user":{"$ref":"#/components/schemas/User"},"accounts_enabled":{"title":"Accounts Enabled","type":"boolean"},"automatic_tier":{"title":"Automatic Tier","type":"integer"},"minimum_tier":{"title":"Minimum Tier","type":"integer"},"tier":{"title":"Tier","type":"integer"},"effective_limits":{"$ref":"#/components/schemas/AccountLimits"},"places":{"$ref":"#/components/schemas/Places"},"storage":{"$ref":"#/components/schemas/Storage"},"waitlist":{"anyOf":[{"$ref":"#/components/schemas/Waitlist"},{"type":"null"}]},"referrals":{"$ref":"#/components/schemas/Referrals"},"wallet":{"$ref":"#/components/schemas/Wallet"},"onboarding":{"$ref":"#/components/schemas/Onboarding"},"data_exports":{"$ref":"#/components/schemas/DataExports","description":"Downloads of all the account's data, which the console's Download your data starts."},"dismissed_notices":{"description":"The notices of the console's Latest dismissed on any device in the last week, newest first, by their keys there.","items":{"type":"string"},"title":"Dismissed Notices","type":"array"},"pins":{"$ref":"#/components/schemas/Pins","description":"The rows pinned at the top of the console's Decision Lab lists on any device, at most five a list."}},"required":["user","accounts_enabled","automatic_tier","minimum_tier","tier","effective_limits","places","storage","waitlist","referrals","wallet","onboarding","data_exports","dismissed_notices","pins"],"title":"Account","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/usage":{"get":{"tags":["Accounts"],"summary":"Get usage","description":"Daily usage, errors, server time, and exact USD costs, with model and API-key breakdowns.\n\nCalendar days in the selected timezone (UTC by default), today included,\nwith the preceding period for comparison. requests counts successes;\ntotal_requests includes recorded 4xx/5xx failures. cost_usd is an exact\ndecimal string. Key metadata never contains credentials. These fields count\ninference; `laboratory` has fine-tunes, prompt jobs, evaluation predictions, keep warm\nand dataset storage, and ignores the model, key and source filters.","operationId":"getUsage","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":1,"default":30,"title":"Days"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"default":"UTC","title":"Timezone"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"}},{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Api Key Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(api|console)$"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"days":{"title":"Days","type":"integer"},"start":{"title":"Start","type":"string"},"end":{"title":"End","type":"string"},"timezone":{"title":"Timezone","type":"string"},"totals":{"$ref":"#/components/schemas/UsageTotals"},"previous":{"$ref":"#/components/schemas/UsageTotals"},"daily":{"items":{"$ref":"#/components/schemas/DailyUsage"},"title":"Daily","type":"array"},"by_model":{"items":{"$ref":"#/components/schemas/ModelUsage"},"title":"By Model","type":"array"},"by_api_key":{"items":{"$ref":"#/components/schemas/KeyUsage"},"title":"By Api Key","type":"array"},"laboratory":{"$ref":"#/components/schemas/LaboratoryUsage","description":"Laboratory spend in the period. The model, key and source filters don't apply to it. The other fields count inference only, so evaluation predictions are here instead."}},"required":["days","start","end","timezone","totals","previous","daily","by_model","by_api_key","laboratory"],"title":"UsageSeries","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/usage/requests":{"get":{"tags":["Accounts"],"summary":"List requests","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":200,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Cursor"}},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","maxLength":64,"default":"UTC","title":"Timezone"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Model"}},{"name":"api_key_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Api Key Id"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(api|console)$"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/UsageRequest"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/keys":{"get":{"tags":["Accounts"],"summary":"List API keys","operationId":"listApiKeys","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":100,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Cursor"}},{"name":"revoked","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter active (false) or revoked (true) keys. Omit to list both.","title":"Revoked"},"description":"Filter active (false) or revoked (true) keys. Omit to list both."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{"$ref":"#/components/schemas/ApiKey"},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"required":["data","has_more","next_cursor"],"title":"Page","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/early-access":{"post":{"tags":["Accounts"],"summary":"Request early access","operationId":"requestEarlyAccess","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EarlyAccess"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"model":{"title":"Model","type":"string"},"received":{"const":true,"title":"Received","type":"boolean"}},"required":["id","model","received"],"title":"EarlyAccess","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/wallet":{"get":{"tags":["Billing"],"summary":"Get paid and promotional credit balances and grants","description":"The balance, its grants, and what holds the reserved part (`reservations`).\n`financial_blocked` says the figures are paused for reconciliation, when they and the\nreservations can disagree until the account is repaired.","operationId":"getWallet","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"currency":{"const":"USD","title":"Currency","type":"string"},"paid_usd":{"title":"Paid Usd","type":"string"},"promotional_usd":{"title":"Promotional Usd","type":"string"},"balance_usd":{"description":"The credit the account has: paid credit and promotional grants, with what expired grants still hold for work in progress. Available plus reserved, unless a reversed payment left paid holds uncovered.","title":"Balance Usd","type":"string"},"available_usd":{"title":"Available Usd","type":"string"},"reserved_usd":{"title":"Reserved Usd","type":"string"},"financial_shortfall_usd":{"description":"Paid credit the account is missing: what it owes, and paid holds it no longer covers.","title":"Financial Shortfall Usd","type":"string"},"grants":{"items":{"$ref":"#/components/schemas/Grant"},"title":"Grants","type":"array"},"reservations":{"$ref":"#/components/schemas/Reservations","description":"What holds the reserved credit. Each reservation is charged or released when its work ends."},"financial_blocked":{"description":"True while the account's figures are paused for reconciliation: work it accepted still ends and is recorded, but the balance, available and reserved amounts stay as they were until support repairs them, so they can disagree with `reservations` meanwhile.","title":"Financial Blocked","type":"boolean"}},"required":["currency","paid_usd","promotional_usd","balance_usd","available_usd","reserved_usd","financial_shortfall_usd","grants","reservations","financial_blocked"],"title":"AccountWallet","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/payments":{"get":{"tags":["Billing"],"summary":"Page through your purchases and their settlement status","operationId":"listPayments","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{},"title":"Data","type":"array"},"has_more":{"title":"Has More","type":"boolean"},"offset":{"title":"Offset","type":"integer"},"limit":{"title":"Limit","type":"integer"},"minimum_usd":{"title":"Minimum Usd","type":"string"},"suggested_usd":{"items":{"type":"string"},"title":"Suggested Usd","type":"array"},"purchase_valid_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"How many days credit bought now lasts; null if it doesn't expire.","title":"Purchase Valid Days"},"checkout_enabled":{"title":"Checkout Enabled","type":"boolean"},"test_mode":{"title":"Test Mode","type":"boolean"}},"required":["data","has_more","offset","limit","minimum_usd","suggested_usd","purchase_valid_days","checkout_enabled","test_mode"],"title":"PaymentHistory","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/payments/{purchase_id}":{"get":{"tags":["Billing"],"summary":"Get one purchase and its verified settlement state","operationId":"getPayment","parameters":[{"name":"purchase_id","in":"path","required":true,"schema":{"type":"string","title":"Purchase Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"id":{"title":"Id","type":"string"},"status":{"title":"Status","type":"string"},"origin":{"enum":["manual","automatic"],"title":"Origin","type":"string"},"amount_usd":{"title":"Amount Usd","type":"string"},"tax_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The tax added on top of the credit when it was paid; null until the payment is seen, and for payments made before tax was charged.","title":"Tax Usd"},"reversed_usd":{"title":"Reversed Usd","type":"string"},"checkout_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The hosted checkout page, for the console's session. Null to an API key, which may not complete a payment.","title":"Checkout Url"},"receipt_url":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The payment's invoice once it is paid, or its Stripe receipt, for the console's session. Null to an API key, since an invoice shows the billing address and VAT number.","title":"Receipt Url"},"created_at":{"title":"Created At","type":"number"},"credited_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credited At"},"expires_at":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"When the purchase's credit expires; null if it never does.","title":"Expires At"},"expired_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"What expired of it, once its expiry has been recorded; null until then.","title":"Expired Usd"}},"required":["id","status","origin","amount_usd","tax_usd","reversed_usd","checkout_url","receipt_url","created_at","credited_at","expires_at","expired_usd"],"title":"Purchase","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/automatic-topup":{"get":{"tags":["Billing"],"summary":"Get your automatic top-up settings","operationId":"getAutomaticTopup","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"enabled":{"title":"Enabled","type":"boolean"},"revision":{"title":"Revision","type":"integer"},"threshold_usd":{"title":"Threshold Usd","type":"string"},"amount_usd":{"title":"Amount Usd","type":"string"},"monthly_limit_usd":{"title":"Monthly Limit Usd","type":"string"},"monthly_used_usd":{"title":"Monthly Used Usd","type":"string"},"resets_at":{"title":"Resets At","type":"number"},"card":{"anyOf":[{"$ref":"#/components/schemas/Card"},{"type":"null"}]},"status":{"title":"Status","type":"string"},"available":{"title":"Available","type":"boolean"},"pending_purchase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Purchase Id"},"setup":{"anyOf":[{"$ref":"#/components/schemas/CardSetup"},{"type":"null"}]}},"required":["enabled","revision","threshold_usd","amount_usd","monthly_limit_usd","monthly_used_usd","resets_at","card","status","available","pending_purchase_id","setup"],"title":"AutomaticTopup","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/account/referrals":{"get":{"tags":["Billing"],"summary":"Get signup attribution and lifetime referral rewards","operationId":"getReferrals","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"data":{"items":{},"title":"Data","type":"array"},"verified_signups":{"title":"Verified Signups","type":"integer"},"rewards_issued":{"title":"Rewards Issued","type":"integer"},"lifetime_limit":{"title":"Lifetime Limit","type":"integer"},"reward_usd":{"title":"Reward Usd","type":"string"},"minimum_purchase_usd":{"title":"Minimum Purchase Usd","type":"string"}},"required":["data","verified_signups","rewards_issued","lifetime_limit","reward_usd","minimum_purchase_usd"],"title":"ReferralHistory","type":"object"}}}},"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"}}}}},"x-internal":false,"security":[{"BearerAuth":[]}]}},"/v1/hooks/claude-code":{"post":{"summary":"Check tool call","description":"A PreToolUse hook for Claude Code.\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":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":1,"maxLength":255,"pattern":"^[!-~]+$"},"description":"Reuse the same key and body after a lost response. A successful replay does not execute or charge again. Changed request bodies conflict; expired replay bodies are not executed again under the old key."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"hookSpecificOutput":{"$ref":"#/components/schemas/HookDecision"}},"title":"HookResponse","type":"object"}}},"headers":{"Idempotency-Replayed":{"description":"`true` when this response replays an earlier request that used the same `Idempotency-Key`. Absent when the request ran.","schema":{"type":"string","enum":["true"]}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"hook_event_name":{"title":"Hook Event Name","type":"string"},"tool_name":{"title":"Tool Name","type":"string"},"tool_input":{"title":"Tool Input"},"cwd":{"title":"Cwd","type":"string"},"permission_mode":{"title":"Permission Mode","type":"string"},"agent_type":{"title":"Agent Type","type":"string"}},"title":"HookRequest","type":"object"}}}}}},"/healthz":{"get":{"summary":"Check health","operationId":"health","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"status":{"const":"ok","title":"Status","type":"string"}},"required":["status"],"title":"Health","type":"object"}}}},"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"],"x-internal":false,"security":[]}},"/v1/onehot":{"get":{"summary":"Discover capabilities","description":"Discover models, recipes, limits, prices, and training, labeling and tuning availability.","operationId":"discover","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"training_available":{"title":"Training Available","type":"boolean"},"labeling_available":{"title":"Labeling Available","type":"boolean"},"prompt_tuning":{"$ref":"#/components/schemas/PromptAvailability"},"pricing":{"$ref":"#/components/schemas/PriceList"},"models":{"items":{"$ref":"#/components/schemas/Model"},"title":"Models","type":"array"},"recipes":{"items":{"$ref":"#/components/schemas/Recipe"},"title":"Recipes","type":"array"},"limits":{"additionalProperties":{"type":"integer"},"title":"Limits","type":"object"},"warnings":{"description":"Advisory capacity warnings at the time of this read. An empty list does not prove spare capacity: engines with missing or stale measurements cannot be assessed. A model warning applies to that exact catalogue model; queue warnings concern fine-tuning.","items":{"$ref":"#/components/schemas/ServiceWarning"},"title":"Warnings","type":"array"}},"required":["training_available","labeling_available","prompt_tuning","pricing","models","recipes","limits","warnings"],"title":"Discovery","type":"object"}}}},"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"],"x-internal":false,"security":[{"BearerAuth":[]}]}}},"components":{"schemas":{"ContinueEstimate":{"properties":{"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters"},"latest":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Latest","description":"The id of the family's latest model you saw, or null for none. If the family has moved on since, nothing is queued and the request is refused with family_changed."}},"additionalProperties":false,"type":"object","title":"ContinueEstimate","description":"A family's next fine-tune, from its latest model on its dataset's newer rows, as its\nestimate takes it: the body that starts it, without max_price_usd."},"DatasetCreate":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$","title":"Name"},"examples":{"items":{"$ref":"#/components/schemas/Example"},"type":"array","minItems":1,"title":"Examples"},"evaluation_fraction":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.1},{"type":"null"}],"title":"Evaluation Fraction"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for its first day of storage, which a dataset above the free size holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","required":["name","examples"],"title":"DatasetCreate"},"DatasetRename":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"pattern":"^[^\\x00-\\x1f\\x7f]+$","title":"Name"}},"additionalProperties":false,"type":"object","required":["name"],"title":"DatasetRename"},"DatasetRestore":{"properties":{"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for its first day of storage, which a dataset above the free size holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","title":"DatasetRestore"},"DatasetRows":{"properties":{"examples":{"items":{"$ref":"#/components/schemas/Example"},"type":"array","minItems":1,"title":"Examples"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for its first day of storage, which a dataset above the free size holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."},"family":{"anyOf":[{"type":"string","pattern":"^[a-z](?:-?[a-z0-9]){1,62}$"},{"type":"null"}],"title":"Family","description":"The family whose page adds these rows, such as router: one of your families on this dataset. The version records it, so the family can say where its new data came from."}},"additionalProperties":false,"type":"object","required":["examples"],"title":"DatasetRows"},"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","default":""},"decisions":{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","maxItems":1024,"minItems":1,"title":"Decisions"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageIn"},"type":"array","maxItems":8,"minItems":1},{"type":"null"}],"title":"Images","description":"Up to 8 images the decisions are about, each shown where the context says `<image:id>`. The context must then be a string with an anchor for each image. fat and chub (`kettei-fat`, `kettei-chub`) read images; other models refuse them with `images_not_supported`."},"fallback":{"anyOf":[{"type":"string","enum":["auto","none"]},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback"},"temperature":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.2},{"type":"null"}],"title":"Temperature","description":"The temperature T of every answer of this request: probabilities become p^(1/T), renormalised, so below 1 they are sharper and above 1 softer. The top answer never changes. Leave it out for the model's own default for each kind of decision; send 1 for the probabilities exactly as the engine scored them."}},"additionalProperties":false,"type":"object","required":["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"},"policy":{"anyOf":[{"$ref":"#/components/schemas/Policy"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","question"],"title":"Decision"},"EarlyAccess":{"properties":{"model":{"type":"string","pattern":"^kettei-[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"},"EvaluationCreate":{"properties":{"dataset_id":{"type":"string","pattern":"^ds_[a-f0-9]{24}$","title":"Dataset Id"},"models":{"items":{"type":"string"},"type":"array","maxItems":16,"minItems":1,"title":"Models","description":"What to evaluate, each named as a call names it: a family, such as router, evaluated with the model it serves when the evaluation is queued; a model by its number, such as router@4; or a base model's id. Each must answer calls, so one switched off is refused."}},"additionalProperties":false,"type":"object","required":["dataset_id","models"],"title":"EvaluationCreate"},"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","default":""},"decisions":{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","maxItems":1024,"minItems":1,"title":"Decisions"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageIn"},"type":"array","maxItems":8,"minItems":1},{"type":"null"}],"title":"Images","description":"Up to 8 images the decisions are about, each shown where the context says `<image:id>`. The context must then be a string with an anchor for each image. fat and chub (`kettei-fat`, `kettei-chub`) read images; other models refuse them with `images_not_supported`."},"fallback":{"anyOf":[{"type":"string","enum":["auto","none"]},{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fallback"},"temperature":{"anyOf":[{"type":"number","maximum":5.0,"minimum":0.2},{"type":"null"}],"title":"Temperature","description":"The temperature T of every answer of this request: probabilities become p^(1/T), renormalised, so below 1 they are sharper and above 1 softer. The top answer never changes. Leave it out for the model's own default for each kind of decision; send 1 for the probabilities exactly as the engine scored them."},"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"},"side":{"anyOf":[{"type":"string","enum":["training","evaluation"]},{"type":"null"}],"title":"Side","description":"Ignored: a download marks each row's side, and the dataset's split decides it."}},"additionalProperties":false,"type":"object","required":["decisions"],"title":"Example"},"FamilyContinue":{"properties":{"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters"},"latest":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Latest","description":"The id of the family's latest model you saw, or null for none. If the family has moved on since, nothing is queued and the request is refused with family_changed."},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for this job, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","title":"FamilyContinue","description":"A family's next fine-tune, from its latest model on its dataset's newer rows."},"FamilyDelete":{"properties":{"dataset_id":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Dataset Id","description":"The dataset the family grew on when the caller looked: refused with family_changed unless it still does, as a family deleted and named again on another dataset doesn't."},"latest":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Latest","description":"The id of the family's latest model the caller saw, or null for none: refused with family_changed if it has another since, as when a model joined it, so a delete never takes a model the caller didn't see."}},"additionalProperties":false,"type":"object","title":"FamilyDelete"},"FamilyRollback":{"properties":{"to":{"type":"string","maxLength":140,"title":"To","description":"The model to go back to, such as router@2: one of the family's models, neither deleted nor discarded."},"discard":{"items":{"type":"string"},"type":"array","maxItems":500,"title":"Discard","description":"The family's models newer than `to`, neither deleted nor discarded, such as [\"router@3\", \"router@4\"], as the caller confirmed discarding them: refused with rollback_changed unless they are exactly those."},"served":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Served","description":"The id of the model the family served when the caller looked: refused unless it still does. Null for none."}},"additionalProperties":false,"type":"object","required":["to","discard"],"title":"FamilyRollback"},"FamilySwitch":{"properties":{"on":{"type":"boolean","title":"On"},"switch_off":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Switch Off","description":"Families, such as router, and models, such as router@2, to switch off in the same step, to make room when switching on would pass the account's limit (live_limit)."},"served":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Served","description":"The id of the model the family served when the caller looked: refused unless it still does. Null for none."}},"additionalProperties":false,"type":"object","required":["on"],"title":"FamilySwitch"},"FinalizeLabels":{"properties":{"row_indices":{"items":{"type":"integer"},"type":"array","maxItems":2000,"minItems":1,"title":"Row Indices"},"evaluation_fraction":{"type":"number","maximum":1.0,"minimum":0.1,"title":"Evaluation Fraction","default":0.2},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for its first day of storage, which a dataset above the free size holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"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","description":"Training steps. Left out, two passes over the training rows, from 20 to 2,000 steps, so a very large dataset gets fewer than two passes. At most the policy's limits.fine_tune_passes passes (2 by default), or 20 steps. The fee is per training token trained, so more steps train more tokens and cost more."},"learning_rate":{"type":"number","maximum":0.01,"exclusiveMinimum":0.0,"title":"Learning Rate","default":5e-05},"lora_rank":{"type":"integer","minimum":1.0,"title":"Lora Rank","description":"The LoRA rank of the adapter, from 1 to 16, the highest at launch. Left out, 8. A rank above 16 is refused with `rank_unsupported` when the job is accepted. A continuation keeps its parent's rank.","default":8},"seed":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Seed","default":42}},"additionalProperties":false,"type":"object","title":"Hyperparameters"},"ImageIn":{"properties":{"id":{"type":"integer","maximum":64.0,"minimum":1.0,"title":"Id","description":"The image's number: the context shows it where it says `<image:id>`."},"media_type":{"type":"string","enum":["image/jpeg","image/png","image/webp"],"title":"Media Type","description":"The file's type: JPEG, PNG or WebP, still (not animated)."},"data":{"type":"string","maxLength":14000000,"minLength":4,"title":"Data","description":"The file, base64-encoded (standard alphabet, padded, no line breaks), up to 10 MiB."}},"additionalProperties":false,"type":"object","required":["id","media_type","data"],"title":"ImageIn","description":"One image, shown where the context says `<image:id>`."},"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","default":""},"questions":{"additionalProperties":{"$ref":"#/components/schemas/JevQuestion"},"type":"object","maxProperties":1024,"minProperties":1,"title":"Questions"}},"additionalProperties":false,"type":"object","required":["model","questions"],"title":"JevRequest"},"JobCreate":{"properties":{"dataset_id":{"type":"string","pattern":"^ds_[a-f0-9]{24}$","title":"Dataset Id"},"from":{"type":"string","maxLength":140,"minLength":1,"title":"From","description":"Where the family starts: a base model that can be fine-tuned, or one of your models as family@N, which it trains from on that model's base. Left out, core.","default":"kettei-core"},"family":{"type":"string","maxLength":63,"pattern":"^[a-z](?:-?[a-z0-9]){1,62}$","title":"Family","description":"The new family's name: lowercase letters and digits, with single hyphens between them, 2 to 63 characters. A name already taken is refused with family_exists."},"method":{"type":"string","enum":["sft","reward"],"title":"Method","default":"sft"},"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for this job, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","required":["dataset_id","family"],"title":"JobCreate","description":"A new family's first fine-tune, from a base or one of your models."},"JobEstimate":{"properties":{"dataset_id":{"type":"string","pattern":"^ds_[a-f0-9]{24}$","title":"Dataset Id"},"from":{"type":"string","maxLength":140,"minLength":1,"title":"From","description":"Where the family starts: a base model that can be fine-tuned, or one of your models as family@N, which it trains from on that model's base. Left out, core.","default":"kettei-core"},"family":{"type":"string","maxLength":63,"pattern":"^[a-z](?:-?[a-z0-9]){1,62}$","title":"Family","description":"The new family's name: lowercase letters and digits, with single hyphens between them, 2 to 63 characters. A name already taken is refused with family_exists."},"method":{"type":"string","enum":["sft","reward"],"title":"Method","default":"sft"},"hyperparameters":{"$ref":"#/components/schemas/Hyperparameters"}},"additionalProperties":false,"type":"object","required":["dataset_id","family"],"title":"JobEstimate","description":"A new family's first fine-tune, from a base or one of your models, as its estimate takes\nit: the body that starts it, without max_price_usd."},"KeepWarm":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for the first hour, which switching keep warm on holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."},"served":{"anyOf":[{"type":"string","maxLength":140},{"type":"null"}],"title":"Served","description":"The id of the model the family served when the caller looked: refused unless it still does. Null for none."},"switch_off":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Switch Off","description":"Families, such as router, and models, such as router@2, whose keep warm stops in the same step, to make room when the account is at its limit (warm_limit) or the model's size has no kept-warm place left (warm_capacity). Their switches stay on."}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"KeepWarm"},"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"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for this job, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","required":["source_id"],"title":"LabelJobCreate"},"ModelKeepWarm":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for the first hour, which switching keep warm on holds, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."},"adapter":{"type":"string","maxLength":140,"title":"Adapter","description":"The id of the model the caller saw: refused unless the model called is still that one."},"switch_off":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Switch Off","description":"Families, such as router, and models, such as router@2, whose keep warm stops in the same step, to make room when the account is at its limit (warm_limit) or the model's size has no kept-warm place left (warm_capacity). Their switches stay on."}},"additionalProperties":false,"type":"object","required":["enabled"],"title":"ModelKeepWarm"},"ModelSwitch":{"properties":{"on":{"type":"boolean","title":"On"},"switch_off":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Switch Off","description":"Families, such as router, and models, such as router@2, to switch off in the same step, to make room when switching on would pass the account's limit (live_limit)."},"adapter":{"type":"string","maxLength":140,"title":"Adapter","description":"The id of the model the caller saw: refused unless the model called is still that one."}},"additionalProperties":false,"type":"object","required":["on"],"title":"ModelSwitch"},"Policy":{"properties":{"action_costs":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Action Costs"},"abstain_below":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Abstain Below"}},"additionalProperties":false,"type":"object","title":"Policy"},"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"},"max_price_usd":{"anyOf":[{"type":"string","pattern":"^\\d{1,9}(\\.\\d{1,9})?$"},{"type":"null"}],"title":"Max Price Usd","description":"The most you agree to pay for this job, in USD, such as the price you were shown. It is a decimal string, such as `\"2.500000000\"`, never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held."}},"additionalProperties":false,"type":"object","required":["dataset_id"],"title":"PromptTuningCreate"},"PromptTuningUpdate":{"properties":{"label_issues_dismissed":{"type":"boolean","title":"Label Issues Dismissed"}},"additionalProperties":false,"type":"object","required":["label_issues_dismissed"],"title":"PromptTuningUpdate"},"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 another attempt may succeed; it does not prove that no work was done. Respect Retry-After when present. Only operations that support Idempotency-Key replay a prior result, including /v1/decide for 24 hours.","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"},"InputReceipt":{"properties":{"format":{"type":"string","enum":["json","jsonl"],"title":"Format"},"sha256":{"type":"string","title":"Sha256"},"bytes":{"type":"integer","title":"Bytes"}},"type":"object","required":["format","sha256","bytes"],"title":"InputReceipt"},"LabelingSource":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rows":{"type":"integer","title":"Rows"},"sha256":{"type":"string","title":"Sha256"},"input":{"$ref":"#/components/schemas/InputReceipt"},"created_at":{"type":"number","title":"Created At"}},"type":"object","required":["id","name","rows","sha256","input","created_at"],"title":"LabelingSource"},"LabelingJob":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"source_id":{"type":"string","title":"Source Id"},"status":{"type":"string","enum":["queued","running","cancelling","cancelled","review_ready","failed","finalized","discarded","deleted"],"title":"Status","description":"deleted: you deleted its source, and with it the queries and the teachers' answers. The job and its counts stay."},"teacher_models":{"items":{"type":"string"},"type":"array","title":"Teacher Models"},"rows":{"type":"integer","title":"Rows"},"completed_rows":{"type":"integer","title":"Completed Rows"},"valid_rows":{"type":"integer","title":"Valid Rows"},"agreement_rows":{"type":"integer","title":"Agreement Rows"},"error_rows":{"type":"integer","title":"Error Rows"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"price_usd":{"type":"string","title":"Price Usd","description":"The job's fee, as exact USD: each of its teachers' price for a row, for every row."},"charge":{"type":"string","enum":["free","reserved","charged","released"],"title":"Charge","description":"What the fee is doing: held while the job runs, charged once its labels are ready for review, released if it fails or is cancelled first."},"dataset_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dataset Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","name","source_id","status","teacher_models","rows","completed_rows","valid_rows","agreement_rows","error_rows","created_at","updated_at","price_usd","charge"],"title":"LabelingJob"},"LabelingResult":{"properties":{"index":{"type":"integer","title":"Index"},"context":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Context"},"decisions":{"items":{"$ref":"#/components/schemas/Decision"},"type":"array","title":"Decisions"},"teachers":{"items":{"$ref":"#/components/schemas/TeacherResult"},"type":"array","title":"Teachers"},"valid":{"type":"boolean","title":"Valid"},"agreement":{"type":"boolean","title":"Agreement"},"targets":{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object","title":"Targets"},"error":{"type":"string","title":"Error"}},"type":"object","required":["index","context","decisions","teachers","valid","agreement"],"title":"LabelingResult"},"TeacherResult":{"properties":{"model":{"type":"string","title":"Model"},"labels":{"additionalProperties":{"type":"string"},"type":"object","title":"Labels"},"error":{"type":"string","title":"Error"}},"type":"object","required":["model"],"title":"TeacherResult"},"DecisionReadiness":{"properties":{"decision":{"$ref":"#/components/schemas/Decision","description":"The decision as the dataset's rows define it."},"outcomes":{"items":{"type":"string"},"type":"array","title":"Outcomes","description":"Its outcome names in order, as the model reads them and targets name them."},"rows":{"type":"integer","title":"Rows","description":"Training rows that ask it."},"labels":{"additionalProperties":{"type":"integer"},"type":"object","title":"Labels","description":"How many of those rows expect each outcome, in the decision's order."},"reason":{"anyOf":[{"type":"string","enum":["conflicting_decision","structured_wording","too_few_rows","too_many_rows","too_few_per_outcome"]},{"type":"null"}],"title":"Reason","description":"Why prompt tuning can't tune it, or null when it can. A job refused for it has this error code."}},"type":"object","required":["decision","outcomes","rows","labels","reason"],"title":"DecisionReadiness"},"LabelingLineage":{"properties":{"job_id":{"type":"string","title":"Job Id"},"source_id":{"type":"string","title":"Source Id"},"source_sha256":{"type":"string","title":"Source Sha256"},"source_input_sha256":{"type":"string","title":"Source Input Sha256"},"spec_sha256":{"type":"string","title":"Spec Sha256"},"prompt_version":{"type":"string","title":"Prompt Version"},"teacher_models":{"items":{"type":"string"},"type":"array","title":"Teacher Models"},"row_indices":{"items":{"type":"integer"},"type":"array","title":"Row Indices"},"selection_sha256":{"type":"string","title":"Selection Sha256"},"target_method":{"type":"string","const":"mean_one_hot_teacher_votes","title":"Target Method"}},"type":"object","required":["job_id","source_id","source_sha256","source_input_sha256","spec_sha256","prompt_version","teacher_models","row_indices","selection_sha256","target_method"],"title":"LabelingLineage"},"PromptTuningReadiness":{"properties":{"decisions":{"items":{"$ref":"#/components/schemas/DecisionReadiness"},"type":"array","title":"Decisions","description":"Decisions the training rows ask, those it can tune first and then the most asked, as many as fit in 64 KiB."},"unlisted":{"type":"integer","title":"Unlisted","description":"How many more decisions the training rows ask."}},"type":"object","required":["decisions","unlisted"],"title":"PromptTuningReadiness"},"StorageWindow":{"properties":{"started_at":{"type":"number","title":"Started At"},"ends_at":{"type":"number","title":"Ends At","description":"When this day's hold ends and the next is reserved."},"reserved_usd":{"type":"string","title":"Reserved Usd","description":"The day's fee held, as exact USD."}},"type":"object","required":["started_at","ends_at","reserved_usd"],"title":"StorageWindow"},"LabelIssue":{"properties":{"row":{"type":"string","title":"Row","description":"The dataset row, as r and its index: r4 is row 4."},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["row","reason"],"title":"LabelIssue"},"PromptChange":{"properties":{"part":{"type":"string","title":"Part"},"before":{"type":"string","title":"Before"},"after":{"type":"string","title":"After"}},"type":"object","required":["part","before","after"],"title":"PromptChange"},"PromptProgress":{"properties":{"phase":{"type":"string","title":"Phase"},"round":{"type":"integer","title":"Round"},"rounds":{"type":"integer","title":"Rounds"},"original_loss":{"type":"number","title":"Original Loss"},"best_loss":{"type":"number","title":"Best Loss"}},"type":"object","title":"PromptProgress"},"PromptResult":{"properties":{"verdict":{"type":"string","enum":["improved","inconclusive","no_improvement"],"title":"Verdict"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"tuned":{"anyOf":[{"$ref":"#/components/schemas/Decision"},{"type":"null"}]},"candidate":{"anyOf":[{"$ref":"#/components/schemas/Decision"},{"type":"null"}]},"changes":{"items":{"$ref":"#/components/schemas/PromptChange"},"type":"array","title":"Changes"},"test":{"additionalProperties":true,"type":"object","title":"Test"},"label_issues":{"items":{"$ref":"#/components/schemas/LabelIssue"},"type":"array","title":"Label Issues"},"original":{"$ref":"#/components/schemas/Decision"},"decision":{"type":"string","title":"Decision"},"rows":{"type":"integer","title":"Rows"},"rows_left_out":{"type":"integer","title":"Rows Left Out"},"noise_band":{"type":"number","title":"Noise Band"},"rounds":{"items":{"$ref":"#/components/schemas/PromptRound"},"type":"array","title":"Rounds"}},"type":"object","required":["verdict","tuned","candidate","changes","label_issues","original","decision","rows","rows_left_out","noise_band","rounds"],"title":"PromptResult"},"PromptRound":{"properties":{"round":{"type":"integer","title":"Round"},"best_loss":{"type":"number","title":"Best Loss"}},"type":"object","required":["round","best_loss"],"title":"PromptRound"},"PromptTuningJob":{"properties":{"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"prompt_tuning.job","title":"Object"},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status"},"dataset_id":{"type":"string","title":"Dataset Id"},"model":{"type":"string","title":"Model"},"decision":{"type":"string","title":"Decision"},"effort":{"type":"string","enum":["standard","thorough"],"title":"Effort"},"price_usd":{"type":"string","title":"Price Usd","description":"The job's fee, as exact USD."},"charge":{"type":"string","enum":["free","reserved","charged","released"],"title":"Charge","description":"What the fee is doing: held while the job runs, charged for a proven improvement or a rerun, released otherwise."},"test_looks":{"type":"integer","title":"Test Looks"},"progress":{"anyOf":[{"$ref":"#/components/schemas/PromptProgress"},{"type":"null"}]},"result":{"anyOf":[{"$ref":"#/components/schemas/PromptResult"},{"type":"null"}]},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"error":{"type":"string","title":"Error"},"label_issues_dismissed_at":{"type":"number","title":"Label Issues Dismissed At","description":"When you dismissed its label issues, so its dataset no longer lists them."}},"type":"object","required":["id","object","status","dataset_id","model","decision","effort","price_usd","charge","test_looks","progress","result","created_at","updated_at"],"title":"PromptTuningJob"},"Evaluation":{"properties":{"id":{"type":"string","title":"Id"},"dataset_id":{"type":"string","title":"Dataset Id"},"dataset_version":{"type":"integer","title":"Dataset Version","description":"The dataset version whose evaluation rows it scores."},"model_id":{"type":"string","title":"Model Id"},"model_sha256":{"type":"string","title":"Model Sha256"},"model_label":{"type":"string","title":"Model Label"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status"},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"generation":{"type":"integer","title":"Generation"},"training_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Job Id"},"dataset_sha256":{"type":"string","title":"Dataset Sha256"},"evaluation_sha256":{"type":"string","title":"Evaluation Sha256"},"method":{"type":"string","enum":["sft","reward"],"title":"Method"},"evaluation_rows":{"type":"integer","title":"Evaluation Rows"},"decisions":{"type":"integer","title":"Decisions"},"named":{"type":"string","title":"Named","description":"The family, or the model by its number, the request named, whose idle clock the run moves when it finishes."},"completed_rows":{"type":"integer","title":"Completed Rows"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Null until the evaluation succeeds. Then `n`, the decisions scored, with `accuracy`, `loss`, `brier` and `ece` for expected answers or `expected_reward` for rewards, and `latency_ms`, the median server milliseconds per request, when it was measured. A result taken from a fine-tune's own held-out scoring sends no request, so it has none."},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"}},"type":"object","required":["id","dataset_id","dataset_version","model_id","model_sha256","model_label","model_name","version","status","created_at","updated_at","generation","training_job_id","dataset_sha256","evaluation_sha256","method","evaluation_rows","decisions","completed_rows","metrics","error"],"title":"Evaluation"},"AccountLimits":{"properties":{"rpm":{"type":"integer","title":"Rpm"},"tpm":{"type":"integer","title":"Tpm"},"concurrency":{"type":"integer","title":"Concurrency"},"stored_objects":{"type":"integer","title":"Stored Objects"},"stored_mib":{"type":"integer","title":"Stored Mib"},"kept_warm":{"type":"integer","title":"Kept Warm"},"answering":{"type":"integer","title":"Answering"},"read_rpm":{"type":"integer","title":"Read Rpm"},"write_rpm":{"type":"integer","title":"Write Rpm"},"estimate_tokens_per_minute":{"type":"integer","title":"Estimate Tokens Per Minute"},"fine_tunes":{"type":"integer","title":"Fine Tunes","description":"Fine-tunes the account can have queued, running or cancelling at once. Another start gets 429 `tenant_queue_full`."}},"type":"object","required":["rpm","tpm","concurrency","stored_objects","stored_mib","kept_warm","answering","read_rpm","write_rpm","estimate_tokens_per_minute","fine_tunes"],"title":"AccountLimits"},"DataExports":{"properties":{"per_hour":{"type":"integer","title":"Per Hour","description":"How many downloads of all its data an account may start in each clock hour."},"left":{"type":"integer","title":"Left","description":"How many more the current hour allows."},"resets_at":{"type":"number","title":"Resets At","description":"When the current hour ends, and its count with it, in Unix seconds."}},"type":"object","required":["per_hour","left","resets_at"],"title":"DataExports"},"Onboarding":{"properties":{"email_verified":{"type":"boolean","title":"Email Verified"},"workspace_access":{"type":"boolean","title":"Workspace Access"},"api_key_created":{"type":"boolean","title":"Api Key Created"},"prediction_succeeded":{"type":"boolean","title":"Prediction Succeeded"},"dismissed":{"type":"boolean","title":"Dismissed"}},"type":"object","required":["email_verified","workspace_access","api_key_created","prediction_succeeded","dismissed"],"title":"Onboarding"},"Pins":{"properties":{"datasets":{"items":{"type":"string"},"type":"array","title":"Datasets"},"labeling_jobs":{"items":{"type":"string"},"type":"array","title":"Labeling Jobs"},"fine_tuning_jobs":{"items":{"type":"string"},"type":"array","title":"Fine Tuning Jobs"},"prompt_tuning_jobs":{"items":{"type":"string"},"type":"array","title":"Prompt Tuning Jobs"},"families":{"items":{"type":"string"},"type":"array","title":"Families","description":"By name."},"models":{"items":{"type":"string"},"type":"array","title":"Models","description":"By number, such as router@4."}},"type":"object","required":["datasets","labeling_jobs","fine_tuning_jobs","prompt_tuning_jobs","families","models"],"title":"Pins","description":"The rows pinned at the top of each of the console's Decision Lab lists, first first."},"Places":{"properties":{"answering":{"type":"integer","title":"Answering","description":"Models that answer calls, through a family, their own switch or both, each once: the places counted against `answering` in effective_limits."},"kept_warm":{"type":"integer","title":"Kept Warm","description":"Models kept warm, each once: the warm places counted against `kept_warm`."}},"type":"object","required":["answering","kept_warm"],"title":"Places"},"Referrals":{"properties":{"code":{"type":"string","title":"Code"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"count":{"type":"integer","title":"Count"},"reward_usd":{"type":"string","title":"Reward Usd"},"minimum_purchase_usd":{"type":"string","title":"Minimum Purchase Usd"},"lifetime_limit":{"type":"integer","title":"Lifetime Limit"}},"type":"object","required":["code","url","count","reward_usd","minimum_purchase_usd","lifetime_limit"],"title":"Referrals"},"Storage":{"properties":{"objects":{"type":"integer","title":"Objects"},"bytes":{"type":"integer","title":"Bytes"}},"type":"object","required":["objects","bytes"],"title":"Storage"},"User":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"picture":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Picture"},"role":{"type":"string","enum":["member","admin"],"title":"Role"},"status":{"type":"string","enum":["active","waitlisted","blocked","deleted"],"title":"Status"},"referral_code":{"type":"string","title":"Referral Code"},"created_at":{"type":"number","title":"Created At"},"admitted_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Admitted At"},"financial_blocked":{"type":"boolean","title":"Financial Blocked"},"reminders_enabled":{"type":"boolean","title":"Reminders Enabled"},"minimum_tier":{"type":"integer","title":"Minimum Tier"}},"type":"object","required":["id","email","name","picture","role","status","referral_code","created_at","admitted_at","financial_blocked","reminders_enabled","minimum_tier"],"title":"User"},"Waitlist":{"properties":{"priority":{"type":"boolean","title":"Priority","description":"Whether a friend who joined through the account's link has moved it into the priority line."},"ahead":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ahead","description":"In the main line, the number to show as people ahead of the account. Null in the priority line."}},"type":"object","required":["priority","ahead"],"title":"Waitlist"},"Wallet":{"properties":{"currency":{"type":"string","const":"USD","title":"Currency"},"paid_usd":{"type":"string","title":"Paid Usd"},"promotional_usd":{"type":"string","title":"Promotional Usd"},"balance_usd":{"type":"string","title":"Balance Usd","description":"The credit the account has: paid credit and promotional grants, with what expired grants still hold for work in progress. Available plus reserved, unless a reversed payment left paid holds uncovered."},"available_usd":{"type":"string","title":"Available Usd"},"reserved_usd":{"type":"string","title":"Reserved Usd"},"financial_shortfall_usd":{"type":"string","title":"Financial Shortfall Usd","description":"Paid credit the account is missing: what it owes, and paid holds it no longer covers."}},"type":"object","required":["currency","paid_usd","promotional_usd","balance_usd","available_usd","reserved_usd","financial_shortfall_usd"],"title":"Wallet"},"DailyUsage":{"properties":{"requests":{"type":"integer","title":"Requests"},"decisions":{"type":"integer","title":"Decisions"},"input_tokens":{"type":"integer","title":"Input Tokens"},"errors_4xx":{"type":"integer","title":"Errors 4Xx"},"errors_5xx":{"type":"integer","title":"Errors 5Xx"},"fallbacks":{"type":"integer","title":"Fallbacks"},"total_requests":{"type":"integer","title":"Total Requests"},"cost_usd":{"type":"string","title":"Cost Usd","description":"Exact USD with nine decimal places."},"request_ms_sum":{"type":"number","title":"Request Ms Sum"},"request_ms_count":{"type":"integer","title":"Request Ms Count"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"day":{"type":"string","title":"Day"}},"type":"object","required":["requests","decisions","input_tokens","errors_4xx","errors_5xx","fallbacks","total_requests","cost_usd","request_ms_sum","request_ms_count","p50_ms","p95_ms","day"],"title":"DailyUsage"},"KeyMetadata":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"name":{"type":"string","title":"Name"},"is_console":{"type":"boolean","title":"Is Console"},"revoked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","name","is_console","revoked_at"],"title":"KeyMetadata"},"KeyUsage":{"properties":{"requests":{"type":"integer","title":"Requests"},"decisions":{"type":"integer","title":"Decisions"},"input_tokens":{"type":"integer","title":"Input Tokens"},"errors_4xx":{"type":"integer","title":"Errors 4Xx"},"errors_5xx":{"type":"integer","title":"Errors 5Xx"},"fallbacks":{"type":"integer","title":"Fallbacks"},"total_requests":{"type":"integer","title":"Total Requests"},"cost_usd":{"type":"string","title":"Cost Usd","description":"Exact USD with nine decimal places."},"request_ms_sum":{"type":"number","title":"Request Ms Sum"},"request_ms_count":{"type":"integer","title":"Request Ms Count"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"api_key":{"$ref":"#/components/schemas/KeyMetadata"},"daily":{"items":{"$ref":"#/components/schemas/DailyUsage"},"type":"array","title":"Daily"}},"type":"object","required":["requests","decisions","input_tokens","errors_4xx","errors_5xx","fallbacks","total_requests","cost_usd","request_ms_sum","request_ms_count","p50_ms","p95_ms","api_key","daily"],"title":"KeyUsage"},"LabActivity":{"properties":{"activity":{"type":"string","enum":["labeling","fine_tuning","prompts","evaluations","keep_warm","dataset_storage"],"title":"Activity"},"cost_usd":{"type":"string","title":"Cost Usd"},"daily":{"items":{"$ref":"#/components/schemas/LabDay"},"type":"array","title":"Daily"},"jobs":{"type":"integer","title":"Jobs"},"charged":{"type":"integer","title":"Charged"},"decisions":{"type":"integer","title":"Decisions"},"requests":{"type":"integer","title":"Requests"},"minutes":{"type":"integer","title":"Minutes","description":"Minutes billed by windows that closed."},"subjects":{"type":"integer","title":"Subjects"}},"type":"object","required":["activity","cost_usd","daily"],"title":"LabActivity"},"LabDay":{"properties":{"day":{"type":"string","title":"Day"},"cost_usd":{"type":"string","title":"Cost Usd"}},"type":"object","required":["day","cost_usd"],"title":"LabDay"},"LabItem":{"properties":{"activity":{"type":"string","enum":["labeling","fine_tuning","prompts","evaluations","keep_warm","dataset_storage"],"title":"Activity"},"id":{"type":"string","title":"Id","description":"The job, the evaluated model, the kept-warm model or the dataset. Keep warm and storage list each stretch from switching on to switching off as its own item, so a model or dataset switched on again appears once a stretch."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"started_at":{"type":"number","title":"Started At","description":"When it started. A stretch of keep warm or storage keeps its start when that was before the period."},"ended_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ended At","description":"When it ended: a job's last change once it finished, an evaluated model's last prediction of the period, or the close of a stretch of keep warm or storage. Null while it runs or bills."},"status":{"type":"string","title":"Status"},"charge":{"type":"string","enum":["free","reserved","charged","released"],"title":"Charge","description":"What its price did. For keep warm and storage, reserved while a window is open, then charged if the stretch's windows in the period cost anything, or released if none did."},"reason":{"anyOf":[{"type":"string","enum":["failed","cancelled","improved","rerun","no_improvement","insufficient_credit"]},{"type":"null"}],"title":"Reason","description":"Why a job was or wasn't charged, or that keep warm or storage stopped for credit."},"cost_usd":{"type":"string","title":"Cost Usd"},"reserved_usd":{"type":"string","title":"Reserved Usd"},"by_day":{"items":{"$ref":"#/components/schemas/LabDay"},"type":"array","title":"By Day","description":"Its spend in the period, on each day it spent on, as the activity's daily spend dates it: a job's charge on the day it started, an evaluated model's predictions on the days they were made, and a stretch's windows on the days they began."},"examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Examples"},"base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base","description":"A fine-tune's base model."},"gate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Gate","description":"Whether a finished fine-tune passed its gate, or null without a result. Its charge doesn't depend on it."},"effort":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Effort"},"decisions":{"type":"integer","title":"Decisions"},"requests":{"type":"integer","title":"Requests"},"minutes":{"type":"integer","title":"Minutes"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows"},"deleted":{"type":"boolean","title":"Deleted","description":"Whether you deleted the stored dataset since."}},"type":"object","required":["activity","id","name","started_at","ended_at","status","charge","reason","cost_usd","reserved_usd","by_day"],"title":"LabItem"},"LabRecurring":{"properties":{"activity":{"type":"string","enum":["keep_warm","dataset_storage"],"title":"Activity"},"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"rate_usd":{"type":"string","title":"Rate Usd","description":"The price of one window, per `unit`."},"unit":{"type":"string","enum":["hour","day"],"title":"Unit"},"started_at":{"type":"number","title":"Started At"},"ends_at":{"type":"number","title":"Ends At"},"reserved_usd":{"type":"string","title":"Reserved Usd"},"base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows"}},"type":"object","required":["activity","id","name","rate_usd","unit","started_at","ends_at","reserved_usd"],"title":"LabRecurring"},"LabTotals":{"properties":{"cost_usd":{"type":"string","title":"Cost Usd"}},"type":"object","required":["cost_usd"],"title":"LabTotals"},"LaboratoryUsage":{"properties":{"totals":{"$ref":"#/components/schemas/LabTotals"},"daily":{"items":{"$ref":"#/components/schemas/LabDay"},"type":"array","title":"Daily"},"activities":{"items":{"$ref":"#/components/schemas/LabActivity"},"type":"array","title":"Activities","description":"Always these five, in this order."},"items":{"items":{"$ref":"#/components/schemas/LabItem"},"type":"array","title":"Items","description":"Reserved first, then the last to start first. An evaluated model, a kept-warm model or a stored dataset starts with its first activity in the period."},"items_complete":{"type":"boolean","title":"Items Complete","description":"False when the period has more than 1,000 items."},"recurring":{"items":{"$ref":"#/components/schemas/LabRecurring"},"type":"array","title":"Recurring","description":"The windows billing now, whatever the period."}},"type":"object","required":["totals","daily","activities","items","items_complete","recurring"],"title":"LaboratoryUsage"},"ModelUsage":{"properties":{"requests":{"type":"integer","title":"Requests"},"decisions":{"type":"integer","title":"Decisions"},"input_tokens":{"type":"integer","title":"Input Tokens"},"errors_4xx":{"type":"integer","title":"Errors 4Xx"},"errors_5xx":{"type":"integer","title":"Errors 5Xx"},"fallbacks":{"type":"integer","title":"Fallbacks"},"total_requests":{"type":"integer","title":"Total Requests"},"cost_usd":{"type":"string","title":"Cost Usd","description":"Exact USD with nine decimal places."},"request_ms_sum":{"type":"number","title":"Request Ms Sum"},"request_ms_count":{"type":"integer","title":"Request Ms Count"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"},"model":{"type":"string","title":"Model"},"daily":{"items":{"$ref":"#/components/schemas/DailyUsage"},"type":"array","title":"Daily"},"daily_decisions":{"items":{"type":"integer"},"type":"array","title":"Daily Decisions"}},"type":"object","required":["requests","decisions","input_tokens","errors_4xx","errors_5xx","fallbacks","total_requests","cost_usd","request_ms_sum","request_ms_count","p50_ms","p95_ms","model","daily","daily_decisions"],"title":"ModelUsage"},"UsageTotals":{"properties":{"requests":{"type":"integer","title":"Requests"},"decisions":{"type":"integer","title":"Decisions"},"input_tokens":{"type":"integer","title":"Input Tokens"},"errors_4xx":{"type":"integer","title":"Errors 4Xx"},"errors_5xx":{"type":"integer","title":"Errors 5Xx"},"fallbacks":{"type":"integer","title":"Fallbacks"},"total_requests":{"type":"integer","title":"Total Requests"},"cost_usd":{"type":"string","title":"Cost Usd","description":"Exact USD with nine decimal places."},"request_ms_sum":{"type":"number","title":"Request Ms Sum"},"request_ms_count":{"type":"integer","title":"Request Ms Count"},"p50_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P50 Ms"},"p95_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"P95 Ms"}},"type":"object","required":["requests","decisions","input_tokens","errors_4xx","errors_5xx","fallbacks","total_requests","cost_usd","request_ms_sum","request_ms_count","p50_ms","p95_ms"],"title":"UsageTotals"},"UsageRequest":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["accepted","succeeded","failed","rejected"],"title":"Status"},"source":{"type":"string","enum":["api","console"],"title":"Source"},"created_at":{"type":"number","title":"Created At"},"endpoint":{"type":"string","title":"Endpoint"},"status_code":{"type":"integer","title":"Status Code"},"requested_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requested Model"},"served_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Served Model"},"decisions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Decisions"},"input_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Input Tokens"},"server_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Server Ms"},"request_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Ms"},"fallback_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fallback Reason"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code"},"api_key":{"$ref":"#/components/schemas/KeyMetadata"},"cost_usd":{"type":"string","title":"Cost Usd"}},"type":"object","required":["id","status","source","created_at","endpoint","status_code","requested_model","served_model","decisions","input_tokens","server_ms","request_ms","fallback_reason","error_code","api_key","cost_usd"],"title":"UsageRequest"},"ApiKey":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"prefix":{"type":"string","title":"Prefix"},"created_at":{"type":"number","title":"Created At"},"last_used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revoked At"},"scope":{"type":"string","enum":["full","inference","read"],"title":"Scope","description":"What the key may call: full, everything a key may; inference, decisions and reads of models, families and discovery; read, every read."},"monthly_cap_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monthly Cap Usd","description":"The most its decisions may cost in a calendar month (UTC), as exact USD, or null for no cap."},"month_spent_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Month Spent Usd","description":"What its decisions cost this month, as exact USD, while it has a cap; null otherwise."}},"type":"object","required":["id","name","prefix","created_at","scope","monthly_cap_usd","month_spent_usd"],"title":"ApiKey"},"Grant":{"properties":{"id":{"type":"string","title":"Id"},"source":{"type":"string","title":"Source"},"amount_usd":{"type":"string","title":"Amount Usd"},"spent_usd":{"type":"string","title":"Spent Usd"},"held_usd":{"type":"string","title":"Held Usd"},"created_at":{"type":"number","title":"Created At"},"expires_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Expires At"},"revoked_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["id","source","amount_usd","spent_usd","held_usd","created_at","expires_at","revoked_at"],"title":"Grant","description":"A promotional grant as its owner sees it. How it was issued stays on the server: a\nreferral's names the person who bought, and an administrator's names the administrator."},"HeldDecisions":{"properties":{"requests":{"type":"integer","title":"Requests"},"reserved_usd":{"type":"string","title":"Reserved Usd"}},"type":"object","required":["requests","reserved_usd"],"title":"HeldDecisions"},"HeldWork":{"properties":{"activity":{"type":"string","enum":["labeling","fine_tuning","prompts","keep_warm","dataset_storage"],"title":"Activity"},"id":{"type":"string","title":"Id","description":"The job, the kept-warm model or the dataset."},"name":{"type":"string","title":"Name"},"reserved_usd":{"type":"string","title":"Reserved Usd"},"since":{"type":"number","title":"Since"},"until":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Until","description":"When a keep-warm hour or a day of storage ends; null for a job, which holds until it ends."},"reason":{"anyOf":[{"type":"string","const":"rerun"},{"type":"null"}],"title":"Reason","description":"A prompt-tuning job that retests rows tested before: charged when its test runs, whatever the verdict."}},"type":"object","required":["activity","id","name","reserved_usd","since","until"],"title":"HeldWork"},"Reservations":{"properties":{"work":{"items":{"$ref":"#/components/schemas/HeldWork"},"type":"array","title":"Work"},"decisions":{"$ref":"#/components/schemas/HeldDecisions","description":"Inference requests in flight."}},"type":"object","required":["work","decisions"],"title":"Reservations"},"Card":{"properties":{"brand":{"type":"string","title":"Brand"},"last4":{"type":"string","title":"Last4"},"exp_month":{"type":"integer","title":"Exp Month"},"exp_year":{"type":"integer","title":"Exp Year"}},"type":"object","required":["brand","last4","exp_month","exp_year"],"title":"Card"},"CardSetup":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"The hosted page that saves a card while the set-up is pending, for the console's session. Null to an API key, which may not change automatic top-ups."}},"type":"object","required":["id","status","url"],"title":"CardSetup"},"AdapterCapacity":{"properties":{"max_rank":{"type":"integer","title":"Max Rank"}},"type":"object","required":["max_rank"],"title":"AdapterCapacity"},"EvaluationDataset":{"properties":{"id":{"type":"string","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Archived At"},"deleted":{"type":"boolean","title":"Deleted","description":"True once you deleted it."}},"type":"object","required":["id","name","archived_at","deleted"],"title":"EvaluationDataset"},"EvaluationSet":{"properties":{"dataset":{"$ref":"#/components/schemas/EvaluationDataset"},"training_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Training Examples"},"validation_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validation Examples"},"earlier_examples":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Earlier Examples"}},"type":"object","required":["dataset","training_examples","validation_examples","earlier_examples"],"title":"EvaluationSet"},"KeepWarmWindow":{"properties":{"started_at":{"type":"number","title":"Started At"},"ends_at":{"type":"number","title":"Ends At","description":"When this hour's hold ends and the next is reserved."},"reserved_usd":{"type":"string","title":"Reserved Usd","description":"The hour's fee held, as exact USD. The minutes used are charged when the hour rolls over or keep warm is switched off."}},"type":"object","required":["started_at","ends_at","reserved_usd"],"title":"KeepWarmWindow"},"Model":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"evaluation_key":{"type":"string","title":"Evaluation Key"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"family":{"type":"string","title":"Family"},"size_order":{"type":"integer","title":"Size Order"},"lora":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lora"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics"},"max_prompt_tokens":{"type":"integer","title":"Max Prompt Tokens"},"max_questions":{"type":"integer","title":"Max Questions"},"calibration":{"type":"string","title":"Calibration"},"availability_reason":{"type":"string","title":"Availability Reason","description":"Why it can't answer now: no_engine (its pool has no engine right now), not_served (this server doesn't serve it), or, for an adapter, base_mismatch, engine_unconfigured or engine_changed."},"access_requested":{"type":"boolean","title":"Access Requested"},"adapter_capacity":{"anyOf":[{"$ref":"#/components/schemas/AdapterCapacity"},{"type":"null"}]},"created_at":{"type":"number","title":"Created At"},"deleted_at":{"type":"number","title":"Deleted At","description":"When its owner deleted it. A deleted model answers and runs nothing."},"discarded_at":{"type":"number","title":"Discarded At","description":"When a rollback of its family discarded it. A discarded model answers and runs nothing."},"on_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"On At","description":"When its own switch went on: it answers calls to its number, such as router@4. Null while it is off."},"keep_warm":{"type":"boolean","title":"Keep Warm","description":"Whether it is kept warm on its own switch. A family's keep warm doesn't set it: see keep_warm_window."},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for it, through its family or its own switch, or null when nothing is billed."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Keep Warm Stopped At","description":"When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null."},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Used At","description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on."},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Switches Off At","description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model."},"off_reason":{"anyOf":[{"type":"string","enum":["owner","idle"]},{"type":"null"}],"title":"Off Reason","description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise."},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Off At","description":"When it went off, with off_reason. Null otherwise."},"job_id":{"type":"string","title":"Job Id"},"model_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Name"},"version":{"type":"integer","title":"Version"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"decision_price_nano":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Price Nano","description":"Exact integer string of nano-USD per billed input token from the current billing policy. Zero means free; null means unpriced."},"base":{"type":"string","title":"Base","description":"An adapter's base model id: the base whose prices it pays."},"evaluation_set":{"anyOf":[{"$ref":"#/components/schemas/EvaluationSet"},{"type":"null"}]},"request_latency":{"$ref":"#/components/schemas/RequestLatency"}},"type":"object","required":["id","status","evaluation_key"],"title":"Model","description":"A base, an early-access catalogue entry, or a trained adapter."},"PriceList":{"properties":{"currency":{"type":"string","const":"USD","title":"Currency"},"tuned_multiplier":{"type":"integer","title":"Tuned Multiplier","description":"A fine-tuned model costs this many times its base model's price per token, unless its catalogue entry shows a price of its own."},"keep_warm_hour_usd":{"additionalProperties":{"type":"string"},"type":"object","title":"Keep Warm Hour Usd","description":"By base model id: per hour a custom model is kept warm, billed per started minute."},"fine_tune_million_tokens_usd":{"additionalProperties":{"type":"string"},"type":"object","title":"Fine Tune Million Tokens Usd","description":"By base model id: per million training tokens. A fine-tune's training tokens are every rendered training sequence its steps run, each time they run it, so two passes over a dataset train each row's tokens twice. A job's split.trained_tokens gives them."},"fine_tune_minimum_usd":{"type":"string","title":"Fine Tune Minimum Usd","description":"The least a fine-tune costs, whatever its number of training tokens. A base whose fine_tune_million_tokens_usd is 0 is free, this included."},"prompt_tuning_usd":{"additionalProperties":{"type":"string"},"type":"object","title":"Prompt Tuning Usd","description":"Per prompt-tuning job, by effort (standard, thorough)."},"teacher_row_usd":{"additionalProperties":{"type":"string"},"type":"object","title":"Teacher Row Usd","description":"By teacher model id: per row it labels. A labelling job pays each of its teachers' price for every row."},"dataset_free_rows":{"type":"integer","title":"Dataset Free Rows","description":"Examples a dataset may hold for free."},"dataset_day_usd":{"type":"string","title":"Dataset Day Usd","description":"Per day for each dataset holding more than dataset_free_rows examples."}},"type":"object","required":["currency","tuned_multiplier","keep_warm_hour_usd","fine_tune_million_tokens_usd","fine_tune_minimum_usd","prompt_tuning_usd","teacher_row_usd","dataset_free_rows","dataset_day_usd"],"title":"PriceList","description":"The runtime policy's list prices as exact USD (pricing.public). Token prices are on\neach model's decision_price_nano instead."},"PromptAvailability":{"properties":{"available":{"type":"boolean","title":"Available"}},"type":"object","required":["available"],"title":"PromptAvailability"},"Recipe":{"properties":{"id":{"type":"string","title":"Id"},"order":{"type":"integer","title":"Order"},"task":{"type":"string","title":"Task"},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"use_when":{"type":"string","title":"Use When"},"watch":{"type":"string","title":"Watch"},"request":{"$ref":"#/components/schemas/DecideRequest"},"results":{"additionalProperties":true,"type":"object","title":"Results","description":"Historical evaluation evidence, or not_measured."},"examples":{"items":{"$ref":"#/components/schemas/Example"},"type":"array","title":"Examples"}},"type":"object","required":["id","order","task","name","description","use_when","watch","request","results"],"title":"Recipe"},"RequestLatency":{"properties":{"median_ms":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Median Ms"},"samples":{"type":"integer","title":"Samples"},"median_is_lower_bound":{"type":"boolean","title":"Median Is Lower Bound"},"start":{"type":"string","title":"Start"},"end":{"type":"string","title":"End"}},"type":"object","required":["median_ms","samples","median_is_lower_bound","start","end"],"title":"RequestLatency"},"ServiceWarning":{"properties":{"code":{"type":"string","enum":["engine_busy","queue_full","tenant_queue_full"],"title":"Code"},"message":{"type":"string","title":"Message"},"model":{"type":"string","title":"Model"}},"type":"object","required":["code","message"],"title":"ServiceWarning"},"KeptWarm":{"properties":{"started_at":{"type":"number","title":"Started At"},"ended_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Ended At","description":"Null while it is still kept warm."}},"type":"object","required":["started_at","ended_at"],"title":"KeptWarm"},"ModelActivityDay":{"properties":{"day":{"type":"string","title":"Day","description":"A UTC calendar day, such as 2026-10-09."},"family":{"type":"integer","title":"Family","description":"Calls it answered that named its family."},"model":{"type":"integer","title":"Model","description":"Calls it answered that named it by its number."}},"type":"object","required":["day","family","model"],"title":"ModelActivityDay"},"Charge":{"properties":{"currency":{"type":"string","const":"USD","title":"Currency"},"amount_usd":{"type":"string","title":"Amount Usd"},"reserved_usd":{"type":"string","title":"Reserved Usd"},"operation_id":{"type":"string","title":"Operation Id"}},"type":"object","required":["currency","amount_usd","reserved_usd","operation_id"],"title":"Charge"},"DecisionResult":{"properties":{"kind":{"type":"string","enum":["single","binary","ordinal"],"title":"Kind"},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities","description":"Scores normalized over the declared outcomes; not calibrated correctness."},"top":{"type":"string","title":"Top"},"p_top":{"type":"number","title":"P Top"},"expected_level":{"type":"number","title":"Expected Level","description":"Ordinal decisions: the expected zero-based level."},"policy":{"$ref":"#/components/schemas/PolicyResult","description":"Present when the request gave the decision a policy."}},"type":"object","required":["kind","probabilities","top","p_top"],"title":"DecisionResult"},"DecisionUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"decisions":{"type":"integer","title":"Decisions"},"tokenizer":{"$ref":"#/components/schemas/Tokenizer"},"images":{"type":"integer","title":"Images","description":"With images: how many the request sent."},"image_tokens":{"type":"integer","title":"Image Tokens","description":"With images: their tokens, each image once. input_tokens includes them, and 300 more per image."}},"type":"object","required":["input_tokens","decisions","tokenizer"],"title":"DecisionUsage"},"Fallback":{"properties":{"from":{"type":"string","title":"From"},"to":{"type":"string","title":"To"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["from","to","reason"],"title":"Fallback"},"PolicyResult":{"properties":{"action":{"type":"string","title":"Action","description":"The action with the lowest expected cost, the most likely outcome when the policy prices no actions, or abstain when p_top is below abstain_below."},"expected_costs":{"additionalProperties":{"type":"number"},"type":"object","title":"Expected Costs","description":"Each action's expected cost under the probabilities, with action_costs."}},"type":"object","required":["action"],"title":"PolicyResult"},"Timing":{"properties":{"render":{"type":"number","title":"Render"},"score":{"type":"number","title":"Score"},"load":{"type":"number","title":"Load"}},"type":"object","required":["render","score"],"title":"Timing"},"Tokenizer":{"properties":{"name":{"type":"string","title":"Name"},"revision":{"type":"string","title":"Revision"}},"type":"object","required":["name","revision"],"title":"Tokenizer"},"ModelQuote":{"properties":{"id":{"type":"string","title":"Id"},"quote_usd":{"type":"string","title":"Quote Usd"}},"type":"object","required":["id","quote_usd"],"title":"ModelQuote"},"HookDecision":{"properties":{"hookEventName":{"type":"string","const":"PreToolUse","title":"Hookeventname"},"permissionDecision":{"type":"string","enum":["allow","ask","deny"],"title":"Permissiondecision"},"permissionDecisionReason":{"type":"string","title":"Permissiondecisionreason"}},"type":"object","required":["hookEventName","permissionDecision","permissionDecisionReason"],"title":"HookDecision"},"LintWarning":{"properties":{"decision":{"type":"string","title":"Decision"},"rule":{"type":"string","title":"Rule"},"severity":{"type":"string","title":"Severity"},"message":{"type":"string","title":"Message"}},"type":"object","required":["decision","rule","severity","message"],"title":"LintWarning"},"JevBoolean":{"properties":{"type":{"type":"string","const":"noul","title":"Type"},"noul":{"type":"number","title":"Noul"}},"type":"object","required":["type","noul"],"title":"JevBoolean"},"JevChoice":{"properties":{"type":{"type":"string","const":"choice","title":"Type"},"choice":{"type":"string","title":"Choice"},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["type","choice","probabilities","confidence"],"title":"JevChoice"},"JevScore":{"properties":{"type":{"type":"string","const":"score","title":"Type"},"score":{"type":"number","title":"Score"},"legend":{"additionalProperties":{"type":"string"},"type":"object","title":"Legend"},"probabilities":{"additionalProperties":{"type":"number"},"type":"object","title":"Probabilities"},"confidence":{"type":"number","title":"Confidence"}},"type":"object","required":["type","score","legend","probabilities","confidence"],"title":"JevScore"},"JevUsage":{"properties":{"input_tokens":{"type":"integer","title":"Input Tokens"},"output_tokens":{"type":"integer","const":0,"title":"Output Tokens"},"tokenizer":{"$ref":"#/components/schemas/Tokenizer"}},"type":"object","required":["input_tokens","output_tokens","tokenizer"],"title":"JevUsage"},"Dataset":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"number","title":"Created At"},"sha256":{"type":"string","title":"Sha256","description":"Names every row of the latest version: its first version's file digest, each later one's chained on."},"version":{"type":"integer","title":"Version","description":"The latest version. Counts and the split are this version's."},"rows":{"type":"integer","title":"Rows"},"contexts":{"type":"integer","title":"Contexts"},"duplicates_removed":{"type":"integer","title":"Duplicates Removed"},"method":{"type":"string","enum":["sft","reward"],"title":"Method"},"archived_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Archived At","description":"When we archived it: when credit couldn't cover its storage, or on a suspension. Restore it to start new work. Null in the library."},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Used At","description":"When work last started on it: a fine-tune, an evaluation or prompt tuning, or the labelling job that made it. Adding rows doesn't count. Null until then."},"evaluation_only":{"type":"boolean","title":"Evaluation Only"},"evaluation_fraction":{"type":"number","title":"Evaluation Fraction"},"split":{"additionalProperties":{"type":"integer"},"type":"object","title":"Split"},"prompt_tuning":{"$ref":"#/components/schemas/PromptTuningReadiness","description":"What prompt tuning can tune in the training partition, counted when the dataset was made or grew, with the reasons the counts give worked out under the limits in force when it is read. Datasets of outcome scores have none."},"input":{"$ref":"#/components/schemas/InputReceipt"},"labeling":{"$ref":"#/components/schemas/LabelingLineage"},"storage_window":{"anyOf":[{"$ref":"#/components/schemas/StorageWindow"},{"type":"null"}],"description":"The day of storage held now, at the price it was accepted at, or null. Archiving or deleting it charges the minutes used of it; later days are priced as they start."},"labels_to_check":{"type":"integer","title":"Labels To Check","description":"How many labels prompt tuning doubted in this dataset that nobody has dismissed, each row and decision once, as its labels-to-check route lists them."}},"type":"object","required":["id","name","created_at","sha256","version","rows","contexts","duplicates_removed","method","archived_at","used_at","evaluation_only","evaluation_fraction","split"],"title":"Dataset"},"DatasetVersion":{"properties":{"version":{"type":"integer","title":"Version"},"created_at":{"type":"number","title":"Created At"},"sha256":{"type":"string","title":"Sha256","description":"Names every row of this version: the first version's file digest, each later one's chained on."},"rows":{"type":"integer","title":"Rows","description":"The dataset's rows at this version."},"added":{"type":"integer","title":"Added","description":"The rows this version added."},"contexts":{"type":"integer","title":"Contexts"},"split":{"additionalProperties":{"type":"integer"},"type":"object","title":"Split"},"added_via":{"type":"string","enum":["api","jsonl","csv","labeling"],"title":"Added Via","description":"How this version's rows came: the JSON API, a JSONL or CSV upload, or the labelling job that made the dataset, for its first version only."},"added_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added From","description":"The family whose page added these rows, or null. Only a later version has one."}},"type":"object","required":["version","created_at","sha256","rows","added","contexts","split","added_via","added_from"],"title":"DatasetVersion"},"LabelToCheck":{"properties":{"row":{"type":"string","title":"Row","description":"The dataset row, as r and its index: r4 is row 4."},"decision":{"type":"string","title":"Decision","description":"The decision whose expected answer is in doubt."},"reason":{"type":"string","title":"Reason","description":"Why the newest job that flagged it doubts it."},"jobs":{"items":{"type":"string"},"type":"array","title":"Jobs","description":"The succeeded prompt-tuning jobs that flagged it and are not dismissed, newest first."},"flagged_at":{"type":"number","title":"Flagged At","description":"When the newest of those jobs ended."},"context":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Context"},"targets":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Targets","description":"The row's expected answer for the decision."}},"type":"object","required":["row","decision","reason","jobs","flagged_at","context","targets"],"title":"LabelToCheck"},"CurvePoint":{"properties":{"step":{"type":"integer","title":"Step","description":"The last training step the point covers."},"loss":{"type":"number","title":"Loss","description":"The mean training loss over the steps it covers."},"learning_rate":{"type":"number","title":"Learning Rate","description":"The mean learning rate."}},"type":"object","required":["step","loss","learning_rate"],"title":"CurvePoint"},"ResolvedHyperparameters":{"properties":{"steps":{"type":"integer","title":"Steps"},"learning_rate":{"type":"number","title":"Learning Rate"},"lora_rank":{"type":"integer","title":"Lora Rank"},"seed":{"type":"integer","title":"Seed"}},"type":"object","required":["steps","learning_rate","lora_rank","seed"],"title":"ResolvedHyperparameters","description":"What a job trains with, as its owner chose or the defaults gave it. The trainer's own\nsettings stay on the server."},"FineTuningJob":{"properties":{"id":{"type":"string","title":"Id"},"dataset_id":{"type":"string","title":"Dataset Id"},"model":{"type":"string","title":"Model"},"method":{"type":"string","enum":["sft","reward"],"title":"Method"},"hyperparameters":{"$ref":"#/components/schemas/ResolvedHyperparameters"},"dataset_evaluation":{"anyOf":[{"$ref":"#/components/schemas/Evaluation"},{"type":"null"}]},"family":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family","description":"The family the job adds a model to."},"family_deleted":{"type":"boolean","title":"Family Deleted","description":"True once you deleted that family. The job and its charge stay."},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent","description":"The id of the model it trains from, or null from a base."},"dataset_version":{"type":"integer","title":"Dataset Version","description":"The version of its dataset it trains on."},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status"},"outcome":{"anyOf":[{"type":"string","enum":["joined","gate_failed","failed","cancelled","rolled_back"]},{"type":"null"}],"title":"Outcome","description":"How it ended for its family: its model joined the family with the next number, or failed its gate and is not kept for you, or the run failed or was cancelled, or a rollback discarded the model that joined. Only a failed run or a cancellation is free and leaves the data for another try. Null while it runs."},"created_at":{"type":"number","title":"Created At"},"updated_at":{"type":"number","title":"Updated At"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"metrics":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metrics","description":"Evaluation groups and the gate, when complete."},"error":{"anyOf":[{"type":"string"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Progress"},"curve":{"anyOf":[{"items":{"$ref":"#/components/schemas/CurvePoint"},"type":"array"},{"type":"null"}],"title":"Curve","description":"The training loss over steps, at most 300 points, each the means of a run of consecutive steps. Null until the job succeeds, or when its trainer kept none. Lists of jobs leave it out."},"limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Limits"},"split":{"additionalProperties":{"type":"integer"},"type":"object","title":"Split","description":"train_rows and validation_rows, and trained_tokens: the training tokens the job trains, every rendered training sequence its steps run, each time they run it. A priced fine-tune's fee is its base's fine_tune_million_tokens_usd for them, and at least fine_tune_minimum_usd."},"lineage":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lineage"},"price_usd":{"type":"string","title":"Price Usd","description":"The fee held for this job, as exact USD."},"charge":{"type":"string","enum":["free","reserved","charged","released"],"title":"Charge","description":"What the fee is doing: held while the job runs, charged if it succeeds, released if it fails or is cancelled."},"rows_deleted":{"type":"boolean","title":"Rows Deleted","description":"True once a dataset whose rows its specification held was deleted: the job, its model and its metrics stay, but its held-out records are gone."}},"type":"object","required":["id","dataset_id","model","method","hyperparameters","family","family_deleted","parent","dataset_version","status","outcome","created_at","updated_at","output_model","metrics","error","progress","limits","split","lineage","price_usd","charge"],"title":"FineTuningJob"},"JobEvent":{"properties":{"seq":{"type":"integer","title":"Seq"},"created_at":{"type":"number","title":"Created At"},"type":{"type":"string","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["seq","created_at","type","message"],"title":"JobEvent"},"Continuation":{"properties":{"state":{"type":"string","enum":["new_data","retry","no_new_data","not_enough_evaluation_data","queued","training","origin_gone","dataset_deleted","dataset_archived","fine_tuning_off"],"title":"State","description":"`new_data` when it can start on a version no finished job of the family used, and `retry` when it can start on the version its last run failed or was cancelled on. Otherwise what refuses it now: no training rows newer than the family last trained on, fewer evaluation decisions than its gate needs, a fine-tune of the family queued or training, an empty family whose origin model was deleted or discarded, its dataset deleted or archived, or fine-tuning off on this server. A family whose dataset was deleted never continues again: start a new family from its latest model."},"version":{"type":"integer","title":"Version","description":"The dataset version a continuation trains on: its newest."},"added_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Added At","description":"When that version was added."},"added_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Added From","description":"The family whose page added that version, or null when none did."},"evaluation_decisions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Evaluation Decisions","description":"The evaluation decisions about new contexts its gate could judge. Null while a job is queued or training, and when it is refused whatever the data."},"needed":{"type":"integer","title":"Needed","description":"How many of those the gate needs."},"rows":{"anyOf":[{"$ref":"#/components/schemas/ContinueRows"},{"type":"null"}],"description":"The rows it would take. Null when evaluation_decisions is."},"price_usd":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Usd","description":"0, as exact USD, when a continuation that can start would be free. Otherwise null: a priced fine-tune's fee depends on the hyperparameters it is sent with. `POST /v1/families/{family}/continue/estimate` gives the exact fee for them; send it as max_price_usd."}},"type":"object","required":["state","version","added_at","added_from","evaluation_decisions","needed","rows","price_usd"],"title":"Continuation"},"ContinueRows":{"properties":{"new":{"type":"integer","title":"New","description":"Training rows added since the family last trained."},"earlier":{"type":"integer","title":"Earlier","description":"Earlier training rows sampled to train on with them."},"evaluation":{"type":"integer","title":"Evaluation","description":"Evaluation rows its gate would measure on."}},"type":"object","required":["new","earlier","evaluation"],"title":"ContinueRows"},"DeletedModelVersion":{"properties":{"version":{"type":"integer","title":"Version"},"ref":{"type":"string","title":"Ref"},"adapter":{"type":"string","title":"Adapter"},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent","description":"The id of the model it trained from, or null from a base."},"status":{"type":"string","const":"deleted","title":"Status"},"deleted_at":{"type":"number","title":"Deleted At"}},"type":"object","required":["version","ref","adapter","parent","status","deleted_at"],"title":"DeletedModelVersion","description":"A model you deleted, as its family's line shows it: where it stood, and when it went."},"Family":{"properties":{"continue":{"anyOf":[{"$ref":"#/components/schemas/Continuation"},{"type":"null"}],"description":"What continuing it would do now, from the family's dataset and jobs. It doesn't check credit, storage allowance or queue room, which the start refuses with insufficient_credit, storage_allowance, queue_full or tenant_queue_full. A list of families reads no dataset: there `new_data` and `retry` only say a version no finished job used is waiting, and the counts and fee are null. The answers of a switch, keep warm or rollback leave it out."},"id":{"type":"string","title":"Id"},"object":{"type":"string","const":"family","title":"Object"},"switched_on":{"type":"boolean","title":"Switched On","description":"Whether calls to its name are answered."},"used_at":{"type":"number","title":"Used At","description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on."},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Switches Off At","description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model."},"off_reason":{"anyOf":[{"type":"string","enum":["owner","idle"]},{"type":"null"}],"title":"Off Reason","description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise."},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Off At","description":"When it went off, with off_reason. Null otherwise."},"dataset_id":{"type":"string","title":"Dataset Id","description":"The dataset it grows on."},"origin":{"type":"string","title":"Origin","description":"Where it started: a base model, or one of your models."},"created_at":{"type":"number","title":"Created At","description":"When it was named, as its first fine-tune was queued."},"served":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"The model calls to its name get while it is switched on, or null for none yet."},"latest":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"type":"null"}],"description":"Its newest model, neither deleted nor discarded."},"models":{"items":{"anyOf":[{"$ref":"#/components/schemas/ModelVersion"},{"$ref":"#/components/schemas/DeletedModelVersion"}]},"type":"array","title":"Models","description":"Every model of its line, oldest first. A deleted one shows only where it stood."},"keep_warm":{"type":"boolean","title":"Keep Warm"},"keep_warm_window":{"anyOf":[{"$ref":"#/components/schemas/KeepWarmWindow"},{"type":"null"}],"description":"The hour of keep warm being billed for the model the family serves, while the family is kept warm. Null otherwise: a model kept warm on its own shows its own hour."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Keep Warm Stopped At","description":"When keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null."},"move":{"anyOf":[{"$ref":"#/components/schemas/FamilyMove"},{"type":"null"}],"description":"The move to its latest model it waits to make, and what it waits for. Null while it serves its latest model, or is switched off."},"moved":{"anyOf":[{"$ref":"#/components/schemas/FamilyMoved"},{"type":"null"}],"description":"When it last moved by itself to the model it serves, and from which. Null when it never did, or serves another model or was rolled back since."},"jobs":{"items":{"$ref":"#/components/schemas/FamilyJob"},"type":"array","title":"Jobs","description":"Its fine-tunes, newest first, with how each ended. Lists of families, and the answers of a switch, keep warm or rollback, leave it out."}},"type":"object","required":["id","object","switched_on","used_at","switches_off_at","off_reason","off_at","dataset_id","origin","created_at","served","latest","models","keep_warm","keep_warm_window","keep_warm_stopped_at","move","moved"],"title":"Family"},"FamilyJob":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","enum":["queued","running","cancelling","succeeded","failed","cancelled"],"title":"Status"},"outcome":{"anyOf":[{"type":"string","enum":["joined","gate_failed","failed","cancelled","rolled_back"]},{"type":"null"}],"title":"Outcome","description":"How it ended: its model joined the family, failed its gate, the run failed or was cancelled, or a rollback discarded the model it made. Null while it runs."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why it made no model, in one line: the gate's first reason, or the first line of the error of a run that failed. Otherwise null."},"dataset_version":{"type":"integer","title":"Dataset Version"},"output_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Model"},"created_at":{"type":"number","title":"Created At"},"price_usd":{"type":"string","title":"Price Usd","description":"The fee held for this job, as exact USD."},"charge":{"type":"string","enum":["free","reserved","charged","released"],"title":"Charge","description":"What the fee is doing: held while the job runs, charged once training finishes, whatever the gate says, released if the run fails or is cancelled."}},"type":"object","required":["id","status","outcome","reason","dataset_version","output_model","created_at","price_usd","charge"],"title":"FamilyJob"},"FamilyMove":{"properties":{"to":{"type":"string","title":"To","description":"The model it moves to, its latest, such as router@5."},"waiting_for":{"type":"string","enum":["place","warm_place","warm_capacity","engines"],"title":"Waiting For","description":"`place` while the account has no place left for the move, which takes one only if the model the family serves keeps answering by its own switch, or it serves none yet. The move waits until a model is switched off or the tier goes up. A kept-warm family takes a warm place only if the model it serves stays warm by its own keep warm. `warm_place` while the account keeps as many models warm as its tier allows. That wait ends when a model's keep warm is turned off or the tier goes up. `warm_capacity` while the model's size has no kept-warm place free on our engines. That wait ends when one frees. Turning the family's keep warm off ends either wait. `engines` otherwise: the model loads, or waits to be tried again after a failed load."},"reason":{"anyOf":[{"type":"string","enum":["live_limit","warm_limit","warm_capacity"]},{"type":"null"}],"title":"Reason","description":"The code of the refusal that holds a waiting move: `live_limit` for `place`, `warm_limit` for `warm_place` and `warm_capacity` for `warm_capacity`, as switching on, keep warm and rollback name them. Null while it waits for engines."}},"type":"object","required":["to","waiting_for","reason"],"title":"FamilyMove"},"FamilyMoved":{"properties":{"at":{"type":"number","title":"At","description":"When it moved."},"from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From","description":"The model it served before, such as router@4, or null when it served none."}},"type":"object","required":["at","from"],"title":"FamilyMoved"},"Gate":{"properties":{"passed":{"type":"boolean","title":"Passed"},"against":{"type":"string","enum":["parent","base"],"title":"Against"},"reasons":{"items":{"type":"string"},"type":"array","title":"Reasons"},"groups":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Groups"},"ece":{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"null"}]},"type":"object","title":"Ece"}},"type":"object","required":["passed","against","reasons"],"title":"Gate"},"ModelVersion":{"properties":{"version":{"type":"integer","title":"Version"},"ref":{"type":"string","title":"Ref"},"adapter":{"type":"string","title":"Adapter"},"status":{"type":"string","title":"Status"},"discarded_at":{"type":"number","title":"Discarded At"},"on_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"On At","description":"When its own switch went on, so it answers calls to its number. Null while off."},"keep_warm":{"type":"boolean","title":"Keep Warm","description":"Whether it is kept warm on its own switch."},"keep_warm_stopped_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Keep Warm Stopped At","description":"When its own keep warm switched off because the next hour couldn't be reserved, while it stays off. Otherwise null."},"used_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Used At","description":"Its idle clock: the latest of its last production call by an API key that named it, its last evaluation that named it, and when it was switched on."},"switches_off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Switches Off At","description":"When idling switches it off unless it's used. Null while it is off or kept warm on its own switch, and when idling never switches anything off. A family's is also null while it serves no model."},"off_reason":{"anyOf":[{"type":"string","enum":["owner","idle"]},{"type":"null"}],"title":"Off Reason","description":"Why it is off: owner when it was switched off by hand, idle when nothing used it for too long. Null otherwise."},"off_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Off At","description":"When it went off, with off_reason. Null otherwise."},"parent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent"},"created_at":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Created At"},"gate":{"anyOf":[{"$ref":"#/components/schemas/Gate"},{"type":"null"}]},"heldout":{"additionalProperties":{"type":"number"},"type":"object","title":"Heldout"}},"type":"object","required":["version","ref","adapter","status","on_at","keep_warm","keep_warm_stopped_at","used_at","switches_off_at","off_reason","off_at","parent","created_at","gate","heldout"],"title":"ModelVersion"}},"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"onehot_sk_...","description":"Create an API key in the console. Required when accounts are enabled."}}},"tags":[{"name":"Decisions","description":"Probabilities for questions with fixed outcomes."},{"name":"Models","description":"Base models, and fine-tuned models by their numbers."},{"name":"Families","description":"Lines of models trained on one dataset, and the switches that let them answer calls."},{"name":"Datasets","description":"Validated training examples. A dataset grows in versions, and a version never changes."},{"name":"Evaluations","description":"Reusable model results on a dataset's fixed evaluation rows."},{"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":"Email OTP sign-in, revocable sessions, security and API keys."},{"name":"Billing","description":"Exact USD balances, purchases, automatic top-ups and referrals."},{"name":"Integrations","description":"Endpoints other tools call, such as Claude Code."},{"name":"System","description":"Health and discovery."}]}