{"openapi":"3.1.0","info":{"title":"Factorial Compute","description":"Run and chain vision, 3D and reasoning models through one API.\n\n**Run a model:** `POST /v1/executions` with a model id and its input. The\nanswer is typed - masks, boxes, depth, point clouds, meshes, transcripts, text -\nin the same shape whichever model produced it. `GET /v1/catalog` lists the\nmodels; `GET /v1/catalog/{model_id}` gives one model's exact input schema, a\nworking example and its price.\n\n**Chain models:** pass an earlier run's id (`exec_...`) as an input field of\nthe next run. Files stay on our side - nothing is downloaded and uploaded\nagain between steps.\n\n**Know the price first:** `POST /v1/quote` prices a run without running it.\n\nAuthenticate with `Authorization: Bearer <key>`. Plain REST: any language\nworks. Guides: https://docs.factorialcompute.com","version":"1.0.0"},"paths":{"/v1/catalog":{"get":{"tags":["Models"],"summary":"List models","description":"The models you can call now, or with `?all=true` every model we serve,\neach saying whether it is `available` right now or `offline`.\n\nOnly what can answer by default: this is the list a coding agent chooses\nfrom, and a model it cannot call is worse than a model it was never shown.\n`?long_tail=true` adds every language model OpenRouter serves, by its id\n- callable, priced, and not verified by us.","operationId":"list_catalog_v1_catalog_get","parameters":[{"name":"all","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"All"}},{"name":"long_tail","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Long Tail"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModelInfo"},"title":"Response List Catalog V1 Catalog Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/catalog/{model_id}":{"get":{"tags":["Models"],"summary":"Describe a model: its input schema, an example and its price","operationId":"get_model_info_v1_catalog__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media":{"post":{"tags":["Files"],"summary":"Upload a file","description":"Upload bytes once, reference them by id. Content-addressed within your\norganization. Structures are parsed at upload time so a bad file fails\nhere, not halfway through a queued job.","operationId":"upload_media_v1_media_post","parameters":[{"name":"kind","in":"query","required":false,"schema":{"type":"string","default":"video","title":"Kind"}},{"name":"format","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"structure format override","title":"Format"},"description":"structure format override"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_media_v1_media_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/media/{media_id}":{"get":{"tags":["Files"],"summary":"Get an uploaded file's details","operationId":"get_media_v1_media__media_id__get","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Files"],"summary":"Delete an uploaded file","description":"Delete an upload and everything decoded from it.","operationId":"delete_media_v1_media__media_id__delete","parameters":[{"name":"media_id","in":"path","required":true,"schema":{"type":"string","title":"Media Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Media V1 Media  Media Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/objects/{key}":{"get":{"tags":["Files"],"summary":"Download a file a model produced","description":"Download an output artifact (trajectories, force arrays, embeddings) by\nthe storage key a result points at. A key outside your organization's\nprefix is indistinguishable from one that doesn't exist.","operationId":"get_object_v1_objects__key__get","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/usage":{"get":{"tags":["Account"],"summary":"Usage and cost","description":"Your organization's usage in model-native units, and what it cost.\n\nMoney is in micro-dollars (1,000,000 = $1), as integers, priced at what\neach unit cost when it was used.","operationId":"get_usage_v1_usage_get","parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"}},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Until"}},{"name":"group_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"tag to break usage down by, e.g. team","title":"Group By"},"description":"tag to break usage down by, e.g. team"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Usage V1 Usage Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization":{"get":{"tags":["Account"],"summary":"Your account","description":"Your organization: its queue and its concurrency limit.","operationId":"get_organization_v1_organization_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Organization V1 Organization Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/organization/purge":{"post":{"tags":["Account"],"summary":"Delete everything your account has stored","description":"Delete everything your organization has stored: uploads, results,\ntrajectories, checkpoints, sessions and labels. Active work is canceled\nfirst; if some of it is still mid-execution this returns 409 - call again\nonce it has stopped.\n\nKept: billing records (with tags cleared), and trajectory-log rows scrubbed\nof anything describing your inputs.","operationId":"purge_organization_v1_organization_purge_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurgeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Purge Organization V1 Organization Purge Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/signup":{"post":{"tags":["Account"],"summary":"Redeem an invitation for an API key","description":"Redeem an invitation and get an account.\n\nUnauthenticated, because the invitation *is* the authentication. Single\nuse and safe to race on: two people arriving with the same code cannot\nboth get an account.","operationId":"signup_v1_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Signup V1 Signup Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/invites":{"post":{"tags":["Account"],"summary":"Invite a teammate","description":"Invite a teammate onto this organization. They run the one line this\nreturns and get their own key on the same account, sharing its credit -\nnothing secret is copied from one person to another. Single use, 14 days.","operationId":"create_team_invite_v1_invites_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamInviteRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Team Invite V1 Invites Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Account"],"summary":"List team invitations","description":"This organization's team invitations - who each was for and whether it\nwas used. Never the codes.","operationId":"list_team_invites_v1_invites_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Team Invites V1 Invites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/chat/completions":{"post":{"tags":["OpenAI-compatible"],"summary":"Chat completion (OpenAI-compatible)","description":"The OpenAI chat completions format, streaming included: an OpenAI client\nworks with its base URL set to this API. `model` is any chat model in\n`/v1/catalog`.","operationId":"chat_completions_v1_chat_completions_post","parameters":[{"name":"X-Factorial-Tags","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Factorial-Tags"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/embeddings":{"post":{"tags":["OpenAI-compatible"],"summary":"Embeddings (OpenAI-compatible)","description":"The OpenAI embeddings format.","operationId":"embeddings_v1_embeddings_post","parameters":[{"name":"X-Factorial-Tags","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Factorial-Tags"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/models":{"get":{"tags":["OpenAI-compatible"],"summary":"List chat models (OpenAI-compatible)","description":"The chat models you can call, in the shape an OpenAI client expects.\nEvery model, with what each takes and returns, is at /v1/catalog.\n\nA shared entry is marked as such. A customer should be able to tell\ncapacity that is theirs from capacity they are borrowing, because the two\nbehave differently under load.","operationId":"list_models_v1_models_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Models V1 Models Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches":{"post":{"tags":["Language-model batches"],"summary":"Start a language-model batch","operationId":"create_batch_v1_batches_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Batch V1 Batches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Language-model batches"],"summary":"List language-model batches","operationId":"list_batches_v1_batches_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Batches V1 Batches Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/{batch_id}":{"get":{"tags":["Language-model batches"],"summary":"Get a language-model batch","operationId":"read_batch_v1_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Read Batch V1 Batches  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/batches/{batch_id}/cancel":{"post":{"tags":["Language-model batches"],"summary":"Cancel a language-model batch","operationId":"cancel_batch_v1_batches__batch_id__cancel_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Batch V1 Batches  Batch Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/quote":{"post":{"tags":["Runs"],"summary":"Price a run without running it","description":"What this request would cost, without running it.\n\nThe same checks the run makes, so an input the run would refuse is refused\nhere - which also makes this the cheap way to check an input. Exact for\nbought models; for chat an upper bound, and only with max_tokens.","operationId":"quote_execution_v1_quote_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Quote Execution V1 Quote Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/executions":{"post":{"tags":["Runs"],"summary":"Run a model","description":"Run one computation.\n\nSend an Idempotency-Key to make retries safe: a repeat returns the\noriginal execution rather than running the work a second time. Without\none, a network timeout on a long generation leaves the caller unable to\ntell whether to retry - and both answers cost money.","operationId":"create_execution_v1_executions_post","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExecutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Runs"],"summary":"List runs","description":"This account's executions, newest first - each with its answer, its\ncost, and for a visual answer the view_url that shows it: how a result\nfrom yesterday is found again.","operationId":"list_executions_v1_executions_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"session","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/executions/{execution_id}":{"get":{"tags":["Runs"],"summary":"Get a run and its answer","description":"Its status - `queued`, `running`, `succeeded`, `failed` or `canceled` - and,\nonce it has succeeded, its typed answer and what it cost. Poll this, or follow\n`/events`.","operationId":"get_execution_v1_executions__execution_id__get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/executions/{execution_id}/cancel":{"post":{"tags":["Runs"],"summary":"Cancel a run","description":"Stop a run that has not finished. Work already done is billed; nothing after.","operationId":"cancel_execution_v1_executions__execution_id__cancel_post","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/executions/{execution_id}/events":{"get":{"tags":["Runs"],"summary":"Follow a run's progress","description":"The events so far, or a live stream of them.\n\nPolling returns everything after `after`, so a caller resuming from a\ndropped connection does not replay what it has already seen.","operationId":"execution_events_v1_executions__execution_id__events_get","parameters":[{"name":"execution_id","in":"path","required":true,"schema":{"type":"string","title":"Execution Id"}},{"name":"stream","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stream"}},{"name":"after","in":"query","required":false,"schema":{"type":"integer","default":-1,"title":"After"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows":{"post":{"tags":["Workflows"],"summary":"Open a workflow","description":"Open a workflow. Add steps, then close it; until then it is `open`, and\na client that stops heartbeating for five minutes leaves it incomplete.","operationId":"create_workflow_v1_workflows_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Workflow V1 Workflows Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}":{"get":{"tags":["Workflows"],"summary":"Get a workflow","description":"The graph: each step's status, cost and run, and the workflow's.","operationId":"get_workflow_v1_workflows__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Workflow V1 Workflows  Workflow Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/steps":{"post":{"tags":["Workflows"],"summary":"Add a step","description":"Submit a step. It starts as soon as every step it references has succeeded.\nWith an Idempotency-Key, a retry returns the step already made.","operationId":"add_step_v1_workflows__workflow_id__steps_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StepRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Step V1 Workflows  Workflow Id  Steps Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/maps":{"post":{"tags":["Workflows"],"summary":"Add a step that runs over a list","description":"Run one model over a list: one step per item, in parallel, started when\nthe list exists. Its answer is the items' answers in order.","operationId":"add_map_v1_workflows__workflow_id__maps_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MapRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Map V1 Workflows  Workflow Id  Maps Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/steps/{step_id}":{"get":{"tags":["Workflows"],"summary":"Get a step and its answer","description":"One step, with its answer once it has succeeded.","operationId":"get_step_v1_workflows__workflow_id__steps__step_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"step_id","in":"path","required":true,"schema":{"type":"string","title":"Step Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Step V1 Workflows  Workflow Id  Steps  Step Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/heartbeat":{"post":{"tags":["Workflows"],"summary":"Keep an open workflow alive","operationId":"heartbeat_v1_workflows__workflow_id__heartbeat_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Heartbeat V1 Workflows  Workflow Id  Heartbeat Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/close":{"post":{"tags":["Workflows"],"summary":"Close a workflow","description":"No more steps are coming. Idempotent.","operationId":"close_workflow_v1_workflows__workflow_id__close_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CloseRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Close Workflow V1 Workflows  Workflow Id  Close Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/workflows/{workflow_id}/cancel":{"post":{"tags":["Workflows"],"summary":"Cancel a workflow","operationId":"cancel_workflow_v1_workflows__workflow_id__cancel_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"string","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Workflow V1 Workflows  Workflow Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipes/{name}":{"put":{"tags":["Recipes (beta)"],"summary":"Save a recipe","description":"Save a recipe: checked whole now - models, fields, references, inputs -\nand kept as its next version. The same definition again is the version\nalready there (`unchanged`).","operationId":"save_recipe_v1_recipes__name__put","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecipeRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Save Recipe V1 Recipes  Name  Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Recipes (beta)"],"summary":"Get a recipe","description":"The latest version, or the one asked for.","operationId":"get_recipe_v1_recipes__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"version","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Recipe V1 Recipes  Name  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Recipes (beta)"],"summary":"Delete a recipe","description":"Every version. The runs it made are kept, as the workflows they were.","operationId":"delete_recipe_v1_recipes__name__delete","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Recipe V1 Recipes  Name  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipes":{"get":{"tags":["Recipes (beta)"],"summary":"List recipes","operationId":"list_recipes_v1_recipes_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Recipes V1 Recipes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipes/{name}/runs":{"post":{"tags":["Recipes (beta)"],"summary":"Run a recipe","description":"Run it: a workflow, built with these inputs and closed, carried to the\nend by the server. Follow it at GET /v1/recipe-runs/{id}.","operationId":"run_recipe_v1_recipes__name__runs_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Recipe V1 Recipes  Name  Runs Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-runs/{run_id}":{"get":{"tags":["Recipes (beta)"],"summary":"Get a recipe run","description":"How a run stands - and once it has finished, the recipe's output.","operationId":"get_run_v1_recipe_runs__run_id__get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Run V1 Recipe Runs  Run Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipes/{name}/batches":{"post":{"tags":["Recipes (beta)"],"summary":"Run a recipe over a dataset","description":"Run a recipe over a dataset: one run per item, a few at a time, the\nfirst few as a priced trial. Checked whole first: every item's inputs.","operationId":"create_batch_v1_recipes__name__batches_post","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Batch V1 Recipes  Name  Batches Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}":{"get":{"tags":["Recipes (beta)"],"summary":"Get a recipe batch","description":"How far it has got, what it has cost - and after the trial, its\nresults and the projected total, waiting to be confirmed.","operationId":"get_batch_v1_recipe_batches__batch_id__get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Batch V1 Recipe Batches  Batch Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/confirm":{"post":{"tags":["Recipes (beta)"],"summary":"Confirm a batch after its trial","description":"After the trial: run the rest.","operationId":"confirm_batch_v1_recipe_batches__batch_id__confirm_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CostRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Confirm Batch V1 Recipe Batches  Batch Id  Confirm Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/cancel":{"post":{"tags":["Recipes (beta)"],"summary":"Cancel a recipe batch","operationId":"cancel_batch_v1_recipe_batches__batch_id__cancel_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Batch V1 Recipe Batches  Batch Id  Cancel Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/retry":{"post":{"tags":["Recipes (beta)"],"summary":"Retry a batch's failed items","description":"Run the items that failed again, alone - and a batch its cap stopped,\nthe items it never started too.","operationId":"retry_batch_v1_recipe_batches__batch_id__retry_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CostRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Retry Batch V1 Recipe Batches  Batch Id  Retry Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/results":{"get":{"tags":["Recipes (beta)"],"summary":"Download a batch's results","description":"One row per item, in order. `format=jsonl` or `csv` is every item, as a file.","operationId":"batch_results_v1_recipe_batches__batch_id__results_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|jsonl|csv)$","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipes/{name}/diff":{"get":{"tags":["Recipes (beta)"],"summary":"Compare two versions of a recipe","description":"What changed from version a to b: inputs, each step, the output - and\nwhich steps would run again, compared on an earlier run's inputs.","operationId":"diff_recipe_v1_recipes__name__diff_get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"a","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"A"}},{"name":"b","in":"query","required":true,"schema":{"type":"integer","minimum":1,"title":"B"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Diff Recipe V1 Recipes  Name  Diff Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-runs/{run_id}/compare":{"post":{"tags":["Recipes (beta)"],"summary":"Rerun with another version","description":"Run another version on this run's inputs, reusing its answers wherever\nthe steps are unchanged. Both side by side at /comparison once it is done.","operationId":"compare_run_v1_recipe_runs__run_id__compare_post","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Run V1 Recipe Runs  Run Id  Compare Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-runs/{run_id}/comparison":{"get":{"tags":["Recipes (beta)"],"summary":"Two runs side by side","operationId":"run_comparison_v1_recipe_runs__run_id__comparison_get","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Run Comparison V1 Recipe Runs  Run Id  Comparison Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/compare":{"post":{"tags":["Recipes (beta)"],"summary":"Rerun a batch with another version","description":"Another version over the same items, each reusing its earlier run's\nanswers wherever the steps are unchanged - with a trial first, as any batch.","operationId":"compare_batch_v1_recipe_batches__batch_id__compare_post","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompareRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Compare Batch V1 Recipe Batches  Batch Id  Compare Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/recipe-batches/{batch_id}/comparison":{"get":{"tags":["Recipes (beta)"],"summary":"Two batches side by side","description":"Item by item beside the batch it reran: each side's status, cost and\noutput, and whether the output changed.","operationId":"batch_comparison_v1_recipe_batches__batch_id__comparison_get","parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|jsonl|csv)$","default":"json","title":"Format"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys":{"get":{"tags":["Account"],"summary":"List API keys","description":"This organization's keys, never the secrets.\n\nA key is shown once, when it is created, and is stored only as a hash - so\nthis can say what exists and when it was last used, and can never show a\ncustomer a key they have lost.","operationId":"list_keys_v1_keys_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Keys V1 Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Account"],"summary":"Create an API key","description":"Mint a key for this organization.\n\nOnly an owner may do this, and only a `readonly` or `member` key: a\ncustomer minting themselves an admin key would be an escalation, and admin\nis the operator's role rather than a customer's.","operationId":"create_key_v1_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Create Key V1 Keys Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/keys/{key_id}":{"delete":{"tags":["Account"],"summary":"Revoke an API key","operationId":"revoke_key_v1_keys__key_id__delete","parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Revoke Key V1 Keys  Key Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/billing":{"get":{"tags":["Account"],"summary":"Credit and balance","description":"What has been granted, what it came from, and what is left.","operationId":"billing_summary_v1_billing_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Billing Summary V1 Billing Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/weights":{"post":{"tags":["Your own weights"],"summary":"Add your own fine-tuned weights","operationId":"add_weights_v1_weights_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWeights"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Add Weights V1 Weights Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Your own weights"],"summary":"List your weights","operationId":"list_weights_v1_weights_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Weights V1 Weights Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/weights/{model_id}":{"get":{"tags":["Your own weights"],"summary":"Get your weights' status","operationId":"get_weights_v1_weights__model_id__get","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Weights V1 Weights  Model Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Your own weights"],"summary":"Remove your weights","operationId":"remove_weights_v1_weights__model_id__delete","parameters":[{"name":"model_id","in":"path","required":true,"schema":{"type":"string","title":"Model Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Remove Weights V1 Weights  Model Id  Delete"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AddWeights":{"properties":{"base":{"type":"string","title":"Base","description":"the catalogue model these are a fine-tune of, e.g. sam2-segment"},"name":{"type":"string","title":"Name","description":"lower case letters, digits and dashes; the model becomes base@name"},"source":{"$ref":"#/components/schemas/WeightsSource"},"replace":{"type":"boolean","title":"Replace","description":"install new weights over a model you already have","default":false}},"type":"object","required":["base","name","source"],"title":"AddWeights"},"BatchCreate":{"properties":{"model":{"type":"string","title":"Model"},"requests":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Requests"},"input_media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Media Id"},"operation":{"anyOf":[{"type":"string","pattern":"^(chat_batch|embed_batch)$"},{"type":"null"}],"title":"Operation"},"chunk_steps":{"anyOf":[{"type":"integer","maximum":1024.0,"minimum":1.0},{"type":"null"}],"title":"Chunk Steps"},"tags":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Tags"},"max_tokens":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Tokens"},"max_cost_usd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Cost Usd"}},"type":"object","required":["model"],"title":"BatchCreate"},"BatchRequest":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"fixed":{"additionalProperties":true,"type":"object","title":"Fixed"},"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version"},"pilot":{"type":"integer","minimum":0.0,"title":"Pilot","default":3},"in_flight":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"In Flight","default":8},"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd"}},"type":"object","required":["items"],"title":"BatchRequest"},"Body_upload_media_v1_media_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_media_v1_media_post"},"ChatBody":{"properties":{"model":{"type":"string","title":"Model"},"messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Messages"},"n":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"N"},"max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Tokens"},"max_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Completion Tokens"},"temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Temperature"},"top_p":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Top P"},"stop":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string"},{"type":"null"}],"title":"Stop"},"stream":{"type":"boolean","title":"Stream","default":false},"stream_options":{"anyOf":[{"$ref":"#/components/schemas/StreamOptions"},{"type":"null"}]}},"additionalProperties":true,"type":"object","required":["model","messages"],"title":"ChatBody"},"CloseRequest":{"properties":{"reason":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Reason"}},"type":"object","title":"CloseRequest"},"CompareRequest":{"properties":{"version":{"type":"integer","minimum":1.0,"title":"Version"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd"},"pilot":{"type":"integer","minimum":0.0,"title":"Pilot","default":3},"in_flight":{"type":"integer","maximum":32.0,"minimum":1.0,"title":"In Flight","default":8}},"type":"object","required":["version"],"title":"CompareRequest"},"CostRequest":{"properties":{"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd"}},"type":"object","title":"CostRequest"},"EmbedBody":{"properties":{"model":{"type":"string","title":"Model"},"input":{"anyOf":[{"type":"string"},{"items":{"type":"string"},"type":"array"}],"title":"Input"}},"additionalProperties":true,"type":"object","required":["model","input"],"title":"EmbedBody"},"ExecutionRequest":{"properties":{"model":{"type":"string","title":"Model","description":"A model id from /v1/catalog."},"input":{"title":"Input","description":"What the model takes - its schema is input_schema in /v1/catalog/{model_id}. A file field takes an uploaded file's id from POST /v1/media (med_...), or an earlier run's id (exec_...) to use its answer."},"stream":{"type":"boolean","title":"Stream","description":"Language models: stream the answer as server-sent events.","default":false},"wait":{"type":"boolean","title":"Wait","description":"true: answer when the run finishes. false: return its id at once, to collect later.","default":true},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags","description":"Labels of your own, for /v1/usage."},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"mode":{"type":"string","pattern":"^(interactive|batch)$","title":"Mode","default":"interactive"},"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd","description":"Refuse the run, before anything is spent, if its price would be more than this."},"webhook_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Webhook Url","description":"With wait=false: an https URL told when the run finishes - its id and status only."}},"type":"object","required":["model"],"title":"ExecutionRequest","description":"What the SDK sends.\n\n`input` is deliberately untyped here and validated against the model's\ntask in core.tasks - a vision model's input and an embedding model's\ninput are different shapes, and pretending otherwise in one schema would\nmake both of them worse."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MapRequest":{"properties":{"model":{"type":"string","title":"Model"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"replace":{"type":"boolean","title":"Replace","default":false},"over":{"title":"Over"},"input":{"title":"Input"}},"type":"object","required":["model","over"],"title":"MapRequest"},"MediaResponse":{"properties":{"id":{"type":"string","title":"Id"},"kind":{"type":"string","title":"Kind"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"},"size_bytes":{"type":"integer","title":"Size Bytes"},"sha256":{"type":"string","title":"Sha256"},"probe":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Probe"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"deduplicated":{"type":"boolean","title":"Deduplicated","default":false},"produced_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Produced By"},"derived_from":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Derived From"}},"type":"object","required":["id","kind","size_bytes","sha256","created_at"],"title":"MediaResponse"},"ModelInfo":{"properties":{"id":{"type":"string","title":"Id"},"name":{"type":"string","title":"Name"},"family":{"type":"string","title":"Family"},"primitives":{"items":{"type":"string"},"type":"array","title":"Primitives"},"input_types":{"items":{"type":"string"},"type":"array","title":"Input Types"},"operations":{"items":{"type":"string"},"type":"array","title":"Operations"},"unit":{"type":"string","title":"Unit"},"secondary_units":{"items":{"type":"string"},"type":"array","title":"Secondary Units"},"availability":{"type":"string","title":"Availability"},"description":{"type":"string","title":"Description"},"context":{"type":"string","title":"Context"},"output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output"},"input":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Input"},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema"},"health":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Health"},"example":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Example"},"accepts_weights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Accepts Weights"},"limits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Limits"},"defaults":{"additionalProperties":true,"type":"object","title":"Defaults"},"pricing":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pricing"}},"type":"object","required":["id","name","family","primitives","input_types","unit","availability","description","context","defaults"],"title":"ModelInfo"},"PurgeRequest":{"properties":{"confirm":{"type":"string","title":"Confirm"}},"type":"object","required":["confirm"],"title":"PurgeRequest"},"QuoteRequest":{"properties":{"model":{"type":"string","title":"Model"},"input":{"title":"Input"}},"type":"object","required":["model"],"title":"QuoteRequest"},"RecipeRequest":{"properties":{"definition":{"title":"Definition"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"}},"type":"object","required":["definition"],"title":"RecipeRequest"},"RunRequest":{"properties":{"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Version"},"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Webhook Url"}},"type":"object","title":"RunRequest"},"SignupRequest":{"properties":{"invite":{"type":"string","title":"Invite"},"organization":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}],"title":"Organization"}},"type":"object","required":["invite"],"title":"SignupRequest","description":"What a stranger needs to provision themselves.\n\nAn invitation code and a name. Deliberately no password and no email: the\nkey this returns is the credential, and a second identity system whose\nonly job is to guard the first one is a month of work nobody has asked\nfor."},"StepRequest":{"properties":{"model":{"type":"string","title":"Model"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"},"replace":{"type":"boolean","title":"Replace","default":false},"input":{"title":"Input"}},"type":"object","required":["model"],"title":"StepRequest"},"StreamOptions":{"properties":{"include_usage":{"type":"boolean","title":"Include Usage","default":false}},"type":"object","title":"StreamOptions"},"TeamInviteRequest":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"TeamInviteRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WeightsSource":{"properties":{"media_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Media Id","description":"a file uploaded to /v1/media with kind=weights"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"an https link the runner downloads from"},"hf":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hf","description":"a Hugging Face repo, owner/name"},"file":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"File","description":"which file in the repo, if it has several"},"subfolder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subfolder","description":"a LoRA adapter in a folder of the repo"},"revision":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revision"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"a read token, for a private repo"}},"type":"object","title":"WeightsSource","description":"Where the weights are: exactly one of these."},"WorkflowRequest":{"properties":{"max_cost_usd":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Max Cost Usd"},"webhook_url":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Webhook Url"},"tags":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Tags"},"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Name"}},"type":"object","title":"WorkflowRequest"}}},"tags":[{"name":"Runs","description":"Run one model on one input, and collect its answer."},{"name":"Models","description":"What you can run: each model's input schema, an example and its price."},{"name":"Files","description":"Upload a file once and pass its id; download what a model produced."},{"name":"Workflows","description":"Several runs as one graph, each step starting when the steps it uses have finished."},{"name":"Recipes (beta)","description":"A pipeline saved under a name, run again on new inputs or over a dataset."},{"name":"OpenAI-compatible","description":"Language models through the OpenAI wire format: point an OpenAI client here."},{"name":"Language-model batches","description":"Many chat requests as one job."},{"name":"Your own weights","description":"Run your fine-tuned weights by name."},{"name":"Account","description":"Keys, usage, credit and teammates."}]}