{"openapi":"3.1.0","info":{"title":"weights.fyi API","version":"1.0.0","description":"The weights.fyi HTTP API: page classification, batch jobs, datasets and fine-tuning, compute plans and streams, traces, and (once a chat model has started) LLM endpoints with OpenAI-compatible chat. Every call takes `Authorization: Bearer <token>`; `x-required-scope` names the scope it needs (`read`, `submit` or `manage`). Refusals are JSON with an `error` code; a `429` is retryable after `Retry-After`. Calls that are not running on this service yet are left out until they are."},"servers":[{"url":"https://weights.fyi/run"}],"tags":[{"name":"Account and keys","description":"API tokens, their scopes, and the workspace a key belongs to."},{"name":"Credit and usage","description":"Prepaid credit, your balance, and every charge of your account."},{"name":"Models and quotes","description":"The models you can run or train, their state, versions, and what a job will cost."},{"name":"Classify","description":"Classify a call's worth of pages, with results in the answer when the model is ready."},{"name":"Jobs and results","description":"Batches of any size, their progress and cost, and their results read exactly once."},{"name":"Datasets","description":"Labelled training data: create a dataset, upload its file, list and remove it."},{"name":"Compute plans and streams","description":"Staged work with dependencies, budgets and schedules, fed by streams of packs."},{"name":"Fine-tuning","description":"Train the classifier on your own labelled pages and download the weights it made."},{"name":"Your own workers","description":"Enroll your own model workers: join tokens, the workers and the offers they publish."},{"name":"Tracing and exports","description":"Spans and logs of every job, your own trace destinations, and content logging."},{"name":"Your workspace","description":"What runs, waits and failed, its money, its people and its audit, as one read."}],"paths":{"/v1/compute/capabilities":{"get":{"tags":["Compute plans and streams"],"summary":"Describe accepted sources and formats","description":"What plans and packs accept: one entry per source URI scheme (forms, pinning, readers, byte ranges, hydration modes) and per data format, the submission options, and what the bundled runtime runs. Reader names are ecosystem examples, not libraries installed in the runtime.","operationId":"get_v1_compute_capabilities","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The capabilities, fixed in the service's code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ComputeCapabilities"},"example":{"schema":"weights.compute-capabilities/v1","dataset_protocols":{"az":{"uri_pattern":"az://<container>/<path>","uri_patterns":["az://<container>/<path>","abfss://<container>@<account>.dfs.core.windows.net/<path>"],"pinning":"required (sha256 field or @sha256:<64-hex> suffix)","native_readers":["arrow-rs object_store","adlfs","duckdb azure"],"supports_byte_range":true,"hydration_modes":["jit","prestage"]}},"data_formats":{"parquet":{"extensions":[".parquet"],"media_type":"application/vnd.apache.parquet","kind":"columnar","supports_byte_range":true,"supports_predicate_pushdown":true,"native_readers":["pyarrow.dataset","polars.scan_parquet","duckdb","arrow-rs parquet"]}},"scavenger_submission":{"source_probe":{"verify_param":"verify_source","modes":["live_range_probe","syntax_and_custody_only"],"checks":["reachability","http_206_range","content_range_bounds","magic_bytes"]}}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-capabilities"}}},"/v1/compute/plans":{"post":{"tags":["Compute plans and streams"],"summary":"Submit a compute plan","description":"Admits a ComputePlan: stages with dependencies, a schedule window and a budget, for a tenant and organisation your account holds a grant on. The same normalised plan again answers its current receipt; the same `plan_id` or `operation_key` with different content answers `409`.","operationId":"post_v1_compute_plans","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"verify_source","in":"query","required":false,"description":"`1`, `true`, `0` or `false`, ignoring case and surrounding whitespace. True reads every source by a short range before anything is written; false cannot turn off a check the service requires.","schema":{"type":"string"},"example":"1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanSubmission"},"example":{"plan_id":"example-plan","operation_key":"example-1","tenancy":{"tenant_id":"demo","org_slug":"demo","platform":"api","max_budget_usd_micros":1000000},"schedule":{"window_start_ms":1793232000000,"until_ms":1793318400000,"wake_policy":"scavenger_stream"},"stages":[{"stage_id":"pages","execution_mode":"weights_managed_compute","workload":{"kind":"classifier_drain","model":"laya-page-role","open_stream":true,"total_items_hint":0,"output_prefix_uri":"r2://tenants/demo/results/"}}]}}}},"responses":{"201":{"description":"Admitted: the plan's receipt and what source verification read. Admission confirms acceptance, not execution.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlanReceipt"},{"type":"object","properties":{"source_probe":{"$ref":"#/components/schemas/SourceProbe"},"pack_sizing_advisory":{"$ref":"#/components/schemas/PackSizingAdvisory"}},"required":["source_probe"]}]},"example":{"plan_id":"example-plan","operation_key":"example-1","state":"waiting_price","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","kind":"classifier_drain","model":"laya-page-role","state":"waiting_price","needs":[]}],"source_probe":{"verified":false,"mode":"syntax_and_custody_only","probes":[]}}}}},"200":{"description":"An identical retry: the same normalised plan under its `operation_key`, answered with the plan's current receipt and what source verification read. Nothing is admitted twice.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlanReceipt"},{"type":"object","properties":{"source_probe":{"$ref":"#/components/schemas/SourceProbe"},"pack_sizing_advisory":{"$ref":"#/components/schemas/PackSizingAdvisory"}},"required":["source_probe"]}]},"example":{"plan_id":"example-plan","operation_key":"example-1","state":"waiting_price","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","kind":"classifier_drain","model":"laya-page-role","state":"waiting_price","needs":[]}],"source_probe":{"verified":false,"mode":"syntax_and_custody_only","probes":[]}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `source_unreachable`, `source_range_unsupported`, `source_range_out_of_bounds`, `source_size_mismatch`, `source_format_mismatch`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `source_probe_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"source_probe_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-create"}},"get":{"tags":["Compute plans and streams"],"summary":"List compute plans","description":"Your account's plans, newest admission first, with each stage's progress and pack counts. Unknown or repeated parameters are refused, so a misspelt filter never lists everything.","operationId":"get_v1_compute_plans","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"state","in":"query","required":false,"description":"A plan state, or `active` for every plan not `completed`, `failed` or `cancelled`.","schema":{"type":"string","enum":["queued","waiting_price","ready_to_wake","waiting_capacity","executing","completed","failed","cancelled","active"]},"example":"active"},{"name":"wake_policy","in":"query","required":false,"description":"The schedule's wake policy.","schema":{"type":"string","enum":["standard","scavenger_stream","piggyback"]}},{"name":"qos_priority","in":"query","required":false,"description":"The QoS class the schedule declares; plans that declare none match no value.","schema":{"type":"string","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]}},{"name":"limit","in":"query","required":false,"description":"Plans per page, 1–200; default 50.","schema":{"type":"integer","minimum":1,"maximum":200,"default":50},"example":20},{"name":"cursor","in":"query","required":false,"description":"The `next_cursor` of an earlier page, with the same filters.","schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"description":"`workspace`, the default: everything in the workspace. `mine`: what you submitted, with this key, or as a signed-in person with any key you issued here. A credential that names no person and no key is refused `mine`.","schema":{"type":"string","enum":["mine","workspace"],"default":"workspace"},"example":"mine"}],"responses":{"200":{"description":"A page of plans.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanList"},"example":{"plans":[{"plan_id":"example-plan","operation_key":"example-1","tenant_id":"demo","state":"executing","continuous":false,"created_at_ms":1793232000000,"updated_at_ms":1793235600000,"wake_policy":"scavenger_stream","qos_priority":null,"qos_class":"flex","window_start_ms":1793232000000,"until_ms":1793318400000,"pack_counts":{"lazy":0,"pending":2,"completed":3,"expired_incomplete":0,"dead_lettered":0,"dead_letter_accepted":0,"cancelled":0},"leases_live":1,"total_accrued_cost_usd_micros":300,"submitted_by":{"person_id":12,"token_id":4},"stages":[{"stage_id":"pages","stream_id":"example-plan~pages","needs":[],"kind":"classifier_drain","model":"laya-page-role","state":"executing","stream_sealed":false,"continuous":false,"packs_total":6,"packs_completed":3,"items_completed":300,"steps_completed":0,"accrued_cost_usd_micros":300,"pack_counts":{"lazy":0,"pending":2,"completed":3,"expired_incomplete":0,"dead_lettered":0,"dead_letter_accepted":0,"cancelled":0},"leases_live":1}]}],"next_cursor":null,"limit":20}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`, `invalid_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-list"}}},"/v1/compute/plans/dry-run":{"post":{"tags":["Compute plans and streams"],"summary":"Dry-run a compute plan","description":"Checks a ComputePlan without admitting it: the plan rules and your tenancy grant, each model's pinned release, and a declared or synthetic request per chat stage answered by a stand-in. With `verify_source`, reads the requested sources by range. Nothing is written, queued or charged. `ok` means no error was found; `verified` requires every check to be `checked`.","operationId":"post_v1_compute_plans_dry-run","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"verify_source","in":"query","required":false,"description":"`1`, `true`, `0` or `false`, ignoring case and surrounding whitespace. True reads every source by a short range before anything is written; false cannot turn off a check the service requires.","schema":{"type":"string"},"example":"1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanSubmission"},"example":{"plan_id":"example-plan","operation_key":"example-1","tenancy":{"tenant_id":"demo","org_slug":"demo","platform":"api","max_budget_usd_micros":1000000},"schedule":{"window_start_ms":1793232000000,"until_ms":1793318400000,"wake_policy":"scavenger_stream"},"stages":[{"stage_id":"pages","execution_mode":"weights_managed_compute","workload":{"kind":"classifier_drain","model":"laya-page-role","open_stream":true,"total_items_hint":0,"output_prefix_uri":"r2://tenants/demo/results/"}}]}}},"description":"The plan `POST /v1/compute/plans` takes; at most 1 MiB and 128 stages by default. The service may configure a different stage limit."},"responses":{"200":{"description":"The verdict. A plan the rules refuse answers `ok: false` with a finding, not `400`.","content":{"application/json":{"schema":{"type":"object","properties":{"schema":{"type":"string","description":"The answer's format, `weights.twin-dry-run/v1`."},"plan_id":{"type":["string","null"],"description":"The plan's `plan_id`, when it has one."},"plan_valid":{"type":"boolean","description":"Whether the plan rules of submission accept the plan."},"ok":{"type":"boolean","description":"Whether no finding is an error; unverified checks may remain."},"verified":{"type":"boolean","description":"True only when every check is `checked`; does not prove execution."},"tenancy_authorized":{"type":["boolean","null"],"description":"Whether your account holds the grant submission needs; null for an invalid plan. Invalid or unauthorized plans are not simulated and read no source."},"cost_usd_micros":{"type":"integer","description":"Always 0: a dry run uses no capacity.","minimum":0,"maximum":9223372036854775807},"checks":{"type":"object","properties":{"roster_pins":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true},"source_uris":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true},"context_bounds":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true},"template_kwargs":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true},"tools":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true},"request_shape":{"type":"object","properties":{"status":{"type":"string","description":"Passed, found an error, or not established by this run.","enum":["checked","failed","unverified"]},"detail":{"type":"string","description":"What was checked or why it remains unverified."}},"required":["status","detail"],"additionalProperties":true}},"required":["roster_pins","source_uris","context_bounds","template_kwargs","tools","request_shape"]},"unverified":{"type":"array","items":{"type":"string"},"description":"Names of checks whose status is `unverified`."},"source_probe":{"$ref":"#/components/schemas/SourceProbe"},"limits":{"type":"object","properties":{"stages":{"type":"integer","description":"Stages in the plan.","minimum":0},"max_stages":{"type":"integer","description":"The most stages one dry run takes.","minimum":1},"stages_used_pct":{"type":"number","description":"`stages` as a percentage of `max_stages`."},"loopback_timeout_seconds":{"type":"number","description":"How long one stand-in call may take."},"deadline_seconds":{"type":"number","description":"How long the whole dry run may take: the per-call time for the model list and for each chat stage."},"elapsed_seconds":{"type":"number","description":"How long this dry run took."},"deadline_used_pct":{"type":"number","description":"`elapsed_seconds` as a percentage of the deadline."},"slot_wait_seconds":{"type":"number","description":"How long it waited for a free stand-in."},"concurrent_twins":{"type":"integer","description":"Stand-ins this service runs at once.","minimum":1},"concurrent_twins_basis":{"type":"string","description":"Where that number comes from."},"twins_in_use":{"type":"integer","description":"Stand-ins busy when this answer was written.","minimum":0},"twins_in_use_pct":{"type":"number","description":"The same as a percentage."},"twins_peak":{"type":"integer","description":"The most that were busy at once so far.","minimum":0}},"description":"Present when simulation was attempted: how much of each bound this dry run used. A dry run that runs out of its deadline reports the finding `dry_run_deadline_exceeded`; one that finds every stand-in busy answers `429 dry_run_busy`.","additionalProperties":true},"models":{"type":"array","items":{"type":"object","properties":{"requested":{"type":"string","description":"The model as the plan names it."},"model_id":{"type":"string","description":"The model's catalogue identifier."},"ok":{"type":"boolean","description":"Whether this model's release and layout checks passed."},"pinned":{"type":"boolean","description":"Whether the model's release is pinned, so it can be loaded."},"tp_degree":{"type":["integer","null"],"description":"The parallel width the model was checked at: how many accelerators one copy of it spans. Null for a model outside the catalogue."},"context_window":{"type":["integer","null"],"description":"The context window checked against, in tokens."},"context_window_basis":{"type":["string","null"],"description":"What `context_window` rests on, as a sentence: the limit the release states, or an upper bound, the smaller of the model's own limit and the session cache it is given. An upper bound is not a measurement."},"reasoning_efforts":{"type":["object","null"],"properties":{},"description":"For each `reasoning_effort` tier (`low`, `medium`, `high`, `xhigh`, `max`), the word the model's chat template receives for it. Null when the release records no reasoning settings.","additionalProperties":{"type":["string","null"]}},"context_window_pinned":{"type":"boolean","description":"Whether the release states that window; otherwise it is an upper bound."},"context_bounds":{"type":["object","null"],"properties":{},"description":"The architectural limit and the session capacity used to bound the context.","additionalProperties":true},"tools_supported":{"type":"boolean","description":"Whether the model's release accepts tool calls."},"template_kwargs":{"type":"array","items":{"type":"string"},"description":"Template options recorded by the release."}},"additionalProperties":true},"description":"One entry per distinct model of the plan."},"stages":{"type":"array","items":{"type":"object","properties":{"stage_id":{"type":["string","null"],"description":"The stage's identifier."},"kind":{"type":"string","description":"The stage's workload kind."},"model":{"type":["string","null"],"description":"The stage's model."},"ok":{"type":"boolean","description":"Whether this stage's checks passed."},"checks":{"type":"object","properties":{"context_bounds":{"type":"string","enum":["checked","failed","unverified"]},"template_kwargs":{"type":"string","enum":["checked","failed","unverified"]},"tools":{"type":"string","enum":["checked","failed","unverified"]},"request_shape":{"type":"string","enum":["checked","failed","unverified"]}},"description":"This chat stage's check statuses; empty for stages that send no chat request."},"request":{"type":["object","null"],"properties":{},"description":"What the declared or synthetic request was sized on: sessions, context and `max_tokens`. A synthetic request leaves the real request shape unverified.","additionalProperties":true},"twin":{"type":["object","null"],"properties":{},"description":"The stand-in's answer, or why the stage sends it no request.","additionalProperties":true}},"additionalProperties":true},"description":"One entry per stage."},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","description":"Only an error makes `ok` false.","enum":["error","warning"]},"code":{"type":"string","description":"The code a program acts on, e.g. `manifest_sha256_unpinned`."},"message":{"type":"string","description":"One sentence for a person."},"model":{"type":"string","description":"The model the finding is about, when there is one."},"stage_id":{"type":"string","description":"The stage the finding is about, when there is one."}},"required":["severity","code","message"],"additionalProperties":true},"description":"Every error and warning, in the order found."},"pack_sizing_advisory":{"$ref":"#/components/schemas/PackSizingAdvisory"}},"required":["schema","plan_valid","ok","verified","tenancy_authorized","checks","unverified","source_probe","cost_usd_micros","models","stages","findings"],"additionalProperties":true},"example":{"schema":"weights.twin-dry-run/v1","plan_id":"example-plan","plan_valid":true,"ok":true,"verified":false,"tenancy_authorized":true,"cost_usd_micros":0,"checks":{"roster_pins":{"status":"checked","detail":"The model's release is pinned."},"source_uris":{"status":"unverified","detail":"No source was read."},"context_bounds":{"status":"unverified","detail":"No chat stage was sent to the stand-in."},"template_kwargs":{"status":"unverified","detail":"No chat stage was sent to the stand-in."},"tools":{"status":"unverified","detail":"No chat stage was sent to the stand-in."},"request_shape":{"status":"unverified","detail":"No chat stage was sent to the stand-in."}},"unverified":["source_uris","context_bounds","template_kwargs","tools","request_shape"],"source_probe":{"verified":false,"mode":"syntax_and_custody_only","probes":[]},"models":[{"requested":"laya-page-role","model_id":"laya-page-role","ok":true,"pinned":true,"tp_degree":null,"context_window":null,"context_window_basis":null,"context_window_pinned":false,"tools_supported":false,"reasoning_efforts":null}],"limits":{"stages":1,"max_stages":128,"stages_used_pct":0.78,"loopback_timeout_seconds":5.0,"deadline_seconds":5.0,"elapsed_seconds":0.012,"deadline_used_pct":0.24,"slot_wait_seconds":0.0,"concurrent_twins":8,"concurrent_twins_basis":"one twin per CPU this process may run on (8)","twins_in_use":1,"twins_in_use_pct":12.5,"twins_peak":1},"stages":[{"stage_id":"pages","kind":"classifier_drain","model":"laya-page-role","ok":true,"request":null,"twin":{"exercised":false,"reason":"a classifier_drain stage sends no chat request; the twin answers chat stages"}}],"findings":[]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `dry_run_busy`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dry_run_busy"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-dry-run"}}},"/v1/compute/plans/{plan_id}":{"get":{"tags":["Compute plans and streams"],"summary":"Get a compute plan","description":"The plan's receipt: normalised tenancy and schedule, each stage's state, progress, delivery `outcome` and `failure`, readiness, `accounting`, and `last_event_seq` to follow later events. A read never starts capacity and never checks sources. For a plan made only of `live_session_pool` harness stages, a read can wake stages that wait: when every model of the plan is ready with room, this poll moves them to `lease_ready`. An absent plan and another account's both answer `404`.","operationId":"get_v1_compute_plans_plan_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"}],"responses":{"200":{"description":"The plan's receipt. Polling a harness plan can wake its waiting stages; no other plan is changed by a read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReceipt"},"example":{"plan_id":"example-plan","operation_key":"example-1","state":"completed","stages":[{"stage_id":"sessions","stream_id":"example-plan~sessions","state":"completed","needs":[],"checkpoint_uri":null,"packs_total":0,"packs_completed":0,"items_completed":0,"steps_completed":0,"accrued_cost_usd_micros":1200}],"last_event_seq":42,"total_accrued_cost_usd_micros":1200}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-get"}}},"/v1/compute/plans/{plan_id}/stages/{stage_id}/complete":{"post":{"tags":["Compute plans and streams"],"summary":"Complete a harness stage","description":"Records the result of your active `awow_harness_lease` stage; the JSON body is the result itself, and an identical result can be sent again. A service-managed stage answers `403`: its own workers report its completion.","operationId":"post_v1_compute_plans_plan_id_stages_stage_id_complete","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"},{"name":"stage_id","in":"path","required":true,"description":"The authored identifier of your `awow_harness_lease` stage.","schema":{"type":"string"},"example":"sessions"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"output_uri":{"type":["string","null"],"description":"This tenant's output: `r2://tenants/<tenant_id>/<path>` or `s3://<bucket>/tenants/<tenant_id>/<path>`."},"output_checkpoint_uri":{"type":["string","null"],"description":"This tenant's checkpoint, in the same forms."},"total_cost_usd_micros":{"type":"integer","description":"The stage's total cost, in micro-dollars.","minimum":0,"maximum":9223372036854775807}},"additionalProperties":true},"example":{}}},"description":"The result object, at most 1 MiB; `{}` is valid. Do not wrap it in `result`; further fields are kept and compared on replay."},"responses":{"200":{"description":"The plan's receipt; the stage reports `completed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReceipt"},"example":{"plan_id":"example-plan","state":"completed","stages":[{"stage_id":"sessions","stream_id":"example-plan~sessions","state":"completed","accrued_cost_usd_micros":1200}],"total_accrued_cost_usd_micros":1200,"last_event_seq":42}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-stages-complete"}}},"/v1/compute/plans/{plan_id}/stages/{stage_id}/fail":{"post":{"tags":["Compute plans and streams"],"summary":"Fail a harness stage","description":"Reports that your active `awow_harness_lease` stage failed. The stage ends `failed` and only the stages that depend on it, directly or through others, are cancelled (`failure.reason: dependency_failed`); independent stages keep running, and the plan ends `failed` once they finish. Two kinds of reason do not fail the stage. One that starts with `INPUT_STAGING_FAILED` or `PLATFORM_OOM` puts it back in line for another attempt while it has attempts left (`max_attempts`, default 3). One that reports missing credit returns it to `ready_to_wake` until credit is there. A stage or plan that already ended answers its receipt unchanged, keeping the first reason.","operationId":"post_v1_compute_plans_plan_id_stages_stage_id_fail","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"},{"name":"stage_id","in":"path","required":true,"description":"The authored identifier of your `awow_harness_lease` stage.","schema":{"type":"string"},"example":"sessions"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Non-whitespace content, at most 4,096 UTF-8 bytes; stored as sent.","minLength":1}},"required":["reason"],"additionalProperties":true},"example":{"reason":"The coding suite exceeded its deadline."}}},"description":"A JSON object of at most 1 MiB; other fields are ignored."},"responses":{"200":{"description":"The plan's receipt: the stage `failed` and its dependents `cancelled`, or the stage waiting again after a transient or credit reason. Independent stages are untouched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReceipt"},"example":{"plan_id":"example-plan","state":"executing","outcome":"in_progress","stages":[{"stage_id":"sessions","stream_id":"example-plan~sessions","state":"failed","outcome":"failed","failure":{"status":"failed","reason":"The coding suite exceeded its deadline.","error":"The coding suite exceeded its deadline."}},{"stage_id":"review","stream_id":"example-plan~review","needs":["sessions"],"state":"cancelled","outcome":"cancelled","failure":{"status":"cancelled","reason":"dependency_failed","source_stage_id":"sessions"}},{"stage_id":"docs","stream_id":"example-plan~docs","state":"lease_ready","outcome":"in_progress","failure":null}],"last_event_seq":43}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-stages-fail"}}},"/v1/compute/plans/{plan_id}/stages/{stage_id}/packs/retry":{"post":{"tags":["Compute plans and streams"],"summary":"Retry a stage's dead-lettered packs","description":"Returns the stage's dead-lettered packs to pending work with attempt counts reset, when `expected_dead_lettered` still matches the stage's count. It replays by `operation_key` or `Idempotency-Key`; send the same key and payload when you retry.","operationId":"post_v1_compute_plans_plan_id_stages_stage_id_packs_retry","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"},{"name":"stage_id","in":"path","required":true,"description":"The stage's authored identifier within the plan.","schema":{"type":"string"},"example":"pages"},{"name":"Idempotency-Key","in":"header","required":false,"description":"The operation's key, unless `operation_key` is in the body (which takes precedence for durable replay). The same key with a different request answers `422 idempotency_key_reused`; while the first still runs, `409 idempotency_key_in_progress`.","schema":{"type":"string","minLength":1},"example":"retry-packs-1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageRetry"},"example":{"expected_dead_lettered":1}}},"description":"At most 1 MiB."},"responses":{"200":{"description":"The plan's receipt with the operation; a durable replay changes nothing again.","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"`true` when this is the first answer to this `Idempotency-Key` again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageDeadLetterResult"},"example":{"plan_id":"example-plan","state":"ready_to_wake","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"ready_to_wake","packs_pending":1,"packs_dead_lettered":0}],"operation":{"event_type":"dead_lettered_packs_retried","operation_key":"retry-packs-1","target_stage_id":"pages","expected_dead_lettered":1,"reason":"","packs":1,"pack_ids":["p3"],"reopened_from":"failed","restored_stages":[]},"replayed":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dead_letter_count_changed`, `compute_plan_conflict`, `compute_schedule_window_closed`, `compute_dependents_progressed`, `idempotency_key_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dead_letter_count_changed","expected_dead_lettered":1,"actual_dead_lettered":2}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-stages-packs-retry"}}},"/v1/compute/plans/{plan_id}/stages/{stage_id}/packs/accept-loss":{"post":{"tags":["Compute plans and streams"],"summary":"Accept the loss of a stage's dead-lettered packs","description":"Marks the stage's dead-lettered packs `dead_letter_accepted` with your reason: they are not retried and no output is invented. A stage failed by those packs can reopen; the call replays by `operation_key` or `Idempotency-Key`.","operationId":"post_v1_compute_plans_plan_id_stages_stage_id_packs_accept-loss","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"},{"name":"stage_id","in":"path","required":true,"description":"The stage's authored identifier within the plan.","schema":{"type":"string"},"example":"pages"},{"name":"Idempotency-Key","in":"header","required":false,"description":"The operation's key, unless `operation_key` is in the body (which takes precedence for durable replay). The same key with a different request answers `422 idempotency_key_reused`; while the first still runs, `409 idempotency_key_in_progress`.","schema":{"type":"string","minLength":1},"example":"retry-packs-1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageAcceptLoss"},"example":{"expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary."}}},"description":"At most 1 MiB."},"responses":{"200":{"description":"The plan's receipt with the operation; accepted losses stay visible in `packs_dead_letter_accepted`.","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"`true` when this is the first answer to this `Idempotency-Key` again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageDeadLetterResult"},"example":{"plan_id":"example-plan","state":"completed","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"completed","packs_dead_lettered":0,"packs_dead_letter_accepted":1}],"operation":{"event_type":"dead_letters_accepted","operation_key":"accept-loss-1","target_stage_id":"pages","expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary.","packs":1,"pack_ids":["p3"],"reopened_from":"failed","restored_stages":[]},"replayed":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dead_letter_count_changed`, `compute_plan_conflict`, `idempotency_key_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dead_letter_count_changed","expected_dead_lettered":1,"actual_dead_lettered":2}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-stages-packs-accept-loss"}}},"/v1/compute/plans/{plan_id}/stages/{stage_id}/materialize":{"post":{"tags":["Compute plans and streams"],"summary":"Fill a stream's pending lookahead","description":"Promotes lazy packs and registers further packs from the stage's `lazy_materializer` policy, up to its lookahead and total; `force_fill` lifts the batch size. It neither uploads nor verifies the data the packs name, and repeated calls may add more as work drains.","operationId":"post_v1_compute_plans_plan_id_stages_stage_id_materialize","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"},{"name":"stage_id","in":"path","required":true,"description":"The stage's authored identifier within the plan.","schema":{"type":"string"},"example":"pages"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"force_fill":{"type":"boolean","description":"Fill the available lookahead in this call.","default":false}},"additionalProperties":false},"example":{"force_fill":true}}},"description":"`{}` or only `force_fill`, at most 1 MiB; an empty body is invalid JSON."},"responses":{"200":{"description":"What this call added.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageMaterialized"},"example":{"materialized":8,"stages":[{"plan_id":"example-plan","stage_id":"pages","materialized":8}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `stream_backpressure`, `rate_limited`. `stream_backpressure` sends no `Retry-After`: poll the backlog and send again as work drains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stream_backpressure","message":"stream backpressure limit reached","status":"backpressure","policy_signal":"WIND_DOWN_UNTIL_DRAINED","active_packs":4,"pending":3,"leased_live":1,"max_pending_packs":4}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again. Not sent with `stream_backpressure`."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-stages-materialize"}}},"/v1/compute/plans/{plan_id}/promote":{"post":{"tags":["Compute plans and streams"],"summary":"Promote a standing plan","description":"Moves a standing plan (`piggyback`, `scavenger_stream` or `incomplete: ok`) to `wake_policy: standard` with its progress kept, optionally with a new hourly ceiling. Not a safe retry: a second promotion answers `409`, so read the plan after a lost answer.","operationId":"post_v1_compute_plans_plan_id_promote","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"max_hourly_usd_micros":{"type":["integer","null"],"description":"Replaces the schedule's hourly ceiling, in micro-dollars; omitted or null keeps it.","minimum":0,"maximum":9223372036854775807}},"additionalProperties":false},"example":{"max_hourly_usd_micros":2000000}}},"description":"Empty, `{}`, or only `max_hourly_usd_micros`; at most 1 MiB."},"responses":{"200":{"description":"The plan's receipt with the updated schedule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReceipt"},"example":{"plan_id":"example-plan","state":"executing","schedule":{"window_start_ms":1793232000000,"until_ms":1793318400000,"wake_policy":"standard","incomplete":"fail","max_hourly_usd_micros":2000000},"stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"executing","packs_completed":3}],"last_event_seq":43}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-promote"}}},"/v1/compute/plans/{plan_id}/cancel":{"post":{"tags":["Compute plans and streams"],"summary":"Cancel a compute plan","description":"Cancels every unfinished stage and pack and releases the plan's capacity request; completed stages and accrued cost stay. A cancelled plan answers its receipt unchanged; a completed or failed one answers `409`.","operationId":"post_v1_compute_plans_plan_id_cancel","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"reason":{"type":"string","description":"Recorded on each cancelled stage and in the events; default `cancelled_by_owner`. At most 4,096 bytes.","minLength":1}},"additionalProperties":false},"example":{"reason":"superseded by a new plan"}}},"description":"Empty, `{}`, or only `reason`; at most 1 MiB."},"responses":{"200":{"description":"The plan's receipt: `cancelled`, with its capacity request `released`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanReceipt"},"example":{"plan_id":"example-plan","state":"cancelled","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"cancelled","packs_completed":3}],"readiness":{"ready":false,"active_workers":0,"capacity":{"state":"released"}},"last_event_seq":44}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-cancel"}}},"/v1/compute/plans/{plan_id}/consolidate":{"post":{"tags":["Compute plans and streams"],"summary":"Consolidate superseded plans into a plan","description":"Moves the pending, lazy and stashed packs (with `retry_dead_lettered`, the dead-lettered ones too) of your superseded plans onto the matching stages of this plan, then ends those plans. A superseded plan holding a live pack lease refuses the whole call, and nothing changes.","operationId":"post_v1_compute_plans_plan_id_consolidate","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"plan_id","in":"path","required":true,"description":"The plan's identifier, as sent at admission.","schema":{"type":"string"},"example":"example-plan"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"superseded_plan_ids":{"type":"array","items":{"type":"string"},"description":"Your plans in the same tenant, not this one, none twice.","minItems":1},"stage_map":{"type":"object","properties":{},"description":"A superseded plan's stage to this plan's; omitted, by identifier.","additionalProperties":{"type":"string"}},"retry_dead_lettered":{"type":"boolean","description":"Move dead-lettered packs as fresh pending packs, history kept."},"reason":{"type":"string","description":"Recorded on each cancellation; default `superseded_by:<plan_id>`. At most 4,096 bytes.","minLength":1}},"required":["superseded_plan_ids"],"additionalProperties":false},"example":{"superseded_plan_ids":["embeddings-20261104","embeddings-20261106"],"retry_dead_lettered":true,"reason":"one stream per workload"}}}},"responses":{"200":{"description":"This plan's receipt and what moved; a repeat answers `replayed: true`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/PlanReceipt"},{"type":"object","properties":{"consolidation":{"$ref":"#/components/schemas/PlanConsolidation"}},"required":["consolidation"]}]},"example":{"plan_id":"embeddings","state":"executing","continuous":true,"stages":[{"stage_id":"embed","stream_id":"embeddings~embed","state":"ready_to_wake","stream_sealed":false,"continuous":true,"packs_total":46,"packs_completed":40,"packs_pending":6}],"consolidation":{"moved_packs":6,"reopened_stages":["embed"],"replayed":false,"superseded":[{"plan_id":"embeddings-20261104","from_state":"ready_to_wake","cancelled":true,"moved_packs":4,"moved_dead_lettered":0},{"plan_id":"embeddings-20261106","from_state":"failed","cancelled":false,"moved_packs":2,"moved_dead_lettered":1}]}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`, `compute_schedule_window_closed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-plans-consolidate"}}},"/v1/streams/{stage_id}/packs":{"post":{"tags":["Compute plans and streams"],"summary":"Register a pack","description":"Registers one runnable pack or lazy pointer on a stream, or with `packs` a batch of 1–64 whose sources are checked concurrently; an identical registration answers it again. With `verify_source` each source is read by a short range first, and a failing one registers nothing.","operationId":"post_v1_streams_stage_id_packs","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"verify_source","in":"query","required":false,"description":"`1`, `true`, `0` or `false`, ignoring case and surrounding whitespace. True reads every source by a short range before anything is written; false cannot turn off a check the service requires.","schema":{"type":"string"},"example":"1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PackRegistration"},{"type":"object","properties":{"packs":{"type":"array","items":{"$ref":"#/components/schemas/PackRegistration"},"minItems":1,"maxItems":64},"verify_source":{"type":"boolean","description":"Check every pack's source."},"max_pending_packs":{"type":"integer","description":"This call's admission limit for every pack.","minimum":1},"plan_id":{"type":"string"},"stage_id":{"type":"string"}},"required":["packs"],"additionalProperties":false}]},"example":{"pack_id":"p0","item_count":1,"source_uri":"https://files.example.test/p0.jsonl?sig=SIGNED_VALUE","sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","compressed_bytes":3,"format":"jsonl"}}},"description":"One pack, or `packs` with 1–64; at most 1 MiB of JSON."},"responses":{"201":{"description":"Registered, replayed or promoted: the normalised registration and what was read.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PackRegistered"},{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string"},"packs":{"type":"array","items":{"$ref":"#/components/schemas/PackRegistered"}},"source_probe":{"$ref":"#/components/schemas/SourceProbe"},"pack_sizing_advisory":{"$ref":"#/components/schemas/PackSizingAdvisory"}},"required":["plan_id","stage_id","packs","source_probe"]}]},"example":{"plan_id":"example-plan","stage_id":"pages","pack_id":"p0","ordinal":0,"item_count":1,"source_uri":"https://files.example.test/p0.jsonl?sig=SIGNED_VALUE","sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","compressed_bytes":3,"format":"jsonl","r2_input_uri":null,"est_input_tokens":0,"est_output_tokens":0,"prefix_hash":null,"source_probe":{"verified":true,"mode":"live_range_probe","probes":[{"pack_id":"p0","uri":"https://files.example.test/p0.jsonl?sig=SIGNED_VALUE","status":206,"supports_range":true,"remote_bytes":3,"magic_ok":null}]}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `source_unreachable`, `source_range_unsupported`, `source_range_out_of_bounds`, `source_size_mismatch`, `source_format_mismatch`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `ambiguous_compute_stage`, `compute_plan_conflict`, `compute_schedule_window_closed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"ambiguous_compute_stage"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `stream_backpressure`, `rate_limited`. `stream_backpressure` sends no `Retry-After`: poll the backlog and send again as work drains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stream_backpressure","message":"stream backpressure limit reached","status":"backpressure","policy_signal":"WIND_DOWN_UNTIL_DRAINED","active_packs":4,"pending":3,"leased_live":1,"max_pending_packs":4}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again. Not sent with `stream_backpressure`."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `source_probe_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"source_probe_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-create"}},"get":{"tags":["Compute plans and streams"],"summary":"Read a stream's backlog","description":"A lookahead snapshot of the stream: packs per state, live and expired leases, the `deficit` of pending packs to fill `lookahead_window`, and the next lazy packs to prepare. It reserves nothing and is not a listing of every pack.","operationId":"get_v1_streams_stage_id_packs","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"lookahead_window","in":"query","required":false,"description":"The window to fill; default 32. Zero returns no lazy candidates.","schema":{"type":"integer","minimum":0,"maximum":9223372036854775807,"default":32},"example":2}],"responses":{"200":{"description":"The stream's backlog.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamBacklog"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","stream_sealed":false,"packs_total":2,"packs_completed":0,"lookahead_window":2,"max_pending_packs":4,"backpressured":false,"counts":{"lazy":1,"pending":1,"completed":0,"expired_incomplete":0},"leased_live":0,"leased_expired":0,"active_packs":1,"deficit":1,"next_lazy_packs":[{"plan_id":"example-plan","stage_id":"pages","pack_id":"p1","ordinal":1,"item_count":100,"source_uri":"gs://corpus/part-1.jsonl","source_shards":null,"r2_input_uri":null,"sha256":null,"prefix_hash":null,"compressed_bytes":null,"est_input_tokens":null,"est_output_tokens":null}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `ambiguous_compute_stage`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"ambiguous_compute_stage"}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-list"}}},"/v1/streams/{stage_id}/packs/{pack_id}":{"get":{"tags":["Compute plans and streams"],"summary":"Get a pack","description":"One registered pack's state, its lease's identity, expiry and retry history, and its output receipt once it completed. Reading never leases or retries work.","operationId":"get_v1_streams_stage_id_packs_pack_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"pack_id","in":"path","required":true,"description":"The pack's identifier, unique within its stream.","schema":{"type":"string"},"example":"p0"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"responses":{"200":{"description":"The pack; `receipt` is null before completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackStatus"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","pack_id":"p0","ordinal":0,"state":"completed","lease":{"lease_id":"lease_7f3c2a91d4e8b605","lease_expires_ms":1793235600000},"lease_expires_ms":1793235600000,"receipt":{"plan_id":"example-plan","stage_id":"pages","pack_id":"p0","ordinal":0,"output_pack_uri":"r2://tenants/demo/results/p0.jsonl","output_pack_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","items_materialized":1,"output_uri":"r2://tenants/demo/results/p0.jsonl","output_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","output_bytes":null}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`, `compute_pack_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-get"}}},"/v1/streams/{stage_id}/packs/{pack_id}/complete":{"post":{"tags":["Compute plans and streams"],"summary":"Complete a harness pack","description":"Records the output receipt of a leased pack of an `awow_harness_lease` stage; an identical receipt is safe to repeat. Current plan admission assigns every stream to managed execution, whose packs answer `403` here.","operationId":"post_v1_streams_stage_id_packs_pack_id_complete","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"pack_id","in":"path","required":true,"description":"The pack's identifier, unique within its stream.","schema":{"type":"string"},"example":"p0"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackCompletion"},"example":{"output_pack_uri":"r2://tenants/demo/results/p0.jsonl","output_pack_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","items_materialized":1}}}},"responses":{"200":{"description":"The normalised receipt; a replay returns the stored one without counting again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackReceipt"},"example":{"plan_id":"example-plan","stage_id":"pages","pack_id":"p0","ordinal":0,"output_pack_uri":"r2://tenants/demo/results/p0.jsonl","output_pack_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","items_materialized":1}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`, `compute_pack_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `ambiguous_compute_stage`, `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"ambiguous_compute_stage"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-complete"}}},"/v1/streams/{stage_id}/seal":{"post":{"tags":["Compute plans and streams"],"summary":"Seal a stream","description":"Marks the end of a stream: no new pack identifiers, while lazy packs can still be promoted and identical replays stay valid. Repeating it is safe; on a continuous stream a later registration or consolidation lifts the seal.","operationId":"post_v1_streams_stage_id_seal","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"responses":{"200":{"description":"Sealed; the stream finishes once its packs settle.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamSealed"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","sealed":true,"state":"completed","total_items":100}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `ambiguous_compute_stage`, `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"ambiguous_compute_stage"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-seal"}}},"/v1/streams/{stage_id}/packs/{pack_id}/content":{"put":{"tags":["Compute plans and streams"],"summary":"Upload a pack's content","description":"Sends one input pack's bytes with your API key alone, stores them in your workspace's custody and registers the pack runnable, promoting a lazy one. Nothing is registered until the whole body has arrived and matched its digest; the same bytes again answer `200`.","operationId":"put_v1_streams_stage_id_packs_pack_id_content","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"pack_id","in":"path","required":true,"description":"The pack: letters, digits and `._:-`, at most 128 characters.","schema":{"type":"string"},"example":"pack-0001"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"item_count","in":"query","required":true,"description":"Items in the pack.","schema":{"type":"integer","minimum":1,"maximum":9223372036854775807},"example":500},{"name":"format","in":"query","required":false,"description":"The pack's format; `jsonl.zst` is read as `jsonl_zst`. A `jsonl_zst` body starts with a Zstandard frame.","schema":{"type":"string","enum":["jsonl_zst","jsonl.zst","jsonl","parquet","arrow_ipc","lance","safetensors"],"default":"jsonl_zst"}},{"name":"ordinal","in":"query","required":false,"description":"Position in the stream; the next free one when omitted.","schema":{"type":"integer","minimum":0,"maximum":9223372036854775807}},{"name":"est_input_tokens","in":"query","required":false,"description":"Input token estimate; 0 when omitted.","schema":{"type":"integer","minimum":0,"maximum":9223372036854775807,"default":0}},{"name":"est_output_tokens","in":"query","required":false,"description":"Output token estimate; 0 when omitted.","schema":{"type":"integer","minimum":0,"maximum":9223372036854775807,"default":0}},{"name":"max_pending_packs","in":"query","required":false,"description":"This call's backlog limit instead of the stage's.","schema":{"type":"integer","minimum":1,"maximum":9223372036854775807}},{"name":"sha256","in":"query","required":false,"description":"The body's expected SHA-256; must agree with `X-Content-SHA256` when both are given.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}},{"name":"X-Content-SHA256","in":"header","required":false,"description":"The body's expected SHA-256.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"requestBody":{"required":true,"content":{"application/octet-stream":{"schema":{"type":"string","description":"The pack's bytes.","format":"binary"}}},"description":"The pack's bytes, at most 512 MiB (`max_record_pack_bytes` in capabilities). A `Content-Length` over it is refused before a byte is read."},"responses":{"201":{"description":"A new or promoted pack.","headers":{"Location":{"schema":{"type":"string"},"description":"The pack's path."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackUploaded"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","pack_id":"pack-0001","ordinal":0,"item_count":500,"format":"jsonl_zst","r2_input_uri":"s3://BUCKET/tenants/demo/streams/example-plan/pages/inputs/pack-0001.jsonl.zst","sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","compressed_bytes":48213,"est_input_tokens":0,"est_output_tokens":0,"replayed":false}}}},"200":{"description":"An identical replay: the registration again, nothing stored twice.","headers":{"Location":{"schema":{"type":"string"},"description":"The pack's path."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackUploaded"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","pack_id":"pack-0001","ordinal":0,"item_count":500,"format":"jsonl_zst","r2_input_uri":"s3://BUCKET/tenants/demo/streams/example-plan/pages/inputs/pack-0001.jsonl.zst","sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","compressed_bytes":48213,"est_input_tokens":0,"est_output_tokens":0,"replayed":true}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`, `source_format_mismatch`, `content_sha256_mismatch`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large","limit_bytes":536870912}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `stream_backpressure`, `rate_limited`. `stream_backpressure` sends no `Retry-After`: poll the backlog and send again as work drains.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stream_backpressure","message":"stream backpressure limit reached","status":"backpressure","policy_signal":"WIND_DOWN_UNTIL_DRAINED","active_packs":4,"pending":3,"leased_live":1,"max_pending_packs":4}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again. Not sent with `stream_backpressure`."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}},"502":{"description":"A service behind the call did not answer properly. Codes: `storage_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"storage_unavailable"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `stream_store_not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stream_store_not_configured"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-content-put"}}},"/v1/streams/{stage_id}/outputs":{"get":{"tags":["Compute plans and streams"],"summary":"List a stream's completed outputs","description":"Completed packs in ordinal order, each with its output receipt and the path that reads its bytes. Page on with `next_after_ordinal`; an empty page answers null, so call again later with the same `after_ordinal`. Packs do not complete in ordinal order: a pack with a lower ordinal can complete after you paged past it and is then never listed above your cursor. Use the cursor to follow new outputs, and before you treat a stream as fully read, list once more from `after_ordinal=-1` or check each pack with `GET /v1/streams/{stage_id}/packs/{pack_id}`.","operationId":"get_v1_streams_stage_id_outputs","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"after_ordinal","in":"query","required":false,"description":"List ordinals above this one; default -1.","schema":{"type":"integer","minimum":-1,"maximum":9223372036854775807,"default":-1},"example":-1},{"name":"limit","in":"query","required":false,"description":"Entries, 1–500; default 100.","schema":{"type":"integer","minimum":1,"maximum":500,"default":100},"example":100}],"responses":{"200":{"description":"A page of completed packs.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamOutputs"},"example":{"plan_id":"example-plan","stage_id":"pages","stream_id":"example-plan~pages","after_ordinal":-1,"limit":100,"outputs":[{"pack_id":"p0","ordinal":0,"item_count":1,"completed_at_ms":1793235600000,"receipt":{"plan_id":"example-plan","stage_id":"pages","pack_id":"p0","ordinal":0,"output_pack_uri":"r2://tenants/demo/results/p0.jsonl","output_pack_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","items_materialized":1,"output_uri":"r2://tenants/demo/results/p0.jsonl","output_sha256":"ca3d163bab055381827226140568f3bef7eaac187cebd76878e0b63e9e442356","output_bytes":null},"output_path":"/v1/streams/example-plan~pages/packs/p0/output"}],"next_after_ordinal":0}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-outputs-list"}}},"/v1/streams/{stage_id}/packs/{pack_id}/output":{"get":{"tags":["Compute plans and streams"],"summary":"Download a pack's output","description":"Streams a completed pack's output (`part=data`) or its manifest (`part=manifest`) from your workspace's custody with a known `Content-Length`, so a cut download resumes with `Range`. Compare each answer's `ETag` with the first, and check the whole download against `X-Weights-Output-SHA256`.","operationId":"get_v1_streams_stage_id_packs_pack_id_output","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"pack_id","in":"path","required":true,"description":"The pack's identifier, unique within its stream.","schema":{"type":"string"},"example":"p0"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"part","in":"query","required":false,"description":"The output or its manifest.","schema":{"type":"string","enum":["data","manifest"],"default":"data"},"example":"data"},{"name":"Range","in":"header","required":false,"description":"One span: `bytes=first-last`, `bytes=first-` or `bytes=-n`.","schema":{"type":"string","pattern":"^bytes=([0-9]+-[0-9]*|-[0-9]+)$"},"example":"bytes=0-1048575"}],"responses":{"200":{"description":"The whole object: `application/zstd`, `application/x-ndjson` or `application/octet-stream` for data, `application/json` for the manifest.","headers":{"Content-Length":{"schema":{"type":"integer","minimum":0},"description":"The object's size."},"Accept-Ranges":{"schema":{"type":"string","enum":["bytes"]}},"ETag":{"schema":{"type":"string"},"description":"The stored object's tag; compare it across resumed reads."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment` with the object's file name."},"X-Weights-Output-SHA256":{"schema":{"type":"string"},"description":"The receipt's digest of the data part, when it has one."}},"content":{"application/zstd":{"schema":{"type":"string","format":"binary"}},"application/x-ndjson":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":true}}}},"206":{"description":"One span of the object.","headers":{"Content-Length":{"schema":{"type":"integer","minimum":0},"description":"The span's size."},"Content-Range":{"schema":{"type":"string"},"description":"`bytes first-last/size`."},"Accept-Ranges":{"schema":{"type":"string","enum":["bytes"]}},"ETag":{"schema":{"type":"string"},"description":"The stored object's tag."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment` with the object's file name."},"X-Weights-Output-SHA256":{"schema":{"type":"string"},"description":"The receipt's digest of the whole data part, when it has one."}},"content":{"application/zstd":{"schema":{"type":"string","format":"binary"}},"application/x-ndjson":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_compute_plan`, `invalid_range`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_compute_plan"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`, `output_outside_custody`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_stage_not_found`, `compute_pack_not_found`, `output_not_found`, `output_manifest_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_stage_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `pack_not_completed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"pack_not_completed","message":"the pack has no output until it completes","state":"pending"}}}},"416":{"description":"Refused. Codes: `range_not_satisfiable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"range_not_satisfiable","size":48213}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}},"502":{"description":"A service behind the call did not answer properly. Codes: `invalid_output_uri`, `storage_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_output_uri"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `stream_store_not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stream_store_not_configured"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-output-get"}}},"/v1/streams/{stage_id}/packs/retry":{"post":{"tags":["Compute plans and streams"],"summary":"Retry a stream's dead-lettered packs","description":"The stage retry addressed by stream: the stream's dead-lettered packs return to pending work when `expected_dead_lettered` matches. Body, checks, replay and answer are the stage call's.","operationId":"post_v1_streams_stage_id_packs_retry","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"The operation's key, unless `operation_key` is in the body (which takes precedence for durable replay). The same key with a different request answers `422 idempotency_key_reused`; while the first still runs, `409 idempotency_key_in_progress`.","schema":{"type":"string","minLength":1},"example":"retry-packs-1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageRetry"},"example":{"expected_dead_lettered":1}}},"description":"At most 1 MiB."},"responses":{"200":{"description":"The plan's receipt with the operation.","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"`true` when this is the first answer to this `Idempotency-Key` again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageDeadLetterResult"},"example":{"plan_id":"example-plan","state":"ready_to_wake","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"ready_to_wake","packs_pending":1,"packs_dead_lettered":0}],"operation":{"event_type":"dead_lettered_packs_retried","operation_key":"retry-packs-1","target_stage_id":"pages","expected_dead_lettered":1,"reason":"","packs":1,"pack_ids":["p3"],"reopened_from":"failed","restored_stages":[]},"replayed":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dead_letter_count_changed`, `ambiguous_compute_stage`, `compute_plan_conflict`, `compute_schedule_window_closed`, `compute_dependents_progressed`, `idempotency_key_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dead_letter_count_changed","expected_dead_lettered":1,"actual_dead_lettered":2}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-retry"}}},"/v1/streams/{stage_id}/packs/accept-loss":{"post":{"tags":["Compute plans and streams"],"summary":"Accept loss of a stream's dead-lettered packs","description":"The stage acceptance of loss addressed by stream: the stream's dead-lettered packs become `dead_letter_accepted` with your reason, and no output is invented. Body, checks, replay and answer are the stage call's.","operationId":"post_v1_streams_stage_id_packs_accept-loss","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"stage_id","in":"path","required":true,"description":"The plan's `stream_id` (`plan_id~stage_id`), or the authored stage identifier with `?plan_id=`.","schema":{"type":"string"},"example":"example-plan~pages"},{"name":"plan_id","in":"query","required":false,"description":"The plan, when `{stage_id}` is an authored stage identifier; must agree with a qualified one.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"The operation's key, unless `operation_key` is in the body (which takes precedence for durable replay). The same key with a different request answers `422 idempotency_key_reused`; while the first still runs, `409 idempotency_key_in_progress`.","schema":{"type":"string","minLength":1},"example":"retry-packs-1"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageAcceptLoss"},"example":{"expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary."}}},"description":"At most 1 MiB."},"responses":{"200":{"description":"The plan's receipt with the operation.","headers":{"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"`true` when this is the first answer to this `Idempotency-Key` again."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageDeadLetterResult"},"example":{"plan_id":"example-plan","state":"completed","stages":[{"stage_id":"pages","stream_id":"example-plan~pages","state":"completed","packs_dead_lettered":0,"packs_dead_letter_accepted":1}],"operation":{"event_type":"dead_letters_accepted","operation_key":"accept-loss-1","target_stage_id":"pages","expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary.","packs":1,"pack_ids":["p3"],"reopened_from":"failed","restored_stages":[]},"replayed":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `compute_tenancy_unauthorized`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `compute_plan_not_found`, `compute_stage_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dead_letter_count_changed`, `ambiguous_compute_stage`, `compute_plan_conflict`, `idempotency_key_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dead_letter_count_changed","expected_dead_lettered":1,"actual_dead_lettered":2}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/streams-packs-accept-loss"}}},"/v1/compute/events":{"get":{"tags":["Compute plans and streams"],"summary":"List compute events","description":"The event log of your account's plans, oldest first, after the sequence you pass as `after_seq`; persist the greatest `seq` you processed. Lease-ready events can carry scoped bearer tokens, so keep answers private.","operationId":"get_v1_compute_events","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"after_seq","in":"query","required":false,"description":"Only greater sequences; default 0 (also for an empty value).","schema":{"type":"integer","minimum":0,"maximum":9223372036854775807,"default":0},"example":41},{"name":"limit","in":"query","required":false,"description":"Events per answer, 1–500; default 500 (also for an empty value).","schema":{"type":"integer","minimum":1,"maximum":500,"default":500},"example":100},{"name":"tenant_id","in":"query","required":false,"description":"Narrows to one tenant of your account; an unknown one answers `[]`.","schema":{"type":"string"}}],"responses":{"200":{"description":"At most `limit` events in increasing `seq`, or `[]`.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ComputeEvent"}},"example":[{"seq":42,"emitted_at_ms":1793232000000,"plan_id":"example-plan","tenant_id":"demo","container_id":null,"stage_id":"sessions","kind":{"event_type":"stage_completed","output_uri":null,"checkpoint_uri":null,"total_cost_usd_micros":1200}}]}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_event_cursor`, `invalid_compute_plan`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_event_cursor"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"500":{"description":"A fault on our side. Codes: `compute_store_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_store_error"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/compute-events"}}},"/v1/workspace/campaigns/{campaign_id}":{"get":{"tags":["Your workspace"],"summary":"Read one campaign as one object","description":"Every plan of your workspace that names the campaign in `metadata.run_id`, with its window, timeline, what it produced, what it was charged and why work failed. Every figure is null with its reason where nothing was recorded, never 0; a campaign with dead letters is never `done`.","operationId":"get_v1_workspace_campaigns_campaign_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"campaign_id","in":"path","required":true,"description":"The `run_id` your plans carry in their `metadata`.","schema":{"type":"string"},"example":"nov-12"}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"},"example":{"schema":"weights.workspace.campaign/v1","campaign_id":"nov-12","observed_at":"2026-11-12T18:00:00Z","status":"ended_with_losses","dead_letters_open":2,"reason":"2 plans ended; 2 packs dead-lettered, waiting for a retry or an accepted loss","window":{"started_at":"2026-11-12T09:00:00Z","ended_at":"2026-11-12T17:40:00Z"},"campaigns":["strix"],"plans":[{"plan_id":"strix-pages","campaign":"strix","state":"completed","outcome":"incomplete_dead_letter"}],"produced":{"packs_assigned":{"value":3,"status":"fresh","observed_at":"2026-11-12T18:00:00Z","reason":null,"unit":"packs"}},"cost":{"charged_usd":{"value":0.42,"status":"fresh","observed_at":"2026-11-12T18:00:00Z","reason":null,"unit":"USD"}}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `campaign_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"campaign_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspace-campaigns-get"}}},"/v1/workspace/snapshot":{"get":{"tags":["Your workspace"],"summary":"Read the workspace snapshot","description":"What runs, waits and failed, what it waits for, what it cost, the money held, your workers and your refused calls, in one read. Every figure says whether it was measured; `money` needs `manage`.","operationId":"get_v1_workspace_snapshot","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"scope","in":"query","required":false,"description":"`mine`: what you submitted, yourself or with keys you issued (a key alone: its own work). `workspace`: all of this workspace. `all`: one block per workspace you belong to, for a signed-in person. Default: `mine` for a member, else `workspace`.","schema":{"type":"string","enum":["mine","workspace","all"]},"example":"mine"}],"responses":{"200":{"description":"The snapshot.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceSnapshot"},"example":{"schema":"weights.workspace-snapshot/v1","observed_at":"2026-11-16T09:45:00Z","scope":{"kind":"mine","workspace_id":6,"person_id":12,"token_id":null,"window":"7d","list_rows":50},"workspace":{"id":6,"name":"Kaggle team","role":"member"},"headline_verdict":{"code":"failed","sentence":"3 running, 1 waiting on price, 1 failed; 12 packs to retry or accept."},"work_summary":{"running":3,"waiting":1,"failed":1,"completed_7d":14,"degraded_7d":0,"cancelled_7d":2,"dead_lettered_packs":12},"items":[{"kind":"plan","id":"kaggle-entry-b","name":"kaggle-entry-b-2026-11-16","campaign":"kaggle","lane":"standard","state":"waiting_price","outcome":{"code":"waiting","words":"WAITING · waiting for a price","detail":null},"progress":{"packs_completed":40,"packs_total":120,"packs_dead_lettered":0,"packs_leased":0,"last_completed_at":"2026-11-16T09:31:07.000Z"},"rate_packs_per_min":{"value":null,"status":"unavailable","observed_at":null,"reason":"no rate is recorded per plan","unit":"packs/min"},"settled_usd":{"value":3.2,"status":"fresh","observed_at":"2026-11-16T09:45:00Z","reason":null,"unit":"USD","basis":"charges posted to the ledger in the last 7 days"},"updated_at":"2026-11-16T09:40:12.000Z","links":{"plan":"/v1/compute/plans/kaggle-entry-b"}}],"items_listed":{"plans":{"listed":1,"total":1},"jobs":{"listed":0,"total":0}},"campaigns":[{"campaign":"kaggle","plans":4,"open":2,"failed":1,"link":"/v1/workspace/campaigns/kaggle"}],"campaigns_total":1,"waiting_reasons":[{"item":"kaggle-entry-b","kind":"price","detail":"waiting for a price at or under what this plan accepts","window_until":"2026-11-17T06:00:00.000Z","expected_start":{"value":"2026-11-16T10:30:00.000Z","status":"fresh","observed_at":"2026-11-16T09:45:00Z","reason":null,"basis":"the first start the market forecast expects at or under this plan's own hourly price limit, for the hardware its model runs on"}}],"money":null,"withheld":{"money":{"error":"scope_required","required":"manage"}},"workers":[{"node_id":"0a6f2c1e-51d4-4c0b-9d0e-2f1c7a9b3e10","name":"m5-128gb","reachable":true,"serving":true,"serving_state":"serving","serving_changed_at":null,"last_seen_at":"2026-11-16T09:44:58.000Z","declared_slots":4,"busy_slots":{"value":null,"status":"unavailable","observed_at":null,"reason":"busy slots are counted per pool, not per worker, yet"},"why_idle":null}],"refusals_recent":[{"at":"2026-11-14T09:12:31.000Z","http_status":402,"reason":"credit_exhausted","status":"refused","source":"admission","cause":"the workspace's credit ran out","action":null,"action_call":null}],"sources":{"ledger":{"status":"fresh","observed_at":"2026-11-16T09:45:00Z","reason":null,"age_seconds":0.0},"forecast":{"status":"fresh","observed_at":"2026-11-16T09:45:00Z","age_seconds":212.0,"reason":null}}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope","allowed":["mine","workspace","all"]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspace-snapshot"}}},"/v1/workspace/snapshot/events":{"get":{"tags":["Your workspace"],"summary":"Stream the workspace snapshot","description":"The same snapshot as server-sent events, one `snapshot` event every few seconds while the connection stays open. A credential revoked meanwhile gets `unavailable` events from then on.","operationId":"get_v1_workspace_snapshot_events","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"scope","in":"query","required":false,"description":"`mine`: what you submitted, yourself or with keys you issued (a key alone: its own work). `workspace`: all of this workspace. `all`: one block per workspace you belong to, for a signed-in person. Default: `mine` for a member, else `workspace`.","schema":{"type":"string","enum":["mine","workspace","all"]},"example":"mine"}],"responses":{"200":{"description":"Events, each a whole snapshot.","content":{"text/event-stream":{"schema":{"type":"string","description":"`event: snapshot`, then `data:` and the snapshot as JSON."}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_scope"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspace-snapshot-events"}}},"/v1/workspace/members":{"get":{"tags":["Your workspace"],"summary":"List the workspace's members","description":"Every member with their role, when they joined and when they were last active here, and every invitation with its state.","operationId":"get_v1_workspace_members","security":[{"bearerAuth":[]}],"x-required-scope":"manage","responses":{"200":{"description":"Members and invitations.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceMembers"},"example":{"workspace_id":6,"members":[{"person_id":12,"email":"ana@example.com","role":"owner","joined_at":"2026-10-08T08:00:00.000Z","last_active_at":{"value":"2026-11-16T09:30:00.000Z","status":"fresh","observed_at":"2026-11-16T09:45:00Z","reason":null,"basis":"the newest of the person's sessions here and their keys' last use here"},"last_signed_in_at":"2026-11-16T07:58:00.000Z"}],"invitations":[{"id":3,"email":"bo@example.com","role":"member","state":"pending","created_by":12,"created_at":"2026-11-15T10:00:00.000Z","expires_at":"2026-11-22T10:00:00.000Z","accepted_at":null,"accepted_by":null,"revoked_at":null}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspace-members"}}},"/v1/workspace/audit":{"get":{"tags":["Your workspace"],"summary":"Read the workspace's audit log","description":"The workspace's recorded actions, oldest first: keys, members, billing and released holds, with ids, states and amounts only. Without `after`, the newest page.","operationId":"get_v1_workspace_audit","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"after","in":"query","required":false,"description":"List the events after this one: the `next_after` of the previous answer.","schema":{"type":"integer","description":"An event id.","minimum":0}},{"name":"limit","in":"query","required":false,"description":"How many events to list.","schema":{"type":"integer","description":"A whole number from 1 to the service's page size, which is also the default.","minimum":1},"example":50}],"responses":{"200":{"description":"A page of events, oldest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceAudit"},"example":{"events":[{"id":88121,"at":"2026-11-16T09:41:07.000Z","actor":{"kind":"person","id":12},"kind":"incident_orphaned_hold_released","detail":{"account_id":6,"hold_id":9811,"why":"pack_pending","amount_usd_micros":322000}}],"next_after":88121}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspace-audit"}}},"/v1/tokens/mine":{"get":{"tags":["Account and keys"],"summary":"List your own API tokens","description":"The tokens you issued in this workspace, newest first, as the full list shows them, with `issued_by`. A token no person issued sees only itself. Expired tokens are left out unless you ask for them.","operationId":"get_v1_tokens_mine","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"include_expired","in":"query","required":false,"description":"`true` or `1` also lists the tokens whose expiry has passed.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Your tokens, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OwnTokenList"},"example":{"tokens":[{"id":2,"name":"batch runner","prefix":"weights_tcYQQluQ","scopes":["submit","read"],"created_at":"2026-10-09T08:28:09.778Z","expires_at":null,"expired":false,"revoked_at":null,"last_used_at":"2026-10-09T08:28:09.779Z","last_used_address":null,"daily_cap_usd_micros":25000000,"spend_today":{"day":"UTC","since":"2026-10-09T00:00:00.000Z","resets_at":"2026-10-10T00:00:00.000Z","spent_usd_micros":0,"pages_waiting":0,"waiting_usd_micros":0,"training_reserved_usd_micros":0,"committed_usd_micros":0},"rate_limit":{"requests_per_second":1.3125,"burst":28},"issued_by":12}],"day":"UTC"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/tokens-mine"}}},"/v1/reservations/release-orphaned":{"post":{"tags":["Your workspace"],"summary":"Release orphaned holds","description":"Returns to your credit every pack hold nothing can settle any more, in one transaction, and records each as an incident in the audit log. A repeat releases nothing. Only the workspace's owner releases holds: a key the owner issued, or the owner's session.","operationId":"post_v1_reservations_release-orphaned","security":[{"bearerAuth":[]}],"x-required-scope":"manage","responses":{"200":{"description":"What was released.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleasedOrphanedHolds"},"example":{"released_holds":1,"released_usd":0.322,"released_usd_micros":322000,"by_reason":{"pack_pending":{"holds":1,"usd_micros":322000,"words":"its pack is queued, not running"}},"holds":[{"id":9811,"reference":"kaggle-entry-b~classify:pack:pack-7:attempt:1","amount_usd_micros":322000,"why":"pack_pending","why_words":"its pack is queued, not running","incident_id":88121}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `csrf_required`, `workspace_role_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/reservations-release-orphaned"}}},"/v1/jobs/{job_id}/model.safetensors":{"get":{"tags":["Fine-tuning"],"summary":"Download a trained model","description":"Downloads the weights a training job made, its best epoch's checkpoint, as one safetensors file, checked against its recorded SHA-256 before the first byte is sent. Load it with the base model's configuration and tokenizer.","operationId":"get_v1_jobs_job_id_model_safetensors","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The training job's identifier, `job_` and 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_a698e920d5f0db918008bc43"}],"responses":{"200":{"description":"The weights, sent in chunks.","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"model.safetensors\"`."},"X-Content-SHA256":{"schema":{"type":"string"},"description":"The file's SHA-256, checked before sending; the same as `model.artifact.sha256` in the job's results."}},"content":{"application/octet-stream":{"schema":{"type":"string","description":"The safetensors file.","format":"binary"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`, `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `model_artifact_not_ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_artifact_not_ready"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `artifact_download_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"artifact_download_busy","retryable":true}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"502":{"description":"A service behind the call did not answer properly. Codes: `invalid_model_artifact`, `model_artifact_digest_mismatch`, `storage_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_model_artifact"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-model"}}},"/v1/capabilities":{"get":{"tags":["Models and quotes"],"summary":"List the service's capabilities","description":"What this service does now and what it does not do yet, in one document: every ability is `true` or `false`, so something not built is said out loud.","operationId":"get_v1_capabilities","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The service's abilities.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Capabilities"},"example":{"service":"weights.fyi","api_version":"v1","llm_endpoints":{"status":"not_yet_available","models":{"qwen3.8-27b":"not_yet_available"},"routes":["/v1/endpoints","/v1/endpoints/{endpoint}","/v1/endpoints/{endpoint}/ready","/v1/endpoints/{endpoint}/usage","/v1/chat/completions","/v1/endpoints/{endpoint}/reservations/{reservation}"]},"models":"/run/v1/models","openapi":"/run/openapi.json","available":{"classification":true,"batch_classification":true,"finetune":true,"checkpoint_recovery":true,"training_artifact_download":true,"chat_completions":false,"streaming_chat":false,"price_quote":true,"usage_readback":true,"classify_retain_none":true,"jurisdiction_constraint":true,"schedules":false,"arbitrary_extraction":false,"trained_model_serving":false},"limits":{"max_body_bytes":1048576},"classify_retention":{"none":{"execution":"synchronous","replay_status":409,"durable_queue":false,"unavailable_status":409,"unavailable_backends":["managed_durable_classifier","cpu_bundle"]}},"compatibility":{"openrouter_chat":false,"cloudflare_workers_ai":false,"jev_questions":false},"admission":{"overload_status":429,"retry_header":"Retry-After","reject_if_busy":"options.rejectIfBusy","queued_jobs_resume":true,"chat_stream_resume":false},"tracing":{"own_traces":true,"input_logging_default":false,"output_logging_default":false,"content_retention_days":7,"formats":["otlp_http","mlflow","webhook"]}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/capabilities"}}},"/v1/trace-preferences":{"get":{"tags":["Tracing and exports"],"summary":"Get the content logging switches","description":"Whether your account keeps copies of new jobs' inputs and outputs, and the limits those copies live under. Both switches are off until you turn them on.","operationId":"get_v1_trace-preferences","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The switches and their limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracePreferences"},"example":{"log_inputs":false,"log_outputs":false,"retention_days":7,"max_payload_bytes":16384,"max_account_bytes":16777216}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-preferences-get"}},"put":{"tags":["Tracing and exports"],"summary":"Set the content logging switches","description":"Turns logging of inputs and outputs on or off for new jobs; always send both switches. Switching off stops copies at once but does not delete those already kept. `400 invalid_preferences` has two causes: a body that is not exactly the two boolean switches, or a confidential workspace asking to turn either switch on, which is refused however the body is formed; such a workspace can only send both `false`.","operationId":"put_v1_trace-preferences","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceSwitches"},"example":{"log_inputs":true,"log_outputs":true}}}},"responses":{"200":{"description":"The switches as they now are.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TracePreferences"},"example":{"log_inputs":true,"log_outputs":true,"retention_days":7,"max_payload_bytes":16384,"max_account_bytes":16777216}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_preferences`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_preferences","expected":"log_inputs and log_outputs must be booleans"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-preferences-put"}}},"/v1/trace-content":{"delete":{"tags":["Tracing and exports"],"summary":"Delete all logged inputs and outputs","description":"Deletes every kept copy of inputs and outputs of your account at once. It changes neither the switches nor your jobs, results or traces' timings.","operationId":"delete_v1_trace-content","security":[{"bearerAuth":[]}],"x-required-scope":"manage","responses":{"200":{"description":"The copies are deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer","minimum":0}},"required":["deleted"]},"example":{"deleted":2}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-content-delete"}}},"/v1/jobs/{job_id}/trace-content":{"get":{"tags":["Tracing and exports"],"summary":"Read a job's logged inputs and outputs","description":"The copies of inputs and outputs one job kept while logging was on, in the order kept; expired copies are never returned. A job made while logging was off answers an empty list.","operationId":"get_v1_jobs_job_id_trace-content","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's identifier.","schema":{"type":"string"},"example":"job_fe162f1d2fcbae09d936f4b1"},{"name":"after","in":"query","required":false,"description":"The `next_after` of the previous answer; 0 starts at the beginning.","schema":{"type":"integer","minimum":0,"default":0},"example":0},{"name":"limit","in":"query","required":false,"description":"At most this many entries.","schema":{"type":"integer","minimum":1,"maximum":100,"default":100},"example":10}],"responses":{"200":{"description":"One page of copies.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceContentPage"},"example":{"job_id":"job_fe162f1d2fcbae09d936f4b1","content":[{"id":1,"seq":1,"kind":"input","payload":{"text":"Senior data engineer, Utrecht. Apply today.","id":"p1"},"captured_at":"2026-10-09T08:58:56.393Z","expires_at":"2026-10-16T08:58:56.393Z"},{"id":2,"seq":1,"kind":"output","payload":{"chunks":1,"input_tokens":6,"label":"detail","probabilities":{"detail":0.91,"listing":0.03,"landing":0.02,"not_vacancy":0.03,"unresolved":0.01},"raw_probabilities":{"detail":0.88,"listing":0.04,"landing":0.03,"not_vacancy":0.04,"unresolved":0.01},"temperature":1.0},"captured_at":"2026-10-09T08:58:56.396Z","expires_at":"2026-10-16T08:58:56.396Z"}],"next_after":null}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `cmk_key_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-trace-content"}}},"/v1/workspaces":{"get":{"tags":["Account and keys"],"summary":"Get the key's workspace","description":"The workspace the key belongs to, with its trace switches, destination count, `governed_tracing` and claimed email domains. A personal workspace's key also lists its person's workspaces; a shared workspace's key lists that workspace alone.","operationId":"get_v1_workspaces","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The key's workspace and visible memberships.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceOverview"},"example":{"workspace":{"id":7,"name":"awow-io","owner_id":1,"created_at":"2026-10-20T12:00:00Z","cmk":null,"c2":null,"confidential":null,"trace_preferences":{"log_inputs":false,"log_outputs":false},"trace_sinks_count":0,"governed_tracing":true,"domains":[]},"workspaces":[{"id":7,"name":"awow-io","owner_id":1,"role":"owner","created_at":"2026-10-20T12:00:00Z"}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-get"}},"post":{"tags":["Account and keys"],"summary":"Register a workspace","description":"Finds or creates the named workspace, sets its trace switches (both off by default), removes kept content, makes model endpoints and can return a new key once. A repeat finds the same workspace.","operationId":"post_v1_workspaces","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRegister"},"example":{"name":"awow-io","trace_preferences":{"log_inputs":false,"log_outputs":false},"models":["almanakje-gemma3-12b"]}}}},"responses":{"201":{"description":"The workspace was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRegistered"},"example":{"workspace":{"id":7,"name":"awow-io","owner_id":1,"created_at":"2026-10-20T12:00:00Z","cmk":null,"c2":null,"confidential":null,"trace_preferences":{"log_inputs":false,"log_outputs":false},"trace_sinks_count":0,"governed_tracing":true,"domains":[]},"created":true,"trace_preferences":{"log_inputs":false,"log_outputs":false},"trace_sinks_count":0,"governed_tracing":true,"purged":0,"endpoints":[{"id":"ep_1","model":"almanakje-gemma3-12b"}]}}}},"200":{"description":"The workspace was found and updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceRegistered"},"example":{"workspace":{"id":7,"name":"awow-io","owner_id":1,"created_at":"2026-10-20T12:00:00Z","cmk":null,"c2":null,"confidential":null,"trace_preferences":{"log_inputs":false,"log_outputs":false},"trace_sinks_count":0,"governed_tracing":true,"domains":[]},"created":false,"trace_preferences":{"log_inputs":false,"log_outputs":false},"trace_sinks_count":0,"governed_tracing":true,"purged":0,"endpoints":[{"id":"ep_1","model":"almanakje-gemma3-12b"}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_request`, `invalid_json`, `invalid_preferences`, `workspace_name_invalid`, `model_not_available`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_request"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `workspace_role_required`, `cmk_key_refused`, `c2_target_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `workspace_name_ambiguous`, `workspace_changed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"workspace_name_ambiguous"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-post"}}},"/v1/workspaces/domains":{"post":{"tags":["Account and keys"],"summary":"Claim a workspace domain","description":"Claims an organisation email domain for the calling workspace and returns the DNS TXT record to publish. Sending the same domain again keeps its challenge token and updates `join_mode`.","operationId":"post_v1_workspaces_domains","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomainClaim"},"example":{"domain":"awow.io","join_mode":"discoverable"}}}},"responses":{"201":{"description":"The domain was claimed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomain"},"example":{"domain":"awow.io","status":"pending","join_mode":"discoverable","created_at":"2026-11-15T10:00:00Z","verified_at":null,"last_checked_at":null,"dns_record":{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","value":"zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"},"accepted_records":[{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_weights-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_rattle-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_zyxio-target-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]}]}}}},"200":{"description":"The existing claim was returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomain"},"example":{"domain":"awow.io","status":"pending","join_mode":"discoverable","created_at":"2026-11-15T10:00:00Z","verified_at":null,"last_checked_at":null,"dns_record":{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","value":"zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"},"accepted_records":[{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_weights-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_rattle-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_zyxio-target-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_request`, `invalid_json`, `invalid_domain`, `public_email_domain_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_request"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `workspace_role_required`, `operator_workspace_domain`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-domains-create"}}},"/v1/workspaces/domains/{domain}/verify":{"post":{"tags":["Account and keys"],"summary":"Verify a workspace domain","description":"Reads the domain's DNS TXT records over HTTPS and marks the workspace's claim `verified` once the issued challenge token is found.","operationId":"post_v1_workspaces_domains_domain_verify","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"domain","in":"path","required":true,"description":"The claimed email domain, such as `awow.io`.","schema":{"type":"string"},"example":"awow.io"}],"responses":{"200":{"description":"The domain is verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomain"},"example":{"domain":"awow.io","status":"verified","join_mode":"invite_only","created_at":"2026-11-15T10:00:00Z","verified_at":"2026-11-15T10:05:00Z","last_checked_at":"2026-11-15T10:05:00Z","dns_record":{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","value":"zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"},"accepted_records":[{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_weights-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_rattle-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_zyxio-target-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `workspace_role_required`, `operator_workspace_domain`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `domain_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"domain_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `domain_verification_failed`, `domain_already_verified`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"domain_verification_failed"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `domain_dns_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"domain_dns_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-domains-verify"}}},"/v1/workspaces/domains/{domain}":{"patch":{"tags":["Account and keys"],"summary":"Set a domain's join mode","description":"Sets whether verified email addresses at this domain stay `invite_only`, see the workspace as `discoverable`, or join automatically at sign-in (`auto_join`).","operationId":"patch_v1_workspaces_domains_domain","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"domain","in":"path","required":true,"description":"The claimed email domain, such as `awow.io`.","schema":{"type":"string"},"example":"awow.io"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomainMode"},"example":{"join_mode":"auto_join"}}}},"responses":{"200":{"description":"The domain's join mode was updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceDomain"},"example":{"domain":"awow.io","status":"verified","join_mode":"auto_join","created_at":"2026-11-15T10:00:00Z","verified_at":"2026-11-15T10:05:00Z","last_checked_at":"2026-11-15T10:05:00Z","dns_record":{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","value":"zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"},"accepted_records":[{"name":"_zyxio-domain-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_weights-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_rattle-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"_zyxio-target-challenge.awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4","a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]},{"name":"awow.io","type":"TXT","values":["zyxio-domain-verify=a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_request`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_request"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `workspace_role_required`, `operator_workspace_domain`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `domain_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"domain_not_found"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-domains-update"}},"delete":{"tags":["Account and keys"],"summary":"Remove a workspace domain","description":"Removes a claimed or verified email domain from the calling workspace. Existing members remain in the workspace.","operationId":"delete_v1_workspaces_domains_domain","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"domain","in":"path","required":true,"description":"The claimed email domain, such as `awow.io`.","schema":{"type":"string"},"example":"awow.io"}],"responses":{"200":{"description":"The domain claim was removed.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","description":"`true` when removed."},"domain":{"type":"string","description":"The domain that was removed."}},"required":["deleted","domain"]},"example":{"deleted":true,"domain":"awow.io"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `workspace_role_required`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `domain_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"domain_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workspaces-domains-delete"}}},"/v1/models":{"get":{"tags":["Models and quotes"],"summary":"List models","description":"The models your account can use and, for each, whether you can run it, train it, or neither yet: the runnable models, the trainable base when fine-tuning is on, then your own fine-tuned models, and the service's language models with their availability.","operationId":"get_v1_models","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"format","in":"query","required":false,"description":"`openai` wraps the list as `{\"object\": \"list\", \"data\": [...]}`, OpenAI's list shape; the entries stay the same.","schema":{"type":"string","enum":["openai"]},"example":"openai"}],"responses":{"200":{"description":"The models: the runnable ones, the trainable base, then your own.","content":{"application/json":{"schema":{"oneOf":[{"type":"array","items":{"$ref":"#/components/schemas/Model"}},{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Model"}}},"required":["object","data"]}]},"example":[{"id":"laya-page-role","name":"Laya page classifier","description":"Tells what role a web page plays from its text: detail, listing, landing, not_vacancy or unresolved, with the model's probabilities.","input":"page text","can_run":true,"can_train":false},{"id":"laya-page-role-base","name":"Laya page classifier, untrained","description":"The encoder with a fresh page-role head. Train it on your labelled pages.","input":"labelled page text","can_run":false,"can_train":true},{"id":"ft_6e975b0fbd833d058defbbae","name":"Your fine-tuned Laya page classifier (ft_6e975b0fbd833d058defbbae)","owner":"you","trained_from":"laya-page-role-base","job_id":"job_6e975b0fbd833d058defbbae","metric":{"macro_f1":0.743,"epoch":4},"can_run":false,"can_train":false,"note":"Deployment of a trained model is coming."}]}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models"}}},"/v1/classify":{"post":{"tags":["Classify"],"summary":"Classify pages","description":"Classifies a call's worth of pages. A ready model answers `200` with every result, the job id and its cost; otherwise, or past the wait, `202` with the queued job, the model's state and `Retry-After`, and the work carries on.","operationId":"post_v1_classify","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"query","required":false,"description":"The model to run, as `model` in the body; named in both places, they must agree. Default `laya-page-role`.","schema":{"type":"string"},"example":"laya-page-role"},{"name":"retain","in":"query","required":false,"description":"`none`: as `\"retain\": \"none\"` in the body.","schema":{"type":"string","enum":["none"]}},{"name":"wait_cold","in":"query","required":false,"description":"`true`: as `options.waitCold`.","schema":{"type":"boolean"}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string, one per piece of work, sent with every attempt. The same key with the same request answers the first answer again (`Idempotent-Replayed: true`) instead of making a second job; the same key with a different request answers `422 idempotency_key_reused`.","schema":{"type":"string","minLength":1},"example":"batch-2026-11-14-0001"},{"name":"Prefer","in":"header","required":false,"description":"`respond-async` answers `202` with the admitted job at once, even when the model is ready.","schema":{"type":"string","enum":["respond-async"]},"example":"respond-async"},{"name":"X-Weights-Jurisdictions","in":"header","required":false,"description":"Comma-separated two-letter country codes, `EU` or `EEA`. The call runs only on a model whose known location is inside them, or answers `409 jurisdiction_refused`. A `jurisdictions` field in the body can narrow this header, never widen it.","schema":{"type":"string"},"example":"EU"},{"name":"traceparent","in":"header","required":false,"description":"W3C trace context of your own trace: the job's spans join it, and the answer carries the job's own `traceparent`.","schema":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"},"example":"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"},{"name":"tracestate","in":"header","required":false,"description":"W3C `tracestate`, kept only with a valid `traceparent`.","schema":{"type":"string"},"example":"vendor=opaque-value"},{"name":"X-Weights-Retain","in":"header","required":false,"description":"`none`: as `\"retain\": \"none\"` in the body.","schema":{"type":"string","enum":["none"]}},{"name":"X-Weights-Wait-Cold","in":"header","required":false,"description":"As `options.waitCold: true`.","schema":{"type":"string","enum":["1","true","yes"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Classify"},"example":{"model":"laya-page-role","pages":[{"text":"Senior data engineer, Utrecht. Apply today.","id":"p1"},"All open positions: 24 results. Filter by city or team."]}}}},"responses":{"200":{"description":"The model was ready and every page finished within the wait.","headers":{"traceparent":{"schema":{"type":"string"},"description":"The trace context of the work's own record: in your trace when you sent a valid `traceparent`."},"tracestate":{"schema":{"type":"string"},"description":"Your `tracestate`, kept with a valid `traceparent`."},"Weights-Notice":{"schema":{"type":"string"},"description":"`traceparent_ignored` or `tracestate_ignored` when the trace context you sent was not valid."},"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present on the first answer replayed for a repeated `Idempotency-Key`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyAnswer"},"example":{"job_id":"job_a9f211eac4050afa06474fa0","status":"SUCCEEDED","model":"laya-page-role","traceparent":"00-bab95d936f1061465864482cc2494dce-1c86517d7012893b-01","results":[{"seq":1,"id":"p1","input_sha":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","label":"detail","probabilities":{"detail":0.912,"listing":0.041,"landing":0.022,"not_vacancy":0.019,"unresolved":0.006},"status":"done","error":null},{"seq":2,"id":null,"input_sha":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","label":"listing","probabilities":{"detail":0.027,"listing":0.893,"landing":0.061,"not_vacancy":0.011,"unresolved":0.008},"status":"done","error":null}],"cost":{"usd_micros":7,"final":true,"basis":"the sum of the job's charges so far, each posted as its results landed, at the prices it was admitted at","prices":{"usd_per_1m_pages":2.288525},"pages_counted":3,"runs":[{"started_at":"2026-10-09T08:28:09.790Z","ended_at":null,"usd_micros":7,"final":false}]}}}}},"202":{"description":"The results are not in the answer: read the job after `Retry-After`.","headers":{"Location":{"schema":{"type":"string"},"description":"The job's path, to follow with GET /v1/jobs/{job_id}."},"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before reading the job."},"traceparent":{"schema":{"type":"string"},"description":"The trace context of the work's own record: in your trace when you sent a valid `traceparent`."},"tracestate":{"schema":{"type":"string"},"description":"Your `tracestate`, kept with a valid `traceparent`."},"Weights-Notice":{"schema":{"type":"string"},"description":"`traceparent_ignored` or `tracestate_ignored` when the trace context you sent was not valid."},"Preference-Applied":{"schema":{"type":"string","enum":["respond-async"]},"description":"Sent when `Prefer: respond-async` was honoured."},"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present on the first answer replayed for a repeated `Idempotency-Key`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassifyQueued"},"example":{"job_id":"job_a9f211eac4050afa06474fa0","status":"QUEUED","model":"laya-page-role","traceparent":"00-bab95d936f1061465864482cc2494dce-1c86517d7012893b-01","model_state":{"state":"asleep","since":"2026-10-09T08:28:09.534Z","expected_ready_seconds":151,"message":"The model is asleep. Submitting work will start it.","queued_work_preserved":false,"recovery_action":null},"retry_after_seconds":151,"cold_start":{"model_state":"asleep","expected_ready_seconds":151}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_body`, `empty_page`, `invalid_text`, `invalid_id`, `page_too_large`, `no_pages`, `too_many_pages`, `model_not_available`, `model_conflict`, `invalid_options`, `invalid_page`, `input_hash`, `invalid_jurisdictions`, `invalid_retain`, `retain_none_requires_sync`, `invalid_idempotency_key`, `invalid_version`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `no_credit`, `queue_exceeds_credit`, `token_daily_cap`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"no_credit","available_usd_micros":0}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`, `version_not_found`, `no_champion`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `idempotency_key_in_progress`, `jurisdiction_refused`, `version_not_executable`, `calibration_unknown`, `calibration_mismatch`, `bundle_not_executable`, `retain_none_unavailable`, `replay_not_retained`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_in_progress"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `overloaded`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"overloaded","retryable":true,"reason":"queue_full","retry_after_seconds":30}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"internal_error"}}}},"502":{"description":"A service behind the call did not answer properly. Codes: `model_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_error"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `price_unavailable`, `billing_pending`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"price_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/classify"}}},"/v1/jobs":{"post":{"tags":["Jobs and results"],"summary":"Create a batch or training job","description":"Sends a batch of pages of any size as one job, stored whole or refused whole; with `\"kind\": \"finetune\"` it starts a training job on a `ready` dataset instead. Follow either with `GET /v1/jobs/{job_id}`.","operationId":"post_v1_jobs","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"query","required":false,"description":"The model, for an NDJSON body; default `laya-page-role`. If the body names one too, they must agree.","schema":{"type":"string"},"example":"laya-page-role"},{"name":"Idempotency-Key","in":"header","required":false,"description":"Any string, one per piece of work, sent with every attempt. The same key with the same request answers the first answer again (`Idempotent-Replayed: true`) instead of making a second job; the same key with a different request answers `422 idempotency_key_reused`.","schema":{"type":"string","minLength":1},"example":"batch-2026-11-14-0001"},{"name":"traceparent","in":"header","required":false,"description":"W3C trace context of your own trace: the job's spans join it, and the answer carries the job's own `traceparent`.","schema":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"},"example":"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"},{"name":"tracestate","in":"header","required":false,"description":"W3C trace state, sent with `traceparent`; a valid one is echoed in the answer.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"},"example":{"model":"laya-page-role","pages":[{"text":"Senior data engineer, Utrecht. Apply today.","id":"page-000001"},{"text":"All open positions: 24 results. Filter by city or team.","id":"page-000002"}]}},"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/JobPageLine"},"example":"{\"text\": \"Senior data engineer, Utrecht. Apply today.\", \"id\": \"page-000001\"}\n{\"text\": \"All open positions: 24 results. Filter by city or team.\", \"id\": \"page-000002\"}\n"}},"description":"`application/json`: a page batch (`pages`), read whole up to the service's body limit, or a training job (`\"kind\": \"finetune\"`). `application/x-ndjson` (also `application/ndjson`, `application/jsonl`, `application/x-jsonlines`): one page per line, read as it arrives, the model named in `?model=`."},"responses":{"201":{"description":"Every page is stored, or the training job is admitted and queued; the job exists from then on.","headers":{"Location":{"schema":{"type":"string"},"description":"The job's path, `/run/v1/jobs/<job_id>`."},"traceparent":{"schema":{"type":"string"},"description":"The job's own trace context."},"tracestate":{"schema":{"type":"string"},"description":"Your valid `tracestate`, echoed."},"Weights-Notice":{"schema":{"type":"string"},"description":"`traceparent_ignored` or `tracestate_ignored` when yours could not be used."},"Idempotent-Replayed":{"schema":{"type":"string","enum":["true"]},"description":"Present when this is the stored first answer to the same `Idempotency-Key`."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/JobCreated"},{"$ref":"#/components/schemas/JobFinetuneCreated"}]},"example":{"job_id":"job_5e7c50ca2489d324a215b0ba","model":"laya-page-role","status":"QUEUED","items_total":2,"traceparent":"00-7a4dfea36c0049bd6c1e4f5d1d1087e7-5d25160c17fbf86e-01"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_body`, `invalid_json_line`, `invalid_line`, `empty_page`, `invalid_text`, `invalid_id`, `page_too_large`, `no_pages`, `model_not_available`, `model_conflict`, `invalid_idempotency_key`, `unsupported_job_kind`, `recipe_not_available`, `option_out_of_range`, `dataset_label_mismatch`, `invalid_schedule`, `invalid_schedule_window`, `invalid_objective`, `invalid_replay_weights`, `invalid_manifest_uri`, `invalid_manifest_sha256`, `checkpoint_reference_unsupported`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `queue_exceeds_credit`, `no_credit`, `token_daily_cap`, `training_not_covered`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"queue_exceeds_credit","pages":5000,"pages_allowed":1018,"pages_queued":0,"available_usd_micros":1000,"message":"Your available credit, $0.0010, pays for about 1,018 more pages at $0.0010 per 1,000 pages; this job has 5,000. Send fewer pages, or add credit first."}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`, `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `idempotency_key_in_progress`, `dataset_not_ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_in_progress"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`, `line_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"415":{"description":"A body type the call does not take. Codes: `unsupported_media_type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unsupported_media_type"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `idempotency_key_reused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"idempotency_key_reused","message":"This Idempotency-Key was used for a different request."}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `overloaded`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"overloaded","retryable":true,"reason":"queue_full","retry_after_seconds":30}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"500":{"description":"A fault on our side. Codes: `internal_error`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"internal_error"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `price_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"price_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-create"}},"get":{"tags":["Jobs and results"],"summary":"List jobs","description":"Lists your account's jobs, newest first, page jobs and training jobs together, each as `GET /v1/jobs/{job_id}` shows it. A batch still being uploaded is not listed until its last line is in.","operationId":"get_v1_jobs","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"How many jobs to list.","schema":{"type":"integer","description":"A whole number from 1 to the service's page size, which is also the default.","minimum":1},"example":2},{"name":"after","in":"query","required":false,"description":"The `next_after` of the previous answer, to list the jobs older than those it held.","schema":{"type":"integer","description":"A cursor; 0, the default, starts with the newest.","minimum":0,"default":0}},{"name":"scope","in":"query","required":false,"description":"`workspace`, the default: everything in the workspace. `mine`: what you submitted, with this key, or as a signed-in person with any key you issued here. A credential that names no person and no key is refused `mine`.","schema":{"type":"string","enum":["mine","workspace"],"default":"workspace"},"example":"mine"}],"responses":{"200":{"description":"Your jobs, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobList"},"example":{"jobs":[{"job_id":"job_9cc1a911d3d0ed07d9423f3a","model":"laya-page-role","service_class":"batch","status":"SUCCEEDED","traceparent":"00-37a63971738f58a19283dfb688ab035b-16fa1c149369a2e9-01","waiting_for":null,"created_at":"2026-10-09T08:28:09.803Z","started_at":"2026-10-09T08:28:09.804Z","completed_at":"2026-10-09T08:28:09.807Z","progress":{"total":2,"done":2,"failed":0,"cancelled":0,"queued":0,"in_flight":0,"pages_per_second":666.6666666666666,"eta_seconds":0.0,"rate_window_seconds":60.0},"model_state":{"state":"ready","since":"2026-10-09T08:28:09.790Z","expected_ready_seconds":null},"cost":{"usd_micros":0,"final":false,"basis":"the sum of the job's charges so far, each posted as its results landed, at the prices it was admitted at"},"runs":[{"started_at":"2026-10-09T08:28:09.790Z","ended_at":null,"usd_micros":0,"final":false}]}],"next_after":null}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`, `invalid_scope`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-list"}}},"/v1/jobs/{job_id}":{"get":{"tags":["Jobs and results"],"summary":"Get a job","description":"Returns one of your jobs as it stands: status, progress, the model's state, the cost so far and each run of the model it was served in. It is the call you poll; a page job and a training job answer in different words.","operationId":"get_v1_jobs_job_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's identifier, `job_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_5e7c50ca2489d324a215b0ba"}],"responses":{"200":{"description":"The job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"},"example":{"job_id":"job_5e7c50ca2489d324a215b0ba","model":"laya-page-role","service_class":"batch","status":"SUCCEEDED","traceparent":"00-7a4dfea36c0049bd6c1e4f5d1d1087e7-5d25160c17fbf86e-01","waiting_for":null,"created_at":"2026-10-09T08:28:09.800Z","started_at":"2026-10-09T08:28:09.801Z","completed_at":"2026-10-09T08:28:09.803Z","progress":{"total":5,"done":5,"failed":0,"cancelled":0,"queued":0,"in_flight":0,"pages_per_second":2500.0,"eta_seconds":0.0,"rate_window_seconds":60.0},"model_state":{"state":"ready","since":"2026-10-09T08:28:09.790Z","expected_ready_seconds":null},"cost":{"usd_micros":5,"final":true,"pages_counted":2,"prices":{"usd_per_1m_pages":2.288525},"basis":"the sum of the job's charges so far, each posted as its results landed, at the prices it was admitted at"},"runs":[{"started_at":"2026-10-09T08:28:09.790Z","ended_at":null,"usd_micros":5,"final":false}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-get"}},"delete":{"tags":["Jobs and results"],"summary":"Cancel a job","description":"Stops a job: a page job's unsent pages are cancelled and never cost anything, while pages already with the model finish. A training job stops cleanly, saving its last checkpoint and keeping the best model so far; cancelling again is safe.","operationId":"delete_v1_jobs_job_id","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job to stop, `job_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_63a47e390e1b77237fbfeb4c"}],"responses":{"200":{"description":"A page job after the change (`CANCELLED`, or `RUNNING` until the pages with the model finish), a training job that was not training yet or had finished, or a finished job unchanged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobView"},"example":{"job_id":"job_63a47e390e1b77237fbfeb4c","model":"laya-page-role","service_class":"flex","status":"CANCELLED","traceparent":"00-54da3ec45d99eba84336021ad3e15853-136241e49ed6a735-01","waiting_for":null,"created_at":"2026-10-09T08:28:09.784Z","started_at":null,"completed_at":"2026-10-09T08:28:09.788Z","progress":{"total":1,"done":0,"failed":0,"cancelled":1,"queued":0,"in_flight":0,"pages_per_second":null,"eta_seconds":null,"rate_window_seconds":60.0},"model_state":{"state":"asleep","since":"2026-10-09T08:28:09.782Z","expected_ready_seconds":151},"cost":{"usd_micros":0,"final":true,"basis":"the sum of the job's charges so far, each posted as its results landed, at the prices it was admitted at"},"runs":[]}}}},"202":{"description":"A training job that was training: `state` `finishing` while it saves and stops.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobTrainingView"},"example":{"job_id":"job_a698e920d5f0db918008bc43","kind":"finetune","model":"laya-page-role-base","dataset":"ds_12be8b8818ceaf13696e7ff9","recipe":"laya-page-role/v2","options":{"epochs":4,"patience":3,"seed":1729,"checkpoint_seconds":300.0},"status":"RUNNING","state":"finishing","state_text":"Finishing","progress":{"epoch":2,"epochs":4,"done":2,"total":4},"cost":{"usd_micros":556,"final":false,"training_tokens":90673,"basis":"The training tokens the trainer trained so far, at the price the job was admitted at."}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-cancel"}}},"/v1/jobs/{job_id}/results":{"get":{"tags":["Jobs and results"],"summary":"Read job results","description":"Returns what a job produced: for a page job its rows in `seq` order, a cursor's worth at a time; for a training job the record of the training, with every epoch's metrics, the model, the resumes and the checkpoints. Each page is answered exactly once and its text is deleted once its result is written.","operationId":"get_v1_jobs_job_id_results","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's identifier, `job_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_5e7c50ca2489d324a215b0ba"},{"name":"after","in":"query","required":false,"description":"A page job: list the rows after this `seq`; 0, the default, is the beginning.","schema":{"type":"integer","description":"From 0 to the job's number of pages.","minimum":0,"default":0},"example":0},{"name":"limit","in":"query","required":false,"description":"A page job: list at most this many rows.","schema":{"type":"integer","description":"A whole number from 1 to the service's page size, which is also the default.","minimum":1},"example":2}],"responses":{"200":{"description":"The results written so far.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"`1` while `complete` is `false`: wait, then ask again."}},"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ResultPageJob"},{"$ref":"#/components/schemas/ResultTraining"}]},"example":{"job_id":"job_5e7c50ca2489d324a215b0ba","status":"SUCCEEDED","results":[{"seq":1,"id":"page-000001","input_sha":"809f756b65c64bed8fc568254ad4604343a41d876d22f6334503ea587cb1ffc0","label":"listing","probabilities":{"detail":0.04,"listing":0.88,"landing":0.05,"not_vacancy":0.02,"unresolved":0.01},"status":"done","error":null},{"seq":2,"id":"page-000002","input_sha":"9de63a8f1489ec0fd159882d2e10e8ed92177a667f42e3d3284a7a86485fb6a2","label":"detail","probabilities":{"detail":0.91,"listing":0.03,"landing":0.02,"not_vacancy":0.03,"unresolved":0.01},"status":"done","error":null}],"next_after":2,"complete":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-results"}}},"/v1/jobs/{job_id}/logs":{"get":{"tags":["Tracing and exports"],"summary":"Get a job's log","description":"Every span and event the service recorded about one job, oldest first, content-free; they keep their trace and span ids. `?outputs=1` adds each page's result.","operationId":"get_v1_jobs_job_id_logs","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's identifier, `job_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_5e7c50ca2489d324a215b0ba"},{"name":"outputs","in":"query","required":false,"description":"`1`, `true` or `yes` adds each page's result to the entries that carry one; anything else, or nothing, leaves them out.","schema":{"type":"string"},"example":"1"}],"responses":{"200":{"description":"The job's log.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceJobLog"},"example":{"job_id":"job_5e7c50ca2489d324a215b0ba","outputs":false,"logs":[{"trace_id":"7a4dfea36c0049bd6c1e4f5d1d1087e7","span_id":"5d25160c17fbf86e","parent_span_id":null,"name":"job","kind":"span","start_at":"2026-10-09T08:28:09.800Z","end_at":"2026-10-09T08:28:09.803Z","duration_ms":3.0,"status":"ok","account_id":1,"job_id":"job_5e7c50ca2489d324a215b0ba","attempt_id":null,"attributes":{"caller_trace":false,"cost_charged_usd_micros":0,"items_cancelled":0,"items_done":5,"items_failed":0,"items_total":5,"pages_per_second":2500.0,"service_class":"batch","status":"SUCCEEDED"}},{"trace_id":"7a4dfea36c0049bd6c1e4f5d1d1087e7","span_id":"a6c070aed79199aa","parent_span_id":"5d25160c17fbf86e","name":"job.queued","kind":"event","start_at":"2026-10-09T08:28:09.801Z","end_at":"2026-10-09T08:28:09.801Z","duration_ms":0.0,"status":"ok","account_id":1,"job_id":"job_5e7c50ca2489d324a215b0ba","attempt_id":null,"attributes":{"items_total":5,"service_class":"batch"}}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-logs"}}},"/v1/trace-sinks":{"get":{"tags":["Tracing and exports"],"summary":"List trace destinations","description":"Your trace destinations, oldest first, each with what it has received and what still waits for it. Header names only; their values are never shown.","operationId":"get_v1_trace-sinks","security":[{"bearerAuth":[]}],"x-required-scope":"manage","responses":{"200":{"description":"Your destinations, oldest first.","content":{"application/json":{"schema":{"type":"object","properties":{"sinks":{"type":"array","items":{"$ref":"#/components/schemas/Sink"}}},"required":["sinks"]},"example":{"sinks":[{"id":1,"account_id":1,"name":"prod collector","kind":"otlp_http","url":"https://collector.example.org","header_names":["Authorization"],"include_outputs":false,"enabled":true,"created_at":"2026-10-09T09:12:40.118Z","delivered":214,"backlog":0,"backlog_oldest_at":null,"next_try_at":null,"last_ok_at":"2026-10-09T09:41:07.902Z","last_error":"http_401","last_error_at":"2026-10-09T09:20:15.331Z"}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-sinks-list"}},"post":{"tags":["Tracing and exports"],"summary":"Add a trace destination","description":"Adds a destination where every span of your account is delivered as it ends: OpenTelemetry over HTTP, MLflow, or a signed webhook. Nothing is sent by this call; delivery runs on the Tracing and tracking option. A confidential workspace cannot add one: the call answers `400 invalid_preferences` whatever the body holds, because such a workspace keeps governed tracing (no content logged, nothing exported).","operationId":"post_v1_trace-sinks","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkCreate"},"example":{"name":"my receiver","kind":"webhook","url":"https://hooks.example.org/weights"}}}},"responses":{"201":{"description":"The destination; a webhook's signing secret is shown here once.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkCreated"},"example":{"id":2,"account_id":1,"name":"my receiver","kind":"webhook","url":"https://hooks.example.org/weights","header_names":[],"include_outputs":false,"enabled":false,"created_at":"2026-10-09T09:13:02.540Z","delivered":0,"backlog":0,"backlog_oldest_at":null,"next_try_at":null,"last_ok_at":null,"last_error":null,"last_error_at":null,"signing_secret":"fabwh_59bdfdff0cf290c56dc43a24107a50c8484636d95603088ca0edb08b2e8fde59"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_body`, `invalid_headers`, `invalid_header`, `reserved_header`, `invalid_name`, `invalid_kind`, `invalid_url`, `url_credentials`, `url_is_traces_endpoint`, `https_required`, `unresolvable_host`, `address_not_public`, `mlflow_experiment_header_missing`, `too_many_sinks`, `invalid_preferences`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-sinks-create"}}},"/v1/trace-sinks/{sink_id}":{"delete":{"tags":["Tracing and exports"],"summary":"Remove a trace destination","description":"Removes a destination and drops the spans still waiting for it. Your spans themselves stay in the job log and the trace export.","operationId":"delete_v1_trace-sinks_sink_id","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"sink_id","in":"path","required":true,"description":"The destination's number, the `id` that `GET /v1/trace-sinks` lists.","schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"The destination is removed.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"integer","description":"The number of the destination removed."}},"required":["deleted"]},"example":{"deleted":1}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `sink_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"sink_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-sinks-delete"}}},"/v1/trace-sinks/{sink_id}/test":{"post":{"tags":["Tracing and exports"],"summary":"Send a test span to a destination","description":"Sends one test span now, whether or not the destination is enabled, and reports what your end answered. The test leaves the destination's delivery record untouched.","operationId":"post_v1_trace-sinks_sink_id_test","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"sink_id","in":"path","required":true,"description":"The destination's number, the `id` that `GET /v1/trace-sinks` lists.","schema":{"type":"integer"},"example":1}],"responses":{"200":{"description":"The outcome; a destination that refused the test still answers `200` here.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SinkTestResult"},"example":{"ok":true,"status":200,"latency_ms":84.2,"error":null,"sent_to":"https://collector.example.org/v1/traces"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `sink_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"sink_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/trace-sinks-test"}}},"/v1/tokens":{"get":{"tags":["Account and keys"],"summary":"List API tokens","description":"Every API token of your account, newest first, with its scopes, limits and last use, never the token itself. Revoked tokens stay listed; expired ones are left out unless you ask for them.","operationId":"get_v1_tokens","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"include_expired","in":"query","required":false,"description":"`true` or `1` also lists the tokens whose expiry has passed.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The account's tokens, newest first.","content":{"application/json":{"schema":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/Token"}},"day":{"type":"string","description":"The day over which every `spend_today` is counted.","enum":["UTC"]}},"required":["tokens","day"]},"example":{"tokens":[{"id":2,"name":"batch runner","prefix":"weights_tcYQQluQ","scopes":["submit","read"],"created_at":"2026-10-09T08:28:09.778Z","expires_at":null,"expired":false,"revoked_at":null,"last_used_at":"2026-10-09T08:28:09.779Z","last_used_address":null,"daily_cap_usd_micros":25000000,"spend_today":{"day":"UTC","since":"2026-10-09T00:00:00.000Z","resets_at":"2026-10-10T00:00:00.000Z","spent_usd_micros":0,"pages_waiting":0,"waiting_usd_micros":0,"training_reserved_usd_micros":0,"committed_usd_micros":0},"rate_limit":{"requests_per_second":1.3125,"burst":28},"issued_by":12},{"id":1,"name":"test","prefix":"weights_I9AYkq1e","scopes":["submit","read","manage"],"created_at":"2026-10-09T08:28:09.773Z","expires_at":null,"expired":false,"revoked_at":null,"last_used_at":"2026-10-09T08:28:09.780Z","last_used_address":null,"daily_cap_usd_micros":null,"spend_today":null,"rate_limit":{"requests_per_second":1.3125,"burst":28},"issued_by":12}],"day":"UTC"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/tokens-list"}},"post":{"tags":["Account and keys"],"summary":"Create an API token","description":"Makes an API token and returns it once. It can never hold a scope the calling token lacks, and the call takes no `Idempotency-Key`.","operationId":"post_v1_tokens","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreate"},"example":{"name":"batch runner","scopes":["submit","read"],"daily_cap_usd":"25"}}}},"responses":{"201":{"description":"The new token, shown in this answer only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenCreated"},"example":{"id":2,"token":"weights_tcYQQluQhy9HxNfOiqWDGmzXAT2a3ryMNT43Ic6TWr3_xxxxxx","prefix":"weights_tcYQQluQ","name":"batch runner","scopes":["read","submit"],"created_at":"2026-10-09T08:28:09.778Z","expires_at":null,"daily_cap_usd_micros":25000000,"issued_by":12,"note":"The token is shown once. Keep it somewhere safe."}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_body`, `invalid_json`, `invalid_scopes`, `no_scopes`, `unknown_scope`, `invalid_expiry`, `expiry_needs_time_zone`, `expiry_in_the_past`, `invalid_amount`, `invalid_name`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_body"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `scope_escalation`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/tokens-create"}}},"/v1/tokens/self":{"get":{"tags":["Account and keys"],"summary":"Get the calling token","description":"The calling token's own entry, the workspace it is bound to and the account it belongs to, with only `read`. A revoked or expired token is refused first, so a `200` means the token is live at that moment.","operationId":"get_v1_tokens_self","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The calling token; `spend_today` is `null` here.","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"allOf":[{"$ref":"#/components/schemas/Token"},{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"integer","description":"The workspace's number."},"name":{"type":"string","description":"The workspace's name."}},"required":["id","name"],"description":"The workspace the token is bound to. A token works in this one workspace only."}},"required":["workspace"]}]},"account":{"type":"object","properties":{"id":{"type":"integer","description":"The account the token belongs to."}},"required":["id"]}},"required":["token","account"]},"example":{"token":{"id":2,"name":"batch runner","prefix":"weights_tcYQQluQ","scopes":["submit","read"],"created_at":"2026-10-09T08:28:09.778Z","expires_at":null,"expired":false,"revoked_at":null,"last_used_at":"2026-10-14T08:28:09.779Z","last_used_address":null,"daily_cap_usd_micros":25000000,"spend_today":null,"rate_limit":{"requests_per_second":1.3125,"burst":28},"issued_by":12,"workspace":{"id":7,"name":"awow-io"}},"account":{"id":7}}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `token_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"token_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/tokens-self"}}},"/v1/tokens/{token_id}":{"delete":{"tags":["Account and keys"],"summary":"Revoke an API token","description":"Revokes one of your account's tokens for good; its next call is refused with `401 token_revoked`. Work it sent keeps running and stays readable with any other `read` token.","operationId":"delete_v1_tokens_token_id","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"token_id","in":"path","required":true,"description":"The `id` of the token to revoke, from `GET /v1/tokens`.","schema":{"type":"integer"},"example":2}],"responses":{"200":{"description":"The token is revoked.","content":{"application/json":{"schema":{"type":"object","properties":{"revoked":{"type":"integer","description":"The `id` of the token revoked."}},"required":["revoked"]},"example":{"revoked":2}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `token_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"token_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/tokens-revoke"}}},"/v1/endpoint":{"get":{"tags":["Models and quotes"],"summary":"Get the model's state","description":"The classifier model's state now, since when, and how long until it is expected ready. You never need it to send work, which waits and starts by itself; use it to decide when to send.","operationId":"get_v1_endpoint","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The model's state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndpointState"},"example":{"model":"laya-page-role","state":"asleep","since":"2026-10-09T08:28:09.534Z","expected_ready_seconds":null}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/endpoint"}}},"/v1/endpoint/warm":{"post":{"tags":["Models and quotes"],"summary":"Warm the model","description":"Asks for the classifier model to be made ready ahead of your work, so your first pages start at once. Starting it costs nothing, but it is held ready for you from the request, and that time is charged to you even if you send no pages.","operationId":"post_v1_endpoint_warm","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"traceparent","in":"header","required":false,"description":"W3C trace context: the request's record joins your trace, else your account's. An invalid one is ignored and `Weights-Notice` says so.","schema":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"},"example":"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"},{"name":"tracestate","in":"header","required":false,"description":"W3C `tracestate`, kept only with a valid `traceparent`.","schema":{"type":"string"},"example":"vendor=opaque-value"}],"responses":{"202":{"description":"The model's state as of the request, usually unchanged yet; follow it with GET /v1/endpoint.","headers":{"traceparent":{"schema":{"type":"string"},"description":"The trace context of the work's own record: in your trace when you sent a valid `traceparent`."},"tracestate":{"schema":{"type":"string"},"description":"Your `tracestate`, kept with a valid `traceparent`."},"Weights-Notice":{"schema":{"type":"string"},"description":"`traceparent_ignored` or `tracestate_ignored` when the trace context you sent was not valid."}},"content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/EndpointState"},{"type":"object","properties":{"traceparent":{"type":"string","description":"The request record's trace context: your trace when you sent one, else your account's."}},"required":["traceparent"]}]},"example":{"model":"laya-page-role","state":"asleep","since":"2026-10-09T08:28:09.782Z","expected_ready_seconds":151,"traceparent":"00-53fb4b64058bcaa257364b2155c0196d-b842c114f8b6833c-01"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `no_credit`, `token_daily_cap`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"no_credit","available_usd_micros":0}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/endpoint-warm"}}},"/v1/quote":{"get":{"tags":["Models and quotes"],"summary":"Get a price quote","description":"Prices a job before you send it: pages times the page price, the same for any size of job and whether the model is asleep or ready. With `kind=finetune` it estimates a training job; with `model` set to a language model it answers that model's prices per 1M tokens.","operationId":"get_v1_quote","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"query","required":false,"description":"The model to price: `laya-page-role` by default; a language model's id for its token prices; with `kind=finetune` the base to train, `laya-page-role-base`.","schema":{"type":"string"},"example":"laya-page-role"},{"name":"pages","in":"query","required":false,"description":"How many pages the job would hold, a whole number from 1.","schema":{"type":"integer","minimum":1,"default":1000},"example":100000},{"name":"kind","in":"query","required":false,"description":"`finetune` to estimate a training job.","schema":{"type":"string","enum":["finetune"]}},{"name":"dataset","in":"query","required":false,"description":"With `kind=finetune`: the dataset to quote for, yours and `ready`; its row counts are used. Name it or `train_rows`.","schema":{"type":"string","pattern":"^ds_[0-9a-f]{24}$"},"example":"ds_3c1f0a9e5b7d2c4e6f8a0b1c"},{"name":"train_rows","in":"query","required":false,"description":"With `kind=finetune` and no dataset: the training rows.","schema":{"type":"integer","minimum":1},"example":20000},{"name":"validation_rows","in":"query","required":false,"description":"With `train_rows`: the validation rows.","schema":{"type":"integer","minimum":0,"default":0},"example":5000},{"name":"epochs","in":"query","required":false,"description":"With `kind=finetune`: the epochs, from 1 to the service's epoch limit; the recipe's default, 10, when left out.","schema":{"type":"integer","minimum":1},"example":10},{"name":"recipe","in":"query","required":false,"description":"With `kind=finetune`: `laya-page-role/v2` (the default) or `laya-page-role/v1`.","schema":{"type":"string"},"example":"laya-page-role/v2"}],"responses":{"200":{"description":"The price: of pages, of a training job (`kind=finetune`), or a language model's prices.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/QuotePages"},{"$ref":"#/components/schemas/QuoteFinetune"},{"$ref":"#/components/schemas/QuoteLlm"}]},"example":{"model":"laya-page-role","pages":100000,"estimate_usd_for_job":0.2288524883347864,"estimate_usd_per_1000_pages":0.002288524883347864,"usd_per_1m_pages":2.288525,"basis":"$2.2885 per 1M pages answered ($0.002289 per 1,000), whatever the job's size and whether the model is asleep or awake: a job pays for its pages only.","typical_ready_seconds":144.0,"typical_ready_basis":"our measured reference wake-up"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`, `model_not_available`, `recipe_not_available`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"parameter_out_of_range","parameter":"pages","low":1,"high":null}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`, `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dataset_not_ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_ready"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `price_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"price_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/quote"}},"post":{"tags":["Models and quotes"],"summary":"Quote a training job with its options","description":"Estimates a training job as it would run: its recipe and base, a dataset or row counts, and the options `POST /v1/jobs` takes for that recipe, checked the same way. Nothing is stored or charged. Pages and a language model's tokens are quoted by `GET /v1/quote`.","operationId":"post_v1_quote","security":[{"bearerAuth":[]}],"x-required-scope":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteFinetuneRequest"},"example":{"kind":"finetune","recipe":"laya-student-lora-sft/v1","model":"qwen3.5-4b","train_rows":20000,"validation_rows":1000,"options":{"epochs":3,"lora_rank":16}}}}},"responses":{"200":{"description":"The training job's estimate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteFinetune"},"example":{"model":"qwen3.5-4b","kind":"finetune","dataset":null,"recipe":"laya-student-lora-sft/v1","epochs":3,"train_rows":20000,"validation_rows":1000,"pages_per_epoch":20000,"estimate_training_tokens":68004937,"usd_per_1m_training_tokens":0.006127,"estimate_usd_for_job":0.41666666666666674,"estimate":true,"basis":"An estimate: 3 epochs over 20,000 training pages at about 1,133 tokens a page, the tokens our trainer fed a page of a real release, about 68,004,937 training tokens at $0.0061 per 1M. The validation pass is not charged. The job is charged for the tokens the trainer actually trains, as it trains; its cost so far is on your panel and its job page."}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_body`, `unsupported_quote_kind`, `invalid_parameter`, `parameter_out_of_range`, `model_not_available`, `recipe_not_available`, `option_out_of_range`, `dataset_format_mismatch`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"option_out_of_range","option":"num_generations","low":2,"high":null}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`, `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dataset_not_ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_ready"}}}},"415":{"description":"A body type the call does not take. Codes: `unsupported_media_type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unsupported_media_type"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `price_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"price_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/quote-finetune-post"}}},"/v1/usage":{"get":{"tags":["Credit and usage"],"summary":"Get your balance and usage","description":"Your balance, what you can spend now, and what you bought: recent page jobs, fine-tunes and LLM endpoints with their cost, charges per UTC day, credit and unpaid payment pages. With `?schema=weights.receipts/v1` the same call answers usage receipts instead: one receipt per settled piece of work (a chat call, a plan's pack or step), each with what was billed. Name a `request_id` to look one up, or page through them all in order with `after`.","operationId":"get_v1_usage","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"limit","in":"query","required":false,"description":"Without `schema`: how many rows each list holds at most, newest first, from 1 up to the service's row limit per answer, which is also the default. With `schema`: receipts per page, 1 to 1000, default 100.","schema":{"type":"integer","minimum":1},"example":10},{"name":"schema","in":"query","required":false,"description":"`weights.receipts/v1` answers usage receipts instead of the balance and usage figures.","schema":{"type":"string","enum":["weights.receipts/v1"]}},{"name":"request_id","in":"query","required":false,"description":"With `schema`: the one receipt of this request (the `X-Request-Id` of the call). A request still running answers `state: pending`, one the account never made `state: unknown`.","schema":{"type":"string","format":"uuid"}},{"name":"after","in":"query","required":false,"description":"With `schema`: list receipts whose `receipt_seq` is above this; pass the last page's `next`.","schema":{"type":"integer","minimum":0,"default":0}},{"name":"through","in":"query","required":false,"description":"With `schema`: list receipts up to and including this `receipt_seq`; default the account's latest. One above the latest answers `400 invalid_receipt_window`.","schema":{"type":"integer","minimum":0}}],"responses":{"200":{"description":"Your account's figures; with `schema=weights.receipts/v1`, a page of receipts or the one receipt `request_id` names.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Usage"},{"$ref":"#/components/schemas/UsageReceiptPage"},{"$ref":"#/components/schemas/UsageReceipt"}]},"example":{"balance_usd_micros":24999989,"in_progress_usd_micros":0,"available_usd_micros":24999989,"endpoints":[],"jobs":[{"job_id":"job_5e7c50ca2489d324a215b0ba","created_at":"2026-10-10T08:28:09.800Z","status":"SUCCEEDED","cost_usd_micros":11,"final":true,"prices":{"usd_per_1m_pages":2.288525},"model":"laya-page-role","pages":5,"pages_done":5,"pages_counted":5}],"fine_tunes":[],"days":[{"day":"2026-10-10","usd_micros":11,"pages":{"pages":5,"usd_micros":11}}],"other_charges":[],"credits":[{"at":"2026-10-10T08:28:09.774Z","usd_micros":25000000,"kind":"grant","what":"Credit granted"}],"pending_topups":[],"note":"Charged per unit as your work lands: prompt, cached and output tokens per call, pages answered, training tokens trained, each at the price per 1M units it was admitted at. Never a start, a wait or a move."}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `parameter_out_of_range`, `invalid_request_id`, `invalid_receipt_window`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `receipt_authority_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"receipt_authority_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/usage"}}},"/v1/credit/topups":{"post":{"tags":["Credit and usage"],"summary":"Open a payment page for credit","description":"Opens a hosted payment page for an amount of prepaid credit in US dollars; the credit reaches your balance once the payment is confirmed. A retry makes a second page.","operationId":"post_v1_credit_topups","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopupRequest"},"example":{"usd":"25.00"}}}},"responses":{"201":{"description":"The payment page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Topup"},"example":{"topup_id":"<Stripe's id for the payment page>","checkout_url":"<the payment page's https address at Stripe>","usd":"25.00"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_body`, `invalid_json`, `invalid_amount`, `below_minimum`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_body"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_configured","feature":"stripe"}}}},"502":{"description":"A service behind the call did not answer properly. Codes: `stripe_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stripe_refused"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `stripe_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"stripe_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/credit-topups-create"}}},"/v1/datasets":{"post":{"tags":["Datasets"],"summary":"Create a dataset","description":"Makes an empty dataset in status `uploading` and answers where to send its file, or with `source_ref` registers a zero-copy pointer to your bucket that is `ready` at once. A dataset costs nothing and is kept until you delete it.","operationId":"post_v1_datasets","security":[{"bearerAuth":[]}],"x-required-scope":"submit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreate"},"example":{"name":"my labelled pages","format":"laya-page-role/jsonl"}}}},"responses":{"201":{"description":"The dataset and the upload instruction.","headers":{"Location":{"schema":{"type":"string"},"description":"The dataset's path, `/run/v1/datasets/<dataset_id>`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetCreated"},"example":{"dataset_id":"ds_12be8b8818ceaf13696e7ff9","name":"my labelled pages","format":"laya-page-role/jsonl","base_model":"laya-page-role-base","labels":["detail","listing","landing","not_vacancy","unresolved"],"status":"uploading","error":null,"rows":null,"train_rows":null,"validation_rows":null,"bytes":null,"sha256":null,"created_at":"2026-10-09T08:28:09.826Z","ready_at":null,"jobs":[],"upload":{"method":"PUT","path":"/run/v1/datasets/ds_12be8b8818ceaf13696e7ff9/content","content_type":"application/x-ndjson","max_bytes":461373440,"row":"one JSON object per line: id, split (train or validation), group_id, label (one of the model's labels), provenance, weight, state (the page text), optional state_sha256"}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_body`, `unsupported_format`, `model_not_available`, `invalid_source_ref`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `no_credit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"no_credit","available_usd_micros":0}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_configured","feature":"training"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `dataset_count_limit`, `dataset_storage_limit`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_count_limit"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/datasets-create"}},"get":{"tags":["Datasets"],"summary":"List datasets","description":"Lists your account's datasets that are not deleted, newest first, and where you stand against the dataset limits. There is no cursor; read older datasets by id.","operationId":"get_v1_datasets","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"Your datasets and the limits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetList"},"example":{"datasets":[{"dataset_id":"ds_3c5312a9a04e76a477cec491","name":"bad","format":"laya-page-role/jsonl","base_model":"laya-page-role-base","labels":["detail","listing","landing","not_vacancy","unresolved"],"status":"failed","error":"unknown_label","rows":null,"train_rows":null,"validation_rows":null,"bytes":null,"sha256":null,"created_at":"2026-10-09T08:28:09.830Z","ready_at":null,"jobs":[]},{"dataset_id":"ds_12be8b8818ceaf13696e7ff9","name":"my labelled pages","format":"laya-page-role/jsonl","base_model":"laya-page-role-base","labels":["detail","listing","landing","not_vacancy","unresolved"],"status":"ready","error":null,"rows":50,"train_rows":40,"validation_rows":10,"bytes":8935,"sha256":"96c0db13101fe3bbdf7aa2fa278fe54799434ae60fc1ecbe52e66f9fb972f506","created_at":"2026-10-09T08:28:09.826Z","ready_at":"2026-10-09T08:28:09.829Z","jobs":["job_a698e920d5f0db918008bc43"]}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/datasets-list"}}},"/v1/datasets/{dataset_id}/content":{"put":{"tags":["Datasets"],"summary":"Upload a dataset file","description":"Uploads the NDJSON file of a dataset in status `uploading` or `failed`, one labelled page per line, checked row by row and as a whole. The upload is all or nothing: a refusal leaves the dataset `failed`, and the corrected file goes to the same address.","operationId":"put_v1_datasets_dataset_id_content","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"dataset_id","in":"path","required":true,"description":"The dataset's identifier, `ds_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"ds_12be8b8818ceaf13696e7ff9"}],"requestBody":{"required":true,"content":{"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/DatasetRow"},"example":"{\"id\": \"ex-000001\", \"split\": \"train\", \"group_id\": \"site-0042\", \"label\": \"listing\", \"provenance\": {\"source\": \"my crawl\"}, \"weight\": 1.0, \"state\": \"All open positions: 24 results. Filter by city or team.\"}\n"}},"description":"The file, at most what the dataset reserved: one row per line, no blank lines. `application/ndjson`, `application/jsonl`, `application/x-jsonlines`, `application/octet-stream`, `text/plain` or no type are read the same way."},"responses":{"200":{"description":"The whole file is stored; the dataset is `ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetUploaded"},"example":{"dataset_id":"ds_12be8b8818ceaf13696e7ff9","status":"ready","rows":50,"train_rows":40,"validation_rows":10,"other_rows":0,"bytes":8935,"sha256":"96c0db13101fe3bbdf7aa2fa278fe54799434ae60fc1ecbe52e66f9fb972f506"}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json_line`, `invalid_line`, `missing_field`, `unknown_label`, `invalid_split`, `no_rows`, `invalid_identifier`, `duplicate_example_id`, `group_split_overlap`, `invalid_provenance`, `invalid_example_weight`, `invalid_state`, `state_digest_mismatch`, `multiple_labels`, `field_targets_not_trainable`, `train_and_validation_required`, `missing_label_support`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unknown_label","line":7,"allowed":["detail","listing","landing","not_vacancy","unresolved"]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `no_credit`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"no_credit","available_usd_micros":0}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`, `not_configured`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}},"408":{"description":"The upload stalled past its limits. Codes: `upload_timed_out`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"upload_timed_out"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dataset_already_uploaded`, `dataset_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_already_uploaded"}}}},"413":{"description":"The body is larger than the call takes. Codes: `dataset_too_large`, `line_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_too_large"}}}},"415":{"description":"A body type the call does not take. Codes: `unsupported_media_type`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unsupported_media_type"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `upload_concurrency_limit`, `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"upload_concurrency_limit"}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"502":{"description":"A service behind the call did not answer properly. Codes: `storage_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"storage_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/datasets-upload"}}},"/v1/datasets/{dataset_id}":{"get":{"tags":["Datasets"],"summary":"Get a dataset","description":"Reads one dataset of your account, deleted ones included: its status, the counts and digest of its accepted file, and the training jobs that used it.","operationId":"get_v1_datasets_dataset_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"dataset_id","in":"path","required":true,"description":"The dataset's identifier, `ds_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"ds_12be8b8818ceaf13696e7ff9"}],"responses":{"200":{"description":"The dataset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"},"example":{"dataset_id":"ds_12be8b8818ceaf13696e7ff9","name":"my labelled pages","format":"laya-page-role/jsonl","base_model":"laya-page-role-base","labels":["detail","listing","landing","not_vacancy","unresolved"],"status":"ready","error":null,"rows":50,"train_rows":40,"validation_rows":10,"bytes":8935,"sha256":"96c0db13101fe3bbdf7aa2fa278fe54799434ae60fc1ecbe52e66f9fb972f506","created_at":"2026-10-09T08:28:09.826Z","ready_at":"2026-10-09T08:28:09.829Z","jobs":["job_a698e920d5f0db918008bc43"]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/datasets-get"}},"delete":{"tags":["Datasets"],"summary":"Delete a dataset","description":"Deletes a dataset's file and marks it `deleted`; the record stays, with name, counts and digest. A dataset an open training job uses answers `409 dataset_in_use`, and repeating a delete is safe.","operationId":"delete_v1_datasets_dataset_id","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"dataset_id","in":"path","required":true,"description":"The dataset's identifier, `ds_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"ds_3c5312a9a04e76a477cec491"}],"responses":{"200":{"description":"The dataset after the delete.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dataset"},"example":{"dataset_id":"ds_3c5312a9a04e76a477cec491","name":"bad","format":"laya-page-role/jsonl","base_model":"laya-page-role-base","labels":["detail","listing","landing","not_vacancy","unresolved"],"status":"deleted","error":"unknown_label","rows":null,"train_rows":null,"validation_rows":null,"bytes":null,"sha256":null,"created_at":"2026-10-09T08:28:09.830Z","ready_at":null,"jobs":[]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `dataset_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `dataset_in_use`, `dataset_busy`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"dataset_in_use","jobs":["job_a698e920d5f0db918008bc43"]}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"502":{"description":"A service behind the call did not answer properly. Codes: `storage_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"storage_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/datasets-delete"}}},"/v1/models/{model}/measure":{"post":{"tags":["Fine-tuning"],"summary":"Measure a model","description":"Starts a job of kind `measure` that finds how many streams the model serves and how fast, so it can be priced per token. It is charged for the time the job itself works, at the hourly price it is admitted at; follow it with GET /v1/jobs/{job_id}.","operationId":"post_v1_models_model_measure","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"path","required":true,"description":"The model's identifier, as the service lists it.","schema":{"type":"string"},"example":"qwen3.5-4b"},{"name":"traceparent","in":"header","required":false,"description":"W3C trace context of your own trace: the job's spans join it, and the answer carries the job's own `traceparent`.","schema":{"type":"string","pattern":"^[0-9a-f]{2}-[0-9a-f]{32}-[0-9a-f]{16}-[0-9a-f]{2}$"},"example":"00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01"},{"name":"tracestate","in":"header","required":false,"description":"W3C `tracestate`, kept only with a valid `traceparent`.","schema":{"type":"string"},"example":"vendor=opaque-value"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasureRequest"},"example":{"hours":0.3}}},"description":"Optional: this measurement's own shape."},"responses":{"201":{"description":"The measurement job.","headers":{"Location":{"schema":{"type":"string"},"description":"The job's path, to follow with GET /v1/jobs/{job_id}."},"traceparent":{"schema":{"type":"string"},"description":"The trace context of the work's own record: in your trace when you sent a valid `traceparent`."},"tracestate":{"schema":{"type":"string"},"description":"Your `tracestate`, kept with a valid `traceparent`."},"Weights-Notice":{"schema":{"type":"string"},"description":"`traceparent_ignored` or `tracestate_ignored` when the trace context you sent was not valid."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeasureJob"},"example":{"job_id":"job_4b1d0c2e9a7f3e5d6c8b1a20","kind":"measure","model":"qwen3.5-4b","status":"QUEUED","state":"queued","traceparent":"00-7d2c1b0a9f8e7d6c5b4a39281706f5e4-3a2b1c0d9e8f7a6b-01","prices":{"usd_per_hour":1.8},"asked":{"hours":0.3},"estimate":{"usd_micros":540000,"basis":"an estimate of the hours of work a measurement takes, at the hourly price; the charge is the job's own work as it lands"}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `unknown_fields`, `invalid_prompt_words`, `invalid_calls_per_stream`, `invalid_hours`, `invalid_json`, `invalid_body`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unknown_fields"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `measure_not_covered`, `token_daily_cap`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"measure_not_covered","needed_usd_micros":540000,"available_usd_micros":120000}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_measurable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_measurable"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `measure_in_progress`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"measure_in_progress"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `price_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"price_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-measure"}}},"/v1/jobs/{job_id}/results.ndjson":{"get":{"tags":["Jobs and results"],"summary":"Download job results as NDJSON","description":"Downloads every result of a finished page job as one NDJSON file, one line per page in `seq` order, streamed. A cut stream closes without the chunked end mark, so a short file never looks whole.","operationId":"get_v1_jobs_job_id_results_ndjson","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"job_id","in":"path","required":true,"description":"The job's identifier, `job_` followed by 24 hexadecimal characters.","schema":{"type":"string"},"example":"job_5e7c50ca2489d324a215b0ba"}],"responses":{"200":{"description":"One compact JSON object per page, as `GET /v1/jobs/{job_id}/results` lists it.","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"<job_id>-results.ndjson\"`."}},"content":{"application/x-ndjson":{"schema":{"$ref":"#/components/schemas/ResultRow"},"example":"{\"seq\":1,\"id\":\"page-000001\",\"input_sha\":\"809f756b65c64bed8fc568254ad4604343a41d876d22f6334503ea587cb1ffc0\",\"label\":\"listing\",\"probabilities\":{\"detail\":0.04,\"listing\":0.88,\"landing\":0.05,\"not_vacancy\":0.02,\"unresolved\":0.01},\"status\":\"done\",\"error\":null}\n{\"seq\":2,\"id\":\"page-000002\",\"input_sha\":\"9de63a8f1489ec0fd159882d2e10e8ed92177a667f42e3d3284a7a86485fb6a2\",\"label\":\"detail\",\"probabilities\":{\"detail\":0.91,\"listing\":0.03,\"landing\":0.02,\"not_vacancy\":0.03,\"unresolved\":0.01},\"status\":\"done\",\"error\":null}\n"}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `not_a_page_job`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not_a_page_job","results":"/v1/jobs/job_a698e920d5f0db918008bc43/results"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `job_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"job_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `results_not_ready`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"results_not_ready","message":"Poll /results for completed rows; download the file once the job finishes."}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-results-ndjson"}}},"/v1/usage.csv":{"get":{"tags":["Credit and usage"],"summary":"Download every credit and charge as CSV","description":"Every credit and charge of your account, oldest first, one ledger row per line with its exact amount. Streamed with no row limit; an interrupted download ends without its closing chunk.","operationId":"get_v1_usage_csv","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"A CSV file (`text/csv; charset=utf-8`, CRLF lines): the header `id,time,kind,what,amount_usd,amount_usd_micros,jobs`, then one line per ledger row. `kind` is `topup`, `grant`, `refund`, `charge` or `option`; credit is positive and charges are negative; `jobs` lists the jobs a charge covers, separated by spaces.","headers":{"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"usage.csv\"`."}},"content":{"text/csv":{"schema":{"type":"string"},"example":"id,time,kind,what,amount_usd,amount_usd_micros,jobs\r\n1,2026-10-09T08:28:09.774Z,grant,Credit granted,25.000000,25000000,\r\n"}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/usage-csv"}}},"/v1/traces":{"get":{"tags":["Tracing and exports"],"summary":"Export your spans as OTLP JSON","description":"Your account's ended spans that started in a window, oldest first, as one content-free OTLP export request, up to `limit` spans per answer. When more remain, `X-Weights-Next-After` is the `after` of the next call.","operationId":"get_v1_traces","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"from","in":"query","required":false,"description":"The window's start, included: ISO 8601; no zone means UTC, and a `+` offset is sent as `%2B`. Without it, your oldest span.","schema":{"type":"string","format":"date-time"},"example":"2026-10-09T00:00:00Z"},{"name":"to","in":"query","required":false,"description":"The window's end, excluded; later than `from`.","schema":{"type":"string","format":"date-time"},"example":"2026-10-10T00:00:00Z"},{"name":"after","in":"query","required":false,"description":"The cursor from the previous answer's `X-Weights-Next-After`; 0 starts at the window's beginning.","schema":{"type":"integer","minimum":0,"default":0},"example":0},{"name":"limit","in":"query","required":false,"description":"The most spans this answer carries: from 1 up to the service's own limit per answer (`X-Weights-Max-Spans`), which is also the default.","schema":{"type":"integer","minimum":1},"example":100}],"responses":{"200":{"description":"One OTLP export request, streamed, as a download named `traces.json`.","headers":{"X-Weights-Max-Spans":{"schema":{"type":"integer"},"description":"The most spans one answer can carry, and the highest `limit`."},"X-Weights-Next-After":{"schema":{"type":"integer"},"description":"Present only when more spans remain in the window: the `after` of the next call."},"Content-Disposition":{"schema":{"type":"string"},"description":"`attachment; filename=\"traces.json\"`."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TraceExport"},"example":{"resourceSpans":[{"resource":{"attributes":[{"key":"weights.model","value":{"stringValue":"laya-page-role"}},{"key":"service.name","value":{"stringValue":"weights.fyi"}}]},"scopeSpans":[{"scope":{"name":"weights.telemetry"},"spans":[{"traceId":"54da3ec45d99eba84336021ad3e15853","spanId":"136241e49ed6a735","name":"job","kind":1,"startTimeUnixNano":"1791534489784000000","endTimeUnixNano":"1791534489788000000","attributes":[{"key":"items_total","value":{"intValue":"1"}},{"key":"items_cancelled","value":{"intValue":"1"}},{"key":"service_class","value":{"stringValue":"flex"}},{"key":"status","value":{"stringValue":"CANCELLED"}},{"key":"weights.account_id","value":{"intValue":"1"}},{"key":"weights.job_id","value":{"stringValue":"job_63a47e390e1b77237fbfeb4c"}},{"key":"weights.span_kind","value":{"stringValue":"span"}}],"status":{"code":1}},{"traceId":"54da3ec45d99eba84336021ad3e15853","spanId":"e651a3d57680e422","name":"job.queued","kind":1,"startTimeUnixNano":"1791534489784000000","endTimeUnixNano":"1791534489784000000","attributes":[{"key":"items_total","value":{"intValue":"1"}},{"key":"service_class","value":{"stringValue":"flex"}},{"key":"weights.account_id","value":{"intValue":"1"}},{"key":"weights.job_id","value":{"stringValue":"job_63a47e390e1b77237fbfeb4c"}},{"key":"weights.span_kind","value":{"stringValue":"event"}}],"status":{"code":1},"parentSpanId":"136241e49ed6a735"}]}]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_parameter`, `invalid_window`, `parameter_out_of_range`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_parameter","parameter":"from","expected":"ISO 8601 such as 2026-10-08T00:00:00Z (send + as %2B)"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/traces"}}},"/v1/reservations":{"post":{"tags":["Credit and usage"],"summary":"Check or hold an amount of credit","description":"With `dry_run: true`, answers whether the amount could be reserved now, against your available credit and against the lifetime budget of the compute plan a `correlation` names; nothing is held or written. Without it, holds the amount until you release it. A hold sets credit aside and is not drawn down by later calls, so release it before the work it was held for starts.","operationId":"post_v1_reservations","security":[{"bearerAuth":[]}],"x-required-scope":"submit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHoldRequest"},"example":{"amount_usd_micros":2500000,"dry_run":true,"correlation":{"campaign_id":"rattle-w44","run_id":"night-run-44","stage_id":"triage"}}}}},"responses":{"200":{"description":"A dry run's answer, or the hold a repeated `reservation_id` already has.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreditHoldPreflight"},{"$ref":"#/components/schemas/CreditHold"}]},"example":{"object":"reservation","dry_run":true,"amount_usd_micros":2500000,"admissible":true,"reason":null,"credit":{"available_usd_micros":18400000,"sufficient":true},"plan":{"plan_id":"cp_night_44","stage_id":"cp_night_44~triage","state":"executing","runnable":true,"budget_usd_micros":40000000,"committed_usd_micros":1200000,"reserved_usd_micros":0,"remaining_usd_micros":38800000,"sufficient":true},"correlation":{"campaign_id":"rattle-w44","run_id":"night-run-44","stage_id":"triage","matched":true},"not_checked":["token_daily_cap"]}}}},"201":{"description":"The hold that was taken.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHold"},"example":{"object":"reservation","dry_run":false,"reservation_id":"wave-44-triage","state":"held","amount_usd_micros":2500000,"created_at":"2026-11-14T21:40:12.118Z","released_at":null,"release_reason":null,"plan":{"plan_id":"cp_night_44","stage_id":"cp_night_44~triage","state":"executing","runnable":true,"budget_usd_micros":40000000,"committed_usd_micros":1200000,"reserved_usd_micros":2500000,"remaining_usd_micros":36300000},"correlation":{"campaign_id":"rattle-w44","run_id":"night-run-44","stage_id":"triage"}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_json`, `invalid_reservation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_json"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"402":{"description":"Not enough credit, or the token's daily spend cap; nothing ran. Codes: `credit_exhausted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"credit_exhausted"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `compute_plan_conflict`, `reservation_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"compute_plan_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `reservation_authority_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"reservation_authority_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/credit-holds-create"}},"get":{"tags":["Credit and usage"],"summary":"List your credit holds","description":"Your open reservation holds, oldest first. With `reservation_id`, that one hold, held or released.","operationId":"get_v1_reservations","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"reservation_id","in":"query","required":false,"description":"Answer this one reservation instead of the list.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"example":"wave-44-triage"}],"responses":{"200":{"description":"The open holds, or the one asked for.","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreditHoldList"},{"$ref":"#/components/schemas/CreditHold"}]},"example":{"object":"list","data":[{"object":"reservation","dry_run":false,"reservation_id":"wave-44-triage","state":"held","amount_usd_micros":2500000,"created_at":"2026-11-14T21:40:12.118Z","released_at":null,"release_reason":null,"plan":{"plan_id":"cp_night_44","stage_id":"cp_night_44~triage","state":"executing","runnable":true,"budget_usd_micros":40000000,"committed_usd_micros":1200000,"reserved_usd_micros":2500000,"remaining_usd_micros":36300000},"correlation":{"campaign_id":"rattle-w44","run_id":"night-run-44","stage_id":"triage"}}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reservation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reservation"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `reservation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"reservation_not_found"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/credit-holds-list"}},"delete":{"tags":["Credit and usage"],"summary":"Release a credit hold","description":"Releases the hold: its credit returns to your account and its room to the compute plan it counted against. Releasing a released hold answers it again, unchanged.","operationId":"delete_v1_reservations","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"reservation_id","in":"query","required":true,"description":"The hold to release.","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"example":"wave-44-triage"}],"responses":{"200":{"description":"The hold, released.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditHold"},"example":{"object":"reservation","dry_run":false,"reservation_id":"wave-44-triage","state":"released","amount_usd_micros":2500000,"created_at":"2026-11-14T21:40:12.118Z","released_at":"2026-11-14T22:05:40.512Z","release_reason":"released_by_caller","plan":{"plan_id":"cp_night_44","stage_id":"cp_night_44~triage","state":"executing","runnable":true,"budget_usd_micros":40000000,"committed_usd_micros":1200000,"reserved_usd_micros":0,"remaining_usd_micros":38800000},"correlation":{"campaign_id":"rattle-w44","run_id":"night-run-44","stage_id":"triage"}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reservation`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reservation"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `reservation_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"reservation_not_found"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `reservation_authority_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"reservation_authority_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/credit-holds-release"}}},"/v1/seats/leases":{"get":{"tags":["Compute plans and streams"],"summary":"List the command-line seat lanes","description":"Every command-line seat lane (`opus`, `fable`, `haiku`, `codex`): whether a compute plan can lease it now, what your own enrolled workers offer for it, and how many packs of your plans a seat of it holds at this moment.","operationId":"get_v1_seats_leases","security":[{"bearerAuth":[]}],"x-required-scope":"read","responses":{"200":{"description":"The lanes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SeatLaneList"},"example":{"object":"list","data":[{"object":"seat_lane","lane":"haiku","cli":"claude","model":"claude-haiku-5-5","seat_model":"claude-haiku-5-5","leasable":true,"aliases":["haiku","claude-haiku-5-5"],"max_seats":512,"offered":{"offers":1,"seats":8,"connected_offers":1,"connected_seats":8,"published_offers":1,"published_seats":8},"active_leases":3},{"object":"seat_lane","lane":"opus","cli":"claude","model":"claude-opus-5-5","seat_model":null,"leasable":false,"aliases":[],"max_seats":null,"offered":null,"active_leases":null}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/seats-leases"}}},"/v1/nodes/join-tokens":{"post":{"tags":["Your own workers"],"summary":"Create a worker join token","description":"Makes a single-use token that enrolls one of your own workers into the workspace, shown once. It can limit the models the worker may offer and have enrollment publish them.","operationId":"post_v1_nodes_join-tokens","security":[{"bearerAuth":[]}],"x-required-scope":"manage","requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerJoinTokenPolicy"},"example":{"models":["almanakje-gemma3-12b"],"auto_publish":false}}}},"responses":{"201":{"description":"The join token, shown in this answer only.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerJoinToken"},"example":{"join_token":"wjt_3mJ8qVb0yQ2t7Lr5Xw9Zc1Ae6Dh4Gk0Nn2Pq8Rs5Tu7","id":12,"workspace_id":7,"expires_at":"2026-11-14T10:30:00+00:00","models":["almanakje-gemma3-12b"],"auto_publish":false}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_join_token_policy`, `pool_declaration_required`, `invalid_pool`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_join_token_policy","field":"models"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `byoc_not_enabled_for_workspace`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `model_name_reserved`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_name_reserved","model":"qwen3.8-27b"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-join-tokens-create"}}},"/v1/nodes/join-tokens/{join_token_id}/revoke":{"post":{"tags":["Your own workers"],"summary":"Revoke a worker join token","description":"Turns an unused join token off before it expires. A token a worker already enrolled with cannot be revoked; revoke the worker instead.","operationId":"post_v1_nodes_join-tokens_join_token_id_revoke","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"join_token_id","in":"path","required":true,"description":"The token's `id`, from the answer that made it.","schema":{"type":"integer"},"example":12}],"responses":{"200":{"description":"The token is revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerJoinTokenRevoked"},"example":{"id":12,"workspace_id":7,"revoked_at":"2026-11-14T09:45:00+00:00"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `join_token_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"join_token_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `join_token_used`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"join_token_used"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-join-tokens-revoke"}}},"/v1/nodes":{"get":{"tags":["Your own workers"],"summary":"List your enrolled workers","description":"The workers your workspace enrolled to serve its own models, oldest enrollment first, each with the models it offers and whether it is connected now. Revoked workers are left out unless you ask for them.","operationId":"get_v1_nodes","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"include_revoked","in":"query","required":false,"description":"`true` or `1` also lists the workers that were revoked.","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"The workspace's workers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerList"},"example":{"data":[{"id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","workspace_id":7,"name":"studio-1","status":"active","join_token_id":12,"facts":{"agent_version":"...","platform":"Linux-aarch64"},"region":null,"spki_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","enrolled_at":"2026-11-14T09:30:00+00:00","revoked_at":null,"serving":"serving","serving_changed_at":null,"serving_reason":null,"open_sessions":1,"offers":[{"model":"almanakje-gemma3-12b","backend_kind":"openai","upstream_model":"gemma3:12b","max_in_flight":4,"call_timeout_seconds":300.0,"modalities":["text"],"region":null,"status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1,"chat_fields":["tools","tool_choice"]}]}]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-list"}}},"/v1/nodes/{node_id}/revoke":{"post":{"tags":["Your own workers"],"summary":"Revoke a worker","description":"Ends a worker's enrollment for good: its connections close at once, its certificate is no longer renewed and work it held goes back in line. A repeat answers the same worker again.","operationId":"post_v1_nodes_node_id_revoke","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"node_id","in":"path","required":true,"description":"The worker's `id` from `GET /v1/nodes`, a UUID.","schema":{"type":"string"},"example":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerRevoke"},"example":{"reason":"hardware retired"}}}},"responses":{"200":{"description":"The worker, now `revoked`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Worker"},"example":{"id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","workspace_id":7,"name":"studio-1","status":"revoked","join_token_id":12,"facts":{"agent_version":"...","platform":"Linux-aarch64"},"region":null,"spki_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","enrolled_at":"2026-11-14T09:30:00+00:00","revoked_at":"2026-11-14T11:00:00+00:00","serving":"serving","serving_changed_at":null,"serving_reason":null,"open_sessions":0,"offers":[{"model":"almanakje-gemma3-12b","backend_kind":"openai","upstream_model":"gemma3:12b","max_in_flight":4,"call_timeout_seconds":300.0,"modalities":["text"],"region":null,"status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1,"chat_fields":["tools","tool_choice"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reason`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reason"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"node_not_found"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-revoke"}}},"/v1/nodes/{node_id}/pause":{"post":{"tags":["Your own workers"],"summary":"Pause a worker","description":"Offers the worker none of your calls until you resume it. Calls it already took finish, and it stays connected, so a resume serves again at once. A repeat answers the same worker again.","operationId":"post_v1_nodes_node_id_pause","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"node_id","in":"path","required":true,"description":"The worker's `id` from `GET /v1/nodes`, a UUID.","schema":{"type":"string"},"example":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerServing"},"example":{"reason":"on the road this week"}}}},"responses":{"200":{"description":"The worker, now `paused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Worker"},"example":{"id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","workspace_id":7,"name":"studio-1","status":"active","join_token_id":12,"facts":{"agent_version":"...","platform":"Linux-aarch64"},"region":null,"spki_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","enrolled_at":"2026-11-14T09:30:00+00:00","revoked_at":null,"serving":"paused","serving_changed_at":"2026-11-16T18:00:00+00:00","serving_reason":"on the road this week","open_sessions":1,"offers":[{"model":"almanakje-gemma3-12b","backend_kind":"openai","upstream_model":"gemma3:12b","max_in_flight":4,"call_timeout_seconds":300.0,"modalities":["text"],"region":null,"status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1,"chat_fields":["tools","tool_choice"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reason`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reason"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `node_revoked`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"node_not_found"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-pause"}}},"/v1/nodes/{node_id}/drain":{"post":{"tags":["Your own workers"],"summary":"Drain a worker","description":"Offers the worker none of your calls, and the `weights` agent on it answers what it holds, closes its connection and stops, so you can switch the computer off. It serves again on its first start after a resume. A repeat answers the same worker again.","operationId":"post_v1_nodes_node_id_drain","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"node_id","in":"path","required":true,"description":"The worker's `id` from `GET /v1/nodes`, a UUID.","schema":{"type":"string"},"example":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerServing"},"example":{"reason":"switching it off for the trip"}}}},"responses":{"200":{"description":"The worker, now `draining`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Worker"},"example":{"id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","workspace_id":7,"name":"studio-1","status":"active","join_token_id":12,"facts":{"agent_version":"...","platform":"Linux-aarch64"},"region":null,"spki_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","enrolled_at":"2026-11-14T09:30:00+00:00","revoked_at":null,"serving":"draining","serving_changed_at":"2026-11-16T18:00:00+00:00","serving_reason":"switching it off for the trip","open_sessions":1,"offers":[{"model":"almanakje-gemma3-12b","backend_kind":"openai","upstream_model":"gemma3:12b","max_in_flight":4,"call_timeout_seconds":300.0,"modalities":["text"],"region":null,"status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1,"chat_fields":["tools","tool_choice"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reason`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reason"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `node_revoked`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"node_not_found"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-drain"}}},"/v1/nodes/{node_id}/resume":{"post":{"tags":["Your own workers"],"summary":"Resume a worker","description":"Offers the worker your calls again after a pause or a drain: at once when it is still connected, else on its agent's next start. A repeat answers the same worker again.","operationId":"post_v1_nodes_node_id_resume","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"node_id","in":"path","required":true,"description":"The worker's `id` from `GET /v1/nodes`, a UUID.","schema":{"type":"string"},"example":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerServing"},"example":{"reason":"back at the desk"}}}},"responses":{"200":{"description":"The worker, now `serving`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Worker"},"example":{"id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","workspace_id":7,"name":"studio-1","status":"active","join_token_id":12,"facts":{"agent_version":"...","platform":"Linux-aarch64"},"region":null,"spki_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","enrolled_at":"2026-11-14T09:30:00+00:00","revoked_at":null,"serving":"serving","serving_changed_at":"2026-11-16T18:00:00+00:00","serving_reason":"back at the desk","open_sessions":1,"offers":[{"model":"almanakje-gemma3-12b","backend_kind":"openai","upstream_model":"gemma3:12b","max_in_flight":4,"call_timeout_seconds":300.0,"modalities":["text"],"region":null,"status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1,"chat_fields":["tools","tool_choice"]}]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_reason`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_reason"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `node_revoked`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `node_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"node_not_found"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-resume"}}},"/v1/nodes/{node_id}/offers/{model}/publish":{"post":{"tags":["Your own workers"],"summary":"Publish a worker's model offer","description":"Routes your workspace's calls for the model to this worker and makes the workspace's endpoint for it. Publishing is not a readiness test: the model answers once the worker is connected.","operationId":"post_v1_nodes_node_id_offers_model_publish","security":[{"bearerAuth":[]}],"x-required-scope":"manage","parameters":[{"name":"node_id","in":"path","required":true,"description":"The worker's `id` from `GET /v1/nodes`, a UUID.","schema":{"type":"string"},"example":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10"},{"name":"model","in":"path","required":true,"description":"The model id of one of the worker's offers.","schema":{"type":"string"},"example":"almanakje-gemma3-12b"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerOfferPublish"},"example":{"priority":1,"pool":{"description":"Gemma 3 12B on the team's own hardware","context_tokens":{"value":8192,"reason":"D: the served context length, 2026-11-01"},"usd_per_1m":{"prompt":0.1,"output":0.3,"reason":"D: the workspace's own price list, 2026-11-01"},"region":null}}}}},"responses":{"200":{"description":"The offer is published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkerOfferPublished"},"example":{"node_id":"0b6f3c52-8f0e-4b57-9a54-3f1c2d7e9a10","model":"almanakje-gemma3-12b","status":"published","pool":"byoc-7-almanakje-gemma3-12b","priority":1}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_publication`, `pool_declaration_required`, `invalid_pool`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_publication","field":"priority","message":"name a priority, or declare one at enrollment (--priority MODEL=N)"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`, `node_revoked`, `csrf_required`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `node_not_found`, `offer_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"node_not_found"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `model_name_reserved`, `pool_already_declared`, `upstream_model_mismatch`, `region_mismatch`, `pool_kind_mismatch`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_name_reserved","model":"qwen3.8-27b"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"503":{"description":"Not ready or not configured right now; retry after the indicated delay. Codes: `byoc_unavailable`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"byoc_unavailable"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/workers-offers-publish"}}},"/v1/models/{model}/versions":{"post":{"tags":["Models and quotes"],"summary":"Register a model version","description":"Registers a trained version of a specialist: its digests, metrics and, optionally, the bundle the service can execute. A version whose gate passed becomes the challenger; the same version registered again with the same fields answers `200` and changes nothing.","operationId":"post_v1_models_model_versions","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersionCreate"},"example":{"version_id":"2026-11-02.1","recipe":"laya-specialist/v1","model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","metrics":{"macro_f1":0.912,"ece":0.031,"gate_passed":true}}}}},"responses":{"201":{"description":"The version, registered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersion"},"example":{"object":"model.version","model":"laya-link-scorer","version_id":"2026-11-02.1","recipe":"laya-specialist/v1","model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","metrics":{"macro_f1":0.912,"ece":0.031,"gate_passed":true},"has_bundle":false,"serving_status":"metadata_only","aliases":["challenger"],"created_at":"2026-11-02T09:14:03.120Z","registry":[]}}}},"200":{"description":"The same version was already registered with these fields; nothing changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersion"},"example":{"object":"model.version","model":"laya-link-scorer","version_id":"2026-11-02.1","recipe":"laya-specialist/v1","model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","metrics":{"macro_f1":0.912,"ece":0.031,"gate_passed":true},"has_bundle":false,"serving_status":"metadata_only","aliases":["challenger"],"created_at":"2026-11-02T09:14:03.120Z","registry":[]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_body`, `invalid_version`, `recipe_not_available`, `unknown_head`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_version","field":"metrics.ece","expected":"a finite number from 0 to 1"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `version_conflict`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"version_conflict"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-versions-create"}},"get":{"tags":["Models and quotes"],"summary":"List a model's versions","description":"Your workspace's versions of a specialist, newest first, with its aliases (champion, challenger, previous) and the specialist's own contract.","operationId":"get_v1_models_model_versions","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"}],"responses":{"200":{"description":"The versions.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersions"},"example":{"object":"model.versions","model":"laya-link-scorer","schema":{"id":"laya-link-scorer","name":"Laya link scorer","kind":"classifier","stage":"link-routing","entity_kind":"link","output_kind":"labels","outputs":["follow_detail","paginate_next","follow_hub","ignore"],"spec_version":"v1","recipe":"laya-specialist/v1"},"aliases":{"champion":null,"challenger":"2026-11-02.1","previous":null},"versions":[{"object":"model.version","model":"laya-link-scorer","version_id":"2026-11-02.1","recipe":"laya-specialist/v1","model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","metrics":{"macro_f1":0.912,"ece":0.031,"gate_passed":true},"has_bundle":false,"serving_status":"metadata_only","aliases":["challenger"],"created_at":"2026-11-02T09:14:03.120Z","registry":[]}],"has_more":false}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-versions-list"}}},"/v1/models/{model}/versions/{version_id}":{"get":{"tags":["Models and quotes"],"summary":"Get a model version","description":"One registered version of a specialist, with the aliases that name it and its record in each MLflow trace destination of your workspace.","operationId":"get_v1_models_model_versions_version_id","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"},{"name":"version_id","in":"path","required":true,"description":"The version's id.","schema":{"type":"string"},"example":"2026-11-02.1"}],"responses":{"200":{"description":"The version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelVersion"},"example":{"object":"model.version","model":"laya-link-scorer","version_id":"2026-11-02.1","recipe":"laya-specialist/v1","model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","metrics":{"macro_f1":0.912,"ece":0.031,"gate_passed":true},"has_bundle":false,"serving_status":"metadata_only","aliases":["challenger"],"created_at":"2026-11-02T09:14:03.120Z","registry":[]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_version`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_version"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`, `version_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-versions-get"}}},"/v1/models/{model}/promote":{"post":{"tags":["Models and quotes"],"summary":"Promote a version to champion","description":"Makes a version the champion: the champion it replaces becomes `previous`. Without `force` the version must have passed its own gate and must beat a standing champion; `companions` promote the other specialists of one release with it, every one or none.","operationId":"post_v1_models_model_promote","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPromote"},"example":{"version_id":"2026-11-02.1","force":false}}}},"responses":{"200":{"description":"The promotion, or `promoted: false` when the version already was the champion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelPromotion"},"example":{"object":"model.promotion","model":"laya-link-scorer","version_id":"2026-11-02.1","promoted":true,"serving_status":"metadata_only","id":17,"replaced_version_id":null,"forced":false,"gate":{"candidate":{"macro_f1":0.912,"ece":0.031,"gate_passed":true},"thresholds":{"gain_macro_f1":0.002,"hold_macro_f1":0.001,"gain_ece":0.005},"champion":null,"passed":true,"rule":"first_champion","forced":false},"aliases":{"champion":"2026-11-02.1","challenger":null,"previous":null},"registry":[]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_version`, `invalid_body`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_version"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`, `version_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `promotion_refused`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"promotion_refused","reason":"not_better_than_champion","model":"laya-link-scorer","version_id":"2026-11-02.1","gate":{"candidate":{"macro_f1":0.905,"ece":0.034,"gate_passed":true},"champion":{"version_id":"2026-10-28.2","macro_f1":0.904,"ece":0.036},"thresholds":{"gain_macro_f1":0.002,"hold_macro_f1":0.001,"gain_ece":0.005},"passed":false,"rule":null}}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-promote"}}},"/v1/models/{model}/aliases":{"post":{"tags":["Models and quotes"],"summary":"Set a model's aliases","description":"Sets champion, challenger and previous at once, only when they are `expected` now, else `409 aliases_changed` and nothing changes: how you undo a promotion you made.","operationId":"post_v1_models_model_aliases","security":[{"bearerAuth":[]}],"x-required-scope":"submit","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelAliasesSet"},"example":{"aliases":{"champion":null,"challenger":"2026-11-02.1","previous":null},"expected":{"champion":"2026-11-02.1","challenger":null,"previous":null}}}}},"responses":{"200":{"description":"The aliases now.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelAliases"},"example":{"object":"model.aliases","model":"laya-link-scorer","aliases":{"champion":null,"challenger":"2026-11-02.1","previous":null},"changed":true,"registry":[]}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_version`, `invalid_body`, `invalid_json`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_version"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`, `version_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}},"409":{"description":"The current state does not allow the call; read it, then act. Codes: `aliases_changed`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"aliases_changed"}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-aliases"}}},"/v1/models/{model}/bundle":{"get":{"tags":["Models and quotes"],"summary":"Get a version's bundle","description":"The champion's registered bundle, or the named version's, with its digests: what a runtime of yours loads.","operationId":"get_v1_models_model_bundle","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"path","required":true,"description":"A specialist whose versions your workspace registers, e.g. `laya-link-scorer`.","schema":{"type":"string"},"example":"laya-link-scorer"},{"name":"version","in":"query","required":false,"description":"A version's id; the champion's when left out (`version_id` is taken too).","schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@+-]*$"},"example":"2026-11-02.1"}],"responses":{"200":{"description":"The bundle.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bundle"},"example":{"object":"model.bundle","model":"laya-link-scorer","version_id":"2026-11-02.1","recipe":"laya-specialist/v1","aliases":["champion"],"model_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","weights_sha256":"831b6f101815b4590022ea3ffed074ed5af35cfca7ecf93dda70861e50e913e4","dataset_sha256":"5f2c1b9e8a7d6c4b3a29180f7e6d5c4b3a2918f7e6d5c4b3a29180f7e6d5c4b3","bundle":{"manifest":{"version":"2026-11-02.1"}}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_version`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_version"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_versioned`, `no_champion`, `version_not_found`, `bundle_not_registered`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"model_not_versioned"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-bundle"}}},"/v1/models/{model}/attestation":{"get":{"tags":["Models and quotes"],"summary":"Get a model's attestation","description":"Live hardware attestation evidence of a confidential enclave model, bound to the enclave's key and your nonce, for you to verify before you send it data.","operationId":"get_v1_models_model_attestation","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"path","required":true,"description":"A confidential enclave model's id.","schema":{"type":"string"},"example":"confidential-vlm"},{"name":"nonce","in":"query","required":true,"description":"32 random bytes of yours as 64 lower-case hexadecimal characters.","schema":{"type":"string","pattern":"^[0-9a-f]{64}$"},"example":"abababababababababababababababababababababababababababababababab"}],"responses":{"200":{"description":"The attestation evidence.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Attestation"},"example":{"model":"confidential-vlm","nonce":"abababababababababababababababababababababababababababababababab","transport_modes":["enclave_tls","sealed_envelope"],"pk_sha256":"0e9d03893cf9b487b46c69b99a496bc5859890f184509f4a97d5cc1f3bb3cb8f","enclave_public_key_der":"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA...","snp_report":"AgAAAAAAAAAfAAMAAAAAAAEAAAAAAAAA...","snp_cert_chain_pem":["-----BEGIN CERTIFICATE-----\nMIIFQzCCAvegAwIBAgIBADBBBgkq...\n-----END CERTIFICATE-----\n"],"maa_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6...","nvattest_token":"eyJhbGciOiJFUzM4NCJ9..."}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_attestation_nonce`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_attestation_nonce"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `attestation_not_available`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"attestation_not_available"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-attestation"}}},"/v1/models/{model}":{"get":{"tags":["Models and quotes"],"summary":"Get a model","description":"One entry of GET /v1/models by its id, as OpenAI's model retrieval answers it. A model that is not listed answers `404 model_not_found` in OpenAI's error shape.","operationId":"get_v1_models_model","security":[{"bearerAuth":[]}],"x-required-scope":"read","parameters":[{"name":"model","in":"path","required":true,"description":"The model's id; it may hold `/`.","schema":{"type":"string"},"example":"laya-page-role"}],"responses":{"200":{"description":"The model.","headers":{"X-Request-Id":{"schema":{"type":"string"},"description":"The request's id; quote it when you report a problem."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Model"},"example":{"id":"laya-page-role","name":"Laya page classifier","description":"Tells what role a web page plays from its text: detail, listing, landing, not_vacancy or unresolved, with the model's probabilities.","input":"page text","can_run":true,"can_train":false,"object":"model","owned_by":"weights.fyi","kind":"classifier","input_modalities":["text"],"output_modalities":["classification"],"labels":["detail","listing","landing","not_vacancy","unresolved"],"streaming":false,"operations":["classify","batch"],"supported_parameters":["options.rejectIfBusy"],"artifact_download":false,"region":"eu-north1","jurisdiction":"FI","jurisdictions":["FI","EU","EEA"]}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"404":{"description":"It does not exist, or it is another account's; you never learn which. Codes: `model_not_found`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"},"example":{"error":{"message":"The model 'laya-page-roles' does not exist.","type":"invalid_request_error","code":"model_not_found","model":"laya-page-roles","request_id":"3f2b8c1e-9a4d-4e7b-8c21-5d6f7a8b9c0d"}}}},"headers":{"X-Request-Id":{"description":"The request's id; quote it when you report a problem.","schema":{"type":"string"}}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/models-get"}}},"/v1/jobs/estimate":{"post":{"tags":["Jobs and results"],"summary":"Estimate a job before sending it","description":"Works out what a batch or training job would take and cost before you send it: its duration part by part, the data it moves, whether it fits, and a price in US dollars and euros. Nothing is queued or charged.","operationId":"post_v1_jobs_estimate","security":[{"bearerAuth":[]}],"x-required-scope":"submit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateRequest"},"example":{"kind":"finetune","recipe":"laya-page-role/v2","model":"laya-page-role-base","train_rows":40,"validation_rows":10,"options":{"epochs":4}}}}},"responses":{"200":{"description":"The estimate.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Estimate"},"example":{"schema":"weights.job-estimate/v1","estimator_version":"2026-10-22.v1","estimate_id":"est_63575a51e2768b173ebba7b9","spec_sha256":"9f83f267b187e22d08f8fef52f3fcf7db7b1ce5573645bd9da7d6772a3485691","basis_sha256":"63575a51e2768b173ebba7b908cc639293cf3e854cc0bfb98afa024a25d493f7","workload_kind":"finetune_discriminative","model":"laya-page-role-base","throughput_source":"measured","hardware_fit":{"estimated_peak_hbm_gb":21.282,"fits":true},"bandwidth_proposal":{"item_count":50,"logical_ingress_bytes":102400,"wire_ingress_bytes":32768,"wire_egress_bytes":335544,"total_transfer_seconds":0.0,"compression":"none","already_compressed":false,"recommended_chunk_items":50,"recommended_chunk_count":1},"duration":{"transfer_seconds":0.0,"warmup_seconds":25.0,"compute_seconds":2.222,"validation_seconds":0.278,"checkpoint_seconds":67.2,"calibration_seconds":0.0,"total_seconds":94.7},"cost":{"usd_micros":63138,"eur_micros":54722,"usd":0.063138,"eur":0.054722,"compute_usd_micros":63133,"transfer_usd_micros":5,"storage_usd_micros":0,"currency_pair":"EUR/USD","fx":{"eur_per_usd":0.866701,"usd_per_eur":1.1538,"source":"ecb_reference_fallback","as_of":"2026-10-22T00:00:00Z","is_fallback":true}},"workload":{"recipe":"laya-page-role/v2","epochs":4,"train_rows":40,"validation_rows":10,"num_heads":1,"effective_pages_per_sec":72.0,"calibrate_temperature_and_thresholds":false}}}}},"400":{"description":"The request is not what the call takes; fix it and send it again. Codes: `invalid_estimate_spec`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"invalid_estimate_spec"}}}},"401":{"description":"No token, or one that does not work (any more). Codes: `unauthorized`, `invalid_token`, `token_revoked`, `token_expired`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}},"403":{"description":"The token lacks the scope the call needs, or the account may not do this. Codes: `scope_required`, `account_suspended`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"scope_required","required":"submit","granted":["read"]}}}},"413":{"description":"The body is larger than the call takes. Codes: `body_too_large`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"body_too_large"}}}},"422":{"description":"The same Idempotency-Key with a different request, or a request that cannot be processed. Codes: `hardware_fit_exceeded`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"hardware_fit_exceeded"}}}},"429":{"description":"Retryable: the token's request rate, or a capacity limit. Nothing was accepted; wait `Retry-After`. Codes: `rate_limited`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"rate_limited","retry_after_seconds":1,"requests_per_second":2.0,"burst":28}}},"headers":{"Retry-After":{"schema":{"type":"integer","minimum":1},"description":"Whole seconds to wait before sending the request again."}}}},"externalDocs":{"description":"Reference page","url":"https://weights.fyi/run/docs/reference/jobs-estimate"}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"An API token from your panel: `Authorization: Bearer $WEIGHTS_API_KEY`."}},"schemas":{"Artifact":{"type":"object","properties":{"path":{"type":"string","description":"The address of `GET /v1/jobs/{job_id}/model.safetensors`."},"sha256":{"type":"string","description":"The weights' SHA-256, the same as the download's `X-Content-SHA256`."},"format":{"type":"string","enum":["safetensors"]}},"required":["path","sha256","format"],"description":"The trained weights as a file."},"Attestation":{"type":"object","properties":{"model":{"type":"string"},"nonce":{"type":"string","description":"Your nonce, echoed.","pattern":"^[0-9a-f]{64}$"},"transport_modes":{"type":"array","items":{"type":"string","enum":["enclave_tls","sealed_envelope"]},"description":"How requests may reach the enclave."},"pk_sha256":{"type":"string","description":"SHA-256 of the enclave's public key (SPKI DER).","pattern":"^[0-9a-f]{64}$"},"enclave_public_key_der":{"type":"string","description":"The enclave's public key, DER, base64."},"snp_report":{"type":"string","description":"The signed SEV-SNP report, base64; its report data binds SHA-256(SPKI) and your nonce."},"snp_cert_chain_pem":{"type":"array","items":{"type":"string"},"description":"The report's certificate chain, PEM."},"maa_token":{"type":"string","description":"The attestation service's signed token."},"nvattest_token":{"type":"string","description":"The accelerator's signed attestation token."},"image_sha256":{"type":"string","description":"The enclave image's digest.","pattern":"^[0-9a-f]{64}$"},"image_signature":{"type":"string","description":"The enclave's signature binding that image to your nonce, base64."}},"required":["model","nonce","transport_modes"],"description":"Live hardware attestation evidence bound to the enclave's key and your nonce. Verify it yourself before trusting the enclave; further evidence fields depend on the enclave's kind.","additionalProperties":true},"Bundle":{"type":"object","properties":{"object":{"type":"string","enum":["model.bundle"]},"model":{"type":"string"},"version_id":{"type":"string"},"recipe":{"type":"string"},"aliases":{"type":"array","items":{"type":"string","enum":["champion","challenger","previous"]}},"model_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"weights_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"dataset_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"bundle":{"type":"object","properties":{},"description":"The bundle as registered, or its artifact reference.","additionalProperties":true}},"required":["object","model","version_id","bundle"],"description":"A version's bundle."},"Campaign":{"type":"object","properties":{"schema":{"type":"string","const":"weights.workspace.campaign/v1"},"campaign_id":{"type":"string","description":"The `run_id` the plans carry in their `metadata`."},"observed_at":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Never `done` while a plan is open or failed, or a pack was dead-lettered, accepted as lost or expired.","enum":["running","failed","ended_with_losses","cancelled","ended_incomplete","done"]},"reason":{"type":"string","description":"Why, in one line."},"dead_letters_open":{"type":"integer","description":"Packs waiting for a retry or an accepted loss."},"window":{"type":"object","properties":{"started_at":{"type":["string","null"],"format":"date-time"},"ended_at":{"type":["string","null"],"description":"Null while a plan is open.","format":"date-time"},"basis":{"type":"string"}}},"campaigns":{"type":"array","items":{"type":"string"},"description":"The `metadata.campaign_name` values the plans name."},"plans":{"type":"array","items":{"type":"object","properties":{"plan_id":{"type":"string"},"campaign":{"type":["string","null"]},"state":{"type":"string"},"outcome":{"type":"string"},"coverage":{"type":"object","properties":{},"additionalProperties":{"type":"integer"}},"created_at":{"type":["string","null"],"format":"date-time"}}},"description":"Your plans that name the campaign; another workspace's are never listed."},"timeline":{"type":"array","items":{"type":"object","properties":{"at":{"type":["string","null"],"format":"date-time"},"kind":{"type":"string"},"plan_id":{"type":"string"},"stage_id":{"type":["string","null"]},"summary":{"type":["string","null"]},"source":{"type":"string"}}},"description":"The plans' events, oldest first."},"produced":{"type":"object","properties":{"samples_assigned":{"$ref":"#/components/schemas/Figure"},"samples_completed":{"$ref":"#/components/schemas/Figure"},"samples_scored":{"$ref":"#/components/schemas/Figure"},"verified_findings":{"$ref":"#/components/schemas/Figure"},"empty_tasks":{"$ref":"#/components/schemas/Figure"},"packs_assigned":{"$ref":"#/components/schemas/Figure"},"packs_completed":{"$ref":"#/components/schemas/Figure"},"items_completed":{"$ref":"#/components/schemas/Figure"},"samples_passed":{"$ref":"#/components/schemas/Figure"},"score_on_assigned":{"$ref":"#/components/schemas/Figure"},"score_on_scored":{"$ref":"#/components/schemas/Figure"},"samples":{"type":"object","properties":{}}},"description":"Assigned first. The harness's own figures (`samples_*`, the two benchmark scores, `verified_findings`, `empty_tasks`) are unavailable here; the pack outcomes are your ledger's."},"cost":{"type":"object","properties":{"charged_usd":{"$ref":"#/components/schemas/Figure"},"chat_usd":{"$ref":"#/components/schemas/Figure"},"chat_elsewhere_usd":{"$ref":"#/components/schemas/Figure"}},"description":"`chat_elsewhere_usd` is unsupported: chat sent anywhere else is not recorded here."},"failures":{"type":"object","properties":{"by_layer":{"type":"object","properties":{"weights_service":{"$ref":"#/components/schemas/Figure"},"model_serving":{"$ref":"#/components/schemas/Figure"},"your_harness":{"$ref":"#/components/schemas/Figure"}},"description":"Failures whose own record names the layer."},"unclassified":{"type":"object","properties":{"count":{"$ref":"#/components/schemas/Figure"},"by_reason":{"type":"object","properties":{},"additionalProperties":{"type":"integer"}}},"description":"Failures whose record names no layer, by the reason they carry."},"dead_letters":{"$ref":"#/components/schemas/Figure"},"dead_letters_by_reason":{"type":"object","properties":{},"additionalProperties":{"type":"integer"}},"stage_failures":{"type":"array","items":{"type":"object","properties":{}}},"consequences":{"type":"integer"},"refusals":{"type":"object","properties":{}},"rule":{"type":"string"}}},"bounds":{"type":"object","properties":{"row_bound":{"type":"integer"},"truncated":{"type":"object","properties":{},"additionalProperties":{"type":"boolean"}},"basis":{"type":"string"}}}},"required":["schema","campaign_id","status","window","plans","timeline","produced","cost","failures"],"description":"One campaign of your workspace as one object."},"Capabilities":{"type":"object","properties":{"service":{"type":"string","description":"The service's name, `weights.fyi`."},"api_version":{"type":"string","description":"The API's version, `v1`."},"models":{"type":"string","description":"The path of GET /v1/models."},"openapi":{"type":"string","description":"The path of the OpenAPI description."},"llm_endpoints":{"type":"object","properties":{"status":{"type":"string","description":"`available` once any language model answers.","enum":["available","not_yet_available"]},"models":{"type":"object","properties":{},"description":"Each language model's status.","additionalProperties":{"type":"string","enum":["available","not_yet_available"]}},"routes":{"type":"array","items":{"type":"string"},"description":"The paths of the language model calls."}},"description":"Language model endpoints and whether they answer yet."},"available":{"type":"object","properties":{"classification":{"type":"boolean"},"batch_classification":{"type":"boolean"},"finetune":{"type":"boolean"},"checkpoint_recovery":{"type":"boolean"},"training_artifact_download":{"type":"boolean"},"chat_completions":{"type":"boolean"},"streaming_chat":{"type":"boolean"},"price_quote":{"type":"boolean"},"usage_readback":{"type":"boolean"},"classify_retain_none":{"type":"boolean"},"jurisdiction_constraint":{"type":"boolean"},"schedules":{"type":"boolean"},"arbitrary_extraction":{"type":"boolean"},"trained_model_serving":{"type":"boolean"}},"description":"One entry per ability, `true` when the service does it now. The fine-tuning entries follow whether fine-tuning is switched on; chat and schedules whether a chat model can run.","additionalProperties":{"type":"boolean"}},"limits":{"type":"object","properties":{"max_body_bytes":{"type":"integer","description":"The largest chat request body, in bytes."}}},"classify_retention":{"type":"object","properties":{"none":{"type":"object","properties":{"execution":{"type":"string","description":"`synchronous`: answered in the call."},"replay_status":{"type":"integer","description":"The status a repeated `Idempotency-Key` answers, `409`."},"durable_queue":{"type":"boolean","description":"`false`: never queued."},"unavailable_status":{"type":"integer","description":"The status where it cannot be honoured, `409`."},"unavailable_backends":{"type":"array","items":{"type":"string"},"description":"The classifiers that cannot honour it."}}}},"description":"What `retain=none` on POST /v1/classify means."},"compatibility":{"type":"object","properties":{"openrouter_chat":{"type":"boolean"},"cloudflare_workers_ai":{"type":"boolean"},"jev_questions":{"type":"boolean"}},"description":"Integrations the service does not claim, each `false`.","additionalProperties":{"type":"boolean"}},"admission":{"type":"object","properties":{"overload_status":{"type":"integer","description":"`429`."},"retry_header":{"type":"string","description":"`Retry-After`."},"reject_if_busy":{"type":"string","description":"The option's name, `options.rejectIfBusy`."},"queued_jobs_resume":{"type":"boolean","description":"`true`: accepted work resumes after a move."},"chat_stream_resume":{"type":"boolean","description":"`false`."}},"description":"How a full service answers."},"tracing":{"type":"object","properties":{"own_traces":{"type":"boolean"},"input_logging_default":{"type":"boolean"},"output_logging_default":{"type":"boolean"},"content_retention_days":{"type":"integer"},"formats":{"type":"array","items":{"type":"string"},"description":"The kinds of trace destination."}}}},"required":["service","api_version","models","openapi","available","compatibility","admission","tracing"],"description":"What this service does now, and what it does not do yet, each said out loud."},"Classify":{"type":"object","properties":{"model":{"type":"string","description":"The model to run; default `laya-page-role`. Also a specialist model your workspace can run: one whose versions you registered, or one served for your workspace (`GET /v1/models` lists them). Named here and in `?model=`, the two must agree; a model you cannot run answers `400 model_not_available`.","default":"laya-page-role"},"pages":{"type":"array","items":{"oneOf":[{"type":"string","description":"A page's text."},{"type":"object","properties":{"text":{"type":"string","description":"The page's text."},"id":{"oneOf":[{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Your own id, echoed in the result."},{"type":"null"}]}},"required":["text"]},{"type":"object","properties":{"url":{"type":"string","description":"The address the page was fetched from (http or https)."},"final_url":{"type":"string","description":"The address it ended at after redirects (http or https)."},"http_status":{"type":"integer","description":"The status it was fetched with."},"content_type":{"type":"string","description":"The media type it was fetched with."},"sha256":{"type":"string","description":"SHA-256 of the fetched bytes.","pattern":"^[0-9a-f]{64}$"},"body_b64":{"type":"string","description":"The fetched bytes, base64."},"id":{"oneOf":[{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Your own id, echoed in the result."},{"type":"null"}]}},"required":["url","final_url","http_status","content_type","sha256","body_b64"],"description":"A fetched page, for a specialist that reads a page's HTML: a registered version's bundle, or a specialist that serves your workspace.","additionalProperties":false}]},"description":"1 up to the per-call page limit, in the order the results come back; each page non-empty once trimmed and fitting one call to the model.","minItems":1},"options":{"type":"object","properties":{"rejectIfBusy":{"type":"boolean","description":"`true` to be refused with `429 overloaded` when the model is not ready or every call slot is taken, instead of the `202` and a queued job.","default":false},"waitCold":{"type":"boolean","description":"`true` to keep waiting for the results while the model starts, within the same wait, instead of answering `202` at once.","default":false}},"additionalProperties":false},"jurisdictions":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Country codes, `EU` or `EEA`, as a list or comma-separated: the call runs only where the model's known location is inside them. It narrows `X-Weights-Jurisdictions`, never widens it."},"retain":{"type":"string","description":"`none`: keep no copy of the answer (also `?retain=none` or `X-Weights-Retain`). The call must be answered in the call, never queued; a retry with the same `Idempotency-Key` answers `409 replay_not_retained` with the first answer's SHA-256.","enum":["none"]},"version_id":{"type":"string","description":"Pin a registered version of the model; it must have a bundle the service executes.","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@+-]*$"},"calibration_sha256":{"type":"string","description":"Pin the calibration: it must be the served version's.","pattern":"^[0-9a-f]{64}$"},"schedule":{"$ref":"#/components/schemas/JobSchedule"}},"required":["pages"],"description":"Pages to classify."},"ClassifyAnswer":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier, `job_` and 24 hexadecimal characters."},"status":{"type":"string","description":"`SUCCEEDED` when every page has a result, `FAILED` when every page failed, `CANCELLED` when the job was cancelled during the wait.","enum":["SUCCEEDED","FAILED","CANCELLED"]},"model":{"type":"string","description":"The model that classified the pages."},"traceparent":{"type":"string","description":"The job's trace context, also sent as a header."},"results":{"type":"array","items":{"$ref":"#/components/schemas/ClassifyResult"},"description":"One per page, in the order you sent them."},"cost":{"$ref":"#/components/schemas/ClassifyCost"},"cold_start":{"type":"object","properties":{"model_state":{"type":"string","enum":["asleep","waking_up","ready","going_to_sleep","moving","paused"]},"expected_ready_seconds":{"type":["number","null"]}},"description":"Only when the model was not ready as the job was admitted."},"version_id":{"type":"string","description":"A registered version's answer: the version that classified the pages."},"calibration_sha256":{"type":"string","description":"A registered version's answer: its calibration's digest.","pattern":"^[0-9a-f]{64}$"},"request_id":{"type":"string","description":"A specialist's answer, given at once without a job: the call's id."},"usage":{"type":"object","properties":{},"description":"A registered version's or a specialist's answer: what was charged.","additionalProperties":true}},"required":["status","model","results"],"description":"Every result, when the model was ready and every page finished within the wait.","additionalProperties":true},"ClassifyCost":{"type":"object","properties":{"usd_micros":{"type":["integer","null"],"description":"The job's cost so far, in micro-dollars."},"final":{"type":"boolean","description":"`true` once the job has ended; its pages are charged as their results land."},"basis":{"type":"string","description":"One sentence on how it is counted."},"prices":{"type":["object","null"],"properties":{"usd_per_1m_pages":{"type":"number","description":"The page price the job was admitted at."}},"additionalProperties":{"type":"number"}},"pages_counted":{"type":"integer","description":"The pages answered so far."},"runs":{"type":"array","items":{"type":"object","properties":{"started_at":{"type":"string","format":"date-time"},"ended_at":{"type":["string","null"],"description":"`null` while the run goes on.","format":"date-time"},"usd_micros":{"type":"integer","description":"What the job was charged in that run."},"final":{"type":"boolean"}}},"description":"The runs of the model the job was served in."}},"required":["usd_micros","final"],"description":"The job's cost."},"ClassifyQueued":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier; the `Location` header holds its path."},"status":{"type":"string","enum":["QUEUED","RUNNING"]},"model":{"type":"string","description":"The model the job runs."},"traceparent":{"type":"string","description":"The job's trace context."},"model_state":{"$ref":"#/components/schemas/EndpointState"},"retry_after_seconds":{"type":"integer","description":"The same figure as `Retry-After`: how long to wait before you read the job.","minimum":1},"cold_start":{"type":"object","properties":{"model_state":{"type":"string","enum":["asleep","waking_up","ready","going_to_sleep","moving","paused"]},"expected_ready_seconds":{"type":["number","null"]}},"description":"Only when the model was not ready as the job was admitted."}},"required":["job_id","status","model","model_state","retry_after_seconds"],"description":"The admitted job, when the results are not in the answer.","additionalProperties":true},"ClassifyResult":{"type":"object","properties":{"seq":{"type":"integer","description":"The page's number in the job, from 1, in the order you sent the pages.","minimum":1},"id":{"type":["string","null"],"description":"Your own id for the page, as text."},"input_sha":{"type":"string","description":"SHA-256 of the page's UTF-8 text (of the fetched bytes for a fetched page).","pattern":"^[0-9a-f]{64}$"},"label":{"type":["string","null"],"description":"The page's role: `detail`, `listing`, `landing`, `not_vacancy` or `unresolved`; a registered version answers its own labels."},"probabilities":{"type":["object","null"],"properties":{},"description":"The calibrated probability per label.","additionalProperties":{"type":"number","minimum":0,"maximum":1}},"status":{"type":"string","description":"`done` with a result; `failed` when the model could not classify it; `cancelled` with the job.","enum":["done","failed","cancelled"]},"error":{"type":["string","null"],"description":"Why the page failed, as a code."},"version_id":{"type":"string","description":"A registered version's answer: the version that classified it."},"calibration_sha256":{"type":"string","description":"A registered version's answer: its calibration's digest.","pattern":"^[0-9a-f]{64}$"},"result":{"type":"object","properties":{},"description":"A registered version's or a specialist's own answer for the page.","additionalProperties":true}},"required":["seq","id","input_sha","label","probabilities","status","error"],"description":"One page's result."},"ComputeCapabilities":{"type":"object","properties":{"schema":{"type":"string","enum":["weights.compute-capabilities/v1"]},"dataset_protocols":{"type":"object","properties":{},"description":"One entry per scheme: `s3`, `r2`, `gs`, `az`, `https`, `hf`, `oci`.","additionalProperties":{"$ref":"#/components/schemas/SourceProtocol"}},"data_formats":{"type":"object","properties":{},"description":"One entry per format: `parquet`, `arrow_ipc`, `lance`, `jsonl_zst`, `jsonl`, `safetensors`.","additionalProperties":{"$ref":"#/components/schemas/SourceFormat"}},"scavenger_submission":{"type":"object","properties":{"source_probe":{"type":"object","properties":{"verify_param":{"type":"string"},"modes":{"type":"array","items":{"type":"string"}},"checks":{"type":"array","items":{"type":"string"}}},"description":"The verification option: the request flag, the receipt modes and the check identifiers."},"qos_classes":{"type":"array","items":{"type":"string"},"description":"The values `qos_priority`, `qos_tier` and `qos` take."},"workload_kinds":{"type":"array","items":{"type":"string"},"description":"The workload kinds plans accept."}},"description":"Plan and stream submission calls and their options.","additionalProperties":true},"runtime_support":{"type":"object","properties":{},"description":"What the bundled runtime reads and runs, with its byte bounds, e.g. `max_record_pack_bytes`.","additionalProperties":true}},"required":["schema","dataset_protocols","data_formats"],"additionalProperties":true},"ComputeEvent":{"type":"object","properties":{"seq":{"type":"integer","description":"The cursor; unique in the log.","minimum":1},"emitted_at_ms":{"type":"integer","description":"Unix milliseconds."},"plan_id":{"type":"string"},"tenant_id":{"type":"string"},"container_id":{"type":["string","null"],"description":"The submitted container identifier."},"stage_id":{"type":["string","null"],"description":"The authored stage, or null for a plan-level event."},"kind":{"type":"object","properties":{"event_type":{"type":"string","description":"e.g. `plan_admitted`, `stage_lease_ready`, `stage_progress`, `pack_completed`, `stage_completed`, `stage.failed`, `stage.cancelled`, `plan.cancelled`, `plan_completed`, `scavenger_plan_promoted`, `stream_reopened`, `plan_superseded`, `plan_consolidated`."}},"required":["event_type"],"description":"The event's type and its own fields; keep unfamiliar fields and tolerate new types.","additionalProperties":true}},"required":["seq","emitted_at_ms","plan_id","tenant_id","stage_id","kind"],"description":"One event of a plan."},"CreditHold":{"type":"object","properties":{"object":{"type":"string","enum":["reservation"]},"dry_run":{"type":"boolean","enum":[false]},"reservation_id":{"type":"string","description":"The hold's id."},"state":{"type":"string","description":"`held` until you release it.","enum":["held","released"]},"amount_usd_micros":{"type":"integer","description":"The amount held."},"created_at":{"type":"string","description":"When it was taken.","format":"date-time"},"released_at":{"type":["string","null"],"description":"When it was released.","format":"date-time"},"release_reason":{"type":["string","null"],"description":"Why it was released."},"plan":{"type":["object","null"],"properties":{"plan_id":{"type":"string","description":"The compute plan the correlation resolved to."},"stage_id":{"type":["string","null"],"description":"Its stage, when the correlation names one that exists."},"state":{"type":"string","description":"The plan's state."},"stage_state":{"type":["string","null"],"description":"The selected stage's state, when one is named."},"runnable":{"type":"boolean","description":"`false` once the plan or selected stage has ended: it takes no new spend."},"budget_usd_micros":{"type":["integer","null"],"description":"The plan's lifetime budget; null for operator_epoch."},"committed_usd_micros":{"type":"integer","description":"What the plan has been charged."},"reserved_usd_micros":{"type":"integer","description":"What its open holds reserve."},"remaining_usd_micros":{"type":["integer","null"],"description":"What the plan can still reserve; null for operator_epoch."}},"description":"The plan whose budget counts the hold, or `null`."},"correlation":{"type":"object","properties":{},"description":"The correlation the hold was taken under.","additionalProperties":true}},"required":["object","reservation_id","state","amount_usd_micros","created_at","plan"],"description":"A hold on your credit."},"CreditHoldList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/CreditHold"}}},"required":["object","data"]},"CreditHoldPreflight":{"type":"object","properties":{"object":{"type":"string","enum":["reservation"]},"dry_run":{"type":"boolean","enum":[true]},"amount_usd_micros":{"type":"integer","description":"The amount asked about."},"admissible":{"type":"boolean","description":"Whether a hold of this amount would be taken now."},"reason":{"type":["string","null"],"description":"Why not, when `admissible` is `false`.","enum":["credit_exhausted","compute_plan_conflict",null]},"detail":{"type":"object","properties":{},"description":"What the reason rests on, when `admissible` is `false`.","additionalProperties":true},"credit":{"type":"object","properties":{"available_usd_micros":{"type":"integer","description":"Your credit not already held."},"sufficient":{"type":"boolean","description":"Whether it covers the amount."}},"required":["available_usd_micros","sufficient"]},"plan":{"type":["object","null"],"properties":{"plan_id":{"type":"string","description":"The compute plan the correlation resolved to."},"stage_id":{"type":["string","null"],"description":"Its stage, when the correlation names one that exists."},"state":{"type":"string","description":"The plan's state."},"stage_state":{"type":["string","null"],"description":"The selected stage's state, when one is named."},"runnable":{"type":"boolean","description":"`false` once the plan or selected stage has ended: it takes no new spend."},"budget_usd_micros":{"type":["integer","null"],"description":"The plan's lifetime budget; null for operator_epoch."},"committed_usd_micros":{"type":"integer","description":"What the plan has been charged."},"reserved_usd_micros":{"type":"integer","description":"What its open holds reserve."},"remaining_usd_micros":{"type":["integer","null"],"description":"What the plan can still reserve; null for operator_epoch."},"sufficient":{"type":"boolean","description":"Whether the plan's budget takes this amount."}},"description":"The plan the correlation resolved to, or `null`."},"correlation":{"type":"object","properties":{"matched":{"type":"boolean","description":"Whether a compute plan of yours matches."}},"description":"The correlation you sent, and whether it matched a plan.","additionalProperties":true},"not_checked":{"type":"array","items":{"type":"string"},"description":"What this answer does not cover, e.g. `token_daily_cap`."}},"required":["object","dry_run","amount_usd_micros","admissible","reason","credit","plan","not_checked"],"description":"What a reservation of the amount would meet now."},"CreditHoldRequest":{"type":"object","properties":{"amount_usd_micros":{"type":"integer","description":"How much to reserve, in micro-USD.","minimum":1},"dry_run":{"type":"boolean","description":"`true` only asks whether the amount could be reserved now; nothing is held or written. `false` by default."},"correlation":{"type":"object","properties":{"campaign_id":{"type":"string","description":"Your compute plan's id, or the campaign id its submission declared under `metadata.correlation.campaign_id`."},"run_id":{"type":"string","description":"The run of that campaign: `metadata.correlation.run_id` of the plan's submission."},"stage_id":{"type":"string","description":"The stage within the plan, as you named it or as `plan_id~stage_id`."}},"description":"Which compute plan and stage the amount belongs to. Each field is an identifier of at most 256 characters.","additionalProperties":false},"reservation_id":{"type":"string","description":"Your own id for the hold, so sending the request again finds it instead of holding twice. One is made when you leave it out.","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},"required":["amount_usd_micros"],"description":"An amount to check or hold against your credit and, with `correlation`, against a compute plan's lifetime budget.","additionalProperties":false},"Dataset":{"type":"object","properties":{"dataset_id":{"type":"string","description":"The dataset's identifier, `ds_` followed by 24 hexadecimal characters."},"name":{"type":"string","description":"The name you gave the dataset, leading and trailing spaces removed."},"format":{"type":"string","description":"The file format the rows are read as, such as `laya-page-role/jsonl`."},"base_model":{"type":"string","description":"The model the dataset trains, such as `laya-page-role-base`."},"labels":{"type":"array","items":{"type":"string"},"description":"The labels a row may carry, in the base model's own order."},"status":{"type":"string","description":"`uploading` (no file accepted yet), `ready` (a file accepted; it can train), `failed` (the last upload was refused) or `deleted` (removed; its file is gone).","enum":["uploading","ready","failed","deleted"]},"error":{"type":["string","null"],"description":"The code of the last refused upload, such as `unknown_label`; cleared when a later upload is accepted."},"rows":{"type":["integer","null"],"description":"The rows in the accepted file; `null` until a file is accepted."},"train_rows":{"type":["integer","null"],"description":"The rows with `split` `train`."},"validation_rows":{"type":["integer","null"],"description":"The rows with `split` `validation`."},"bytes":{"type":["integer","null"],"description":"The accepted file's size in bytes."},"sha256":{"type":["string","null"],"description":"The SHA-256 of the accepted file; compare it with your own copy's digest."},"created_at":{"type":"string","format":"date-time","description":"When the dataset was made."},"ready_at":{"type":["string","null"],"format":"date-time","description":"When its file was accepted."},"jobs":{"type":"array","items":{"type":"string"},"description":"Every training job that has used the dataset, oldest first, as job ids."}},"required":["dataset_id","name","format","base_model","labels","status","created_at","jobs"],"description":"A training dataset; its rows are never shown, logged or traced."},"DatasetCreate":{"type":"object","properties":{"name":{"type":"string","description":"Your name for the dataset, any text that is not empty.","minLength":1},"format":{"type":"string","description":"`laya-page-role/jsonl` (default, single-label `label`), `laya-sft-chat/jsonl` (alias `laya-student-sft/v1`, chat `messages`), `laya-dpo-preference/jsonl` (alias `laya-student-dpo/v1`, `prompt`/`chosen`/`rejected`) or `laya-specialist-heads/jsonl` (aliases `laya-specialist/jsonl`, `laya-specialist/v1`, `text`/`targets`)."},"base_model":{"type":"string","description":"The trainable base, default `laya-page-role-base`; `model` is read the same way. Also `qwen3-4b`, `qwen3-8b`, `qwen3.5-4b`, `qwen3.5-8b`, `gemma3-27b`, `fastino-glide-28b`, `knowline-4b-gen5.5`, `knowline-35b-a3b-gen1.5`, `elephant-1-9b`, `mammoth-1-27b`, `onejev-1.6-4b`, `onejev-1.6-0.8b`, `gliclass-v4-edge` and `amber-0.4b`, or their Hugging Face names."},"source_ref":{"$ref":"#/components/schemas/DatasetSourceRef"}},"required":["name"],"description":"A new dataset: a managed upload, or with `source_ref` a pointer to your bucket."},"DatasetCreated":{"type":"object","properties":{"dataset_id":{"type":"string","description":"The dataset's identifier, `ds_` followed by 24 hexadecimal characters."},"name":{"type":"string","description":"The name you gave the dataset, leading and trailing spaces removed."},"format":{"type":"string","description":"The file format the rows are read as, such as `laya-page-role/jsonl`."},"base_model":{"type":"string","description":"The model the dataset trains, such as `laya-page-role-base`."},"labels":{"type":"array","items":{"type":"string"},"description":"The labels a row may carry, in the base model's own order."},"status":{"type":"string","description":"`uploading` (no file accepted yet), `ready` (a file accepted; it can train), `failed` (the last upload was refused) or `deleted` (removed; its file is gone).","enum":["uploading","ready","failed","deleted"]},"error":{"type":["string","null"],"description":"The code of the last refused upload, such as `unknown_label`; cleared when a later upload is accepted."},"rows":{"type":["integer","null"],"description":"The rows in the accepted file; `null` until a file is accepted."},"train_rows":{"type":["integer","null"],"description":"The rows with `split` `train`."},"validation_rows":{"type":["integer","null"],"description":"The rows with `split` `validation`."},"bytes":{"type":["integer","null"],"description":"The accepted file's size in bytes."},"sha256":{"type":["string","null"],"description":"The SHA-256 of the accepted file; compare it with your own copy's digest."},"created_at":{"type":"string","format":"date-time","description":"When the dataset was made."},"ready_at":{"type":["string","null"],"format":"date-time","description":"When its file was accepted."},"jobs":{"type":"array","items":{"type":"string"},"description":"Every training job that has used the dataset, oldest first, as job ids."},"upload":{"oneOf":[{"$ref":"#/components/schemas/DatasetUploadInstruction"},{"type":"null"}]},"source_ref":{"$ref":"#/components/schemas/DatasetSourceRef"}},"required":["dataset_id","name","format","base_model","labels","status","created_at","jobs"],"description":"The new dataset: `uploading` with the upload instruction, or `ready` with `upload: null` and your `source_ref` echoed.","additionalProperties":true},"DatasetLimitScope":{"type":"object","properties":{"count":{"type":"integer","description":"Datasets not deleted."},"max_count":{"type":"integer"},"bytes":{"type":"integer","description":"Bytes stored or reserved."},"max_bytes":{"type":"integer"}},"required":["count","max_count","bytes","max_bytes"]},"DatasetLimits":{"type":"object","properties":{"account":{"$ref":"#/components/schemas/DatasetLimitScope"},"service":{"$ref":"#/components/schemas/DatasetLimitScope"},"reserved_per_dataset":{"type":"integer","description":"The bytes a new dataset reserves until its upload is accepted."}},"description":"Where your account and the service stand against the dataset limits. `POST /v1/datasets` is admitted while `count < max_count` and `bytes + reserved_per_dataset <= max_bytes` for both."},"DatasetList":{"type":"object","properties":{"datasets":{"type":"array","items":{"$ref":"#/components/schemas/Dataset"},"description":"Your datasets that are not deleted, newest first."},"limits":{"$ref":"#/components/schemas/DatasetLimits"}},"required":["datasets"]},"DatasetRow":{"type":"object","properties":{"id":{"type":"string","description":"Unique in the file."},"split":{"type":"string","description":"`train` or `validation`; rows with another split are counted (`other_rows`) and left out of training.","minLength":1},"group_id":{"type":"string","description":"Rows that belong together, such as the pages of one site, go in one split."},"label":{"type":"string","description":"One of the five labels; every label appears in both splits.","enum":["detail","listing","landing","not_vacancy","unresolved"]},"provenance":{"type":"object","properties":{},"description":"Your own note on where the row came from.","additionalProperties":true},"weight":{"type":"number","description":"A positive number, 1 by default.","exclusiveMinimum":0},"state":{"type":"string","description":"The page's text."},"state_sha256":{"type":"string","description":"The SHA-256 of `state`; when given, it must match."}},"required":["id","split","group_id","label","provenance","state"],"description":"One line of a `laya-page-role/jsonl` dataset file."},"DatasetSourceRef":{"type":"object","properties":{"manifest_uri":{"type":"string","description":"Where the dataset's `manifest.json` lies in your bucket, such as `s3://...`."},"sha256":{"type":"string","description":"The manifest's SHA-256, 64 lower-case hexadecimal characters.","pattern":"^[0-9a-f]{64}$"},"row_count":{"type":"integer","description":"The rows in all.","minimum":1},"byte_size":{"type":"integer","description":"The file's size in bytes.","minimum":1},"compression":{"type":"string","enum":["none","zstd","gzip"]},"train_rows":{"type":"integer","minimum":1},"validation_rows":{"type":"integer","minimum":1}},"required":["manifest_uri","sha256","row_count","byte_size"],"description":"A zero-copy pointer: trainers read `<prefix>manifest.json` and `<prefix>dataset.jsonl` straight from your bucket, and nothing is uploaded."},"DatasetUploadInstruction":{"type":"object","properties":{"method":{"type":"string","enum":["PUT"]},"path":{"type":"string","description":"Where to send the file, with the service's base path: `/run/v1/datasets/<dataset_id>/content`."},"content_type":{"type":"string","enum":["application/x-ndjson"]},"max_bytes":{"type":"integer","description":"The largest file the upload accepts, in bytes."},"row":{"type":"string","description":"One sentence naming the fields each line must hold."}},"required":["method","path","content_type","max_bytes"]},"DatasetUploaded":{"type":"object","properties":{"dataset_id":{"type":"string","description":"The dataset's identifier, as in the path."},"status":{"type":"string","description":"The file is accepted and a training job may use the dataset.","enum":["ready"]},"rows":{"type":"integer","description":"Accepted rows."},"train_rows":{"type":"integer"},"validation_rows":{"type":"integer"},"other_rows":{"type":"integer","description":"Rows with any other split; kept in the file, left out of training. Only in this answer."},"bytes":{"type":"integer","description":"The file's size in bytes, exactly as received."},"sha256":{"type":"string","description":"The SHA-256 of the file exactly as received.","pattern":"^[0-9a-f]{64}$"}},"required":["dataset_id","status","rows","train_rows","validation_rows","bytes","sha256"]},"DeliveryOutcome":{"type":"string","description":"What the packs delivered, beside the lifecycle `state`. `complete`: completed with no pack lost. `incomplete_dead_letter`, `incomplete_accepted_loss`, `incomplete_expired`: completed over packs that ran out of attempts, whose loss was accepted, or that the window's end expired. `dead_lettered`: not ended, and nothing can progress until its dead-lettered packs are retried or their loss accepted. `failed`, `cancelled`: the terminal state. `in_progress`: anything else.","enum":["in_progress","complete","incomplete_dead_letter","incomplete_accepted_loss","incomplete_expired","dead_lettered","failed","cancelled"]},"EndpointState":{"type":"object","properties":{"model":{"type":"string","description":"The model this state is about, `laya-page-role`."},"state":{"type":"string","description":"`asleep` (stopped), `waking_up`, `ready`, `going_to_sleep`, `moving` (being served again after an interruption) or `paused`.","enum":["asleep","waking_up","ready","going_to_sleep","moving","paused"]},"since":{"type":["string","null"],"description":"When the model entered this state, UTC.","format":"date-time"},"expected_ready_seconds":{"type":["number","null"],"description":"Seconds until ready while it starts or moves; while stopped or stopping, how long a start typically takes; `null` while ready or paused, or with no estimate. A guide for polling, not a promise."},"message":{"type":["string","null"],"description":"The state in a sentence; `null` while ready."},"queued_work_preserved":{"type":"boolean","description":"`true` while the model starts or moves: queued work is kept."},"recovery_action":{"type":["string","null"],"description":"`poll_job` while it starts or moves: keep polling your job, do not send it again.","enum":["poll_job",null]}},"required":["state","since","expected_ready_seconds"],"description":"The classifier model's state."},"Error":{"type":"object","properties":{"error":{"type":"string","description":"The code a program acts on, e.g. `queue_exceeds_credit`."},"message":{"type":"string","description":"One sentence for a person, when the code alone does not say what to do."},"retryable":{"type":"boolean","description":"`true` when the same request may succeed after `retry_after_seconds`."},"retry_after_seconds":{"type":"integer","description":"The same value as the `Retry-After` header.","minimum":1}},"required":["error"],"description":"A refusal: the code and the details to act on (a line number, bounds, the amount needed). It never quotes your page text.","additionalProperties":true},"Estimate":{"type":"object","properties":{"schema":{"type":"string","enum":["weights.job-estimate/v1"]},"estimator_version":{"type":"string"},"estimate_id":{"type":"string","description":"`est_` and 24 hexadecimal characters, derived from the estimate itself."},"spec_sha256":{"type":"string","description":"A digest of the work as the estimator read it."},"basis_sha256":{"type":"string","description":"A digest of the whole estimate."},"workload_kind":{"type":"string","enum":["inference_batch_flex","finetune_sft","finetune_dpo","finetune_discriminative"]},"model":{"type":"string","description":"The model, under its canonical name."},"throughput_source":{"type":"string","description":"What the speed the estimate uses rests on.","enum":["measured","calibrated","unmeasured"]},"hardware_fit":{"type":"object","properties":{"estimated_peak_hbm_gb":{"type":"number","description":"The memory the work is expected to need at its peak, in GB."},"fits":{"type":"boolean","description":"Whether the work fits."}},"description":"Whether the work fits in the memory one run of the model has.","additionalProperties":true},"bandwidth_proposal":{"type":"object","properties":{"item_count":{"type":"integer"},"logical_ingress_bytes":{"type":"integer","description":"The data's size uncompressed."},"wire_ingress_bytes":{"type":"integer","description":"The bytes that travel in."},"wire_egress_bytes":{"type":"integer","description":"The bytes that travel out."},"total_transfer_seconds":{"type":"number"},"compression":{"type":"string"},"already_compressed":{"type":"boolean"},"recommended_chunk_items":{"type":"integer","description":"Items per chunk when you send the work in chunks."},"recommended_chunk_count":{"type":"integer"}},"description":"The data the work moves, and how to chunk it.","additionalProperties":true},"duration":{"type":"object","properties":{"transfer_seconds":{"type":"number"},"warmup_seconds":{"type":"number"},"compute_seconds":{"type":"number"},"validation_seconds":{"type":"number"},"checkpoint_seconds":{"type":"number"},"calibration_seconds":{"type":"number"},"total_seconds":{"type":"number","description":"The whole duration."}},"description":"How long the work takes, part by part.","additionalProperties":true},"cost":{"type":"object","properties":{"usd_micros":{"type":"integer","description":"The estimate in micro-dollars."},"eur_micros":{"type":"integer","description":"The same in micro-euros."},"usd":{"type":"number"},"eur":{"type":"number"},"compute_usd_micros":{"type":"integer"},"transfer_usd_micros":{"type":"integer"},"storage_usd_micros":{"type":"integer"},"currency_pair":{"type":"string","enum":["EUR/USD"]},"fx":{"type":"object","properties":{"eur_per_usd":{"type":"number"},"usd_per_eur":{"type":"number"},"source":{"type":"string"},"as_of":{"type":"string"},"is_fallback":{"type":"boolean","description":"`true` when no exchange rate of the day was given."}},"description":"The exchange rate used."}},"description":"What the work would cost, in US dollars and euros.","additionalProperties":true},"workload":{"type":"object","properties":{},"description":"What the estimate assumed of the work: rows, epochs, tokens and speeds.","additionalProperties":{}}},"required":["estimate_id","workload_kind","model","duration","cost"],"description":"A pre-flight estimate; nothing is queued or charged.","additionalProperties":true},"EstimateRequest":{"type":"object","properties":{"workload_kind":{"type":"string","description":"`inference_batch_flex`, `finetune_sft`, `finetune_dpo` or `finetune_discriminative`; `kind` is read the same way (`batch` or `flex` for a batch; `finetune` picks the training kind from the recipe)."},"recipe":{"type":"string","description":"A training recipe, such as `laya-page-role/v2`, `laya-specialist-heads/v1`, `laya-student-lora-sft/v1` or `laya-student-lora-dpo/v1`."},"objective":{"type":"string","description":"The training objective; it must agree with the kind.","enum":["sft","dpo","specialist_heads","grpo","opd"]},"format":{"type":"string","description":"The dataset record format, such as `laya-page-role/jsonl`; it must agree with the kind."},"model":{"type":"string","description":"The model to run or train; `base_model` is read the same way."},"items":{"type":"array","items":{},"description":"A batch's items; their count sizes the batch."},"items_count":{"type":"integer","description":"How many items or rows the work holds.","minimum":1},"train_rows":{"type":"integer","minimum":1},"validation_rows":{"type":"integer","minimum":0},"byte_size":{"type":"integer","description":"The data's size in bytes as sent.","minimum":1},"logical_byte_size":{"type":"integer","description":"The data's size uncompressed.","minimum":1},"compression":{"type":"string","description":"`none`, `zstd`, `gzip` or `lz4`; compressed data is never compressed again."},"source_ref":{"type":"object","properties":{},"description":"A dataset pointer as `POST /v1/datasets` takes it; its row and byte counts are read.","additionalProperties":true},"options":{"type":"object","properties":{"epochs":{"type":"integer","minimum":1},"checkpoint_seconds":{"type":"number"},"max_seq_length":{"type":"integer"},"lora_rank":{"type":"integer"},"num_heads":{"type":"integer"}},"description":"Training options the estimate reads.","additionalProperties":true},"max_tokens":{"type":"integer","description":"A batch: the most tokens an answer may hold."},"avg_prompt_tokens":{"type":"integer"},"avg_completion_tokens":{"type":"integer"},"response_format":{"type":"object","properties":{},"description":"A batch with structured output.","additionalProperties":true},"strict_fit":{"type":"boolean","description":"Refuse with `422 hardware_fit_exceeded` when the work does not fit, instead of answering `fits: false`.","default":false},"eur_per_usd":{"type":"number","description":"Your own exchange rate for the euro amounts.","exclusiveMinimum":0}},"description":"The work to estimate; every field is optional and the estimate states what it assumed.","additionalProperties":true},"Figure":{"type":"object","required":["value","status","observed_at","reason"],"description":"One figure. `value` is null unless `status` is fresh or stale.","properties":{"value":{"description":"The figure; null when it was not measured."},"status":{"enum":["fresh","stale","unsupported","unavailable"],"description":"fresh: current. stale: measured, older than the source's own currency rule. unsupported: this hardware or source cannot measure it. unavailable: the source did not answer or did not report it."},"observed_at":{"type":["string","null"],"format":"date-time"},"reason":{"type":["string","null"],"description":"Why the status is not fresh, else null."},"unit":{"type":"string"},"basis":{"type":"string","description":"What the figure is computed from."}}},"Job":{"oneOf":[{"$ref":"#/components/schemas/Classify"},{"type":"object","properties":{"kind":{"const":"finetune","description":"`finetune`. Without it the body is read as a page batch."},"dataset":{"type":"string","description":"The dataset to train on, `ds_` followed by 24 hexadecimal characters; it must be yours and `ready`. `dataset_id` is accepted as the same field."},"model":{"type":"string","description":"The base to train; `base_model` is accepted as the same field. Left out: `laya-page-role-base` for a page-role dataset, and the dataset's own `base_model` for a specialist or student dataset. `GET /v1/models` lists the bases you can train; another answers `400 model_not_available`."},"recipe":{"type":"string","description":"The training recipe. For a page-role dataset `laya-page-role/v2` (the default: AdamW at 2e-5 after 200 warm-up steps, then a linear decay to zero, 8 pages a step) or `laya-page-role/v1` (a constant rate after the warm-up). A specialist dataset trains with `laya-specialist/v1` or `laya-specialist-heads/v1`, a student dataset with `laya-student-lora-sft/v1` or `laya-student-lora-dpo/v1`; left out, the recipe follows the dataset's format or `objective`. One that does not fit the dataset answers `400 recipe_not_available`."},"objective":{"type":"string","description":"The training objective; it selects the recipe when `recipe` is left out (`grpo` and `opd` train `laya-student-lora-grpo/v1` and `laya-student-lora-opd/v1` on a `laya-rlvr-prompt/jsonl` dataset).","enum":["sft","dpo","specialist_heads","grpo","opd"]},"replay_weights":{"type":"object","properties":{},"description":"A positive weight per cohort name: a training row naming that `cohort` trains at it unless the row carries its own `weight`.","additionalProperties":{"type":"number","exclusiveMinimum":0}},"manifest_uri":{"type":"string","description":"The address of the dataset release the job trains from, recorded with the job."},"manifest_sha256":{"type":"string","description":"That release's digest, 64 lowercase hexadecimal digits.","pattern":"^[0-9a-f]{64}$"},"base_checkpoint_uri":{"type":"string","description":"Accepted only empty: a training job starts from its base model. Any other value answers `400 checkpoint_reference_unsupported`.","enum":[""]},"schedule":{"$ref":"#/components/schemas/JobSchedule"},"options":{"$ref":"#/components/schemas/JobTrainingOptions"}},"required":["kind","dataset"],"description":"A training job on a `ready` dataset of yours: the five page roles on the page-role base, or a specialist or student model on its own base.","examples":[{"kind":"finetune","model":"laya-page-role-base","dataset":"ds_12be8b8818ceaf13696e7ff9","recipe":"laya-page-role/v2","options":{"epochs":4,"patience":3}}]}],"description":"A batch of pages, or with `\"kind\": \"finetune\"` a training job."},"JobCost":{"type":"object","properties":{"usd_micros":{"type":["integer","null"],"description":"The job's charges so far in micro-dollars; `null` for a job admitted before prices per unit."},"final":{"type":"boolean","description":"`true` once the job has ended; until then the figure grows as results land."},"basis":{"type":"string","description":"One sentence saying how the cost is worked out."},"pages_counted":{"type":"integer","description":"A page job: the pages charged so far."},"training_tokens":{"type":"integer","description":"A training job: the training tokens charged so far."},"prices":{"type":["object","null"],"properties":{"usd_per_1m_pages":{"type":"number","description":"A page job's price per 1M pages."},"usd_per_1m_training_tokens":{"type":"number","description":"A training job's price per 1M training tokens."}},"description":"The price per 1M the job was admitted at."},"runs":{"type":"array","items":{"$ref":"#/components/schemas/JobRun"},"description":"A training job only: the runs as the cost rule sees them."}},"required":["usd_micros","final","basis"],"description":"The sum of the job's charges, posted as its results land."},"JobCreated":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier, `job_` and 24 hexadecimal characters."},"model":{"type":"string","description":"The model the job runs."},"status":{"type":"string","description":"`QUEUED`; later `RUNNING`, then `SUCCEEDED`, `FAILED` or `CANCELLED`.","enum":["QUEUED"]},"items_total":{"type":"integer","description":"The pages in the job; results are numbered 1 to this, in your order."},"traceparent":{"type":"string","description":"The job's own trace context (version `00`), to link from your traces."},"model_state":{"$ref":"#/components/schemas/JobModelState"},"cold_start":{"type":"object","properties":{"model_state":{"type":"string"},"expected_ready_seconds":{"type":["number","null"]}},"description":"Present when the model was not ready at submission."}},"required":["job_id","model","status","items_total","traceparent"],"description":"A page batch, stored whole.","additionalProperties":true},"JobFinetuneCreated":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier; the trained model will be `ft_` followed by the same 24 characters."},"kind":{"const":"finetune"},"model":{"type":"string","description":"The base being trained, `laya-page-role-base`."},"dataset":{"type":"string","description":"The dataset it trains on."},"recipe":{"type":"string","description":"The recipe it follows."},"objective":{"type":"string","description":"The training objective of the recipe."},"options":{"$ref":"#/components/schemas/JobTrainingOptions"},"status":{"type":"string","enum":["QUEUED"]},"state":{"type":"string","enum":["queued"]},"traceparent":{"type":"string","description":"The job's own trace context, to link your traces to."},"model_state":{"$ref":"#/components/schemas/JobModelState"},"estimate":{"$ref":"#/components/schemas/JobTrainingEstimate"}},"required":["job_id","kind","model","dataset","recipe","options","status","state","estimate"],"description":"A training job, admitted and queued.","additionalProperties":true,"examples":[{"job_id":"job_a698e920d5f0db918008bc43","kind":"finetune","model":"laya-page-role-base","dataset":"ds_12be8b8818ceaf13696e7ff9","recipe":"laya-page-role/v2","options":{"epochs":4,"patience":3,"seed":1729,"checkpoint_seconds":300.0},"status":"QUEUED","state":"queued","traceparent":"00-22f0dbf2bea34f47b832073adda56a66-459770a64a0f7855-01","estimate":{"usd_for_job":0.0011111111111111111,"usd_micros":1111,"training_tokens":181346,"usd_per_1m_training_tokens":0.006127,"basis":"An estimate: 4 epochs over 40 training pages at about 1,133 tokens a page, the tokens our trainer fed a page of a real release, about 181,346 training tokens at $0.0061 per 1M. The validation pass is not charged. The job is charged for the tokens the trainer actually trains, as it trains; its cost so far is on your panel and its job page."}}]},"JobList":{"type":"object","properties":{"jobs":{"type":"array","items":{"$ref":"#/components/schemas/JobView"},"description":"Your jobs, newest first, page jobs and training jobs together."},"next_after":{"type":["integer","null"],"description":"The cursor for the next, older page of jobs, or `null` at the oldest."}},"required":["jobs"]},"JobModelState":{"type":"object","properties":{"state":{"type":"string","description":"The model's state now.","enum":["asleep","waking_up","ready","going_to_sleep","moving","paused"]},"since":{"type":["string","null"],"format":"date-time","description":"When the model entered that state, or `null` when availability cannot currently be confirmed."},"expected_ready_seconds":{"type":["number","null"],"description":"While the model starts or moves, the estimate of the seconds until it is ready."},"message":{"type":["string","null"],"description":"The state in a sentence; `null` while ready."},"queued_work_preserved":{"type":"boolean","description":"`true` while starting, moving, or paused to check availability: queued work is kept."},"recovery_action":{"type":["string","null"],"description":"`poll_job`: keep polling this job, do not send it again.","enum":["poll_job",null]}},"required":["state"],"description":"The model's state as a job sees it."},"JobPageLine":{"type":"object","properties":{"text":{"type":"string","description":"The page's text, not empty, fitting one call to the model.","minLength":1},"id":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Your identifier, a string or a whole number, returned with the result."}},"required":["text"],"description":"One line of an NDJSON page batch. Blank lines are skipped."},"JobPageProgress":{"type":"object","properties":{"total":{"type":"integer","description":"How many pages the job holds."},"done":{"type":"integer","description":"Pages with a result."},"failed":{"type":"integer","description":"Pages that failed."},"cancelled":{"type":"integer","description":"Pages cancelled before they were sent."},"queued":{"type":"integer","description":"Pages waiting to be sent."},"in_flight":{"type":"integer","description":"Pages the model is working on right now."},"pages_per_second":{"type":["number","null"],"description":"Pages finished per second over the last `rate_window_seconds`."},"eta_seconds":{"type":["number","null"],"description":"Seconds the open pages take at that speed; `0` when none are open."},"rate_window_seconds":{"type":"number","description":"The window the speed is measured over."}},"required":["total","done","failed","cancelled","queued","in_flight"]},"JobPageView":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier, `job_` followed by 24 hexadecimal characters."},"model":{"type":"string","description":"The model the job runs, `laya-page-role` today."},"service_class":{"type":"string","description":"`flex` for a job made by `POST /v1/classify`, whose pages go before batch work, or `batch` for a job made by `POST /v1/jobs`.","enum":["flex","batch"]},"status":{"type":"string","description":"The job's status.","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED"]},"traceparent":{"type":["string","null"],"description":"The job's trace context: its trace and its root span."},"waiting_for":{"type":["string","null"],"description":"Why a job with pages to send is not moving.","enum":["model","credit",null]},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time","description":"When its first page was sent to the model."},"completed_at":{"type":["string","null"],"format":"date-time","description":"When its last open page was settled."},"progress":{"$ref":"#/components/schemas/JobPageProgress"},"model_state":{"$ref":"#/components/schemas/JobModelState"},"cost":{"$ref":"#/components/schemas/JobCost"},"runs":{"type":"array","items":{"$ref":"#/components/schemas/JobRun"},"description":"Each run of the model the job was served in, oldest first."}},"required":["job_id","model","service_class","status","created_at","progress","model_state","cost","runs"],"description":"A page job as it stands.","additionalProperties":true},"JobRun":{"type":"object","properties":{"started_at":{"type":"string","format":"date-time","description":"When the run was asked for."},"ended_at":{"type":["string","null"],"format":"date-time","description":"When it stopped; `null` while it lasts."},"usd_micros":{"type":"integer","description":"What the job was charged in this run, in micro-dollars."},"final":{"type":"boolean","description":"Whether the run has ended."}},"required":["started_at","ended_at","usd_micros"],"description":"One run of the model the job was served in."},"JobSchedule":{"type":"object","properties":{"until":{"type":"string","description":"Finish by this time, ISO 8601 in UTC: later than now and at most 8 days ahead. `latest_start_at` and `complete_by` are read as the same field.","format":"date-time"},"latest_start_at":{"type":"string","description":"Read as `until`.","format":"date-time"},"complete_by":{"type":"string","description":"Read as `until`.","format":"date-time"},"window_hours":{"type":"number","description":"Instead of `until`: hours from now, above 0 up to 192; default 4. `deadline_hours` is read as the same field.","exclusiveMinimum":0,"maximum":192},"deadline_hours":{"type":"number","description":"Read as `window_hours`.","exclusiveMinimum":0,"maximum":192},"not_before":{"type":"string","description":"Do not start before this time; it must be earlier than `until`.","format":"date-time"},"max_hourly_usd_micros":{"type":"integer","description":"The highest hourly cost of capacity the work may start at, in micro-dollars. Left out, a figure from the current and recent cost.","minimum":0},"max_hourly_usd":{"type":"number","description":"The same ceiling in US dollars; `max_hourly_usd_micros` wins when both are sent.","minimum":0},"max_startup_usd_micros":{"type":"integer","description":"The most a start may cost, in micro-dollars.","minimum":0},"max_startup_usd":{"type":"number","description":"The same in US dollars; `max_startup_usd_micros` wins when both are sent.","minimum":0},"estimated_duration_seconds":{"type":"integer","description":"How long the work is expected to run; left out, an estimate from its size.","minimum":1,"maximum":604800},"cold_boot_buffer_seconds":{"type":"integer","description":"Time to allow for a start before the deadline.","minimum":0,"maximum":86400},"target_percentile":{"type":"number","description":"Where in the recent cost range to aim, from 0 to 1.","minimum":0,"maximum":1},"prefer_low_cost_window":{"type":"boolean","description":"Prefer the lower-cost times of the window.","default":true},"profile":{"type":"string","description":"A name for the schedule; default the model's id.","minLength":1},"priority_class":{"type":"string","description":"Stored with the schedule."},"wan_ingress_mbps":{"type":"number","description":"Expected inbound transfer rate, in megabits a second.","minimum":0},"wan_egress_mbps":{"type":"number","description":"Expected outbound transfer rate, in megabits a second.","minimum":0},"wan_mbps":{"type":"number","description":"Expected transfer rate in both directions, in megabits a second.","minimum":0},"input_bytes":{"type":"integer","description":"The input's size; with no rate given, the inbound rate is worked out from it.","minimum":0},"expected_output_bytes":{"type":"integer","description":"The expected output's size; the outbound rate is worked out from it.","minimum":0},"transfer_compression_ratio":{"type":"number","description":"Compressed size over raw size, above 0 up to 1.","exclusiveMinimum":0,"maximum":1},"allow_bandwidth_pacing":{"type":"boolean","description":"Let the work slow to the transfer rate available."},"strict_unthrottled_deadline":{"type":"boolean","description":"Hold the deadline as if no pacing applied."},"sandbox_placement":{"type":"string","description":"Where your own client runs relative to the model.","enum":["co_located_loopback","remote_wan"]},"allocated_share":{"type":"object","properties":{"vram_gb":{"type":"number","minimum":0},"kv_cache_gb":{"type":"number","minimum":0},"compute_pct":{"type":"number","minimum":0},"host_vcpus":{"type":"number","minimum":0},"wan_mbps":{"type":"number","minimum":0}},"description":"The share of a model's resources the work is planned on.","additionalProperties":false}},"description":"When queued work may run: a deadline (`until` or `window_hours`) and cost ceilings. Optional; an unknown field answers `400 invalid_schedule`, a deadline outside the next 8 days `400 invalid_schedule_window`. Not accepted with `retain: none`.","additionalProperties":false},"JobTrainingEstimate":{"type":"object","properties":{"usd_for_job":{"type":"number","description":"The estimate in US dollars."},"usd_micros":{"type":"integer","description":"The same in micro-dollars, rounded: the amount set aside from your available credit while the job is open."},"training_tokens":{"type":"integer","description":"The training tokens the estimate assumes."},"usd_per_1m_training_tokens":{"type":"number","description":"The price per 1M training tokens the job keeps."},"basis":{"type":"string","description":"The estimate in words, with the speed it rests on and its date."}},"required":["usd_for_job","usd_micros"]},"JobTrainingOptions":{"type":"object","properties":{"epochs":{"type":"integer","description":"The epochs to run at most, from 1 to the service's maximum; default 10.","minimum":1},"patience":{"type":"integer","description":"Epochs without a better validation macro-F1 before stopping; default 3 in `laya-page-role/v2`, 10 in `laya-page-role/v1`; at most `epochs`.","minimum":1},"seed":{"type":"integer","description":"The random seed; default 1729."},"checkpoint_seconds":{"type":"number","description":"Seconds between checkpoints: down to 16.8 (one checkpoint's measured write and store), never above the service's default.","minimum":16.8}},"description":"Training options inside their bounds; other keys are refused (`400 option_out_of_range`).","additionalProperties":false},"JobTrainingView":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier, `job_` followed by 24 hexadecimal characters."},"kind":{"const":"finetune"},"model":{"type":"string","description":"The base the job trains, `laya-page-role-base`."},"dataset":{"type":"string","description":"The dataset it trains on."},"recipe":{"type":"string","description":"The recipe it follows, such as `laya-page-role/v2`."},"options":{"$ref":"#/components/schemas/JobTrainingOptions"},"service_class":{"type":"string","enum":["batch"]},"status":{"type":"string","description":"The job's status.","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED"]},"state":{"type":"string","description":"Where the training is.","enum":["queued","preparing","training","moving","finishing","done"]},"state_text":{"type":"string","description":"The same in words for a person, such as `Training` or `Waiting for credit`."},"waiting_for":{"type":["string","null"],"description":"While queued and not yet given to the model: what it waits for.","enum":["credit","model","token_daily_cap",null]},"traceparent":{"type":["string","null"],"description":"The job's trace context."},"progress":{"type":"object","properties":{"epoch":{"type":["integer","null"],"description":"The last epoch the training reported."},"epochs":{"type":"integer","description":"How many epochs the job runs at most."},"step":{"type":["integer","null"],"description":"The last step reported."},"steps_per_epoch":{"type":["integer","null"],"description":"The steps in one epoch."},"pages_seen":{"type":["integer","null"],"description":"The training pages processed so far."},"pages_per_second":{"type":["number","null"],"description":"The recent speed."},"training_tokens":{"type":["integer","null"],"description":"The training tokens processed so far."},"last_step_at":{"type":["string","null"],"format":"date-time"},"last_step_age_seconds":{"type":["number","null"],"description":"Seconds since the last step was reported."},"best":{"type":["object","null"],"properties":{"epoch":{"type":"integer"},"macro_f1":{"type":"number"}},"description":"The epoch with the best validation macro-F1 so far."},"epochs_done":{"type":"array","items":{"type":"object","properties":{"epoch":{"type":"integer"},"macro_f1":{"type":["number","null"]},"improved":{"type":"boolean"}}},"description":"One entry per finished epoch."},"last_checkpoint":{"type":["object","null"],"properties":{"step":{"type":"integer"},"at":{"type":"string","format":"date-time"},"age_seconds":{"type":"number"}},"description":"The last saved checkpoint."},"checkpoint_sync":{"type":["object","null"],"properties":{"failing":{"type":"boolean","description":"`true` after two failed saves in a row."},"failures_in_a_row":{"type":"integer"},"last_failed_at":{"type":["string","null"],"format":"date-time"}},"description":"Whether checkpoints are reaching storage; `null` while no save has failed."},"resumes":{"type":"integer","description":"How often the training resumed after a move."},"steps_lost_total":{"type":"integer","description":"Steps done again over every resume."},"load_seconds":{"type":["number","null"],"description":"How long loading your data and the base model took."},"total":{"type":"integer","description":"The epochs to run."},"done":{"type":"integer","description":"The epochs finished."},"failed":{"type":"integer","description":"`0` for a training job."},"cancelled":{"type":"integer","description":"`0` for a training job."},"queued":{"type":"integer","description":"`0` for a training job."},"in_flight":{"type":"integer","description":"`0` for a training job."},"eta_seconds":{"type":"null"},"rate_window_seconds":{"type":"null"}},"additionalProperties":true},"model_state":{"$ref":"#/components/schemas/JobModelState"},"cost":{"$ref":"#/components/schemas/JobCost"},"estimate_usd_micros":{"type":"integer","description":"The estimate the job was admitted against, set aside from your available credit while the job is open."},"expected":{"type":["object","null"],"properties":{"training_tokens":{"type":"integer"},"usd_micros":{"type":"integer"},"estimate":{"type":"boolean","description":"`true` while it is an estimate from the pages, before the trainer counted the tokens."},"basis":{"type":"string"}},"description":"What the job is expected to cost: its training tokens times the price it keeps."},"runs":{"type":"array","items":{"$ref":"#/components/schemas/JobRun"},"description":"One entry per stretch of training, oldest first; a job that moved shows two."},"error":{"type":["string","null"],"description":"The code a failed job ended with, such as `missing_group_id`, `checkpoint_store_refused` or `model_not_saved`."},"stop_reason":{"type":["string","null"],"description":"Why the training stopped: `epoch_limit`, `validation_patience`, `cancelled`, `failed`, and a few rarer words."},"result_model":{"type":["string","null"],"description":"The trained model's id, `ft_` followed by the job's 24 hexadecimal characters, once there is one."},"created_at":{"type":"string","format":"date-time"},"started_at":{"type":["string","null"],"format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}},"required":["job_id","kind","model","dataset","recipe","options","status","state","progress","cost"],"description":"A training job as it stands.","additionalProperties":true},"JobView":{"oneOf":[{"$ref":"#/components/schemas/JobPageView"},{"$ref":"#/components/schemas/JobTrainingView"}],"description":"A page job or a training job."},"MeasureJob":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier."},"kind":{"type":"string","enum":["measure"]},"model":{"type":"string","description":"The model measured."},"status":{"type":"string","enum":["QUEUED"]},"state":{"type":"string","enum":["queued"]},"traceparent":{"type":"string","description":"The job's trace context."},"prices":{"type":"object","properties":{"usd_per_hour":{"type":"number","description":"The price of an hour of the job's work."}},"description":"The price the job is admitted at."},"asked":{"$ref":"#/components/schemas/MeasureRequest"},"estimate":{"type":"object","properties":{"usd_micros":{"type":"integer","description":"The estimate in micro-dollars."},"basis":{"type":"string"}},"description":"What the measurement is estimated to cost; the charge is its own work."}},"required":["job_id","kind","model","status"],"description":"A measurement job, as admitted."},"MeasureRequest":{"type":"object","properties":{"prompt_words":{"type":"integer","description":"Prompt length per call, in words.","minimum":1},"calls_per_stream":{"type":"integer","description":"Calls per stream per step.","minimum":1},"hours":{"type":"number","description":"Hours of work: sets the estimate and the time limit.","exclusiveMinimum":0}},"description":"This measurement's own shape; each field left out takes the service's setting.","additionalProperties":false},"Model":{"type":"object","properties":{"id":{"type":"string","description":"The exact name to send as `model`; a fine-tuned model's is `ft_` and its job's 24 characters."},"name":{"type":"string","description":"The model's name in words."},"description":{"type":"string","description":"One sentence on what the model does."},"input":{"type":"string","description":"What it reads: `page text` for the classifier, `labelled page text` for the base you train, `chat messages` for a language model."},"can_run":{"type":"boolean","description":"`true` when the listed inference operations accept it."},"can_train":{"type":"boolean","description":"`true` when it can be the base of a training job."},"owner":{"type":"string","description":"Only on your own fine-tuned models.","enum":["you"]},"trained_from":{"type":"string","description":"The base a fine-tuned model was trained from, `laya-page-role-base`."},"job_id":{"type":"string","description":"The training job that made a fine-tuned model."},"metric":{"type":"object","properties":{"macro_f1":{"type":"number","description":"The validation macro-F1 of the epoch it was taken from."},"epoch":{"type":"integer","description":"Which epoch that was."}},"description":"A fine-tuned model's validation score."},"note":{"type":"string","description":"A fine-tuned model: one sentence saying that running it is coming."},"object":{"type":"string","description":"OpenAI's object type.","enum":["model"]},"owned_by":{"type":"string","description":"Who owns it.","enum":["weights.fyi","you"]},"kind":{"type":"string","description":"`classifier` for a page model, `llm` for a language model."},"input_modalities":{"type":"array","items":{"type":"string"},"description":"What it takes in, e.g. `text`."},"output_modalities":{"type":"array","items":{"type":"string"},"description":"What it gives back: `classification` or `text`."},"labels":{"type":"array","items":{"type":"string"},"description":"A classifier's labels."},"streaming":{"type":"boolean","description":"Whether its answers stream."},"operations":{"type":"array","items":{"type":"string","enum":["classify","batch","finetune","chat_completions"]},"description":"The calls that accept it now."},"supported_parameters":{"type":"array","items":{"type":"string"},"description":"Its options, e.g. `options.rejectIfBusy`."},"artifact_download":{"type":"boolean","description":"`true` when GET /v1/jobs/{job_id}/model.safetensors serves its weights: your own fine-tuned models."},"status":{"type":"string","description":"A language model: whether it answers calls yet.","enum":["available","not_yet_available"]},"context_tokens":{"type":["integer","null"],"description":"A language model: the most tokens a conversation may hold."},"measured":{"type":["object","null"],"properties":{"on":{"type":"string","description":"When it was measured."},"output_tokens_per_second":{"type":"object","properties":{},"description":"Answer tokens a second, by concurrent streams.","additionalProperties":{"type":"number"}},"first_token_seconds":{"type":"object","properties":{},"description":"The median seconds to the first answer token, by streams.","additionalProperties":{"type":"number"}}},"description":"A language model's measured speed, or `null`."},"price":{"type":"object","properties":{"usd_per_1m_prompt_tokens":{"type":"number"},"usd_per_1m_cached_tokens":{"type":"number"},"usd_per_1m_cache_write_tokens":{"type":"number"},"usd_per_1m_output_tokens":{"type":"number"},"basis":{"type":"string","description":"How a call is charged, or why no price can be set now."}},"description":"A language model's prices per 1M tokens, as a call admitted now keeps them."},"typical_ready_seconds":{"type":"number","description":"A language model: how long getting it ready takes now; it costs nothing."},"max_output_tokens":{"type":["integer","null"],"description":"The most tokens one answer can hold: the context window, which a call's prompt and answer share. `null` for a model that takes no tokens."},"pricing":{"type":["object","null"],"properties":{"unit":{"type":"string","description":"What the prices count.","enum":["tokens"]},"input_usd_per_1m":{"type":"number","description":"USD per 1M prompt tokens."},"output_usd_per_1m":{"type":"number","description":"USD per 1M answer tokens."},"cached_input_usd_per_1m":{"type":["number","null"],"description":"USD per 1M prompt tokens read from the cache."}},"required":["unit","input_usd_per_1m","output_usd_per_1m"],"description":"A language model's prices per 1M tokens in one shape for every model, or `null` when it is priced another way (GET /v1/quote) or has no price now."},"ready_timeout_seconds":{"type":["number","null"],"description":"How long one start of the model may take at most: where a caller waiting for it to become ready can stop. `null` when not known."},"aliases":{"type":["array","null"],"items":{"type":"string"},"description":"Other names `model` accepts for it. `null` when they cannot be read now."},"max_in_flight":{"type":["integer","null"],"description":"A language model: the calls it takes at once now."},"region":{"type":["string","null"],"description":"Where the model runs, when known."},"jurisdiction":{"type":["string","null"],"description":"The two-letter country code of that place, when known."},"jurisdictions":{"type":"array","items":{"type":"string"},"description":"Every code that place matches in `X-Weights-Jurisdictions`: its country, `EU`, `EEA`."}},"required":["id","name","can_run","can_train"],"description":"A model you can run or train, a language model of the service, or one you fine-tuned.","additionalProperties":true},"ModelAliases":{"type":"object","properties":{"object":{"type":"string","enum":["model.aliases"]},"model":{"type":"string"},"aliases":{"type":"object","properties":{"champion":{"type":["string","null"],"description":"The `champion` version's id, or `null`."},"challenger":{"type":["string","null"],"description":"The `challenger` version's id, or `null`."},"previous":{"type":["string","null"],"description":"The `previous` version's id, or `null`."}},"required":["champion","challenger","previous"],"additionalProperties":false},"changed":{"type":"boolean","description":"`false` when they already were these."},"registry":{"type":"array","items":{"$ref":"#/components/schemas/ModelRegistrySync"}}},"required":["object","model","aliases","changed"]},"ModelAliasesSet":{"type":"object","properties":{"aliases":{"type":"object","properties":{"champion":{"type":["string","null"],"description":"The `champion` version's id, or `null`."},"challenger":{"type":["string","null"],"description":"The `challenger` version's id, or `null`."},"previous":{"type":["string","null"],"description":"The `previous` version's id, or `null`."}},"required":["champion","challenger","previous"],"additionalProperties":false},"expected":{"type":"object","properties":{"champion":{"type":["string","null"],"description":"The `champion` version's id, or `null`."},"challenger":{"type":["string","null"],"description":"The `challenger` version's id, or `null`."},"previous":{"type":["string","null"],"description":"The `previous` version's id, or `null`."}},"required":["champion","challenger","previous"],"additionalProperties":false}},"required":["aliases","expected"],"description":"The aliases to set, applied only when they are `expected` now.","additionalProperties":false},"ModelArtifactRef":{"type":"object","properties":{"uri":{"type":"string","description":"Where the checkpoint is stored: a storage URI such as `s3://`, `r2://`, `gs://` or `https://`."},"sha256":{"type":"string","description":"The checkpoint's SHA-256; it must be the version's `weights_sha256` (the default).","pattern":"^[0-9a-f]{64}$"},"byte_size":{"type":"integer","description":"Its size in bytes.","minimum":1},"format":{"type":"string","description":"Its format; `safetensors` by default.","enum":["safetensors","safetensors+zstd","lora_adapter","merged_checkpoint","pt","onnx"]},"lora_rank":{"type":"integer","description":"A LoRA adapter's rank."},"head_calibration":{"type":"object","properties":{},"description":"The heads' calibration, kept as given.","additionalProperties":true}},"required":["uri","byte_size"],"description":"A version's weights kept outside the service, by reference instead of an inline bundle.","additionalProperties":true},"ModelPromote":{"type":"object","properties":{"version_id":{"type":"string","description":"The version to make the champion.","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@+-]*$"},"force":{"type":"boolean","description":"`true` to promote without its gate or beating the champion.","default":false},"companions":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"version_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@+-]*$"}},"required":["model","version_id"],"additionalProperties":false},"description":"Other specialists of one release, promoted in the same transaction by the same rules: every one or none."}},"required":["version_id"],"additionalProperties":false},"ModelPromotion":{"type":"object","properties":{"object":{"type":"string","enum":["model.promotion"]},"model":{"type":"string"},"version_id":{"type":"string"},"promoted":{"type":"boolean","description":"`false` when the version already was the champion: nothing changed."},"serving_status":{"type":"string","enum":["bundle_ready","metadata_only"]},"id":{"type":"integer","description":"The promotion's receipt."},"replaced_version_id":{"type":["string","null"],"description":"The champion it replaced, now `previous`."},"forced":{"type":"boolean"},"gate":{"type":"object","properties":{"candidate":{"type":"object","properties":{"macro_f1":{"type":"number"},"ece":{"type":"number"},"gate_passed":{"type":"boolean"}}},"champion":{"type":["object","null"],"properties":{"version_id":{"type":"string"},"macro_f1":{"type":"number"},"ece":{"type":"number"}}},"thresholds":{"type":"object","properties":{"gain_macro_f1":{"type":"number"},"hold_macro_f1":{"type":"number"},"gain_ece":{"type":"number"}}},"passed":{"type":"boolean"},"rule":{"type":["string","null"],"enum":["first_champion","macro_f1_gain","ece_gain_at_held_macro_f1",null]},"forced":{"type":"boolean"}},"description":"The rule the version met: a macro-F1 gain over the champion, or a lower calibration error at a held macro-F1."},"aliases":{"type":"object","properties":{"champion":{"type":["string","null"],"description":"The `champion` version's id, or `null`."},"challenger":{"type":["string","null"],"description":"The `challenger` version's id, or `null`."},"previous":{"type":["string","null"],"description":"The `previous` version's id, or `null`."}},"required":["champion","challenger","previous"],"additionalProperties":false},"registry":{"type":"array","items":{"$ref":"#/components/schemas/ModelRegistrySync"}},"companions":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"Each companion's promotion, in the same shape, in the order sent."}},"required":["object","model","version_id","promoted","aliases"]},"ModelRegistryRecord":{"type":"object","properties":{"sink_id":{"type":"integer","description":"The trace destination."},"run_id":{"type":["string","null"]},"registry_version":{"oneOf":[{"oneOf":[{"type":"integer"},{"type":"string"}],"description":"Its version number in that registry."},{"type":"null"}]},"synced_at":{"type":["string","null"],"format":"date-time"},"last_error":{"type":["string","null"],"description":"The last failure, until a sync succeeds."},"last_error_at":{"type":["string","null"],"format":"date-time"}},"required":["sink_id"],"description":"One trace destination's record of a version."},"ModelRegistrySync":{"type":"object","properties":{"sink_id":{"type":"integer","description":"The trace destination."},"ok":{"type":["boolean","null"],"description":"`true` once synced; `null` while another sync of the model is under way."},"versions":{"type":"object","properties":{},"description":"Version id to its version number in that registry.","additionalProperties":{}},"aliases":{"type":"object","properties":{},"description":"Alias to the registry version it was set to; `null` for one removed.","additionalProperties":{}},"pending":{"type":"boolean","description":"`true` when the sync was left to the one in progress."},"step":{"type":"string","description":"Where a failed sync stopped."},"error":{"type":"string","description":"Why it failed."},"status":{"type":"integer","description":"The HTTP status of the failed call."},"version_id":{"type":"string","description":"The version the failed call was for."}},"required":["sink_id","ok"],"description":"One trace destination's sync after a change."},"ModelVersion":{"type":"object","properties":{"object":{"type":"string","enum":["model.version"]},"model":{"type":"string","description":"The specialist."},"version_id":{"type":"string"},"recipe":{"type":"string"},"model_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"weights_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"dataset_sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"metrics":{"type":"object","properties":{},"description":"The metrics as registered.","additionalProperties":true},"has_bundle":{"type":"boolean","description":"Whether an inline bundle is registered."},"serving_status":{"type":"string","description":"`bundle_ready`: the service can execute it; `artifact_ready`: its weights are referenced; `metadata_only`: figures and digests only.","enum":["bundle_ready","artifact_ready","metadata_only"]},"aliases":{"type":"array","items":{"type":"string","enum":["champion","challenger","previous"]},"description":"The aliases that name it now."},"created_at":{"type":"string","format":"date-time"},"artifact_ref":{"$ref":"#/components/schemas/ModelArtifactRef"},"registry":{"type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/ModelRegistrySync"},{"$ref":"#/components/schemas/ModelRegistryRecord"}]},"description":"Its state in each MLflow trace destination of your workspace: after a change, the outcome of this call's sync; on a read, each destination's record."}},"required":["object","model","version_id","recipe","metrics","serving_status","aliases"],"description":"A registered version of a specialist."},"ModelVersionCreate":{"type":"object","properties":{"version_id":{"type":"string","description":"Your id for the version: letters, digits and `. _ : @ + -`, beginning with a letter or digit.","pattern":"^[A-Za-z0-9][A-Za-z0-9._:@+-]*$"},"recipe":{"type":"string","description":"The specialist's recipe.","enum":["laya-specialist/v1","laya-specialist-heads/v1"]},"model_sha256":{"type":"string","description":"The model document's SHA-256.","pattern":"^[0-9a-f]{64}$"},"weights_sha256":{"type":"string","description":"The weights' SHA-256.","pattern":"^[0-9a-f]{64}$"},"dataset_sha256":{"type":"string","description":"The training data's SHA-256.","pattern":"^[0-9a-f]{64}$"},"metrics":{"type":"object","properties":{"macro_f1":{"type":"number","description":"Held-out macro-F1.","minimum":0,"maximum":1},"ece":{"type":"number","description":"Expected calibration error.","minimum":0,"maximum":1},"gate_passed":{"type":"boolean","description":"Whether the version passed the trainer's own held-out gate; a version that passed becomes the challenger."},"heads":{"type":"object","properties":{},"description":"Per output or head of the specialist: `{metric: number}`.","additionalProperties":{"type":"object","properties":{},"additionalProperties":{"type":"number"}}},"calibration":{"type":"object","properties":{"sha256":{"type":"string","description":"The digest of the bundle's calibration.","pattern":"^[0-9a-f]{64}$"}},"description":"The calibration, kept as given.","additionalProperties":true}},"required":["macro_f1","ece","gate_passed"],"additionalProperties":{"type":"number","description":"Any other metric: a finite number, named with letters, digits, `_ . -` and `/`."}},"bundle":{"type":"object","properties":{"manifest":{"type":"object","properties":{},"description":"The bundle's signed manifest.","additionalProperties":true}},"description":"Optional: the signed bundle the service can execute, its manifest and every file it names inline, each of the manifest's length and SHA-256.","additionalProperties":true},"artifact_ref":{"$ref":"#/components/schemas/ModelArtifactRef"},"checkpoint_ref":{"$ref":"#/components/schemas/ModelArtifactRef"}},"required":["version_id","recipe","model_sha256","weights_sha256","dataset_sha256","metrics"],"description":"A trained version of a specialist. Send at most one of `bundle` and `artifact_ref` (`checkpoint_ref` is the same field).","additionalProperties":false},"ModelVersions":{"type":"object","properties":{"object":{"type":"string","enum":["model.versions"]},"model":{"type":"string"},"schema":{"type":"object","properties":{},"description":"The specialist's contract: its stage, outputs, heads and recipe.","additionalProperties":true},"aliases":{"type":"object","properties":{"champion":{"type":["string","null"],"description":"The `champion` version's id, or `null`."},"challenger":{"type":["string","null"],"description":"The `challenger` version's id, or `null`."},"previous":{"type":["string","null"],"description":"The `previous` version's id, or `null`."}},"required":["champion","challenger","previous"],"additionalProperties":false},"versions":{"type":"array","items":{"$ref":"#/components/schemas/ModelVersion"},"description":"Newest first, at most one page of them."},"has_more":{"type":"boolean","description":"Whether there are older versions."}},"required":["object","model","aliases","versions","has_more"]},"OpenAIError":{"type":"object","properties":{"error":{"type":"object","properties":{"message":{"type":"string","description":"One sentence for a person."},"type":{"type":"string","description":"OpenAI's error type, e.g. `authentication_error`, `overloaded`."},"code":{"type":"string","description":"The code a program acts on, e.g. `rate_limited`."},"request_id":{"type":"string","description":"The request's id (a UUID), also in `X-Request-Id`; yours when you sent one."},"retryable":{"type":"boolean"},"retry_after_seconds":{"type":"integer","minimum":1}},"required":["message","type","code"],"additionalProperties":true}},"required":["error"],"description":"A refusal on the chat and model-list calls, in OpenAI's shape."},"OwnTokenList":{"type":"object","properties":{"tokens":{"type":"array","items":{"$ref":"#/components/schemas/Token"}},"day":{"type":"string","enum":["UTC"]}},"required":["tokens","day"]},"PackCompletion":{"type":"object","properties":{"output_pack_uri":{"type":"string","description":"The output, within the tenant and the stage's `output_prefix_uri`."},"output_pack_sha256":{"type":"string","description":"The output bytes' SHA-256.","pattern":"^[0-9a-fA-F]{64}$"},"items_materialized":{"type":"integer","description":"Equal to the registered `item_count`.","minimum":0,"maximum":9223372036854775807},"model_sha256":{"type":"string","description":"Required for classifier and embedding work.","minLength":1},"seat_model":{"type":"string","description":"Through an agent seat: the leased model."},"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"Authored, not qualified."},"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0}},"required":["output_pack_uri","output_pack_sha256","items_materialized"],"description":"A pack's output receipt; further fields are kept and compared on replay. At most 1 MiB.","additionalProperties":true},"PackLease":{"type":"object","properties":{"lease_id":{"type":"string"},"lease_expires_ms":{"type":"integer","description":"Unix milliseconds."},"attempt_count":{"type":"integer","minimum":0},"failure_count":{"type":"integer","minimum":0},"dead_letter_reason":{"type":"string"},"dead_letter_history":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}},"progress":{"type":"object","properties":{},"description":"What the worker's last renewal stated of the pack, where it stated anything. An `embedding_drain` pack: `items_done` of `item_count`, `vectors_done` of `vectors_total`, `vectors_recoverable` (how many a replacement worker resumes from) and `vectors_per_second`.","additionalProperties":true},"last_heartbeat_ms":{"type":"integer","description":"When that renewal came, Unix milliseconds."},"heartbeat_count":{"type":"integer","minimum":0}},"description":"The pack's lease: its identity, expiry and retry history, and how far its worker says it is."},"PackReceipt":{"type":"object","properties":{"output_uri":{"type":["string","null"],"description":"Where the output is."},"output_sha256":{"type":["string","null"],"description":"The output's SHA-256."},"output_bytes":{"type":["integer","null"],"description":"The output's size.","minimum":0},"manifest_uri":{"type":"string","description":"The output's manifest, where written."},"model_identity":{"type":"object","properties":{},"description":"The model that made it, where supplied.","additionalProperties":true},"model_sha256":{"type":"string","description":"The model checkpoint's digest, where supplied."},"outcomes":{"type":"object","properties":{},"description":"Counts per outcome, where supplied.","additionalProperties":true},"output_pack_uri":{"type":"string","description":"The output as reported."},"output_pack_sha256":{"type":"string"},"items_materialized":{"type":"integer","minimum":0},"plan_id":{"type":"string"},"stage_id":{"type":"string"},"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0}},"description":"A completed pack's output receipt: location, digest, size and model identity where supplied, plus the receipt's own fields.","additionalProperties":true},"PackRegistered":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0},"item_count":{"type":"integer","minimum":1},"source_uri":{"type":["string","null"]},"r2_input_uri":{"type":["string","null"]},"sha256":{"type":["string","null"]},"compressed_bytes":{"type":["integer","null"],"minimum":0},"format":{"type":["string","null"]},"est_input_tokens":{"type":["integer","null"],"minimum":0},"est_output_tokens":{"type":["integer","null"],"minimum":0},"prefix_hash":{"type":["string","null"]},"source_shards":{"type":["array","null"],"items":{"type":"string"}},"source_probe":{"$ref":"#/components/schemas/SourceProbe"},"pack_sizing_advisory":{"$ref":"#/components/schemas/PackSizingAdvisory"}},"required":["plan_id","stage_id","pack_id","ordinal","item_count"],"description":"The normalised registration, without `state`, `lazy`, `verify_source` and `max_pending_packs`.","additionalProperties":true},"PackRegistration":{"type":"object","properties":{"pack_id":{"type":"string","description":"Immutable, unique within the stream.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"ordinal":{"type":["integer","null"],"description":"The pack's order; omitted or null, the next ordinal or this pack's own.","minimum":0,"maximum":9223372036854775807},"item_count":{"type":"integer","description":"Records in the pack.","minimum":1,"maximum":9223372036854775807},"state":{"type":["string","null"],"description":"`lazy` reserves work without reading it; `pending` (or null) is runnable. The boolean `lazy` is an alternative; both must agree.","enum":["lazy","pending",null]},"source_uri":{"type":"string","description":"The source; a lazy pointer may name a prefix. See `GET /v1/compute/capabilities`."},"r2_input_uri":{"type":["string","null"],"description":"Input already prepared in your tenant's storage; takes precedence over `source_uri`."},"sha256":{"type":["string","null"],"description":"The fetched bytes' SHA-256, before decompression; with a range, of that range only. Required on a runnable pack.","pattern":"^[0-9a-fA-F]{64}$"},"compressed_bytes":{"type":["integer","null"],"description":"Bytes fetched; required on a runnable pack.","minimum":0,"maximum":9223372036854775807},"est_input_tokens":{"type":["integer","null"],"description":"Zero by default for `source_uri` input; required with `r2_input_uri`.","minimum":0,"maximum":9223372036854775807},"est_output_tokens":{"type":["integer","null"],"description":"Zero by default for `source_uri` input; required with `r2_input_uri`.","minimum":0,"maximum":9223372036854775807},"byte_range":{"type":"array","items":{"type":"integer","minimum":0,"maximum":9223372036854775807},"description":"`[start, end]`, `0 <= start < end`, end exclusive; `compressed_bytes` is `end - start`.","minItems":2,"maxItems":2},"format":{"type":"string","description":"`parquet`, `arrow_ipc`, `lance`, `jsonl_zst`, `jsonl` or `safetensors`; custom labels are kept.","minLength":1},"source_shards":{"type":["array","null"],"items":{"type":"string","minLength":1},"description":"Shard identifiers."},"prefix_hash":{"type":["string","null"],"description":"A prefix hint."},"max_pending_packs":{"type":"integer","description":"This call's admission limit instead of the stage's.","minimum":1},"plan_id":{"type":"string","description":"If present, must match the resolved plan."},"stage_id":{"type":"string","description":"If present, must match the authored stage identifier."},"verify_source":{"type":"boolean","description":"Read the source by a short range before registering."}},"required":["pack_id","item_count"],"description":"One pack: runnable, or a lazy pointer to promote later by reposting it with `state: pending`. Unknown fields are kept and take part in replay comparison.","additionalProperties":true},"PackSizing":{"type":"object","properties":{"pack_id":{"type":["string","null"],"description":"The pack; null for a materializer's uniform pack or a declared mean."},"item_count":{"type":"integer"},"compressed_bytes":{"type":["integer","null"]},"est_input_tokens":{"type":["integer","null"]},"estimated_seconds":{"type":"number","description":"Its wall clock at the rate; a floor where the rate is `supplied`."},"governed_by":{"type":"string","description":"The stated size that gives the longest estimate.","enum":["item_count","compressed_bytes","est_input_tokens"]},"times_target":{"type":"number","description":"`estimated_seconds` over the window."},"split_into":{"type":"integer","description":"How many packs of the recommended size it is."},"oversized":{"type":"boolean","description":"Whether it runs past the window."}},"required":["item_count","estimated_seconds","governed_by","oversized"],"description":"One pack against what an interruption may cost.","additionalProperties":true},"PackSizingAdvisory":{"type":"object","properties":{"schema":{"type":"string","description":"`weights.pack-sizing-advisory/v1`."},"ok":{"type":"boolean","description":"`false` when a pack runs past the window. A warning: the plan or pack is admitted either way."},"target_pack_seconds":{"type":"number","description":"What one interruption may cost a pack: 300."},"target_basis":{"type":"string","description":"Why that figure."},"why":{"type":"string","description":"Why an oversized pack can lose its work."},"stages":{"type":"array","items":{"type":"object","properties":{"stage_id":{"type":"string"},"kind":{"type":"string"},"model":{"type":["string","null"]},"assessed":{"type":"boolean","description":"`false` where no co-resident rate is recorded for the model; `reason` says so."},"reason":{"type":"string","description":"Present when not assessed."},"rate":{"$ref":"#/components/schemas/PackSizingRate"},"recommended":{"$ref":"#/components/schemas/PackSizingCeiling"},"packs_declared_as":{"type":"string","description":"What of the stage's packs the submission declares.","enum":["inline_packs","uniform_packs","declared_mean","none"]},"packs_assessed":{"type":"integer"},"packs_oversized":{"type":"integer"},"oversized_pack_ids":{"type":"array","items":{"type":"string"}},"largest":{"oneOf":[{"$ref":"#/components/schemas/PackSizing"},{"type":"null"}]}},"required":["stage_id","kind","assessed"],"additionalProperties":true},"description":"Each `classifier_drain` and `embedding_drain` stage."},"findings":{"type":"array","items":{"type":"object","properties":{"severity":{"type":"string","enum":["warning"]},"code":{"type":"string","enum":["preemptible_pack_too_large"]},"stage_id":{"type":"string"},"message":{"type":"string","description":"The estimate, the cause and the shard ceiling, in one sentence each."}},"required":["severity","code","stage_id","message"]},"description":"One warning for each stage with a pack past the window."}},"required":["schema","ok"],"description":"What a plan's pack stages would lose to one interruption. Capacity can be withdrawn while work runs, and a pack is the unit that is lost: one still in flight then is leased again from its first item. On a pack registration the object is that one pack's `PackSizing` with `ok`, `rate` and `recommended` (and `code` and `message` when it is oversized); on a batch, the `rate` and `recommended` once with the `oversized` packs.","additionalProperties":true},"PackSizingCeiling":{"type":"object","properties":{"pack_seconds":{"type":"number","description":"The window: what one interruption may cost a pack, in seconds."},"max_item_count":{"type":"integer","description":"The most items a pack that finishes inside it holds."},"max_compressed_bytes":{"type":"integer","description":"Its most compressed bytes, where the rate reads them."},"max_est_input_tokens":{"type":"integer","description":"Its most input tokens, where the rate reads them."}},"required":["pack_seconds","max_item_count"],"description":"The shard ceiling to keep to."},"PackSizingRate":{"type":"object","properties":{"items_per_second":{"type":"number","description":"Items one pack drains a second beside the other work it shares capacity with."},"compressed_bytes_per_second":{"type":["number","null"],"description":"Compressed bytes a second; null where the rate reads none."},"input_tokens_per_second":{"type":["number","null"],"description":"Input tokens a second; null where the rate reads none."},"basis":{"type":"string","description":"`measured` on our own capacity; `supplied` with an incident, until a measured rate replaces it.","enum":["measured","supplied"]},"source":{"type":"string","description":"Where the figure comes from."}},"required":["items_per_second","basis","source"],"description":"The co-resident paced speed a pack is judged at."},"PackStatus":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"stream_id":{"type":"string"},"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0},"state":{"type":"string","description":"The stored state: `lazy`, `pending`, a leased state while it runs, `completed`, `expired_incomplete`, `dead_lettered`, `dead_letter_accepted` or `cancelled`."},"lease":{"oneOf":[{"$ref":"#/components/schemas/PackLease"},{"type":"null"}]},"lease_expires_ms":{"type":["integer","null"]},"receipt":{"oneOf":[{"$ref":"#/components/schemas/PackReceipt"},{"type":"null"}]}},"required":["plan_id","stage_id","stream_id","pack_id","ordinal","state","lease","receipt"]},"PackUploaded":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"stream_id":{"type":"string"},"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0},"item_count":{"type":"integer","minimum":1},"format":{"type":"string"},"r2_input_uri":{"type":"string","description":"The stored object; register it on another stream of the plan without sending the bytes again."},"sha256":{"type":"string"},"compressed_bytes":{"type":"integer","minimum":1},"est_input_tokens":{"type":"integer","minimum":0},"est_output_tokens":{"type":"integer","minimum":0},"replayed":{"type":"boolean","description":"`true` when the same bytes were already registered for this pack."}},"required":["plan_id","stage_id","stream_id","pack_id","r2_input_uri","sha256","compressed_bytes","replayed"],"description":"The registration an upload made.","additionalProperties":true},"PlanAccounting":{"type":"object","properties":{"schema":{"type":"string","enum":["weights.plan-accounting/v1"]},"funding_mode":{"type":"string","description":"The plan's monetary authority.","enum":["plan_cap","operator_epoch"]},"budget_usd_micros":{"type":["integer","null"],"description":"Lifetime plan cap, null for operator_epoch.","minimum":1},"spend_usd_micros":{"type":"integer","description":"What the plan has cost so far.","minimum":0},"committed_usd_micros":{"type":"integer","description":"Spend committed by usage receipts.","minimum":0},"reserved_usd_micros":{"type":"integer","description":"Credit held reserved for work in flight, not yet spent or released.","minimum":0},"open_reservations":{"type":"integer","description":"How many reservations are open.","minimum":0},"campaign_only_spend_usd_micros":{"type":"integer","description":"The part of the spend recorded against the plan without a stage.","minimum":0},"campaign_only_reserved_usd_micros":{"type":"integer","description":"The part of the reservations held against the plan without a stage.","minimum":0},"remaining_usd_micros":{"type":["integer","null"],"description":"The budget less spend and reservations; null for operator_epoch.","minimum":0},"last_receipt_seq":{"type":["integer","null"],"description":"The sequence of the plan's latest usage receipt, or null before one."},"state":{"type":"string","description":"`open`: work may still commit spend. `settling`: the plan has ended and reservations remain open. `final`: nothing more can commit.","enum":["open","settling","final"]},"final":{"type":"boolean","description":"`true` when `state` is `final`."}},"required":["schema","budget_usd_micros","spend_usd_micros","committed_usd_micros","reserved_usd_micros","open_reservations","remaining_usd_micros","state","final"],"description":"The plan's money: its budget, what it spent, what it holds reserved and what is left. Waiting in the queue spends nothing."},"PlanConsolidation":{"type":"object","properties":{"moved_packs":{"type":"integer","minimum":0},"reopened_stages":{"type":"array","items":{"type":"string"},"description":"Stages of this plan reopened to take the packs."},"reason":{"type":"string"},"replayed":{"type":"boolean","description":"`true` when every listed plan was already superseded by this one; nothing moved."},"superseded":{"type":"array","items":{"type":"object","properties":{"plan_id":{"type":"string"},"already_superseded":{"type":"boolean"},"from_state":{"type":"string"},"cancelled":{"type":"boolean"},"moved_packs":{"type":"integer","minimum":0},"moved_dead_lettered":{"type":"integer","minimum":0},"stages":{"type":"array","items":{"type":"object","properties":{"from_stage_id":{"type":"string"},"to_stage_id":{"type":"string"},"packs":{"type":"integer","minimum":0}}}}},"additionalProperties":true},"description":"One entry per listed plan."}},"description":"What a consolidation moved.","additionalProperties":true},"PlanList":{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"plan_id":{"type":"string"},"operation_key":{"type":"string"},"tenant_id":{"type":"string"},"state":{"type":"string","enum":["queued","waiting_price","ready_to_wake","waiting_capacity","executing","completed","failed","cancelled"]},"continuous":{"type":"boolean","description":"At least one stage is a continuous stream."},"created_at_ms":{"type":"integer"},"updated_at_ms":{"type":"integer"},"wake_policy":{"type":"string","enum":["standard","scavenger_stream","piggyback"]},"qos_priority":{"type":["string","null"],"description":"The declared QoS class, or null."},"qos_class":{"type":"string","description":"How the plan is treated.","enum":["standard","flex"]},"window_start_ms":{"type":"integer"},"until_ms":{"type":"integer"},"pack_counts":{"type":"object","properties":{},"description":"Packs per state, summed over stages.","additionalProperties":{"type":"integer","minimum":0}},"leases_live":{"type":"integer","minimum":0},"total_accrued_cost_usd_micros":{"type":"integer","minimum":0},"submitted_by":{"type":"object","properties":{"person_id":{"type":["integer","null"],"description":"The person behind the credential that submitted the plan."},"token_id":{"type":["integer","null"],"description":"The key it was submitted with; `null` for a signed-in session."}},"required":["person_id","token_id"],"description":"Who submitted the plan, recorded when it was admitted. Both `null`: the submitter was not recorded (a plan admitted before 16 November 2026 names it only where its payload's `tenancy.actor_email` matched one member)."},"stages":{"type":"array","items":{"type":"object","properties":{"stage_id":{"type":"string"},"stream_id":{"type":"string"},"needs":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["classifier_drain","embedding_drain","llm_batch_drain","cpu_scavenger","scavenge_label","finetune","live_session_pool"]},"model":{"type":["string","null"]},"state":{"type":"string"},"stream_sealed":{"type":"boolean"},"continuous":{"type":"boolean"},"packs_total":{"type":"integer"},"packs_completed":{"type":"integer"},"items_completed":{"type":"integer"},"steps_completed":{"type":"integer"},"accrued_cost_usd_micros":{"type":"integer"},"pack_counts":{"type":"object","properties":{},"description":"The stage's packs per stored state, zeros included.","additionalProperties":{"type":"integer","minimum":0}},"leases_live":{"type":"integer","description":"Unexpired leases workers hold; never named.","minimum":0}},"additionalProperties":true}}},"required":["plan_id","state","stages"],"description":"One plan in a list.","additionalProperties":true},"description":"Newest admission first."},"next_cursor":{"type":["string","null"],"description":"Send it as `cursor`, with the same filters, for the next page; null on the last."},"limit":{"type":"integer","minimum":1,"maximum":200}},"required":["plans","next_cursor","limit"]},"PlanPlacement":{"type":"object","properties":{"placement_mode":{"type":"string","description":"`existing_byoc_only` runs the plan only on capacity that already runs and never starts more; `default` adds no such limit.","enum":["default","existing_byoc_only"],"default":"default"},"allow_provisioning":{"type":"boolean","description":"`false` forbids starting capacity for this plan. Default: `false` for `placement_mode: existing_byoc_only` and for a nonempty `allowed_node_ids`, `true` otherwise. A standing plan starts nothing while it stands, whatever this field says, and once promoted reads it as given. A plan with either of those two never starts capacity, whatever this field says."},"requires_cold_boot":{"type":"boolean","description":"`false` forbids starting capacity for this plan, as `allow_provisioning: false` does."},"blocks_node_teardown":{"type":"boolean","description":"`false` lets capacity stop while the plan still has work; the work then waits for capacity again."},"allowed_node_ids":{"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"description":"The `node_id` of each of your enrolled workers the plan may run on. Empty, the default: any worker its tenancy admits. Nonempty: only a listed worker is handed the plan's work and counts as its capacity, and the plan uses existing capacity only, as `existing_byoc_only` does.","default":[]},"pool_id":{"type":["string","null"],"description":"A pool identifier. Checked and stored with the plan; this build does not yet use it to place work.","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},"description":"Optional limits on the capacity a plan may start or hold. Any of `placement_mode: existing_byoc_only`, `allow_provisioning: false`, `requires_cold_boot: false` or a nonempty `allowed_node_ids` makes the plan wait for capacity that already runs instead of starting its own.","additionalProperties":false},"PlanReadiness":{"type":"object","properties":{"ready":{"type":"boolean","description":"The plan is not terminal and at least one stage is executing or has a lease ready."},"stages_total":{"type":"integer","minimum":0},"stages_ready":{"type":"integer","description":"Stages executing or lease-ready.","minimum":0},"stages_terminal":{"type":"integer","description":"Completed, failed or cancelled stages.","minimum":0},"active_workers":{"type":"integer","description":"Distinct workers holding an unexpired lease on the plan; never named.","minimum":0},"capacity":{"type":["object","null"],"properties":{"state":{"type":"string","description":"`held` while the price or window does not allow it.","enum":["requested","serving","held","released"]},"fleet_width_g":{"type":["integer","null"],"description":"The width of capacity requested."},"until_ms":{"type":["integer","null"]},"updated_at_ms":{"type":"integer"}},"description":"This plan's capacity request, or null before one is made."}},"description":"Whether the plan's work can run now.","additionalProperties":true},"PlanReceipt":{"type":"object","properties":{"plan_id":{"type":"string"},"operation_key":{"type":"string"},"tenancy":{"$ref":"#/components/schemas/PlanTenancy"},"schedule":{"$ref":"#/components/schemas/PlanSchedule"},"state":{"type":"string","enum":["queued","waiting_price","ready_to_wake","waiting_capacity","executing","completed","failed","cancelled"]},"continuous":{"type":"boolean","description":"At least one stage is a continuous stream, so `completed` is not final."},"stages":{"type":"array","items":{"$ref":"#/components/schemas/StageReceipt"},"description":"In submission order."},"lp_summary":{"type":["object","null"],"properties":{},"description":"Planning estimates and allocation details; neither completion evidence nor final charges.","additionalProperties":true},"last_event_seq":{"type":"integer","description":"This plan's greatest event sequence, or zero; pass it as `after_seq`.","minimum":0},"total_accrued_cost_usd_micros":{"type":"integer","description":"The stages' accrued cost; 1,000,000 units are one US dollar."},"outcome":{"$ref":"#/components/schemas/DeliveryOutcome"},"coverage":{"type":"object","properties":{"packs_total":{"type":"integer","minimum":0},"packs_completed":{"type":"integer","minimum":0},"packs_dead_lettered":{"type":"integer","minimum":0},"packs_dead_letter_accepted":{"type":"integer","minimum":0},"packs_expired_incomplete":{"type":"integer","minimum":0},"packs_cancelled":{"type":"integer","minimum":0},"packs_open":{"type":"integer","minimum":0}},"description":"Pack counts over every stage; `packs_open` are those still lazy, pending or leased."},"spend_usd_micros":{"type":"integer","description":"What the plan has cost so far; the same figure as `accounting.spend_usd_micros`.","minimum":0},"accounting":{"$ref":"#/components/schemas/PlanAccounting"},"packs_dead_lettered":{"type":"integer","description":"Dead-lettered packs over every stage.","minimum":0},"packs_expired_incomplete":{"type":"integer","description":"Packs the window's end expired, over every stage.","minimum":0},"packs_dead_letter_accepted":{"type":"integer","description":"Packs whose loss was accepted, over every stage.","minimum":0},"readiness":{"$ref":"#/components/schemas/PlanReadiness"}},"required":["plan_id","state","stages"],"description":"A plan's receipt: admission, reads, promotion, cancellation, completion and failure answer it. `state` is the lifecycle; `outcome` and `coverage` say what the packs delivered, so a `completed` plan with lost packs does not read as clean; `accounting` is the money. A failed or cancelled stage carries its `failure`. The receipt holds neither the full workload nor a completed stage's result; read events for those.","additionalProperties":true},"PlanSchedule":{"type":"object","properties":{"window_start_ms":{"type":"integer","description":"When the window opens, in Unix milliseconds.","minimum":0,"maximum":9223372036854775807},"until_ms":{"type":"integer","description":"When the window closes, in Unix milliseconds; after `window_start_ms`.","minimum":0,"maximum":9223372036854775807},"prefer_low_cost_window":{"type":"boolean","description":"Prefer the lower-cost times of the window.","default":true},"max_hourly_usd_micros":{"type":["integer","null"],"description":"A ceiling on the plan's hourly spend, in micro-dollars; null for none.","minimum":0,"maximum":9223372036854775807},"wake_policy":{"type":"string","description":"`standard` may start capacity within the hourly ceiling; `scavenger_stream` and `piggyback` are standing: they run only alongside work already running.","enum":["standard","scavenger_stream","piggyback"],"default":"standard"},"incomplete":{"type":"string","description":"What the window's end does to unfinished packs: `fail` (alias `require_all`) or `ok` (alias `allow_incomplete`), which needs a stream stage and makes the plan standing.","enum":["fail","ok","require_all","allow_incomplete"]},"requires_cold_boot":{"type":"boolean","description":"Whether the plan may start capacity of its own. `false` keeps it to capacity that already runs; a standing plan is always `false`. The receipt states the value in force."},"blocks_node_teardown":{"type":"boolean","description":"Whether capacity that serves the plan is kept running until its work ends. `false` lets it stop under the plan; a standing plan is always `false`. The receipt states the value in force."},"qos_priority":{"type":"string","description":"The QoS tier. `priority`, `interactive` and `standard` resolve to the standard class, the rest to flex; each tier also implies a priority weight (see `priority_weight`). `qos_tier` and `qos` are aliases, read in that order.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos_tier":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"priority_weight":{"type":"integer","description":"How strongly this work is preferred when work of several plans shares capacity: heavier work is woken first, and running work shares a model's sessions in proportion to its weight. Left out, the QoS tier's weight: `priority` 4, `interactive` 3, `standard` 2, every flex tier 1. A weight never starts capacity by itself.","minimum":1,"maximum":16},"min_remaining_window_ms":{"type":"integer","description":"A pack is handed out only while at least this much of the window is left, in milliseconds.","minimum":1,"maximum":9223372036854775807},"est_duration_ms":{"type":"integer","description":"How long one pack is expected to take, in milliseconds; used by `skip_unfinishable_packs`.","minimum":1,"maximum":9223372036854775807},"skip_unfinishable_packs":{"type":"boolean","description":"`true` stops handing out a pack whose own estimated duration no longer fits in what is left of the window. Read from the schedule."}},"required":["window_start_ms","until_ms"],"description":"The window and policies a plan runs under. `schedule_window` is an alias of `schedule`. An unknown field is refused with `400 invalid_compute_plan`.","additionalProperties":false},"PlanSubmission":{"type":"object","properties":{"plan_id":{"type":"string","description":"Globally unique. Leave it out and the service mints one no one can name first; the receipt carries it.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"operation_key":{"type":"string","description":"Unique within the account and tenant; replay protection.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"tenancy":{"$ref":"#/components/schemas/PlanTenancy"},"schedule":{"$ref":"#/components/schemas/PlanSchedule"},"schedule_window":{"$ref":"#/components/schemas/PlanSchedule","description":"An alias of `schedule`. Send either; when both are sent they must be equal."},"placement":{"oneOf":[{"$ref":"#/components/schemas/PlanPlacement"},{"type":"null"}]},"stages":{"type":"array","items":{"$ref":"#/components/schemas/StageSpec"},"minItems":1},"lazy":{"type":"boolean","description":"Hold the plan `queued` until the service releases it; promotion does not release it. Omit it for ordinary submission.","default":false},"required_models":{"type":"array","items":{"type":"object","properties":{"model_id":{"type":"string","minLength":1},"role":{"type":"string","description":"At most one `primary`.","minLength":1},"tp_degree":{"type":["integer","null"],"description":"The primary model's parallel width; with the model it must name a layout the catalogue qualifies.","minimum":1,"maximum":4294967295}},"required":["model_id","role"]}},"webhook_url":{"type":["string","null"],"description":"Accepted as metadata; it does not set up delivery. Use `notify`.","minLength":1},"notify":{"type":["object","null"],"properties":{"sink_id":{"type":"integer","description":"The `id` of one of your `webhook` trace sinks (`POST /v1/trace-sinks`). Another account's sink answers `404 sink_not_found`; another kind `400 notify_sink_not_webhook`.","minimum":1},"events":{"type":"array","items":{"type":"string","minLength":1},"description":"Public event names to receive, each once; empty or left out: every public event. Stored sorted.","default":[],"uniqueItems":true}},"required":["sink_id"],"description":"Push the plan's events to your webhook sink, one signed JSON line each (`schema: weights.compute-event/v1`). `null` is the same plan as none.","additionalProperties":false},"verify_source":{"type":"boolean","description":"Check every mount and inline manifest entry before admission."},"metadata":{"type":"object","properties":{},"description":"Your own fields, stored with the plan.","additionalProperties":true}},"required":["operation_key","tenancy","stages"],"description":"A ComputePlan: stages with dependencies, a schedule and a budget. At most 1 MiB of JSON. `schedule` or its alias `schedule_window` is required. The plan, its tenancy, schedule, placement, each stage and each workload take only the fields listed here: an unknown field, such as a misspelt one, is refused with `400 invalid_compute_plan`, never ignored.","additionalProperties":false,"anyOf":[{"required":["schedule"]},{"required":["schedule_window"]}]},"PlanTenancy":{"type":"object","properties":{"tenant_id":{"type":"string","description":"Your tenant; your account must hold a grant on it and the organisation.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"org_slug":{"type":"string","description":"The organisation.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"platform":{"type":"string","description":"Where the work comes from, e.g. `api`.","minLength":1},"funding_mode":{"type":"string","description":"Defaults to plan_cap. operator_epoch requires an operator/admin credential and uses the fleet FlushBudget envelope.","enum":["plan_cap","operator_epoch"]},"max_budget_usd_micros":{"type":"integer","description":"Positive for plan_cap; exactly zero for operator_epoch. 1,000,000 units are one US dollar.","minimum":0,"maximum":9223372036854775807},"container_id":{"type":["string","null"],"description":"Your own container identifier, echoed in events.","minLength":1},"actor_email":{"type":["string","null"],"description":"Who submitted the plan.","minLength":1},"colocation_policy":{"type":"string","description":"Whether the work may share capacity with other work (`shared_pool_ok`, the default) or must run on capacity of its own.","enum":["shared_pool_ok","dedicated_node"],"default":"shared_pool_ok"},"privacy_rung":{"type":"string","description":"The privacy level the work runs under.","enum":["rung1_standard","rung2_enclave_tls","rung3_sealed_envelope"],"default":"rung1_standard"},"funding":{"type":["string","null"],"description":"Who pays for the capacity the work runs on. `byoc_self_funded`: your own enrolled workers only, at a capacity rate of zero. `platform_shared`: the service's shared capacity, at its rate. Omitted or null is read as `platform_shared`.","enum":["byoc_self_funded","platform_shared",null]}},"required":["tenant_id","org_slug","platform","max_budget_usd_micros"],"description":"Who owns the plan and its budget. An unknown field is refused with `400 invalid_compute_plan`.","additionalProperties":false},"QuoteFinetune":{"type":"object","properties":{"model":{"type":"string","description":"The base the job would train."},"kind":{"type":"string","enum":["finetune"]},"dataset":{"type":["string","null"],"description":"The dataset you named, or `null` when you gave row counts."},"recipe":{"type":"string","description":"The recipe the estimate is for."},"epochs":{"type":"integer","description":"The number of epochs the estimate is for."},"train_rows":{"type":"integer","description":"The training rows counted."},"validation_rows":{"type":"integer","description":"The validation rows counted."},"pages_per_epoch":{"type":"integer","description":"The training pages one epoch trains."},"estimate_training_tokens":{"type":"integer","description":"Epochs x training pages x the tokens a page usually holds."},"usd_per_1m_training_tokens":{"type":"number","description":"The price per 1M training tokens."},"estimate_usd_for_job":{"type":"number","description":"The estimate for the whole job in US dollars."},"estimate":{"type":"boolean","description":"`true`: the job is charged for the tokens it trains."},"basis":{"type":"string","description":"The estimate in words."}},"required":["model","kind","estimate_usd_for_job"],"description":"A training job's estimate.","examples":[{"model":"laya-page-role-base","kind":"finetune","dataset":null,"recipe":"laya-page-role/v2","epochs":10,"train_rows":20000,"validation_rows":5000,"pages_per_epoch":20000,"estimate_training_tokens":226683125,"usd_per_1m_training_tokens":0.006127,"estimate_usd_for_job":1.3888888888888888,"estimate":true,"basis":"An estimate: 10 epochs over 20,000 training pages at about 1,133 tokens a page, the tokens our trainer fed a page of a real release, about 226,683,125 training tokens at $0.0061 per 1M. The validation pass is not charged."}]},"QuoteFinetuneRequest":{"type":"object","properties":{"kind":{"type":"string","description":"`finetune`: the only quote that takes a body.","enum":["finetune"]},"recipe":{"type":"string","description":"The recipe to estimate; `laya-page-role/v2` when left out.","minLength":1},"model":{"type":"string","description":"The base to train; the recipe's default base, or the dataset's own, when left out.","minLength":1},"dataset":{"type":"string","description":"The dataset to quote for, yours and `ready`; its row counts are used. Name it or `train_rows`.","pattern":"^ds_[0-9a-f]{24}$"},"train_rows":{"type":"integer","description":"With no dataset: the training rows.","minimum":1},"validation_rows":{"type":"integer","description":"With `train_rows`: the validation rows; default 0.","minimum":0},"options":{"type":"object","properties":{},"description":"The options the job would be created with: `epochs`, `patience`, `seed`, `checkpoint_seconds`, and the recipe's own, such as `num_generations`, `teacher_model` or `verifier` for a `grpo` or `opd` recipe. One outside the recipe's bounds, or not the recipe's, answers `400 option_out_of_range`.","additionalProperties":true}},"required":["kind"],"description":"A training job to estimate.","additionalProperties":false,"examples":[{"kind":"finetune","recipe":"laya-student-lora-sft/v1","model":"qwen3.5-4b","train_rows":20000,"validation_rows":1000,"options":{"epochs":3,"lora_rank":16}}]},"QuoteLlm":{"type":"object","properties":{"model":{"type":"string","description":"The language model priced."},"kind":{"type":"string","description":"`llm`, or `classifier` or `extractor` for a specialist."},"usd_per_1m_prompt_tokens":{"type":"number"},"usd_per_1m_cached_tokens":{"type":"number"},"usd_per_1m_cache_write_tokens":{"type":"number"},"usd_per_1m_output_tokens":{"type":"number"},"input_usd_micros_per_million":{"type":"integer","description":"The prompt price in micro-dollars per 1M tokens."},"output_usd_micros_per_million":{"type":"integer","description":"The output price in micro-dollars per 1M tokens."},"basis":{"type":"string","description":"How a call is charged."}},"required":["model","kind","basis"],"description":"A language model's prices per 1M tokens."},"QuotePages":{"type":"object","properties":{"model":{"type":"string","description":"The model priced."},"pages":{"type":"integer","description":"The number of pages priced."},"usd_per_1m_pages":{"type":"number","description":"The price of 1,000,000 pages answered, in US dollars."},"estimate_usd_for_job":{"type":"number","description":"The job's price: `pages` x `usd_per_1m_pages` / 1,000,000."},"estimate_usd_per_1000_pages":{"type":"number","description":"The same per 1,000 pages, equal for every size of job."},"typical_ready_seconds":{"type":"number","description":"How long getting the model ready takes now, in seconds; it costs nothing."},"typical_ready_basis":{"type":"string","description":"Where that figure comes from."},"basis":{"type":"string","description":"The price in words."}},"required":["model","pages","usd_per_1m_pages","estimate_usd_for_job"],"description":"A page job's price."},"ReleasedOrphanedHolds":{"type":"object","properties":{"released_holds":{"type":"integer","minimum":0},"released_usd":{"type":"number"},"released_usd_micros":{"type":"integer","minimum":0},"by_reason":{"type":"object","properties":{},"additionalProperties":{"type":"object","properties":{"holds":{"type":"integer","minimum":0},"usd_micros":{"type":"integer","minimum":0},"words":{"type":"string"}},"required":["holds","usd_micros","words"]}},"holds":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"reference":{"type":"string"},"amount_usd_micros":{"type":"integer","minimum":1},"why":{"type":"string"},"why_words":{"type":"string"},"incident_id":{"type":"integer","description":"The audit event recording it as an incident."}},"required":["id","reference","amount_usd_micros","why","why_words","incident_id"]}}},"required":["released_holds","released_usd","released_usd_micros","by_reason","holds"]},"ResultEpoch":{"type":"object","properties":{"epoch":{"type":"integer"},"accuracy":{"type":"number","description":"Validation accuracy."},"brier":{"type":"number","description":"Brier score."},"ece":{"type":"number","description":"Expected calibration error."},"f1":{"type":"object","properties":{},"description":"F1 per label.","additionalProperties":{"type":"number"}},"macro_f1":{"type":"number"},"nll":{"type":"number","description":"Negative log-likelihood."},"pages":{"type":"integer","description":"Validation pages."},"confusion":{"description":"The confusion matrix over the five labels."},"improved":{"type":"boolean","description":"Whether it beat every earlier epoch."},"elapsed_seconds":{"type":["number","null"]},"recorded_at":{"type":"string","format":"date-time","description":"When the service recorded it."}},"required":["epoch","improved"],"description":"One finished epoch's validation metrics.","additionalProperties":true},"ResultPageJob":{"type":"object","properties":{"job_id":{"type":"string","description":"The job's identifier."},"status":{"type":"string","description":"The job's status.","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED"]},"results":{"type":"array","items":{"$ref":"#/components/schemas/ResultRow"},"description":"The finished rows after `after`, in `seq` order, at most `limit`; an unbroken run stopping before the first unfinished row."},"next_after":{"type":["integer","null"],"description":"The `seq` to send as `after` next, or `null` when this answer reaches the job's last page."},"complete":{"type":"boolean","description":"`true` once the job has finished and this answer reached its last row."}},"required":["job_id","status","results","next_after","complete"],"description":"A page job's results."},"ResultRow":{"type":"object","properties":{"seq":{"type":"integer","description":"The page's sequence number, 1 for the first page you sent.","minimum":1},"id":{"type":["string","null"],"description":"Your own identifier for the page, as text."},"input_sha":{"type":"string","description":"The SHA-256 of the page's UTF-8 text, 64 hexadecimal characters."},"label":{"type":["string","null"],"description":"The role the model gives the page; `null` until the page is done.","enum":["detail","listing","landing","not_vacancy","unresolved",null]},"probabilities":{"type":["object","null"],"properties":{},"description":"The calibrated probability of each of the five labels.","additionalProperties":{"type":"number"}},"status":{"type":"string","description":"`done`; `failed`; `cancelled` (stopped before it was sent); or not answered yet, `queued` (waiting) or `leased` (with the model).","enum":["done","failed","cancelled","queued","leased"]},"error":{"type":["string","null"],"description":"Why a page failed: `page_too_large`, the model's own code, or `max_tries:` and the last fault's code."}},"required":["seq","id","input_sha","label","probabilities","status","error"],"description":"One page's result; its text is never returned."},"ResultTraining":{"type":"object","properties":{"job_id":{"type":"string"},"kind":{"const":"finetune"},"status":{"type":"string","description":"The job's status.","enum":["QUEUED","RUNNING","SUCCEEDED","FAILED","CANCELLED"]},"state":{"type":"string","description":"Where the training is; `done` once the job is finished.","enum":["queued","preparing","training","moving","finishing","done"]},"stop_reason":{"type":["string","null"],"description":"`epoch_limit`, `validation_patience`, `cancelled`, `failed`, or another word from the training; `null` while it runs."},"error":{"type":["string","null"],"description":"The code a failed job ended with."},"model":{"type":["object","null"],"properties":{"id":{"type":"string","description":"`ft_` followed by the job's 24 hexadecimal characters."},"base":{"type":"string","description":"The model it was trained from."},"best_epoch":{"type":"integer"},"best_step":{"type":"integer"},"macro_f1":{"type":"number","description":"Its validation score."},"can_run":{"type":"boolean","description":"`false` for now."},"artifact":{"$ref":"#/components/schemas/Artifact"},"note":{"type":"string","description":"Load the weights with the base model's configuration and tokenizer."}},"description":"The trained model, `null` until the end."},"epochs":{"type":"array","items":{"$ref":"#/components/schemas/ResultEpoch"},"description":"One entry per finished epoch, in order."},"coverage":{"type":"object","properties":{"train_pages":{"type":["integer","null"]},"validation_pages":{"type":["integer","null"]}},"description":"How many pages the training used, as it reported them."},"resumes":{"type":"array","items":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"from_step":{"type":"integer","description":"The step it resumed from."},"last_step_seen":{"type":"integer","description":"The last step the service had seen."},"last_checkpoint_step":{"type":"integer","description":"The checkpoint the training resumed from."},"lost_steps":{"type":"integer","description":"Steps done again."},"lost_steps_seen":{"type":"integer"},"taken_back":{"type":"boolean","description":"Whether the hardware was taken back."},"source":{"type":"string","description":"Where the checkpoint was read from."}},"additionalProperties":true},"description":"One entry per resume after a move."},"steps_lost_total":{"type":"integer","description":"Steps done again over every resume."},"checkpoints":{"type":"object","properties":{"best":{"type":["object","null"],"properties":{"epoch":{"type":"integer"},"step":{"type":"integer"}}},"latest":{"type":["object","null"],"properties":{"step":{"type":"integer"},"at":{"type":"string","format":"date-time"}}}}}},"required":["job_id","kind","status","state","model","epochs"],"description":"A training job's record; `after` and `limit` are ignored."},"SeatLaneList":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","enum":["seat_lane"]},"lane":{"type":"string","description":"The lane's name.","enum":["opus","fable","haiku","codex"]},"cli":{"type":"string","description":"The command-line client the lane runs.","enum":["claude","codex"]},"model":{"type":"string","description":"The hosted model the lane's client is asked for."},"seat_model":{"type":["string","null"],"description":"The model name a compute plan leases the lane by, or `null` while it cannot."},"leasable":{"type":"boolean","description":"Whether a compute plan can lease this lane now."},"aliases":{"type":"array","items":{"type":"string"},"description":"Every name the lane's model answers to."},"max_seats":{"type":["integer","null"],"description":"The most concurrent seats one enrolled worker may offer for it."},"offered":{"type":["object","null"],"properties":{"offers":{"type":"integer","description":"Offers of your enrolled workers, as declared at enrollment (`offered`) or published."},"seats":{"type":"integer","description":"The seats those offers declare."},"connected_offers":{"type":"integer","description":"Offers whose worker is connected now."},"connected_seats":{"type":"integer","description":"The seats of the connected offers."},"published_offers":{"type":"integer","description":"Offers published into a pool: the ones a compute plan can lease."},"published_seats":{"type":"integer","description":"The seats of the published offers."}},"description":"What your own enrolled workers offer for the lane; `null` when it is not leasable."},"active_leases":{"type":["integer","null"],"description":"Packs of your compute plans a seat of this lane holds now."}},"required":["object","lane","cli","model","seat_model","leasable","aliases"]}}},"required":["object","data"],"description":"The command-line seat lanes."},"Sink":{"type":"object","properties":{"id":{"type":"integer","description":"The destination's number, the `sink_id` the other calls take."},"account_id":{"type":"integer","description":"Your account's number."},"name":{"type":"string","description":"The name you gave it, with leading and trailing spaces removed."},"kind":{"type":"string","description":"`otlp_http`, `mlflow` or `webhook`.","enum":["otlp_http","mlflow","webhook"]},"url":{"type":"string","description":"The address you gave; the OpenTelemetry kinds deliver to it with `/v1/traces` added."},"header_names":{"type":"array","items":{"type":"string"},"description":"The names of the headers you set, sorted, without their values."},"include_outputs":{"type":"boolean","description":"Whether each page's result is sent with the spans of calls to the model."},"enabled":{"type":"boolean","description":"`true` when it receives spans, `false` while it is paused: while your Tracing and tracking option is off."},"created_at":{"type":"string","description":"When it was added; it receives only spans that ended after this moment.","format":"date-time"},"delivered":{"type":"integer","description":"How many spans, and ComputePlan events for a webhook, it has received.","minimum":0},"backlog":{"type":"integer","description":"How many spans wait for it.","minimum":0},"backlog_oldest_at":{"type":["string","null"],"description":"When the oldest waiting span was queued; `null` when nothing waits.","format":"date-time"},"next_try_at":{"type":["string","null"],"description":"When the oldest waiting span will next be sent; `null` when nothing waits.","format":"date-time"},"last_ok_at":{"type":["string","null"],"description":"When a delivery last succeeded; `null` if none has yet.","format":"date-time"},"last_error":{"type":["string","null"],"description":"The last delivery's error as a short code that holds nothing of the spans: `http_401` for a status your end answered, `deadline_exceeded`, `redirect_302_not_followed`, `connection_refused`, `tls_verify_failed`, `address_not_public` and the like; `null` if no delivery has failed."},"last_error_at":{"type":["string","null"],"description":"When that error happened, or `null`.","format":"date-time"}},"required":["id","account_id","name","kind","url","header_names","include_outputs","enabled","created_at","delivered","backlog","backlog_oldest_at","next_try_at","last_ok_at","last_error","last_error_at"],"description":"A trace destination with its delivery record. Header values are secrets, never shown back."},"SinkCreate":{"type":"object","properties":{"name":{"type":"string","description":"Your name for it, not empty.","minLength":1},"kind":{"type":"string","description":"`otlp_http` (default), `mlflow` or `webhook`.","enum":["otlp_http","mlflow","webhook"],"default":"otlp_http"},"url":{"type":"string","description":"`https` to a host that resolves only to public addresses; no user name or password; redirects never followed. For `otlp_http` and `mlflow`, the base address without a query (`/v1/traces` is added); a webhook URL is used as given."},"headers":{"type":"object","properties":{},"description":"Names and values sent with every delivery; values are never shown back. Not allowed: `Host`, `Content-Length`, `Content-Type`, `Content-Encoding`, `Transfer-Encoding`, `Connection`, `X-Weights-Signature`, `X-Weights-Timestamp`, or one name twice. `mlflow` needs `x-mlflow-experiment-id`.","additionalProperties":{"type":"string"}},"include_outputs":{"type":"boolean","description":"`true` sends each page's result with the calls' spans, and a bounded sample of logged content on the `job` span.","default":false}},"required":["name","url"]},"SinkCreated":{"type":"object","properties":{"id":{"type":"integer","description":"The destination's number, the `sink_id` the other calls take."},"account_id":{"type":"integer","description":"Your account's number."},"name":{"type":"string","description":"The name you gave it, with leading and trailing spaces removed."},"kind":{"type":"string","description":"`otlp_http`, `mlflow` or `webhook`.","enum":["otlp_http","mlflow","webhook"]},"url":{"type":"string","description":"The address you gave; the OpenTelemetry kinds deliver to it with `/v1/traces` added."},"header_names":{"type":"array","items":{"type":"string"},"description":"The names of the headers you set, sorted, without their values."},"include_outputs":{"type":"boolean","description":"Whether each page's result is sent with the spans of calls to the model."},"enabled":{"type":"boolean","description":"`true` when it receives spans, `false` while it is paused: while your Tracing and tracking option is off."},"created_at":{"type":"string","description":"When it was added; it receives only spans that ended after this moment.","format":"date-time"},"delivered":{"type":"integer","description":"How many spans, and ComputePlan events for a webhook, it has received.","minimum":0},"backlog":{"type":"integer","description":"How many spans wait for it.","minimum":0},"backlog_oldest_at":{"type":["string","null"],"description":"When the oldest waiting span was queued; `null` when nothing waits.","format":"date-time"},"next_try_at":{"type":["string","null"],"description":"When the oldest waiting span will next be sent; `null` when nothing waits.","format":"date-time"},"last_ok_at":{"type":["string","null"],"description":"When a delivery last succeeded; `null` if none has yet.","format":"date-time"},"last_error":{"type":["string","null"],"description":"The last delivery's error as a short code that holds nothing of the spans: `http_401` for a status your end answered, `deadline_exceeded`, `redirect_302_not_followed`, `connection_refused`, `tls_verify_failed`, `address_not_public` and the like; `null` if no delivery has failed."},"last_error_at":{"type":["string","null"],"description":"When that error happened, or `null`.","format":"date-time"},"signing_secret":{"type":"string","description":"For a `webhook` only: the secret its deliveries are signed with, `fabwh_` and 64 hexadecimal characters. Shown in this answer and never again.","pattern":"^fabwh_[0-9a-f]{64}$"}},"required":["id","account_id","name","kind","url","header_names","include_outputs","enabled","created_at","delivered","backlog","backlog_oldest_at","next_try_at","last_ok_at","last_error","last_error_at"],"description":"The destination just added; `delivered` and `backlog` are `0`."},"SinkTestResult":{"type":"object","properties":{"ok":{"type":"boolean","description":"`true` when your end answered with a `2xx` status."},"status":{"type":["integer","null"],"description":"The HTTP status your end answered with; `null` when no answer came."},"latency_ms":{"type":"number","description":"How long the delivery took, in milliseconds."},"error":{"type":["string","null"],"description":"`null` on success; otherwise `http_401` and the like, `redirect_302_not_followed`, `deadline_exceeded`, `connection_refused`, `connection_reset`, `tls_verify_failed`, `unresolvable_host` or `address_not_public`."},"sent_to":{"type":"string","description":"The address the span was posted to."}},"required":["ok","status","latency_ms","error","sent_to"],"description":"The outcome of one test delivery; a refusal by your end is still a `200` here."},"SourceFormat":{"type":"object","properties":{"extensions":{"type":"array","items":{"type":"string"}},"media_type":{"type":"string"},"kind":{"type":"string"},"supports_byte_range":{"type":"boolean","description":"Format-level metadata."},"supports_predicate_pushdown":{"type":"boolean","description":"`parquet` only."},"native_readers":{"type":"array","items":{"type":"string"},"description":"Ecosystem examples, not libraries installed in the runtime."}},"description":"One data format.","additionalProperties":true},"SourceProbe":{"type":"object","properties":{"verified":{"type":"boolean","description":"`true` when at least one source was read."},"mode":{"type":"string","description":"`live_range_probe` when sources were read; `syntax_and_custody_only` when nothing was read.","enum":["live_range_probe","syntax_and_custody_only"]},"probes":{"type":"array","items":{"$ref":"#/components/schemas/SourceProbeEntry"},"description":"One entry per source read; `[]` when nothing was read."}},"required":["verified","mode","probes"],"description":"What source verification read. It checks reachability, ranges, known sizes and recognised file headers; it never hashes a whole input or promises later availability."},"SourceProbeEntry":{"type":"object","properties":{"stage_id":{"type":"string","description":"The stage whose mount or manifest entry was read (plan admission)."},"mount_id":{"type":"string","description":"The mount read."},"pack_id":{"type":"string","description":"The pack read: a registered pack, or a `lazy_materializer` manifest entry."},"uri":{"type":"string","description":"The source read."},"status":{"type":["integer","null"],"description":"The HTTP status the source answered."},"supports_range":{"type":["boolean","null"],"description":"Whether the source honoured the range; null when unknown."},"remote_bytes":{"type":["integer","null"],"description":"The object's size the source reported; null when unknown.","minimum":0},"magic_ok":{"type":["boolean","null"],"description":"Whether the first bytes match the declared format's header; null when the format has none to check."}},"required":["uri","status"],"description":"One source checked before admission.","additionalProperties":true},"SourceProtocol":{"type":"object","properties":{"uri_pattern":{"type":"string","description":"Its main form."},"uri_patterns":{"type":"array","items":{"type":"string"},"description":"Every form."},"pinning":{"type":"string","description":"How a URI must be pinned."},"native_readers":{"type":"array","items":{"type":"string"},"description":"Ecosystem examples, not libraries installed in the runtime."},"supports_byte_range":{"type":"boolean"},"hydration_modes":{"type":"array","items":{"type":"string","enum":["jit","prestage"]},"description":"OCI is `prestage` only."}},"description":"One source URI scheme.","additionalProperties":true},"SpanLogEntry":{"type":"object","properties":{"trace_id":{"type":"string","description":"The trace it belongs to: the job's own, or yours if you sent a `traceparent`.","pattern":"^[0-9a-f]{32}$"},"span_id":{"type":"string","description":"The entry's own id.","pattern":"^[0-9a-f]{16}$"},"parent_span_id":{"type":["string","null"],"description":"The span it belongs under; `null` for the job's root span."},"name":{"type":"string","description":"What it records, such as `job`, `job.queued`, `job.cold_start`, `endpoint.resumed` or `training.checkpoint`."},"kind":{"type":"string","description":"`span` for something with a duration, `event` for a moment.","enum":["span","event"]},"start_at":{"type":"string","format":"date-time"},"end_at":{"type":["string","null"],"description":"Equal to `start_at` for an event; `null` while a span is open.","format":"date-time"},"duration_ms":{"type":["number","null"],"description":"Milliseconds between the two; `null` while the span is open."},"status":{"type":"string","enum":["ok","error"]},"account_id":{"type":"integer","description":"Your account's number."},"job_id":{"type":"string","description":"The job the entry belongs to."},"attempt_id":{"type":["integer","null"],"description":"The run of the model it happened in; `null` outside one."},"attributes":{"type":"object","properties":{},"description":"Counts, times, ids and codes; never page text.","additionalProperties":true},"outputs":{"type":["object","null"],"properties":{},"description":"Only with `?outputs=1`: on a call to the model, each page's `label` and `probabilities` keyed by `seq`; on the `job` span, a bounded sample of logged content (`logged_content`, `content_cursor`); `null` for the others.","additionalProperties":true}},"required":["trace_id","span_id","parent_span_id","name","kind","start_at","end_at","duration_ms","status","account_id","job_id","attempt_id","attributes"],"description":"A span or an event of a job, as the job log, the trace export and your destinations show it."},"SpanOtlp":{"type":"object","properties":{"traceId":{"type":"string","pattern":"^[0-9a-f]{32}$"},"spanId":{"type":"string","pattern":"^[0-9a-f]{16}$"},"parentSpanId":{"type":"string","description":"Absent for a root span such as `job`.","pattern":"^[0-9a-f]{16}$"},"name":{"type":"string","description":"What the span records, such as `job`, `job.queued` or `billing.charge`."},"kind":{"type":"integer","description":"`3` (client) for a call to the model, `1` (internal) for everything else.","enum":[1,3]},"startTimeUnixNano":{"type":"string","description":"Nanoseconds since 1970, as a string."},"endTimeUnixNano":{"type":"string","description":"Nanoseconds since 1970, as a string."},"attributes":{"type":"array","items":{"$ref":"#/components/schemas/TraceAttribute"},"description":"The span's details, plus `weights.span_kind`, `weights.account_id`, `weights.job_id` and `weights.attempt_id` where they apply."},"status":{"type":"object","properties":{"code":{"type":"integer","description":"`1` when it went well, `2` when it failed.","enum":[1,2]}},"required":["code"]}},"required":["traceId","spanId","name","kind","startTimeUnixNano","endTimeUnixNano","attributes","status"],"description":"One span in OTLP's JSON encoding."},"StageAcceptLoss":{"type":"object","properties":{"operation_key":{"type":"string","description":"The operation's key; takes precedence over `Idempotency-Key`.","minLength":1},"expected_dead_lettered":{"type":"integer","description":"The stage's current `packs_dead_lettered`.","minimum":1},"reason":{"type":"string","description":"Nonblank, at most 4,096 UTF-8 bytes after trimming.","minLength":1}},"required":["expected_dead_lettered","reason"],"description":"Accept the loss of dead-lettered packs. A key is required: `operation_key` or `Idempotency-Key`.","additionalProperties":false},"StageDeadLetterOperation":{"type":"object","properties":{"event_type":{"type":"string","enum":["dead_lettered_packs_retried","dead_letters_accepted"]},"operation_key":{"type":"string"},"target_stage_id":{"type":"string"},"expected_dead_lettered":{"type":"integer"},"reason":{"type":"string"},"actor":{"type":["string","null"],"description":"The account's email."},"packs":{"type":"integer","description":"Packs changed."},"pack_ids":{"type":"array","items":{"type":"string"},"description":"The first of them."},"reopened_from":{"type":"string","description":"The stage's state before."},"restored_stages":{"type":"array","items":{"type":"string"},"description":"Stages restored from a failure the dead letters caused."}},"description":"The dead-letter operation recorded.","additionalProperties":true},"StageDeadLetterResult":{"allOf":[{"$ref":"#/components/schemas/PlanReceipt"},{"type":"object","properties":{"operation":{"$ref":"#/components/schemas/StageDeadLetterOperation"},"replayed":{"type":"boolean","description":"`true` for a durable replay: the current receipt, nothing changed again."}},"required":["operation","replayed"]}]},"StageLazyMaterializer":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Effective default true."},"auto_seal":{"type":"boolean","description":"Seal once the declared total is registered beyond the lazy state; effective default true."},"lookahead_packs":{"type":"integer","description":"Pending packs to keep ready; default 16.","minimum":1},"batch_size":{"type":"integer","description":"Packs one fill registers; omitted, the whole gap.","minimum":1},"packs_total":{"type":"integer","description":"The declared total; otherwise the workload's `packs_total`, `expected_packs` or the manifest's length.","minimum":1},"manifest":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"Pack objects; entries override generated values. `shards` and `packs` are alternatives, considered in this order."},"start_index":{"type":"integer","description":"The first index; default 1.","minimum":1},"pack_id_template":{"type":"string","description":"Default `pack-{index:04d}`; a placeholder template includes `index` or `pack_index`."},"r2_input_uri_template":{"type":"string","description":"Input path template; `input_uri_template`, `source_uri_template` and `source_uri` are alternatives, in this order."},"r2_output_uri_template":{"type":"string","description":"Output path template; `output_uri_template` is an alternative."},"sha256_template":{"type":"string","description":"Digest template, unless each entry supplies `sha256`."},"item_count":{"type":"integer","description":"Items per pack (or `items_per_pack`); required.","minimum":1},"compressed_bytes":{"type":"integer","description":"Bytes per pack; required.","minimum":0,"maximum":9223372036854775807},"est_input_tokens":{"type":"integer","description":"Default 512000.","minimum":0,"maximum":9223372036854775807},"est_output_tokens":{"type":"integer","description":"Default 128000.","minimum":0,"maximum":9223372036854775807}},"description":"A stream stage's policy for registering its next packs: on the stage, its metadata or its workload, the first in that order winning.","additionalProperties":true},"StageMaterialized":{"type":"object","properties":{"materialized":{"type":"integer","description":"Packs promoted or registered by this call.","minimum":0},"stages":{"type":"array","items":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string"},"materialized":{"type":"integer","minimum":0}},"required":["plan_id","stage_id","materialized"]}}},"required":["materialized","stages"]},"StageMount":{"type":"object","properties":{"mount_id":{"type":"string","description":"Unique within the stage; aliases `name`, `dataset_id`.","minLength":1},"source_uri":{"type":"string","description":"The data, in a scheme of `GET /v1/compute/capabilities`, pinned as it describes."},"sha256":{"type":"string","description":"The bytes' SHA-256; with `byte_range`, of that range only.","pattern":"^[0-9a-fA-F]{64}$"},"byte_range":{"type":"array","items":{"type":"integer","minimum":0,"maximum":9223372036854775807},"description":"`[start, end]` with an exclusive end.","minItems":2,"maxItems":2},"compressed_bytes":{"type":"integer","description":"The bytes fetched.","minimum":0,"maximum":9223372036854775807},"format":{"type":"string","description":"The format, e.g. `jsonl_zst` or `parquet`.","minLength":1},"mount_path":{"type":"string","description":"An absolute path, unique within the stage; it names the file in a scratch cache and creates no arbitrary filesystem mount."},"hydration":{"type":"string","description":"`jit` reads when needed; `prestage` requires prior preparation (OCI is `prestage` only).","enum":["jit","prestage"]}},"required":["mount_id","source_uri"],"description":"Data a stage reads, in `mounts` or `datasets` on the stage, its metadata or its workload.","additionalProperties":true},"StageReceipt":{"type":"object","properties":{"stage_id":{"type":"string","description":"The authored identifier."},"stream_id":{"type":"string","description":"`plan_id~stage_id`, for unambiguous stream calls."},"needs":{"type":"array","items":{"type":"string"}},"kind":{"type":"string","enum":["classifier_drain","embedding_drain","llm_batch_drain","cpu_scavenger","scavenge_label","finetune","live_session_pool"]},"model":{"type":["string","null"]},"objective":{"type":"string","description":"Present when declared."},"dataset_id":{"type":"string","description":"Present when declared."},"reload_checkpoint_from_stage":{"type":"string","description":"Present when declared."},"reload_checkpoint_from_plan":{"type":"string","description":"Present when declared."},"continuation_from":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string"}},"description":"Present when declared: the stage this finetune continues."},"state":{"type":"string","description":"Dependency and scheduling waits (`waiting_dependency`, `waiting_price`), readiness (`ready_to_wake`, `lease_ready`), execution, then `completed`, `failed` or `cancelled`."},"checkpoint_uri":{"type":["string","null"],"description":"The completed result's `output_checkpoint_uri`."},"packs_total":{"type":"integer","description":"Registered packs; on a continuous stream what was registered so far, not a target."},"packs_completed":{"type":"integer"},"items_completed":{"type":"integer"},"steps_completed":{"type":"integer"},"packs_pending":{"type":"integer"},"packs_lazy":{"type":"integer"},"packs_leased":{"type":"integer"},"packs_dead_lettered":{"type":"integer","description":"Send it as `expected_dead_lettered` to retry or accept loss."},"packs_dead_letter_accepted":{"type":"integer"},"packs_expired_incomplete":{"type":"integer"},"packs_cancelled":{"type":"integer"},"stream_sealed":{"type":"boolean","description":"The stream takes no new pack identifiers."},"continuous":{"type":"boolean","description":"A continuous stream: its pack counts are a live queue."},"accrued_cost_usd_micros":{"type":"integer","description":"Cost accrued by the stage, in micro-dollars."},"outcome":{"$ref":"#/components/schemas/DeliveryOutcome"},"failure":{"type":["object","null"],"properties":{"status":{"type":"string","description":"How the stage ended.","enum":["failed","cancelled"]},"reason":{"type":"string","description":"Your reason as sent to the fail or cancel call, or one of the service's own: `dependency_failed` (a stage it needs failed or was cancelled), `pack_dead_lettered` (a pack ran out of attempts) or `dead_letter_cascade` (a stage it needs did)."},"error":{"type":"string","description":"The same reason as a sentence; with `pack_dead_lettered`, the pack, its attempts and its last error."},"source_stage_id":{"type":"string","description":"With `dependency_failed` or `dead_letter_cascade`: the stage that failed first."},"pack_id":{"type":"string","description":"With `pack_dead_lettered`: the first pack that ran out of attempts."},"attempts":{"type":"integer","description":"With `pack_dead_lettered`: the attempts that pack took."},"dead_letter_reason":{"type":"string","description":"With `pack_dead_lettered`: that pack's last error."},"cascaded_stage_ids":{"type":"array","items":{"type":"string"},"description":"With `pack_dead_lettered`: the dependent stages cancelled with it."}},"required":["status","reason"],"description":"Why the stage ended `failed` or `cancelled`; null for every other stage.","additionalProperties":true},"spend_usd_micros":{"type":"integer","description":"What the stage has cost so far: the larger of its accrued cost and the spend its receipts committed.","minimum":0},"committed_usd_micros":{"type":"integer","description":"Spend committed by the stage's usage receipts.","minimum":0},"reserved_usd_micros":{"type":"integer","description":"Credit the stage holds reserved and has not yet spent or released.","minimum":0},"open_reservations":{"type":"integer","description":"How many such reservations are open.","minimum":0},"last_receipt_seq":{"type":["integer","null"],"description":"The sequence of the stage's latest usage receipt, or null before one."},"mounts":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Present when declared on the stage or workload."},"datasets":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Present when declared on the stage or workload."}},"required":["stage_id","stream_id","state"],"description":"One stage's state and progress.","additionalProperties":true},"StageRetry":{"type":"object","properties":{"operation_key":{"type":"string","description":"The operation's key; takes precedence over `Idempotency-Key`.","minLength":1},"expected_dead_lettered":{"type":"integer","description":"The stage's current `packs_dead_lettered`.","minimum":1},"reason":{"type":"string","description":"At most 4,096 UTF-8 bytes after trimming."}},"required":["expected_dead_lettered"],"description":"Retry dead-lettered packs. A key is required: `operation_key` or `Idempotency-Key`.","additionalProperties":false},"StageSpec":{"type":"object","properties":{"stage_id":{"type":"string","description":"Unique within the plan.","pattern":"^[A-Za-z0-9._:-]{1,128}$"},"execution_mode":{"type":"string","description":"`awow_harness_lease` for `live_session_pool`; `weights_managed_compute` for every other kind. The Python SDK sends an older alias of `weights_managed_compute`, which is accepted too; `scavenge_label` takes `weights_managed_compute` only.","pattern":"^(awow_harness_lease|weights_managed_[a-z]+)$"},"workload":{"$ref":"#/components/schemas/StageWorkload"},"needs":{"type":"array","items":{"type":"string"},"description":"Stages of this plan that must complete first; no cycles.","default":[]},"metadata":{"type":"object","properties":{},"description":"Your own fields.","additionalProperties":true},"stream_spec":{"type":["object","null"],"properties":{},"additionalProperties":true},"resources":{"type":"object","properties":{},"description":"CPU cores and memory, read before the workload's own.","additionalProperties":true},"incomplete":{"type":"string","description":"Stored with the stage; the schedule's `incomplete` is the policy in force."},"max_pending_packs":{"type":"integer","description":"Pending plus live leased packs the stream admits.","minimum":1},"mounts":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Data read just in time."},"datasets":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Data read just in time."},"lazy_materializer":{"$ref":"#/components/schemas/StageLazyMaterializer"},"workload_spec":{"type":"object","properties":{},"description":"`live_session_pool`: the session runner's own fields as one object; its `model` must be the stage's.","additionalProperties":true},"scavenger":{"type":"object","properties":{},"description":"`cpu_scavenger`: the CPU and memory figures (`cpu_cores`, `ram_mb`, `arch`) as one object, read before the workload's own.","additionalProperties":true},"sharing_mode":{"type":"string","description":"`live_session_pool`: `dedicated_node` keeps the stage's sessions from sharing a seat between turns."},"qos_priority":{"type":"string","description":"The QoS tier. `priority`, `interactive` and `standard` resolve to the standard class, the rest to flex; each tier also implies a priority weight (see `priority_weight`). `qos_tier` and `qos` are aliases, read in that order.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos_tier":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"priority_weight":{"type":"integer","description":"How strongly this work is preferred when work of several plans shares capacity: heavier work is woken first, and running work shares a model's sessions in proportion to its weight. Left out, the QoS tier's weight: `priority` 4, `interactive` 3, `standard` 2, every flex tier 1. A weight never starts capacity by itself.","minimum":1,"maximum":16},"min_remaining_window_ms":{"type":"integer","description":"A pack is handed out only while at least this much of the window is left, in milliseconds.","minimum":1,"maximum":9223372036854775807},"est_duration_ms":{"type":"integer","description":"How long one pack is expected to take, in milliseconds; used by `skip_unfinishable_packs`.","minimum":1,"maximum":9223372036854775807},"skip_unfinishable_packs":{"type":"boolean","description":"`true` stops handing out a pack whose own estimated duration no longer fits in what is left of the window. Read from the schedule."},"command":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: the command, a string or a list."},"args":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: its arguments, a string or a list."},"entrypoint":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: the entry point, a string or a list."},"env":{"type":"object","properties":{},"description":"Session runner: environment variables, a name to a string value.","additionalProperties":{"type":"string"}},"allowed_target_domains":{"type":"array","items":{"type":"string","minLength":1},"description":"Session runner: a list of domains."},"allowed_domains":{"type":"array","items":{"type":"string","minLength":1},"description":"Session runner: a list of domains."},"lease_ttl_seconds":{"type":"integer","description":"Session runner: a whole number of seconds.","minimum":1,"maximum":9223372036854775807},"heartbeat_interval_seconds":{"type":"number","description":"Session runner: a positive number of seconds.","exclusiveMinimum":0},"timeout_seconds":{"type":"number","description":"Session runner: a positive number of seconds.","exclusiveMinimum":0},"require_hot_pool":{"type":"boolean","description":"Session runner: a boolean."},"requeue_on_failure":{"type":"boolean","description":"Session runner: a boolean."}},"required":["stage_id","execution_mode","workload"],"description":"One stage of a plan. An unknown field is refused with `400 invalid_compute_plan`.","additionalProperties":false},"StageWorkload":{"type":"object","properties":{"kind":{"type":"string","description":"What the stage does.","enum":["classifier_drain","embedding_drain","llm_batch_drain","cpu_scavenger","scavenge_label","finetune","live_session_pool"]},"model":{"type":"string","description":"The model; required except for `cpu_scavenger`.","minLength":1},"open_stream":{"type":"boolean","description":"Packs are appended after admission."},"continuous":{"type":"boolean","description":"On an open stream: never sealed on a pack count, and a later registration reopens it."},"total_items":{"type":"integer","description":"Items in the stream (`classifier_drain`, `embedding_drain`); zero or omitted on an open stream.","minimum":0,"maximum":9223372036854775807},"total_items_hint":{"type":"integer","description":"An estimate of the items, on an open stream or `llm_batch_drain`.","minimum":0,"maximum":9223372036854775807},"manifest_uri":{"type":["string","null"],"description":"The input manifest.","minLength":1},"output_prefix_uri":{"type":"string","description":"Where results go: `r2://tenants/<tenant_id>/<path>`, `s3://tenants/<tenant_id>/<path>` or `s3://<bucket>/tenants/<tenant_id>/<path>`."},"packs_total":{"type":"integer","description":"Packs expected (also `expected_packs`).","minimum":1},"max_attempts":{"type":"integer","description":"Attempts per pack before it is dead-lettered.","minimum":1},"materialize_lazy_on_lease":{"type":"boolean","description":"On a stream: promote lazy packs as work is taken."},"est_input_tokens":{"type":"integer","description":"Estimated input tokens (`llm_batch_drain`).","minimum":0,"maximum":9223372036854775807},"est_output_tokens":{"type":"integer","description":"Estimated output tokens (`llm_batch_drain`).","minimum":0,"maximum":9223372036854775807},"dimensions":{"type":"integer","description":"`embedding_drain`: vector size; default 768.","minimum":1,"maximum":4096},"aspects":{"type":"array","items":{"type":"string","enum":["offerings","profile"]},"description":"`embedding_drain`: unique aspects; default both."},"dtype":{"type":"string","description":"`embedding_drain`: vector type.","enum":["float16","halfvec"],"default":"float16"},"runtime_id":{"type":"string","description":"`cpu_scavenger`: the only runtime accepted.","enum":["google-quantum-scavenger-v1"]},"cpu_cores":{"type":"integer","description":"`cpu_scavenger`: cores (or `cpu_millis` rounded up).","minimum":1,"maximum":4294967295},"ram_mb":{"type":"integer","description":"`cpu_scavenger`: memory in MiB (or `memory_bytes`, or `ram_gb` times 1024).","minimum":1},"arch":{"type":"string","description":"`cpu_scavenger`: `x86_64` (default) or `aarch64`, or their aliases `amd64`, `x86-64`, `arm64`."},"steps":{"type":"integer","description":"`finetune`: training steps.","minimum":1},"dataset_uri":{"type":"string","description":"`finetune`: the training data.","minLength":1},"output_checkpoint_uri":{"type":"string","description":"`finetune`: where the checkpoint goes, under your tenant."},"objective":{"type":"string","description":"`finetune`: the training objective (weights-scheduler FINETUNE_OBJECTIVES); with a Laya `recipe` it must be the recipe's own.","enum":["sft","dpo","specialist_heads","grpo","opd","fancypants_refinement","abliteration"]},"recipe":{"type":["string","null"],"description":"`finetune`: the training recipe.","minLength":1},"dataset_id":{"type":["string","null"],"description":"`finetune`: the bound dataset (`ds_...`).","minLength":1},"manifest_sha256":{"type":"string","description":"`finetune`: the manifest's digest, 64 lowercase hexadecimal digits.","pattern":"^[0-9a-f]{64}$"},"reload_checkpoint_from_stage":{"type":"string","description":"A `finetune` stage, also in `needs`, whose completed checkpoint this stage reloads."},"reload_checkpoint_from_plan":{"type":"string","description":"The earlier plan of that stage, when it is not this one."},"continuation_from":{"type":"object","properties":{"plan_id":{"type":"string","description":"The earlier plan.","minLength":1},"stage_id":{"type":"string","description":"Its finetune stage.","minLength":1}},"required":["plan_id","stage_id"],"description":"`finetune`: the earlier plan's finetune stage this stage continues, the first of its lineage. The trainer resumes the highest checkpoint that stage verified instead of starting at step 0. It must be this tenant's finetune of the same model, recipe, dataset, steps and `output_checkpoint_uri`."},"checkpoint_seconds":{"type":"number","description":"`finetune`: how often the trainer writes a full checkpoint to the store, in seconds, at most 300: the most training one interruption costs the stage.","exclusiveMinimum":0,"maximum":300},"target_parallel_sessions":{"type":"integer","description":"`live_session_pool`: sessions held in parallel.","minimum":1,"maximum":4294967295},"est_total_tokens":{"type":"integer","description":"`live_session_pool`: estimated tokens.","minimum":0,"maximum":9223372036854775807},"est_duration_seconds":{"type":"integer","description":"`live_session_pool`: estimated duration.","minimum":0,"maximum":9223372036854775807},"customer_container":{"type":["object","null"],"properties":{"image":{"type":"string","description":"The image.","minLength":1},"command":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"allowed_target_domains":{"type":"array","items":{"type":"string","minLength":1}},"cpu":{"type":"string","default":"2"},"memory":{"type":"string","default":"4Gi"},"registry_secret_ref":{"type":["string","null"],"minLength":1}},"required":["image"],"description":"`live_session_pool`: your own container."},"verify_source":{"type":"boolean","description":"Check this stage's sources before admission."},"expected_packs":{"type":"integer","description":"An alias of `packs_total`.","minimum":1},"runner":{"type":"object","properties":{},"description":"`live_session_pool`: the session runner's fields as one object.","additionalProperties":true},"retry_on_failure":{"type":"boolean","description":"Put a failed lease of the stage back in line; default false."},"estimated_duration_seconds":{"type":"number","description":"`cpu_scavenger`, `scavenge_label`: the expected wall clock; at most the schedule window (also `est_duration_seconds`).","minimum":0},"max_wall_seconds":{"type":"number","description":"`scavenge_label`: the wall clock one lease may take; at most the schedule window.","exclusiveMinimum":0},"max_turns":{"type":"integer","description":"`scavenge_label`: the calls one lease may make.","minimum":1,"maximum":4294967295},"wrap_up_fraction":{"type":"number","description":"`scavenge_label`: the share of `max_wall_seconds` or `max_turns` at which the seat is told to wrap up; needs one of the two.","exclusiveMinimum":0,"exclusiveMaximum":1},"total_pages":{"type":"integer","description":"`finetune`: pages in the training data.","minimum":1,"maximum":9223372036854775807},"base_checkpoint_uri":{"type":["string","null"],"description":"`finetune`: the checkpoint to start from.","minLength":1},"dataset_revision":{"oneOf":[{"type":"integer","minimum":0,"maximum":9223372036854775807},{"type":"string","minLength":1}],"description":"`finetune`: the dataset's revision, a number or a name."},"replay_weights":{"type":"object","properties":{},"description":"`finetune`: a positive weight per replayed cohort; at least one.","additionalProperties":{"type":"number","exclusiveMinimum":0}},"target_slug":{"type":["string","null"],"description":"`finetune` derivation: the model the derived checkpoint is for; default the stage's `model`.","minLength":1},"preset":{"type":["string","null"],"description":"`finetune` derivation: the named preset.","minLength":1},"derived_artifact_id":{"type":["string","null"],"description":"`finetune` derivation: the identifier the result is registered under.","minLength":1},"revision":{"type":["string","null"],"description":"`finetune` derivation: the base model's revision.","minLength":1},"tp_degree":{"type":["integer","null"],"description":"`finetune`: the parallel width to run at, 1 to 8.","minimum":1,"maximum":8},"from_fancypants":{"type":"boolean","description":"`finetune` derivation: start from the model's `-fancypants` variant."},"from_abliterated":{"type":"boolean","description":"`finetune` derivation: start from the model's `-abliterated` variant."},"domain_only":{"type":"boolean","description":"`finetune` derivation: restrict the derivation to the declared domain."},"max_kl":{"type":"number","description":"`finetune` derivation: the divergence bound the result must stay within.","exclusiveMinimum":0,"maximum":10},"verifier":{"oneOf":[{"type":"string","enum":["grounded_json_v1","global_scraper_decision_v1"]},{"type":"object","properties":{"verifier_id":{"type":"string","enum":["grounded_json_v1","global_scraper_decision_v1"]}},"required":["verifier_id"],"additionalProperties":false}],"description":"`finetune` with objective `grpo` or `opd`: the one verifier the reward is. Every dataset row must name it; a row scored by another is refused when training starts. Left out, each row is scored by the verifier it names."},"num_generations":{"type":"integer","description":"`finetune` with objective `grpo` or `opd`: completions sampled for each prompt; default the recipe's.","minimum":2,"maximum":16},"temperature":{"type":"number","description":"`finetune` with objective `grpo` or `opd`: the sampling temperature of those completions; default the recipe's.","exclusiveMinimum":0,"maximum":2},"max_completion_tokens":{"type":"integer","description":"`finetune` with objective `grpo` or `opd`: the tokens one completion may take; default the recipe's.","minimum":1,"maximum":4096},"kl_ref_coef":{"type":"number","description":"`finetune` with objective `grpo`: the weight of the penalty for drifting from the base model; default the recipe's.","minimum":0,"maximum":1},"teacher_model":{"type":"string","description":"`finetune` with objective `opd`: the teacher distilled from.","enum":["qwen3.8-27b"]},"distill_coef":{"type":"number","description":"`finetune` with objective `opd`: the weight of the distillation term; default the recipe's.","exclusiveMinimum":0,"maximum":10},"reward_weight":{"type":"number","description":"`finetune` with objective `opd`: the weight of the verifier reward beside the distillation term; default the recipe's.","minimum":0,"maximum":10},"aspect_instructions":{"type":"object","properties":{},"description":"`embedding_drain`: the instruction for each aspect that has no built-in one.","additionalProperties":{"type":"string"}},"replicas":{"type":"integer","description":"`live_session_pool`: with `sessions_per_instance`, another way to state `target_parallel_sessions`, their product.","minimum":1,"maximum":4294967295},"sessions_per_instance":{"type":"integer","description":"`live_session_pool`: sessions per replica.","minimum":1,"maximum":4294967295},"session_duty_cycle":{"type":"number","description":"`live_session_pool`: the share of time a session is mid-turn.","exclusiveMinimum":0,"maximum":1},"multiplex_across_seats":{"type":"boolean","description":"`live_session_pool`: let sessions share a seat between turns."},"mean_context_tokens":{"type":"number","description":"`live_session_pool`: the mean context of a session, in tokens; default 32768.","exclusiveMinimum":0},"prefix_sharing_alpha":{"type":"number","description":"`live_session_pool`: the share of context sessions have in common; default 0.","minimum":0,"maximum":1},"harness_kind":{"type":["string","null"],"description":"`live_session_pool`: the harness that runs the sessions.","minLength":1},"phase_class":{"type":"string","description":"`live_session_pool`: the kind of agent stage, which sets its planning estimates.","enum":["cartographer","exploitation_hunter","coding_harness","scavenger_flex"]},"cpu_arch":{"type":"string","description":"`cpu_scavenger`: an alias of `arch`."},"cpu_millis":{"type":"integer","description":"`cpu_scavenger`: CPU in thousandths of a core, rounded up to cores.","minimum":1},"memory_bytes":{"type":"integer","description":"`cpu_scavenger`: memory in bytes.","minimum":1,"maximum":9223372036854775807},"ram_gb":{"type":"number","description":"`cpu_scavenger`: memory in GiB.","exclusiveMinimum":0},"max_pending_packs":{"type":"integer","description":"Pending plus live leased packs the stream admits.","minimum":1},"mounts":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Data read just in time."},"datasets":{"type":"array","items":{"$ref":"#/components/schemas/StageMount"},"description":"Data read just in time."},"lazy_materializer":{"$ref":"#/components/schemas/StageLazyMaterializer"},"workload_spec":{"type":"object","properties":{},"description":"`live_session_pool`: the session runner's own fields as one object; its `model` must be the stage's.","additionalProperties":true},"scavenger":{"type":"object","properties":{},"description":"`cpu_scavenger`: the CPU and memory figures (`cpu_cores`, `ram_mb`, `arch`) as one object, read before the workload's own.","additionalProperties":true},"sharing_mode":{"type":"string","description":"`live_session_pool`: `dedicated_node` keeps the stage's sessions from sharing a seat between turns."},"qos_priority":{"type":"string","description":"The QoS tier. `priority`, `interactive` and `standard` resolve to the standard class, the rest to flex; each tier also implies a priority weight (see `priority_weight`). `qos_tier` and `qos` are aliases, read in that order.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos_tier":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"qos":{"type":"string","description":"An alias of `qos_priority`.","enum":["standard","interactive","priority","flex","batch","scavenger","piggyback"]},"priority_weight":{"type":"integer","description":"How strongly this work is preferred when work of several plans shares capacity: heavier work is woken first, and running work shares a model's sessions in proportion to its weight. Left out, the QoS tier's weight: `priority` 4, `interactive` 3, `standard` 2, every flex tier 1. A weight never starts capacity by itself.","minimum":1,"maximum":16},"min_remaining_window_ms":{"type":"integer","description":"A pack is handed out only while at least this much of the window is left, in milliseconds.","minimum":1,"maximum":9223372036854775807},"est_duration_ms":{"type":"integer","description":"How long one pack is expected to take, in milliseconds; used by `skip_unfinishable_packs`.","minimum":1,"maximum":9223372036854775807},"skip_unfinishable_packs":{"type":"boolean","description":"`true` stops handing out a pack whose own estimated duration no longer fits in what is left of the window. Read from the schedule."},"command":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: the command, a string or a list."},"args":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: its arguments, a string or a list."},"entrypoint":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}],"description":"Session runner: the entry point, a string or a list."},"env":{"type":"object","properties":{},"description":"Session runner: environment variables, a name to a string value.","additionalProperties":{"type":"string"}},"allowed_target_domains":{"type":"array","items":{"type":"string","minLength":1},"description":"Session runner: a list of domains."},"allowed_domains":{"type":"array","items":{"type":"string","minLength":1},"description":"Session runner: a list of domains."},"lease_ttl_seconds":{"type":"integer","description":"Session runner: a whole number of seconds.","minimum":1,"maximum":9223372036854775807},"heartbeat_interval_seconds":{"type":"number","description":"Session runner: a positive number of seconds.","exclusiveMinimum":0},"timeout_seconds":{"type":"number","description":"Session runner: a positive number of seconds.","exclusiveMinimum":0},"require_hot_pool":{"type":"boolean","description":"Session runner: a boolean."},"requeue_on_failure":{"type":"boolean","description":"Session runner: a boolean."}},"required":["kind"],"description":"What a stage runs. An unknown field is refused with `400 invalid_compute_plan`, and so is a field its `kind` cannot use. Every field of the customer contract is listed. The validator also takes three fields that choose a hardware layout; the service's own plans use them, a customer plan does not send them, and they are not listed.","additionalProperties":false},"StreamBacklog":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"stream_id":{"type":"string"},"plan_state":{"type":"string"},"stage_state":{"type":"string"},"pickup_status":{"type":"string","description":"`completed`, `draining`, `ready_for_pickup` or `waiting_primary_or_price`, or a queued value while the plan is held `queued`."},"stream_sealed":{"type":"boolean","description":"New pack identifiers are refused; lazy packs can still be promoted."},"continuous":{"type":"boolean"},"packs_total":{"type":"integer","minimum":0},"packs_completed":{"type":"integer","minimum":0},"counts":{"type":"object","properties":{},"description":"Packs per stored state, e.g. `lazy`, `pending`, `completed`, `expired_incomplete` and, when present, `dead_lettered`.","additionalProperties":{"type":"integer","minimum":0}},"leased_live":{"type":"integer","description":"Leases expiring after now.","minimum":0},"leased_expired":{"type":"integer","description":"Leases expired at or before now.","minimum":0},"active_packs":{"type":"integer","description":"Pending plus live leased packs.","minimum":0},"lookahead_window":{"type":"integer","minimum":0},"max_pending_packs":{"type":["integer","null"],"description":"The stream's limit, or null.","minimum":1},"backpressured":{"type":"boolean","description":"Active packs reached the limit."},"deficit":{"type":"integer","description":"Pending packs needed to fill the window within the limit; zero under backpressure.","minimum":0},"next_lazy_packs":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true},"description":"At most `deficit` lazy registrations in ordinal order."},"policy_signal":{"type":"string","description":"Advisory: `pause_materialization` (no deficit, or backpressure) or `materialize_next_lazy` (prepare the candidates now); another value while work waits."},"last_poll_at_ms":{"type":["integer","null"],"description":"The latest service-wide execution poll, in Unix milliseconds."},"active_classifier_replicas":{"type":"integer","description":"A classifier stream only: the classifier replicas placed now on capacity that may run this stream.","minimum":0},"recommended_lookahead_packs":{"type":"integer","description":"A classifier stream only: the pending packs to keep ahead of those replicas, 8 for each and never fewer than 16. Read it on every tick and pass it as `lookahead_window`.","minimum":16},"pack_sizing_advisory":{"type":"object","properties":{"schema":{"type":"string","description":"`weights.pack-sizing-advisory/v1`."},"recommended_lookahead_packs":{"type":"integer","description":"The same figure as the field of that name above.","minimum":16},"active_classifier_replicas":{"type":"integer","description":"The same figure as the field of that name above.","minimum":0},"lookahead":{"type":"object","properties":{"floor_packs":{"type":"integer"},"packs_per_classifier_replica":{"type":"integer"},"recommended_lookahead_packs":{"type":"integer","minimum":16},"active_classifier_replicas":{"type":"integer","minimum":0},"rule":{"type":"string","description":"The rule in words."},"read_from":{"type":"string","description":"Where the live figures are read."}},"description":"The rule the two figures follow, with the same two figures.","additionalProperties":true}},"required":["schema","recommended_lookahead_packs","active_classifier_replicas","lookahead"],"description":"A classifier stream only. The two figures are stated here, in `lookahead` and on the backlog itself, and are equal in all three places.","additionalProperties":true}},"required":["plan_id","stage_id","stream_id","counts","deficit","next_lazy_packs"],"description":"A stream's lookahead snapshot; it reserves nothing.","additionalProperties":true},"StreamOutput":{"type":"object","properties":{"pack_id":{"type":"string"},"ordinal":{"type":"integer","minimum":0},"item_count":{"type":"integer","minimum":1},"completed_at_ms":{"type":["integer","null"],"description":"When the pack completed, in Unix milliseconds."},"receipt":{"oneOf":[{"$ref":"#/components/schemas/PackReceipt"},{"type":"null"}]},"output_path":{"type":"string","description":"The path of `GET .../packs/{pack_id}/output` for this pack."}},"required":["pack_id","ordinal","receipt","output_path"]},"StreamOutputs":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"stream_id":{"type":"string"},"after_ordinal":{"type":"integer","minimum":-1},"limit":{"type":"integer","minimum":1,"maximum":500},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/StreamOutput"},"description":"Ascending ordinal."},"next_after_ordinal":{"type":["integer","null"],"description":"The last listed ordinal, or null for an empty page."}},"required":["plan_id","stage_id","stream_id","after_ordinal","limit","outputs","next_after_ordinal"]},"StreamSealed":{"type":"object","properties":{"plan_id":{"type":"string"},"stage_id":{"type":"string","description":"The authored stage identifier."},"stream_id":{"type":"string"},"sealed":{"type":"boolean","description":"Always `true` on success.","const":true},"state":{"type":"string","description":"The stage's state after sealing; may already be `completed`."},"total_items":{"type":"integer","description":"Classifier and embedding streams: the total, inferred on an open stream's first seal.","minimum":0,"maximum":9223372036854775807}},"required":["plan_id","stage_id","stream_id","sealed","state"]},"Token":{"type":"object","properties":{"id":{"type":"integer","description":"The token's number in your account; `DELETE /v1/tokens/{token_id}` takes it."},"name":{"type":"string","description":"The name given when it was made, or `token` if none was."},"prefix":{"type":"string","description":"The first characters of the token, `weights_` and eight more: enough to recognise it, never enough to use it."},"scopes":{"type":"array","items":{"type":"string","enum":["submit","read","manage"]},"description":"What the token may do, in the order `submit`, `read`, `manage`."},"created_at":{"type":"string","description":"When the token was made.","format":"date-time"},"expires_at":{"type":["string","null"],"description":"When the token stops working; `null` for no expiry.","format":"date-time"},"expired":{"type":"boolean","description":"`true` once `expires_at` has passed."},"revoked_at":{"type":["string","null"],"description":"When the token was revoked; `null` while it has not been.","format":"date-time"},"last_used_at":{"type":["string","null"],"description":"When the token was last used for any call; `null` if never.","format":"date-time"},"last_used_address":{"type":["string","null"],"description":"The address the last call came from, as the service saw it; `null` when none was recorded."},"daily_cap_usd_micros":{"type":["integer","null"],"description":"The spend cap per UTC day in micro-dollars; `null` for no cap."},"spend_today":{"oneOf":[{"$ref":"#/components/schemas/TokenSpendToday"},{"type":"null"}]},"rate_limit":{"type":"object","properties":{"requests_per_second":{"type":"number","description":"Calls that send work it may make per second on average."},"burst":{"type":"integer","description":"Calls that send work it may make at once before the rate applies."}},"required":["requests_per_second","burst"],"description":"The token's request rate for calls that need `submit`."},"issued_by":{"type":["integer","null"],"description":"The person who issued the token: the person behind the credential that made it. `null` for a token no person issued. `scope=mine` lists read it."}},"required":["id","name","prefix","scopes","created_at","expires_at","expired","revoked_at","last_used_at","last_used_address","daily_cap_usd_micros","spend_today","rate_limit","issued_by"],"description":"An API token as its account sees it: never the token itself, only its visible prefix. `spend_today` is set only for a live token with a cap."},"TokenCreate":{"type":"object","properties":{"name":{"type":"string","description":"A name of your choice, shown in lists; `token` when left out."},"scopes":{"type":"array","items":{"type":"string","enum":["submit","read","manage"]},"description":"At least one scope, each held by the calling token; `submit` and `read` when left out.","minItems":1},"expires_at":{"type":"string","description":"When the token stops working: ISO 8601 with a time zone, in the future. Leave it out for no expiry.","format":"date-time"},"daily_cap_usd":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"The spend cap per UTC day in US dollars, above zero, such as `\"25\"` or `12.5`. Leave it out for no cap."}},"description":"Every field is optional; `{}` makes a `submit` and `read` token with no expiry and no cap."},"TokenCreated":{"type":"object","properties":{"id":{"type":"integer","description":"The token's number in your account, used to revoke it."},"token":{"type":"string","description":"The token itself, shown in this answer only."},"prefix":{"type":"string","description":"The token's first characters, as lists show it."},"name":{"type":"string","description":"The name it was given."},"scopes":{"type":"array","items":{"type":"string","enum":["submit","read","manage"]},"description":"Its scopes, in alphabetical order."},"created_at":{"type":"string","description":"When it was made.","format":"date-time"},"expires_at":{"type":["string","null"],"description":"When it stops working, or `null`.","format":"date-time"},"daily_cap_usd_micros":{"type":["integer","null"],"description":"Its spend cap per UTC day in micro-dollars, or `null`."},"issued_by":{"type":["integer","null"],"description":"The person who issued it: the person behind the calling credential, or `null` when that credential names none."},"note":{"type":"string","description":"A reminder that the token is shown once."}},"required":["id","token","prefix","name","scopes","created_at","expires_at","daily_cap_usd_micros","issued_by","note"],"description":"A new API token, returned once: the service keeps only a digest and the visible prefix."},"TokenSpendToday":{"type":"object","properties":{"day":{"type":"string","description":"The day over which spend is counted.","enum":["UTC"]},"since":{"type":"string","description":"The start of today, 00:00 UTC.","format":"date-time"},"resets_at":{"type":"string","description":"The start of tomorrow, 00:00 UTC, when the count starts again.","format":"date-time"},"spent_usd_micros":{"type":"integer","description":"Charges posted today for the token's page jobs, plus what its training jobs were charged on this UTC day."},"pages_waiting":{"type":"integer","description":"Pages of those jobs still waiting or being worked on.","minimum":0},"waiting_usd_micros":{"type":"integer","description":"Those pages at each job's price per page."},"training_reserved_usd_micros":{"type":"integer","description":"What is left of the estimates of the token's open training jobs."},"committed_usd_micros":{"type":"integer","description":"Spent plus waiting plus training reserved: the figure the cap is checked against."}},"required":["day","since","resets_at","spent_usd_micros","pages_waiting","waiting_usd_micros","committed_usd_micros"],"description":"Today's spend of a live token with a daily cap, counted over the UTC day."},"Topup":{"type":"object","properties":{"topup_id":{"type":"string","description":"The payment's identifier, also listed in `pending_topups` until it is paid."},"checkout_url":{"type":"string","description":"The `https` address of the hosted payment page; open it in a browser to pay."},"usd":{"type":"string","description":"The amount the page asks for, in dollars with two decimals."}},"required":["topup_id","checkout_url","usd"],"description":"A payment page for an amount of credit."},"TopupRequest":{"type":"object","properties":{"usd":{"oneOf":[{"type":"string"},{"type":"number"}],"description":"The amount in US dollars, in whole cents, such as `\"25.00\"`, at least the payment minimum."}},"required":["usd"]},"TraceAttribute":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"object","properties":{},"description":"One of `stringValue`, `intValue` (a string), `boolValue`, `doubleValue` or `arrayValue`.","additionalProperties":true}},"required":["key","value"],"description":"An OTLP key-value pair."},"TraceContentEntry":{"type":"object","properties":{"id":{"type":"integer","description":"The entry's own number, which `after` counts."},"seq":{"type":"integer","description":"The page's sequence number in the job."},"kind":{"type":"string","enum":["input","output"]},"payload":{"type":"object","properties":{},"description":"The copy: for an input, the page's `text` and your `id`; for an output, the model's answer; for an entry that was too large, `truncated: true`, `original_bytes` and a shortened `preview`.","additionalProperties":true},"captured_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"}},"required":["id","seq","kind","payload","captured_at","expires_at"],"description":"One kept copy of an input or an output."},"TraceContentPage":{"type":"object","properties":{"job_id":{"type":"string"},"content":{"type":"array","items":{"$ref":"#/components/schemas/TraceContentEntry"},"description":"The entries in the order they were kept."},"next_after":{"type":["integer","null"],"description":"The cursor for the next call; `null` when there is nothing more."}},"required":["job_id","content","next_after"]},"TraceExport":{"type":"object","properties":{"resourceSpans":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"object","properties":{"attributes":{"type":"array","items":{"$ref":"#/components/schemas/TraceAttribute"},"description":"`service.name` (`weights.fyi`), and `weights.model` where the answer holds a job's spans."}}},"scopeSpans":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"object","properties":{"name":{"type":"string","enum":["weights.telemetry"]}}},"spans":{"type":"array","items":{"$ref":"#/components/schemas/SpanOtlp"},"description":"The spans, oldest first."}}},"description":"One entry."}}},"description":"One entry: the service as the source of every span."}},"required":["resourceSpans"],"description":"One OTLP `ExportTraceServiceRequest`, content-free."},"TraceJobLog":{"type":"object","properties":{"job_id":{"type":"string","description":"The job, as in the path."},"outputs":{"type":"boolean","description":"`true` when the entries carry each page's result."},"logs":{"type":"array","items":{"$ref":"#/components/schemas/SpanLogEntry"},"description":"The entries, oldest first by their start."}},"required":["job_id","outputs","logs"]},"TracePreferences":{"type":"object","properties":{"log_inputs":{"type":"boolean","description":"`true` when new jobs keep a copy of each page you send."},"log_outputs":{"type":"boolean","description":"`true` when new jobs keep a copy of each result the model gives."},"retention_days":{"type":"integer","description":"How many days a copy is kept; fixed by the service."},"max_payload_bytes":{"type":"integer","description":"The largest copy kept whole; a larger one is kept as a marked, shortened preview. Fixed by the service."},"max_account_bytes":{"type":"integer","description":"The most your account keeps in all; fixed by the service."}},"required":["log_inputs","log_outputs","retention_days","max_payload_bytes","max_account_bytes"],"description":"The content logging switches and the limits the copies live under."},"TraceSwitches":{"type":"object","properties":{"log_inputs":{"type":"boolean","description":"`true` when new jobs keep a copy of each page you send."},"log_outputs":{"type":"boolean","description":"`true` when new jobs keep a copy of each result the model gives."}},"required":["log_inputs","log_outputs"],"description":"Both content logging switches.","additionalProperties":false},"Usage":{"type":"object","properties":{"balance_usd_micros":{"type":"integer","description":"Your credit after every charge, in micro-dollars."},"in_progress_usd_micros":{"type":"integer","description":"Charges not yet posted; 0, since charges post as the work lands."},"available_usd_micros":{"type":"integer","description":"What you can spend now; new work is admitted against this figure."},"jobs":{"type":"array","items":{"$ref":"#/components/schemas/UsageJob"},"description":"Your most recent page jobs, newest first."},"fine_tunes":{"type":"array","items":{"$ref":"#/components/schemas/UsageFineTune"},"description":"Your most recent fine-tunes, newest first."},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/UsageEndpoint"},"description":"Your LLM endpoints."},"days":{"type":"array","items":{"$ref":"#/components/schemas/UsageDay"},"description":"Per UTC day, newest first."},"other_charges":{"type":"array","items":{"$ref":"#/components/schemas/UsageLedgerLine"},"description":"Charges that belong to no unit: the Tracing and tracking fee, and charges by run made before prices per unit."},"credits":{"type":"array","items":{"$ref":"#/components/schemas/UsageLedgerLine"},"description":"Credit added, granted or refunded, newest first."},"pending_topups":{"type":"array","items":{"$ref":"#/components/schemas/UsagePendingTopup"},"description":"Payment pages you opened and did not pay yet."},"note":{"type":"string","description":"One sentence on how a charge is counted."}},"required":["balance_usd_micros","in_progress_usd_micros","available_usd_micros","jobs","fine_tunes","endpoints","days","other_charges","credits","pending_topups","note"],"description":"Your balance, what you can spend now, and what you bought, each list newest first.","additionalProperties":true},"UsageDay":{"type":"object","properties":{"day":{"type":"string","description":"The UTC day.","format":"date"},"usd_micros":{"type":"integer","description":"All charges of the day."},"chat":{"type":"object","properties":{"requests":{"type":"integer"},"prompt_tokens":{"type":"integer"},"cached_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"usd_micros":{"type":"integer"}},"additionalProperties":true},"pages":{"type":"object","properties":{"pages":{"type":"integer"},"usd_micros":{"type":"integer"}},"additionalProperties":true},"training":{"type":"object","properties":{"training_tokens":{"type":"integer"},"usd_micros":{"type":"integer"}},"additionalProperties":true}},"required":["day","usd_micros"],"description":"One UTC day's charges by unit; a unit without charges that day is left out.","additionalProperties":true},"UsageEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint's id."},"model":{"type":"string"},"requests":{"type":"integer","description":"Chat calls made."},"by_outcome":{"type":"object","properties":{},"description":"Calls per outcome.","additionalProperties":{"type":"integer"}},"prompt_tokens":{"type":"integer","description":"Prompt tokens, cached included."},"cached_tokens":{"type":"integer","description":"Cached prompt tokens."},"completion_tokens":{"type":"integer","description":"Output tokens."},"charges_usd_micros":{"type":"object","properties":{"prompt":{"type":"integer"},"cached":{"type":"integer"},"output":{"type":"integer"}},"description":"Charges by part."},"usd_micros":{"type":"integer","description":"All charges of the endpoint."},"final":{"type":"boolean","description":"`true` when no call is in flight."}},"description":"An LLM endpoint's tokens and charges.","additionalProperties":true},"UsageFineTune":{"type":"object","properties":{"job_id":{"type":"string"},"model":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"training_tokens":{"type":"integer","description":"The tokens trained and charged."},"cost_usd_micros":{"type":["integer","null"],"description":"The sum of the job's charges."},"final":{"type":"boolean","description":"`true` once the job has ended."},"prices":{"type":"object","properties":{"usd_per_1m_training_tokens":{"type":"number","description":"The price per 1M training tokens it was admitted at."}},"additionalProperties":true}},"required":["job_id","model","created_at","status","cost_usd_micros","final"],"description":"A recent fine-tune and its cost.","additionalProperties":true},"UsageJob":{"type":"object","properties":{"job_id":{"type":"string"},"model":{"type":"string"},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string"},"pages":{"type":"integer","description":"Pages in the job."},"pages_done":{"type":"integer","description":"Pages answered."},"pages_counted":{"type":"integer","description":"Pages charged."},"cost_usd_micros":{"type":["integer","null"],"description":"The sum of the job's charges; `null` for a job admitted before prices per unit."},"final":{"type":"boolean","description":"`true` once the job has ended."},"prices":{"type":"object","properties":{"usd_per_1m_pages":{"type":"number","description":"The price per 1M pages the job was admitted at."}},"additionalProperties":true}},"required":["job_id","model","created_at","status","pages","pages_done","cost_usd_micros","final"],"description":"A recent page job and its cost.","additionalProperties":true},"UsageLedgerLine":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"usd_micros":{"type":"integer"},"kind":{"type":"string","description":"Only on `credits`.","enum":["topup","grant","refund"]},"what":{"type":"string","description":"The line in words, such as `Credit added` or `Credit granted`."}},"required":["at","usd_micros","what"],"description":"A credit (`credits`) or a charge that belongs to no unit (`other_charges`).","additionalProperties":true},"UsagePendingTopup":{"type":"object","properties":{"topup_id":{"type":"string","description":"The payment page's id, as `POST /v1/credit/topups` answered it."},"usd_micros":{"type":"integer","description":"The amount asked."},"created_at":{"type":"string","format":"date-time"},"state":{"type":"string","enum":["awaiting_payment"]}},"required":["topup_id","usd_micros","created_at","state"],"description":"A payment page not paid yet."},"UsageReceipt":{"type":"object","properties":{"schema":{"type":"string","description":"`weights.billed-usage/v1` in a page of receipts; `weights.receipts/v1` on a lookup by `request_id`.","enum":["weights.billed-usage/v1","weights.receipts/v1"]},"request_id":{"type":"string","description":"The request the receipt is for.","format":"uuid"},"state":{"type":"string","description":"`settled` for a billed request. On a lookup also `pending` (admitted, not yet settled) and `unknown` (no such request of this account); those two carry no further figures."},"receipt_seq":{"type":"string","description":"The receipt's place in your account's sequence, a whole number as text; the cursor `after` and `through` compare with."},"receipt_id":{"type":"string","description":"The receipt's identifier."},"admission_id":{"type":"string","description":"The admission the request ran under."},"currency":{"type":"string","enum":["USD"]},"amount_usd_micros":{"type":"string","description":"What was charged, in micro-dollars, a whole number as text."},"computed_usd_micros":{"type":"string","description":"The amount worked out before any cap, the same way."},"parts_usd_micros":{"type":"object","properties":{},"description":"The amount by part, such as `prompt`, `cached` and `output`.","additionalProperties":{"type":"string"}},"cap_reason":{"type":["string","null"],"description":"Why the charge was capped below the computed amount, or null."},"price_snapshot_id":{"type":"string","description":"The prices the request was admitted at."},"usage":{"type":"object","properties":{},"description":"The units billed: tokens, pages or steps.","additionalProperties":true},"usage_basis":{"type":"string","description":"Where the unit counts come from, e.g. `upstream_reported`."},"model":{"type":["string","null"],"description":"The model that did the work."},"terminal_status":{"type":["string","null"],"description":"How the request ended, e.g. `completed`."},"terminal_reason":{"type":["string","null"],"description":"Why, when it did not complete."},"compute_plan":{"type":"object","properties":{},"description":"For a plan's work: the plan, stage and pack.","additionalProperties":true},"recovered":{"type":"boolean","description":"Whether the answer was carried across a move."},"settled_at":{"type":"string","description":"When it was settled.","format":"date-time"}},"required":["request_id","state"],"description":"One usage receipt: what one settled request was billed. Amounts and sequence numbers are whole numbers written as text.","additionalProperties":true},"UsageReceiptPage":{"type":"object","properties":{"schema":{"type":"string","enum":["weights.receipts/v1"]},"receipts":{"type":"array","items":{"$ref":"#/components/schemas/UsageReceipt"},"description":"In `receipt_seq` order, oldest first."},"after":{"type":"string","description":"The `after` this page was read from, as text."},"through":{"type":"string","description":"The `receipt_seq` this listing ends at: yours, or the account's latest when you sent none. Send it again with each page to read one fixed window."},"next":{"type":"string","description":"The `after` of the next page: the last listed `receipt_seq`, or this page's `after` when the page is empty."},"has_more":{"type":"boolean","description":"Whether more receipts remain up to `through`."}},"required":["schema","receipts","after","through","next","has_more"],"description":"A page of your account's usage receipts."},"Worker":{"type":"object","properties":{"id":{"type":"string","description":"The worker's identifier, the `node_id` the other calls take.","format":"uuid"},"workspace_id":{"type":"integer","description":"The workspace it is enrolled in."},"name":{"type":"string","description":"The name it enrolled under, one of a kind in the workspace."},"status":{"type":"string","description":"`revoked` for good once it has been revoked.","enum":["active","revoked"]},"join_token_id":{"type":"integer","description":"The join token it enrolled with."},"facts":{"type":"object","properties":{"agent_version":{"type":"string","description":"The version of the agent that enrolled it, as the agent names it."},"platform":{"type":"string","description":"Its operating system and architecture, e.g. `Linux-aarch64`."}},"required":["agent_version","platform"],"description":"What the worker's agent reported about itself at enrollment.","additionalProperties":true},"region":{"type":["string","null"],"description":"The region it declared, or `null`."},"spki_sha256":{"type":"string","description":"The SHA-256 of the public key its certificate is issued for, in hexadecimal."},"enrolled_at":{"type":"string","description":"When it enrolled.","format":"date-time"},"revoked_at":{"type":["string","null"],"description":"When it was revoked, or `null`.","format":"date-time"},"serving":{"type":"string","description":"`serving`: offered your calls. `paused`: offered none, its connection kept, so a resume serves at once. `draining`: offered none, and the `weights` agent stops once it has answered what it holds. Calls it already took finish in every state.","enum":["serving","paused","draining"]},"serving_changed_at":{"type":["string","null"],"description":"When it was last paused, drained or resumed, or `null` if never.","format":"date-time"},"serving_reason":{"type":["string","null"],"description":"The reason recorded with that change, or `null` if never."},"open_sessions":{"type":"integer","description":"How many connections it holds to the service now; 0 while it is away.","minimum":0},"offers":{"type":"array","items":{"$ref":"#/components/schemas/WorkerOffer"},"description":"The models it offers, by model id."}},"required":["id","workspace_id","name","status","join_token_id","facts","region","spki_sha256","enrolled_at","revoked_at","serving","serving_changed_at","serving_reason","open_sessions","offers"],"description":"One of your workspace's own workers."},"WorkerJoinToken":{"type":"object","properties":{"join_token":{"type":"string","description":"The token itself, `wjt_` and random characters, shown in this answer only."},"id":{"type":"integer","description":"The token's number; the revoke call takes it."},"workspace_id":{"type":"integer","description":"The workspace a worker enrolling with it joins."},"expires_at":{"type":"string","description":"When it stops enrolling.","format":"date-time"},"models":{"type":["array","null"],"items":{"type":"string"},"description":"The model ids it allows, or `null` for any."},"auto_publish":{"type":"boolean","description":"Whether enrollment with it publishes the worker's offers."}},"required":["join_token","id","workspace_id","expires_at","models","auto_publish"]},"WorkerJoinTokenPolicy":{"type":"object","properties":{"models":{"type":"array","items":{"type":"string"},"description":"The model ids a worker enrolling with this token may offer; any when left out.","minItems":1},"auto_publish":{"oneOf":[{"type":"boolean","description":"`true` publishes each offer at enrollment, into a model's existing declaration."},{"type":"object","properties":{"priority":{"type":"integer","description":"The priority an offer takes when it names none.","minimum":1},"pools":{"type":"object","properties":{},"description":"The declaration of each model, by model id.","additionalProperties":{"$ref":"#/components/schemas/WorkerPoolDeclaration"}},"default_pool":{"$ref":"#/components/schemas/WorkerPoolDeclaration"}},"additionalProperties":false}],"description":"Whether enrollment publishes the worker's offers by itself, and with which declarations. The default, `false`, leaves publishing to a separate call."}},"description":"What a join token allows; every field is optional.","additionalProperties":false},"WorkerJoinTokenRevoked":{"type":"object","properties":{"id":{"type":"integer","description":"The token's number."},"workspace_id":{"type":"integer","description":"Its workspace."},"revoked_at":{"type":"string","description":"When it was revoked; the first time, when the call is repeated.","format":"date-time"}},"required":["id","workspace_id","revoked_at"]},"WorkerList":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Worker"}}},"required":["data"]},"WorkerOffer":{"type":"object","properties":{"model":{"type":"string","description":"The model id the offer answers as."},"backend_kind":{"type":"string","description":"What the worker runs behind the offer, e.g. `openai` for an OpenAI-compatible server."},"upstream_model":{"type":"string","description":"The name the worker's own server knows the model by."},"max_in_flight":{"type":"integer","description":"How many calls it takes at once.","minimum":1},"call_timeout_seconds":{"type":"number","description":"How long one call may take on it.","exclusiveMinimum":0},"modalities":{"type":"array","items":{"type":"string","enum":["text","image"]},"description":"What a call's content may hold."},"region":{"type":["string","null"],"description":"The region the offer declared, or `null`."},"status":{"type":"string","description":"`published` once calls can reach it, `offered` until then.","enum":["offered","published"]},"pool":{"type":["string","null"],"description":"The pool it is published into, or `null` while it is only offered."},"priority":{"type":["integer","null"],"description":"Its place among the model's workers, lowest asked first; `null` until one is set.","minimum":1},"chat_fields":{"type":"array","items":{"type":"string"},"description":"The optional chat fields it takes."}},"required":["model","backend_kind","upstream_model","max_in_flight","call_timeout_seconds","modalities","region","status","pool","priority","chat_fields"]},"WorkerOfferPublish":{"type":"object","properties":{"priority":{"type":"integer","description":"The offer's place among the model's workers, lowest asked first. Left out, the priority the worker declared at enrollment.","minimum":1},"pool":{"$ref":"#/components/schemas/WorkerPoolDeclaration"},"upstream_alias_reason":{"type":"string","description":"Why a worker serving another model's name answers as this one, where other workspaces also call the model: one sentence that starts with `R:`, `M:`, `F:`, `A:` or `D:`."}},"description":"Every field is optional; `pool` is needed the first time a model is published.","additionalProperties":false},"WorkerOfferPublished":{"type":"object","properties":{"node_id":{"type":"string","description":"The worker.","format":"uuid"},"model":{"type":"string","description":"The model id."},"status":{"type":"string","enum":["published"]},"pool":{"type":"string","description":"The pool the offer is published into."},"priority":{"type":"integer","description":"The priority it took.","minimum":1}},"required":["node_id","model","status","pool","priority"]},"WorkerPoolDeclaration":{"type":"object","properties":{"description":{"type":"string","description":"What the model is, for the catalogue.","minLength":1,"maxLength":512},"context_tokens":{"type":"object","properties":{"value":{"type":"integer","description":"The model's context length in tokens.","minimum":1},"reason":{"type":"string","description":"Where the figure comes from: one sentence that starts with `R:`, `M:`, `F:`, `A:` or `D:`."}},"required":["value","reason"]},"usd_per_1m":{"type":"object","properties":{"prompt":{"type":"number","description":"US dollars per 1M prompt tokens.","exclusiveMinimum":0},"output":{"type":"number","description":"US dollars per 1M output tokens.","exclusiveMinimum":0},"reason":{"type":"string","description":"Where the figure comes from: one sentence that starts with `R:`, `M:`, `F:`, `A:` or `D:`."}},"required":["prompt","output","reason"]},"region":{"type":["string","null"],"description":"The region every worker of the model must declare, or `null` for any."}},"required":["description","context_tokens","usd_per_1m","region"],"description":"What a model served by your own workers is declared as: its description, context length, prices and region. Needed once, by whoever first publishes the model.","additionalProperties":false},"WorkerRevoke":{"type":"object","properties":{"reason":{"type":"string","description":"Why, for your own record; at most 512 characters.","maxLength":512}},"description":"Optional."},"WorkerServing":{"type":"object","properties":{"reason":{"type":"string","description":"Why, for your own record; at most 512 characters.","maxLength":512}},"description":"Optional."},"Workspace":{"type":"object","properties":{"id":{"type":"integer","description":"The workspace's number."},"name":{"type":"string","description":"The workspace's name."},"owner_id":{"type":"integer","description":"The person who owns it."},"created_at":{"type":"string","description":"When it was made.","format":"date-time"},"cmk":{"oneOf":[{"$ref":"#/components/schemas/WorkspaceCmk"},{"type":"null"}]},"c2":{"oneOf":[{"$ref":"#/components/schemas/WorkspaceC2"},{"type":"null"}]},"confidential":{"type":["string","null"],"description":"Confidential execution mode, or `null` when unset.","enum":["shared","dedicated",null]},"trace_preferences":{"$ref":"#/components/schemas/TraceSwitches"},"trace_sinks_count":{"type":"integer","description":"How many trace destinations the workspace has, paused ones included.","minimum":0},"governed_tracing":{"type":"boolean","description":"`true` when both switches are off and the count is `0`: nothing of a call leaves the service."},"domains":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceDomain"},"description":"Email domains claimed or verified by this workspace."}},"required":["id","name","owner_id","created_at","cmk","c2","trace_preferences","trace_sinks_count","governed_tracing","domains"],"description":"A workspace as its keys see it. `cmk` and `c2` are `null` when never bound.","additionalProperties":true},"WorkspaceAudit":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"at":{"type":"string","format":"date-time"},"actor":{"type":"object","properties":{"kind":{"type":"string","enum":["account","person","service"]},"id":{"type":["integer","null"]}},"required":["kind","id"]},"kind":{"type":"string"},"detail":{"type":"object","properties":{},"description":"Ids, states, codes and amounts.","additionalProperties":true}},"required":["id","at","actor","kind","detail"]}},"next_after":{"type":["integer","null"],"description":"The `after` of the next page; the newest event's id."}},"required":["events","next_after"]},"WorkspaceBindingRevoke":{"type":"object","properties":{"state":{"type":"string","enum":["revoked"]}},"required":["state"],"description":"Revokes the binding; `null` is refused.","additionalProperties":false},"WorkspaceC2":{"type":"object","properties":{"tenant_id":{"type":"string","description":"The directory tenant, a lowercase UUID."},"client_id":{"type":"string","description":"The compute identity, a UUID; never the `cmk` one."},"subscription_id":{"type":"string","description":"The Azure subscription, a UUID."},"resource_group":{"type":"string","description":"The resource group the VMs are in."},"vms":{"type":"array","items":{"type":"string"},"description":"The bound VM names."},"state":{"type":"string","enum":["active","revoked"]},"bound_at":{"type":"string","description":"When the VMs were bound.","format":"date-time"},"revoked_at":{"type":["string","null"],"description":"When the binding was revoked, or `null`.","format":"date-time"}},"description":"The workspace's binding of its own Azure VMs: references only, never a credential."},"WorkspaceCmk":{"type":"object","properties":{"tenant_id":{"type":"string","description":"The directory tenant, a lowercase UUID."},"client_id":{"type":"string","description":"The dedicated storage identity, a lowercase UUID."},"vault":{"type":"string","description":"The key vault's name."},"key_name":{"type":"string","description":"The key's name."},"key_version":{"type":"string","description":"The fixed key version, 32 lowercase hexadecimal characters."},"kid":{"type":"string","description":"The canonical key identifier of that version."},"state":{"type":"string","enum":["active","revoked"]},"bound_at":{"type":"string","description":"When the key was bound.","format":"date-time"},"revoked_at":{"type":["string","null"],"description":"When the binding was revoked, or `null`.","format":"date-time"}},"description":"The workspace's customer-managed key for retained trace content: references only, never key material."},"WorkspaceDomain":{"type":"object","properties":{"domain":{"type":"string","description":"The claimed organisation domain, lower-case ASCII."},"status":{"type":"string","description":"`pending` until its TXT record is read; `verified` after.","enum":["pending","verified"]},"join_mode":{"type":"string","description":"`invite_only` keeps invitations as the only way in; `discoverable` offers a one-click Join to verified addresses at this domain; `auto_join` adds them as members at sign-in.","enum":["invite_only","discoverable","auto_join"]},"created_at":{"type":"string","description":"When the domain was claimed.","format":"date-time"},"verified_at":{"type":["string","null"],"description":"When DNS verification succeeded, or `null`.","format":"date-time"},"last_checked_at":{"type":["string","null"],"description":"When DNS was last checked, or `null`.","format":"date-time"},"dns_record":{"type":"object","properties":{"name":{"type":"string","description":"The DNS host name to publish at."},"type":{"type":"string","enum":["TXT"]},"value":{"type":"string","description":"The TXT value to publish."}},"required":["name","type","value"],"description":"The canonical TXT record to publish in your DNS."},"accepted_records":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"A DNS name checked during verification."},"type":{"type":"string","enum":["TXT"]},"values":{"type":"array","items":{"type":"string"},"description":"Any TXT value accepted at that name."}},"required":["name","type","values"]},"description":"Every TXT name and value accepted, including shared challenge labels."}},"required":["domain","status","join_mode","created_at","verified_at","last_checked_at","dns_record","accepted_records"],"description":"An email domain claimed or verified by the workspace."},"WorkspaceDomainClaim":{"type":"object","properties":{"domain":{"type":"string","description":"The organisation's email domain, such as `awow.io`; consumer mailbox domains are refused.","minLength":3},"join_mode":{"type":"string","description":"How verified addresses at the domain may join once verified; `invite_only` when left out.","enum":["invite_only","discoverable","auto_join"],"default":"invite_only"}},"required":["domain"],"additionalProperties":false},"WorkspaceDomainMode":{"type":"object","properties":{"join_mode":{"type":"string","description":"How verified addresses at the domain may join.","enum":["invite_only","discoverable","auto_join"]}},"required":["join_mode"],"additionalProperties":false},"WorkspaceEndpoint":{"type":"object","properties":{"id":{"type":"string","description":"The endpoint's id."},"model":{"type":"string","description":"The model it runs."}},"required":["id","model"],"description":"An LLM endpoint made for a named model, as `GET /v1/endpoints/{endpoint}` shows it.","additionalProperties":true},"WorkspaceHold":{"type":"object","properties":{"id":{"type":"integer"},"kind":{"type":"string"},"reference":{"type":"string"},"amount_usd":{"type":"number"},"created_at":{"type":"string","format":"date-time"},"orphaned":{"type":"boolean","description":"`true` when nothing can settle it any more: its pack is not running, or its stage or plan has ended. Never judged by age."},"why":{"type":["string","null"],"description":"Why it is orphaned: `plan_<state>`, `stage_<state>` or `pack_<state>`."},"why_words":{"type":["string","null"]}},"required":["id","kind","reference","amount_usd","created_at","orphaned","why","why_words"]},"WorkspaceItem":{"type":"object","properties":{"kind":{"type":"string","enum":["plan","job"]},"id":{"type":"string"},"name":{"type":["string","null"],"description":"A plan's `operation_key`: the name its submitter gave it."},"campaign":{"type":["string","null"],"description":"The plan's `metadata.run_id`."},"lane":{"type":"string","description":"A plan's `schedule.wake_policy` (`standard` when it names none); a job's service class."},"state":{"type":"string","description":"The plan's or job's own state."},"outcome":{"type":"object","properties":{"code":{"type":"string","description":"A run with dead-lettered packs or failed items is never `done`.","enum":["running","waiting","failed","degraded","blocked","done","incomplete","cancelled"]},"words":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","words","detail"]},"progress":{"type":"object","properties":{"packs_leased":{"type":"integer","description":"A plan's packs a worker holds leased now.","minimum":0},"last_completed_at":{"type":["string","null"],"description":"When a pack of the plan last completed; null while none has.","format":"date-time"}},"description":"A plan's packs completed, in all, dead-lettered and leased now, and its last completion; a job's items done, in all and failed.","additionalProperties":{"type":"integer","minimum":0}},"rate_packs_per_min":{"$ref":"#/components/schemas/Figure"},"settled_usd":{"$ref":"#/components/schemas/Figure"},"updated_at":{"type":["string","null"],"format":"date-time"},"links":{"type":"object","properties":{},"description":"The run's own read.","additionalProperties":{"type":"string"}}},"required":["kind","id","name","campaign","lane","state","outcome","progress","rate_packs_per_min","settled_usd","updated_at","links"]},"WorkspaceMembers":{"type":"object","properties":{"workspace_id":{"type":"integer"},"members":{"type":"array","items":{"type":"object","properties":{"person_id":{"type":"integer"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","admin","member"]},"joined_at":{"type":"string","format":"date-time"},"last_active_at":{"$ref":"#/components/schemas/Figure"},"last_signed_in_at":{"type":["string","null"],"description":"The person's last sign-in, in any workspace.","format":"date-time"}},"required":["person_id","email","role","joined_at","last_active_at","last_signed_in_at"]}},"invitations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"email":{"type":"string"},"role":{"type":"string","enum":["admin","member"]},"state":{"type":"string","enum":["pending","accepted","revoked","expired"]},"created_by":{"type":"integer"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time"},"accepted_at":{"type":["string","null"],"format":"date-time"},"accepted_by":{"type":["integer","null"]},"revoked_at":{"type":["string","null"],"format":"date-time"}},"required":["id","email","role","state","created_at","expires_at"]}}},"required":["workspace_id","members","invitations"]},"WorkspaceMembership":{"type":"object","properties":{"id":{"type":"integer","description":"The workspace's number."},"name":{"type":"string","description":"The workspace's name."},"owner_id":{"type":"integer","description":"The person who owns it."},"role":{"type":"string","description":"The person's role in it.","enum":["owner","admin","member"]},"created_at":{"type":"string","description":"When it was made.","format":"date-time"}},"required":["id","name","owner_id","role","created_at"],"description":"A workspace the key's person belongs to."},"WorkspaceMoney":{"type":"object","properties":{"available_usd":{"$ref":"#/components/schemas/Figure"},"held_usd":{"$ref":"#/components/schemas/Figure"},"active_holds":{"allOf":[{"$ref":"#/components/schemas/Figure"},{"type":"object","properties":{"value":{"type":["array","null"],"items":{"$ref":"#/components/schemas/WorkspaceHold"}}}}],"description":"Every open hold, none cut, each flagged `orphaned` or not."},"orphaned_holds":{"$ref":"#/components/schemas/Figure"},"burn_usd_per_hour":{"$ref":"#/components/schemas/Figure"},"burn_usd_per_hour_7d":{"$ref":"#/components/schemas/Figure"},"runs_out_at":{"$ref":"#/components/schemas/Figure"},"spend":{"type":"object","properties":{"window":{"type":"string"},"by_plan":{"$ref":"#/components/schemas/Figure"},"by_key":{"$ref":"#/components/schemas/Figure"},"by_person":{"$ref":"#/components/schemas/Figure"},"by_campaign":{"$ref":"#/components/schemas/Figure"}},"required":["window","by_plan","by_key","by_person","by_campaign"]},"caps":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["token_daily","monthly"]},"cap_usd":{"type":"number"}},"additionalProperties":true}},"billing":{"type":"object","properties":{"mode":{"type":["string","null"],"enum":["prepaid","active","paused","past_due",null]},"monthly_limit_usd":{"type":["number","null"]},"month_to_date_usd":{"$ref":"#/components/schemas/Figure"},"invoices":{"type":"array","items":{"type":"object","properties":{},"additionalProperties":true}}},"required":["mode","monthly_limit_usd","month_to_date_usd","invoices"],"description":"Read here by an admin; only the owner changes billing."}},"required":["available_usd","held_usd","active_holds","orphaned_holds","burn_usd_per_hour","burn_usd_per_hour_7d","runs_out_at","spend","caps","billing"],"description":"The workspace's money, for a credential that holds `manage` here."},"WorkspaceOverview":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"},"workspaces":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceMembership"},"description":"The key's person's workspaces with their role in each; empty for a key no person issued."}},"required":["workspace","workspaces"]},"WorkspaceRefusal":{"type":"object","properties":{"at":{"type":"string","format":"date-time"},"http_status":{"type":["integer","null"]},"reason":{"type":["string","null"]},"status":{"type":"string","description":"The call's own status word: `failed` and `cut` ended after the call was accepted.","enum":["refused","failed","cut"]},"source":{"type":"string","description":"`admission`: refused before the call was admitted; `call`: the call's own record.","enum":["admission","call"]},"cause":{"type":["string","null"]},"action":{"type":["string","null"],"description":"What to do about it, in words, e.g. `Release orphaned holds`."},"action_call":{"type":["string","null"],"description":"The API call that does it, where one does, e.g. `POST /v1/reservations/release-orphaned`."}},"required":["at","http_status","reason","status","source","cause","action","action_call"]},"WorkspaceRegister":{"type":"object","properties":{"confidential":{"oneOf":[{"type":"string","description":"Turn confidential mode on: `shared` or `dedicated` capacity.","enum":["shared","dedicated"]},{"$ref":"#/components/schemas/WorkspaceBindingRevoke"}],"description":"Confidential mode for the workspace, or `{\"state\": \"revoked\"}` to turn it off; leave it out to keep it as it is. A confidential workspace must keep both trace switches off, so a request that turns one on, or leaves one on, answers `400 invalid_preferences`. While it is on, the workspace cannot switch content logging on or add a trace destination (both answer `400 invalid_preferences`), and its classify calls must use an encrypted transport (`400 encrypted_envelope_required` otherwise)."},"name":{"type":"string","description":"The workspace to find (case does not matter) or create among the person's own; the key's own workspace when left out."},"trace_preferences":{"$ref":"#/components/schemas/TraceSwitches"},"purge_trace_content":{"type":"boolean","description":"Remove kept inputs and outputs; `true` when both switches end off."},"models":{"type":"array","items":{"type":"string","minLength":1},"description":"Up to 16 model ids; each gets an endpoint, as `POST /v1/endpoints` makes one.","maxItems":16},"issue_token":{"type":"object","properties":{"name":{"type":"string","description":"The new key's name."},"scopes":{"type":"array","items":{"type":"string","enum":["submit","read","manage"]},"description":"Within the calling key's scopes; `submit` and `read` when left out.","minItems":1}},"description":"A key of the workspace, returned once in `token`.","additionalProperties":false},"cmk":{"oneOf":[{"type":"object","properties":{"tenant_id":{"type":"string","description":"A lowercase UUID.","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"client_id":{"type":"string","description":"The dedicated storage identity, a lowercase UUID.","pattern":"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"},"vault":{"type":"string","description":"3 to 24 lowercase ASCII letters, digits or hyphens, starting with a letter, ending with a letter or digit, without consecutive hyphens.","pattern":"^[a-z][a-z0-9-]{1,22}[a-z0-9]$"},"key_name":{"type":"string","description":"1 to 127 ASCII letters, digits or hyphens.","pattern":"^[A-Za-z0-9-]{1,127}$"},"key_version":{"type":"string","description":"Exactly 32 lowercase hexadecimal characters.","pattern":"^[0-9a-f]{32}$"}},"required":["tenant_id","client_id","vault","key_name","key_version"],"additionalProperties":false},{"$ref":"#/components/schemas/WorkspaceBindingRevoke"}],"description":"Enroll a fixed key version for retained trace content (wrap and unwrap are proved first), or revoke it. Leave it out to keep the binding as it is."},"c2":{"oneOf":[{"type":"object","properties":{"tenant_id":{"type":"string","description":"A lowercase UUID."},"client_id":{"type":"string","description":"The compute identity, never the `cmk` one."},"subscription_id":{"type":"string","description":"The Azure subscription."},"resource_group":{"type":"string","description":"The resource group of the VMs."},"vms":{"type":"array","items":{"type":"string"},"description":"1 to 32 distinct VM names, each evictable and tagged for this workspace.","minItems":1,"maxItems":32,"uniqueItems":true}},"required":["tenant_id","client_id","subscription_id","resource_group","vms"],"additionalProperties":false},{"$ref":"#/components/schemas/WorkspaceBindingRevoke"}],"description":"Bind an existing workspace's own Azure VMs, which the service may start and deallocate, never create or delete; or revoke the binding. Leave it out to keep it as it is."}},"description":"Every field is optional; an empty body locks down the key's own workspace.","additionalProperties":false},"WorkspaceRegistered":{"type":"object","properties":{"workspace":{"$ref":"#/components/schemas/Workspace"},"created":{"type":"boolean","description":"`true` when the workspace was made by this call, `false` when it was found."},"trace_preferences":{"$ref":"#/components/schemas/TraceSwitches"},"trace_sinks_count":{"type":"integer","description":"How many trace destinations the workspace has, paused ones included.","minimum":0},"governed_tracing":{"type":"boolean","description":"`true` when both switches are off and no destination exists."},"purged":{"type":["integer","null"],"description":"The copies removed, or `null` when no purge was asked.","minimum":0},"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceEndpoint"},"description":"One per model named in `models`."},"token":{"$ref":"#/components/schemas/TokenCreated"}},"required":["workspace","created","trace_preferences","trace_sinks_count","governed_tracing","purged","endpoints"],"description":"The workspace as registered; `token` only when `issue_token` was sent."},"WorkspaceSnapshot":{"type":"object","properties":{"schema":{"type":"string","const":"weights.workspace-snapshot/v1"},"observed_at":{"type":"string","format":"date-time"},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["mine","workspace","all"]},"workspace_id":{"type":"integer"},"person_id":{"type":["integer","null"]},"token_id":{"type":["integer","null"]},"window":{"type":"string"},"list_rows":{"type":"integer","minimum":1}},"required":["kind","workspace_id","person_id","token_id","window","list_rows"]},"workspace":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"role":{"type":["string","null"],"description":"The caller's role here; null for a key no person issued.","enum":["owner","admin","member",null]}},"required":["id","name","role"]},"headline_verdict":{"type":"object","properties":{"code":{"type":"string","description":"`failed`, `degraded`, `waiting_price`, `waiting_capacity`, `waiting_dependency`, `waiting`, `running` or `idle`: the most urgent."},"sentence":{"type":"string","description":"The same in one sentence."}},"required":["code","sentence"]},"work_summary":{"type":"object","properties":{"running":{"type":"integer","minimum":0},"waiting":{"type":"integer","minimum":0},"failed":{"type":"integer","description":"Failed in the last 7 days.","minimum":0},"completed_7d":{"type":"integer","description":"Completed in the last 7 days with nothing lost.","minimum":0},"degraded_7d":{"type":"integer","description":"Completed in the last 7 days with dead-lettered packs or failed items: never counted as done.","minimum":0},"cancelled_7d":{"type":"integer","description":"Cancelled in the last 7 days.","minimum":0},"dead_lettered_packs":{"type":"integer","description":"Packs waiting for a retry or an accepted loss.","minimum":0}},"required":["running","waiting","failed","completed_7d","degraded_7d","cancelled_7d","dead_lettered_packs"],"description":"Counted over all of the scope's work, never only the listed items."},"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceItem"},"description":"The newest runs, at most the service's list size of plans and of jobs."},"items_listed":{"type":"object","properties":{"plans":{"type":"object","properties":{"listed":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["listed","total"]},"jobs":{"type":"object","properties":{"listed":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["listed","total"]}},"required":["plans","jobs"],"description":"How many of each the list shows, of how many."},"campaigns":{"type":"array","items":{"type":"object","properties":{"campaign":{"type":"string","description":"The `run_id` the plans carry in their `metadata`."},"plans":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"link":{"type":"string","description":"The campaign's own read."}},"required":["campaign","plans","open","failed","link"]}},"campaigns_total":{"type":"integer","minimum":0},"waiting_reasons":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceWaitingReason"},"description":"Each run `work_summary.waiting` counts, newest first, up to the list size."},"money":{"oneOf":[{"$ref":"#/components/schemas/WorkspaceMoney"},{"type":"null"}]},"withheld":{"type":"object","properties":{"money":{"$ref":"#/components/schemas/Error"}},"description":"What this credential may not read here, and why."},"workers":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceWorker"},"description":"Your own enrolled workers, oldest enrollment first."},"refusals_recent":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceRefusal"},"description":"Your calls of the last 7 days that did not complete: refused before admission, refused, failed or cut, newest first."},"workspaces":{"type":"array","items":{"type":"object","properties":{"workspace":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":["string","null"]},"role":{"type":["string","null"],"description":"The caller's role here; null for a key no person issued.","enum":["owner","admin","member",null]}},"required":["id","name","role"]},"headline_verdict":{"type":"object","properties":{"code":{"type":"string","description":"`failed`, `degraded`, `waiting_price`, `waiting_capacity`, `waiting_dependency`, `waiting`, `running` or `idle`: the most urgent."},"sentence":{"type":"string","description":"The same in one sentence."}},"required":["code","sentence"]},"work_summary":{"type":"object","properties":{"running":{"type":"integer","minimum":0},"waiting":{"type":"integer","minimum":0},"failed":{"type":"integer","description":"Failed in the last 7 days.","minimum":0},"completed_7d":{"type":"integer","description":"Completed in the last 7 days with nothing lost.","minimum":0},"degraded_7d":{"type":"integer","description":"Completed in the last 7 days with dead-lettered packs or failed items: never counted as done.","minimum":0},"cancelled_7d":{"type":"integer","description":"Cancelled in the last 7 days.","minimum":0},"dead_lettered_packs":{"type":"integer","description":"Packs waiting for a retry or an accepted loss.","minimum":0}},"required":["running","waiting","failed","completed_7d","degraded_7d","cancelled_7d","dead_lettered_packs"],"description":"Counted over all of the scope's work, never only the listed items."},"items":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceItem"},"description":"The newest runs, at most the service's list size of plans and of jobs."},"items_listed":{"type":"object","properties":{"plans":{"type":"object","properties":{"listed":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["listed","total"]},"jobs":{"type":"object","properties":{"listed":{"type":"integer","minimum":0},"total":{"type":"integer","minimum":0}},"required":["listed","total"]}},"required":["plans","jobs"],"description":"How many of each the list shows, of how many."},"campaigns":{"type":"array","items":{"type":"object","properties":{"campaign":{"type":"string","description":"The `run_id` the plans carry in their `metadata`."},"plans":{"type":"integer","minimum":0},"open":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0},"link":{"type":"string","description":"The campaign's own read."}},"required":["campaign","plans","open","failed","link"]}},"campaigns_total":{"type":"integer","minimum":0},"waiting_reasons":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceWaitingReason"},"description":"Each run `work_summary.waiting` counts, newest first, up to the list size."},"money":{"oneOf":[{"$ref":"#/components/schemas/WorkspaceMoney"},{"type":"null"}]},"withheld":{"type":"object","properties":{"money":{"$ref":"#/components/schemas/Error"}},"description":"What this credential may not read here, and why."},"workers":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceWorker"},"description":"Your own enrolled workers, oldest enrollment first."},"refusals_recent":{"type":"array","items":{"$ref":"#/components/schemas/WorkspaceRefusal"},"description":"Your calls of the last 7 days that did not complete: refused before admission, refused, failed or cut, newest first."}},"required":["workspace","headline_verdict","work_summary","items","items_listed","campaigns","campaigns_total","waiting_reasons","money","workers","refusals_recent"]},"description":"With `scope=all` only, in place of the fields above: one block per workspace."},"sources":{"type":"object","properties":{},"additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["fresh","stale","unsupported","unavailable"]},"observed_at":{"type":["string","null"]},"reason":{"type":["string","null"]},"age_seconds":{"type":["number","null"]}},"required":["status","observed_at","reason"]}}},"required":["schema","observed_at","scope","sources"]},"WorkspaceWaitingReason":{"type":"object","properties":{"item":{"type":"string","description":"The waiting plan's or queued job's id."},"kind":{"type":"string","description":"What it waits on. A queued job, or a plan whose store records no reason: `unrecorded`.","enum":["price","capacity","dependency","unrecorded"]},"detail":{"type":"string","description":"What it waits for, in words."},"window_until":{"type":["string","null"],"description":"The end of the plan's own window: it does not start after it. Null for a job.","format":"date-time"},"expected_start":{"$ref":"#/components/schemas/Figure"}},"required":["item","kind","detail","window_until","expected_start"]},"WorkspaceWorker":{"type":"object","properties":{"node_id":{"type":"string"},"name":{"type":"string"},"reachable":{"type":"boolean","description":"It holds an open connection to the service now."},"serving":{"type":"boolean","description":"Reachable, it publishes at least one model, and the workspace has not paused or drained it."},"serving_state":{"type":"string","description":"What the workspace set: `serving`, or `paused` or `draining` (POST /v1/nodes/{node_id}/pause, /drain, /resume), under which it takes no new call.","enum":["serving","paused","draining"]},"serving_changed_at":{"type":["string","null"],"description":"When the workspace last paused, drained or resumed it; null when it never did.","format":"date-time"},"last_seen_at":{"type":["string","null"],"format":"date-time"},"declared_slots":{"type":["integer","null"],"description":"The calls at once its published offers say they take.","minimum":0},"busy_slots":{"$ref":"#/components/schemas/Figure"},"why_idle":{"type":["string","null"]}},"required":["node_id","name","reachable","serving","serving_state","serving_changed_at","last_seen_at","declared_slots","busy_slots","why_idle"]}}}}