{"openapi":"3.1.0","info":{"title":"Autumn Task API","description":"Durable research tasks run by a sandboxed agent. Auth on every request: `X-API-Key: <key>` or `Authorization: Bearer <key>`. JSON over HTTP; `/stream` routes are server-sent events. Errors share one body: branch on `error`, retry when `retryable` is true.","termsOfService":"https://www.autumn.ai/terms","contact":{"name":"Autumn","url":"https://www.autumn.ai/"},"version":"1.0.0","x-llms-txt":"https://api.autumn.ai/llms.txt"},"servers":[{"url":"https://api.autumn.ai"}],"paths":{"/task/workflow":{"get":{"tags":["Tasks"],"summary":"Get task workflow","description":"The task workflow and route map.","operationId":"taskWorkflow","responses":{"200":{"description":"Workflow and route map.","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Taskworkflow"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/metaprompt":{"get":{"tags":["Tasks"],"summary":"Get task metaprompt","description":"The task spec schema, output kinds, and metaprompt for caller-side agents.","operationId":"taskMetaprompt","responses":{"200":{"description":"Task spec schema and metaprompt.","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Taskmetaprompt"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task":{"post":{"tags":["Tasks"],"summary":"Start a task","description":"Start a task from a prompt. Returns at once: store task_id, then stream or poll. Pass task_id to send the prompt to an existing task (202 while it queues).","operationId":"taskStart","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRequest"}}}},"responses":{"200":{"description":"Task accepted. Store task_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"202":{"description":"Queued. The task picks the message up when the current turn ends; the body carries status `accepted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `at_capacity`: Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"at_capacity":{"summary":"at_capacity","value":{"error":"at_capacity","message":"Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`out_of_credits`: Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","content":{"application/json":{"examples":{"out_of_credits":{"summary":"out_of_credits","value":{"error":"out_of_credits","message":"Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","resolve":"https://platform.autumn.ai"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`task_executing`: A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn. | `task_in_cron_mode`: This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task. | `task_exists`: A task with that task_id already exists. Continue it with POST /task/{task_id}/continue, or omit task_id to create a new one.","content":{"application/json":{"examples":{"task_executing":{"summary":"task_executing","value":{"error":"task_executing","message":"A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_in_cron_mode":{"summary":"task_in_cron_mode","value":{"error":"task_in_cron_mode","message":"This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_exists":{"summary":"task_exists","value":{"error":"task_exists","message":"A task with that task_id already exists. Continue it with POST /task/{task_id}/continue, or omit task_id to create a new one.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"`internal_error`: Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":"internal_error","message":"Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"502":{"description":"`bad_gateway`: An upstream service failed. Send the request again shortly.","content":{"application/json":{"examples":{"bad_gateway":{"summary":"bad_gateway","value":{"error":"bad_gateway","message":"An upstream service failed. Send the request again shortly.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]},"get":{"tags":["Tasks"],"summary":"List tasks","description":"One page of tasks, pinned first then most recently updated. Default 50 per page, at most 200. When more remain, the response carries an `X-Next-Cursor` header and a `Link: <...>; rel=\"next\"` header; pass that value as `cursor` to fetch the next page. No header means this is the last page.","operationId":"taskList","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Tasks per page.","default":50,"title":"Limit"},"description":"Tasks per page."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Value of X-Next-Cursor from the previous page.","default":"","title":"Cursor"},"description":"Value of X-Next-Cursor from the previous page."}],"responses":{"200":{"description":"One page of tasks, newest first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Task"},"title":"Response Tasklist"}}},"headers":{"X-Next-Cursor":{"description":"Opaque cursor for the next page. Absent on the last page.","schema":{"type":"string"}},"Link":{"description":"`<url>; rel=\"next\"` for the next page. Absent on the last page.","schema":{"type":"string"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/stream":{"post":{"tags":["Tasks"],"summary":"Start a task and stream","description":"Start a task from a prompt and stream the turn.","operationId":"taskStartStream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PromptRequest"}}},"required":true},"responses":{"200":{"description":"Server-sent events: task, tool, text, error, done. A failure after the stream opens is an error event.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/start":{"post":{"tags":["Tasks"],"summary":"Start from a task spec","description":"Start from a task.json spec with no planning turn. Without task, same as POST /task.","operationId":"taskStartDirect","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectTaskRequest"}}},"required":true},"responses":{"200":{"description":"Task accepted. Store task_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"202":{"description":"Queued. The task picks the message up when the current turn ends; the body carries status `accepted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `at_capacity`: Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"at_capacity":{"summary":"at_capacity","value":{"error":"at_capacity","message":"Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"402":{"description":"`out_of_credits`: Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"out_of_credits":{"summary":"out_of_credits","value":{"error":"out_of_credits","message":"Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","resolve":"https://platform.autumn.ai"}}}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"409":{"description":"`task_executing`: A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn. | `task_in_cron_mode`: This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task. | `task_exists`: A task with that task_id already exists. Continue it with POST /task/{task_id}/continue, or omit task_id to create a new one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"task_executing":{"summary":"task_executing","value":{"error":"task_executing","message":"A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_in_cron_mode":{"summary":"task_in_cron_mode","value":{"error":"task_in_cron_mode","message":"This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_exists":{"summary":"task_exists","value":{"error":"task_exists","message":"A task with that task_id already exists. Continue it with POST /task/{task_id}/continue, or omit task_id to create a new one.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"500":{"description":"`internal_error`: Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":"internal_error","message":"Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"502":{"description":"`bad_gateway`: An upstream service failed. Send the request again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"bad_gateway":{"summary":"bad_gateway","value":{"error":"bad_gateway","message":"An upstream service failed. Send the request again shortly.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/start/stream":{"post":{"tags":["Tasks"],"summary":"Start from a task spec and stream","description":"Start from a task spec and stream the turn.","operationId":"taskStartDirectStream","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DirectTaskRequest"}}},"required":true},"responses":{"200":{"description":"Server-sent events: task, tool, text, error, done. A failure after the stream opens is an error event.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}":{"get":{"tags":["Tasks"],"summary":"Get task status","description":"Status, spec and the last 100 events. Poll only without a stream; GET /task/{task_id}/state is cheaper.","operationId":"taskStatus","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"responses":{"200":{"description":"Status, spec and recent events.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"`rate_limited`: Too many requests. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":"rate_limited","message":"Too many requests. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":10}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/state":{"get":{"tags":["Tasks"],"summary":"Get task state","description":"Whether a turn is running and what is queued. This is the status_url on every task.","operationId":"taskState","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"responses":{"200":{"description":"Liveness and queue state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskState"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/stream":{"get":{"tags":["Tasks"],"summary":"Stream task events","description":"Live events for a task. Resume with Last-Event-ID or after.","operationId":"taskStream","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"Resume after this event id. Last-Event-ID does the same on reconnect.","default":"","title":"After"},"description":"Resume after this event id. Last-Event-ID does the same on reconnect."},{"name":"Last-Event-ID","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sent by EventSource clients on reconnect; resumes after this event id.","title":"Last-Event-Id"},"description":"Sent by EventSource clients on reconnect; resumes after this event id."}],"responses":{"200":{"description":"Server-sent events: task, tool, text, error, done. A failure after the stream opens is an error event.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/continue":{"post":{"tags":["Tasks"],"summary":"Continue a task","description":"Send a message to the task. Queued (202) unless wait is true (200).","operationId":"taskContinue","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContinueRequest"}}}},"responses":{"200":{"description":"Turn finished (wait: true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"202":{"description":"Queued. The task picks the message up when the current turn ends; the body carries status `accepted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `at_capacity`: Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"at_capacity":{"summary":"at_capacity","value":{"error":"at_capacity","message":"Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`out_of_credits`: Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","content":{"application/json":{"examples":{"out_of_credits":{"summary":"out_of_credits","value":{"error":"out_of_credits","message":"Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","resolve":"https://platform.autumn.ai"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`task_executing`: A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn. | `task_in_cron_mode`: This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","content":{"application/json":{"examples":{"task_executing":{"summary":"task_executing","value":{"error":"task_executing","message":"A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_in_cron_mode":{"summary":"task_in_cron_mode","value":{"error":"task_in_cron_mode","message":"This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"`internal_error`: Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":"internal_error","message":"Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/continue/stream":{"post":{"tags":["Tasks"],"summary":"Continue a task and stream","description":"Send a message to the task and stream the turn.","operationId":"taskContinueStream","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContinueRequest"}}}},"responses":{"200":{"description":"Server-sent events: task, tool, text, error, done. A failure after the stream opens is an error event.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/execute":{"post":{"tags":["Tasks"],"summary":"Execute a task","description":"Produce output from the current spec. Queued (202) unless wait is true (200).","operationId":"taskExecute","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExecuteRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Turn finished (wait: true).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"202":{"description":"Queued. The task picks the message up when the current turn ends; the body carries status `accepted`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `at_capacity`: Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"at_capacity":{"summary":"at_capacity","value":{"error":"at_capacity","message":"Autumn is at capacity. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"402":{"description":"`out_of_credits`: Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","content":{"application/json":{"examples":{"out_of_credits":{"summary":"out_of_credits","value":{"error":"out_of_credits","message":"Out of credits. Add credits at https://platform.autumn.ai (Settings > Usage), then send the request again. Retrying without credits fails the same way.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","resolve":"https://platform.autumn.ai"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"409":{"description":"`task_executing`: A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn. | `task_in_cron_mode`: This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","content":{"application/json":{"examples":{"task_executing":{"summary":"task_executing","value":{"error":"task_executing","message":"A turn is running on this task. Poll GET /task/{task_id}/state until `active` is false, then send the request again. Stop it (POST /task/{task_id}/stop) only to abandon the turn.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}},"task_in_cron_mode":{"summary":"task_in_cron_mode","value":{"error":"task_in_cron_mode","message":"This task runs on a schedule and does not take messages. Switch it to chat mode in the platform, or start a new task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"500":{"description":"`internal_error`: Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","content":{"application/json":{"examples":{"internal_error":{"summary":"internal_error","value":{"error":"internal_error","message":"Something went wrong on our end. If the body carries task_id, that task exists: continue it instead of starting another. Otherwise send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/execute/stream":{"post":{"tags":["Tasks"],"summary":"Execute a task and stream","description":"Produce output and stream the turn.","operationId":"taskExecuteStream","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ExecuteRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Server-sent events: task, tool, text, error, done. A failure after the stream opens is an error event.","content":{"text/event-stream":{"schema":{"type":"string"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/stop":{"post":{"tags":["Tasks"],"summary":"Stop a task","description":"Stop the current turn. Saved queued messages continue after it stops. Outputs stay readable.","operationId":"taskStop","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"responses":{"200":{"description":"Stop signal accepted for the current turn.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/output":{"get":{"tags":["Outputs"],"summary":"Get task output","description":"Rows from the active output. Partial rows are readable during a run. Page with limit and cursor: the body carries _next_cursor while rows remain.","operationId":"taskOutput","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":1,"description":"Maximum number of rows to return.","default":100,"title":"Limit"},"description":"Maximum number of rows to return."},{"name":"output","in":"query","required":false,"schema":{"type":"string","description":"Read this output id instead of the active one.","default":"","title":"Output"},"description":"Read this output id instead of the active one."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Resume from the _next_cursor of the previous page.","default":"","title":"Cursor"},"description":"Resume from the _next_cursor of the previous page."}],"responses":{"200":{"description":"Output rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutputResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/outputs":{"get":{"tags":["Outputs"],"summary":"List task outputs","description":"The named output artifacts of a task.","operationId":"taskOutputs","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."}],"responses":{"200":{"description":"Named output artifacts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutputsResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/task/{task_id}/outputs/{output_id}":{"get":{"tags":["Outputs"],"summary":"Get a named output","description":"Rows from one named output. Page with limit and cursor: the body carries _next_cursor while rows remain.","operationId":"taskNamedOutput","parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"string","description":"The task_id returned by POST /task or POST /task/start.","examples":["8fab6f34"],"title":"Task Id"},"description":"The task_id returned by POST /task or POST /task/start."},{"name":"output_id","in":"path","required":true,"schema":{"type":"string","description":"The output id from the task spec, e.g. ai-security-companies.","title":"Output Id"},"description":"The output id from the task spec, e.g. ai-security-companies."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50000,"minimum":1,"description":"Maximum number of rows to return.","default":100,"title":"Limit"},"description":"Maximum number of rows to return."},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","description":"Resume from the _next_cursor of the previous page.","default":"","title":"Cursor"},"description":"Resume from the _next_cursor of the previous page."}],"responses":{"200":{"description":"Output rows.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OutputResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"`task_not_found`: No task with that task_id. Check the id, or list tasks with GET /task.","content":{"application/json":{"examples":{"task_not_found":{"summary":"task_not_found","value":{"error":"task_not_found","message":"No task with that task_id. Check the id, or list tasks with GET /task.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}},"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/credits":{"get":{"tags":["Credits"],"summary":"Get credits","description":"Credit balance.","operationId":"creditsBalance","responses":{"200":{"description":"Credit balance.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditsResponse"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}}},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/tasks/draft":{"post":{"tags":["Uploads"],"summary":"Create a draft task","description":"An empty task to attach uploads to. Start it with POST /task and its task_id.","operationId":"createDraftTask","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DraftRequest"},{"type":"null"}],"title":"Draft"}}}},"responses":{"200":{"description":"The empty task. Store task_id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Task"}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again. | `service_unavailable`: Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}},"service_unavailable":{"summary":"service_unavailable","value":{"error":"service_unavailable","message":"Autumn is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ClerkSession":[]},{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/upload-url":{"post":{"tags":["Uploads"],"summary":"Presign a file upload","description":"Presign a .csv, .txt, .md or .markdown upload. PUT the bytes to upload_url with no auth headers, then POST /validate-upload.","operationId":"createUploadUrl","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"Presigned upload target.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrlResponse"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"429":{"description":"`rate_limited`: Too many requests. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":"rate_limited","message":"Too many requests. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":10}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ClerkSession":[]},{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}},"/validate-upload":{"post":{"tags":["Uploads"],"summary":"Validate an uploaded file","description":"Validate an upload and return the filename for input_files. CSV becomes JSONL: delimiter detected, duplicate and blank headers renamed, extra cells kept as column_N, a user _row_id column becomes _row_id_2.","operationId":"validateUpload","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRequest"}}},"required":true},"responses":{"200":{"description":"The validated file; pass filename in input_files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateUploadResponse"}}}},"400":{"description":"`invalid_request`: The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"invalid_request":{"summary":"invalid_request","value":{"error":"invalid_request","message":"The request is invalid. Fix the field in `param` (see `detail`), or read `message`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"401":{"description":"`unauthorized`: Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","headers":{"WWW-Authenticate":{"description":"Bearer realm=\"autumn\"","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":"unauthorized","message":"Missing or invalid credentials. Send your full API key as `X-API-Key: <key>` or `Authorization: Bearer <key>`.","retryable":false,"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}}},"503":{"description":"`auth_unavailable`: Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","headers":{"Retry-After":{"description":"Seconds to wait before the next request.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"examples":{"auth_unavailable":{"summary":"auth_unavailable","value":{"error":"auth_unavailable","message":"Key verification is temporarily unavailable. Wait `retry_after` seconds, then send the request again.","retryable":true,"request_id":"req_3f9c2a1b0d4e5f6a7b8c","retry_after":5}}}}}},"422":{"description":"`invalid_request`: a field failed validation. `param` names it; `detail` is the validator output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"},"example":{"error":"invalid_request","message":"prompt: Field required","retryable":false,"param":"prompt","detail":[{"type":"missing","loc":["body","prompt"],"msg":"Field required"}],"request_id":"req_3f9c2a1b0d4e5f6a7b8c"}}}}},"security":[{"ClerkSession":[]},{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}}},"components":{"schemas":{"ContinueRequest":{"properties":{"message":{"type":"string","minLength":1,"title":"Message","description":"What to change, add, or continue.","examples":["Add founder LinkedIn URLs for all existing rows, then continue until there are 25 rows."]},"input_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Files","description":"Task-local filenames returned by POST /validate-upload."},"wait":{"type":"boolean","title":"Wait","description":"Wait for the turn to finish (200). Default false: queue and return (202).","default":false}},"additionalProperties":true,"type":"object","required":["message"],"title":"ContinueRequest"},"CreditsResponse":{"properties":{"plan":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan"},"unlimited":{"type":"boolean","title":"Unlimited"},"credits_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Remaining"},"credits_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Used"},"credits_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Total"},"monthly_credits":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Monthly Credits"},"billing_reset_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Billing Reset At"}},"additionalProperties":true,"type":"object","required":["unlimited"],"title":"CreditsResponse"},"DirectTaskRequest":{"properties":{"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Continue this task instead of creating one."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name. Derived from the prompt when omitted. Applies only when the task is created; ignored on an existing task_id."},"clarify":{"type":"boolean","title":"Clarify","description":"Allow one blocking planning question before work starts. Default false: plan and execute without asking.","default":false},"input_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Files","description":"Task-local filenames returned by POST /validate-upload."},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"The output artifact to collect: id, kind, path, name; for research also schema, schema_order, target_count. Applies only when the task is created; ignored on an existing task_id.","examples":[{"id":"ai-security-companies","kind":"research","path":"outputs/ai-security-companies.jsonl","schema":{"company_name":"string","funding_stage":"string","source_urls":"array[string]","website":"string"},"schema_order":["company_name","website","funding_stage","source_urls"],"target_count":10}]},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Column types of input_rows. Applies only when the task is created; ignored on an existing task_id.","examples":[{"company_name":"string","funding_stage":"string","website":"string"}]},"input_rows":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Rows","description":"Rows to enrich, one object per row. Applies only when the task is created; ignored on an existing task_id.","examples":[[{"company_name":"Acme Security","website":"acme.security"}]]},"rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rules","description":"Each value is a rule in plain language; the key names it. Applies only when the task is created; ignored on an existing task_id.","examples":[{"us_only":"Only include companies headquartered in the United States."}]},"count":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Count","description":"Target row count. Applies only when the task is created; ignored on an existing task_id.","examples":[10]},"target_count":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Target Count","description":"Alternative to count. Applies only when the task is created; ignored on an existing task_id.","examples":[10]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Model tier. `ranger` (default): most capable. `scout`: faster. `wren`: cheapest, admin plans only. Fixed for the life of the task. Admin-plan keys may also pin a build with `ranger@v-<sha12>`, a variant name, or a version id.","examples":["ranger"]},"source_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Data","description":"Caller metadata stored on the task and returned with it."},"task":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Task","description":"A task.json spec: brief, output, rules, input_schema, input_rows. Top-level fields apply only when task is omitted. skills is ignored."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Appended to the brief, or used as the brief when task is omitted. One of task, prompt or message is required."},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Alias of prompt."}},"additionalProperties":true,"type":"object","title":"DirectTaskRequest","examples":[{"task":{"brief":"Find 10 Series A AI security companies in the US.","output":{"id":"ai-security-companies","kind":"research","path":"outputs/ai-security-companies.jsonl","schema":{"company_name":"string","funding_stage":"string","source_urls":"array[string]","website":"string"},"schema_order":["company_name","website","funding_stage","source_urls"],"target_count":10}}}]},"DraftRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"The output artifact to collect: id, kind, path, name; for research also schema, schema_order, target_count."},"source_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Data"}},"additionalProperties":true,"type":"object","title":"DraftRequest"},"ErrorResponse":{"properties":{"error":{"type":"string","title":"Error","description":"Stable snake_case code. Branch on this field.","examples":["out_of_credits"]},"message":{"type":"string","title":"Message","description":"What went wrong and what to do next."},"retryable":{"type":"boolean","title":"Retryable","description":"True: the same request can succeed later. False: change the request, key, balance or id first."},"request_id":{"type":"string","title":"Request Id","description":"Also the X-Request-ID header. A client-sent X-Request-ID is echoed.","examples":["req_3f9c2a1b0d4e5f6a7b8c"]},"retry_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After","description":"Seconds to wait. Mirrors the Retry-After header. On 429."},"resolve":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resolve","description":"Where to fix the cause. On 402."},"param":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Param","description":"The field that failed validation. On 422."},"detail":{"anyOf":[{},{"type":"null"}],"title":"Detail","description":"Full validator output. On 422."},"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"The task the error refers to."},"task_created":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Task Created","description":"False when task creation was refused, so no task exists."}},"additionalProperties":true,"type":"object","required":["error","message","retryable","request_id"],"title":"ErrorResponse"},"ExecuteRequest":{"properties":{"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Instruction to include with the execution."},"input_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Files","description":"Task-local filenames returned by POST /validate-upload."},"wait":{"type":"boolean","title":"Wait","description":"Wait for the turn to finish (200). Default false: queue and return (202).","default":false}},"additionalProperties":true,"type":"object","title":"ExecuteRequest"},"OutputResponse":{"properties":{"total":{"type":"integer","title":"Total","description":"Rows available before limit.","examples":[20]},"offset":{"type":"integer","title":"Offset","default":0},"rows":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Rows"},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"The artifact these rows belong to: id, kind, path."},"_next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor","description":"Present when more rows remain. Pass it as cursor to read the next page."}},"additionalProperties":true,"type":"object","required":["total","rows"],"title":"OutputResponse"},"OutputsResponse":{"properties":{"active_output":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Active Output"},"outputs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Outputs","description":"Named output artifacts: id, kind, path, count, active."}},"additionalProperties":true,"type":"object","required":["outputs"],"title":"OutputsResponse"},"PromptRequest":{"properties":{"task_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id","description":"Continue this task instead of creating one."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Display name. Derived from the prompt when omitted. Applies only when the task is created; ignored on an existing task_id."},"clarify":{"type":"boolean","title":"Clarify","description":"Allow one blocking planning question before work starts. Default false: plan and execute without asking.","default":false},"input_files":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Input Files","description":"Task-local filenames returned by POST /validate-upload."},"output":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Output","description":"The output artifact to collect: id, kind, path, name; for research also schema, schema_order, target_count. Applies only when the task is created; ignored on an existing task_id.","examples":[{"id":"ai-security-companies","kind":"research","path":"outputs/ai-security-companies.jsonl","schema":{"company_name":"string","funding_stage":"string","source_urls":"array[string]","website":"string"},"schema_order":["company_name","website","funding_stage","source_urls"],"target_count":10}]},"input_schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Input Schema","description":"Column types of input_rows. Applies only when the task is created; ignored on an existing task_id.","examples":[{"company_name":"string","funding_stage":"string","website":"string"}]},"input_rows":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Input Rows","description":"Rows to enrich, one object per row. Applies only when the task is created; ignored on an existing task_id.","examples":[[{"company_name":"Acme Security","website":"acme.security"}]]},"rules":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Rules","description":"Each value is a rule in plain language; the key names it. Applies only when the task is created; ignored on an existing task_id.","examples":[{"us_only":"Only include companies headquartered in the United States."}]},"count":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Count","description":"Target row count. Applies only when the task is created; ignored on an existing task_id.","examples":[10]},"target_count":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Target Count","description":"Alternative to count. Applies only when the task is created; ignored on an existing task_id.","examples":[10]},"version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version","description":"Model tier. `ranger` (default): most capable. `scout`: faster. `wren`: cheapest, admin plans only. Fixed for the life of the task. Admin-plan keys may also pin a build with `ranger@v-<sha12>`, a variant name, or a version id.","examples":["ranger"]},"source_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Source Data","description":"Caller metadata stored on the task and returned with it."},"prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt","description":"Natural-language task for Autumn. One of prompt or message is required.","examples":["Find 10 Series A AI security companies and return name, website, funding stage, and source URLs."]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"Alias of prompt."}},"additionalProperties":true,"type":"object","title":"PromptRequest","examples":[{"prompt":"Find 10 Series A AI security companies and return name, website, funding stage, and source URLs."}]},"QueueState":{"properties":{"position":{"type":"integer","title":"Position","description":"Place in line, 1 is next.","examples":[3]},"eta_s":{"type":"integer","title":"Eta S","description":"Estimated seconds until the run starts.","examples":[240]}},"additionalProperties":true,"type":"object","required":["position","eta_s"],"title":"QueueState"},"Task":{"properties":{"task_id":{"type":"string","title":"Task Id","examples":["8fab6f34"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","examples":["Series A AI security companies"]},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"`plan` (idle, or finished), `execute` (working), `accepted` (queued), `deleted`.","examples":["execute"]},"phase":{"anyOf":[{"type":"string","enum":["plan","execute"]},{"type":"null"}],"title":"Phase","examples":["execute"]},"activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Activity","description":"idle, queued, planning, executing or thinking. `queued` is waiting for a free slot and starts on its own. Finished is `idle`.","examples":["executing"]},"output_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Output Count","examples":[10]},"credits_used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Credits Used"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"},"poll_after_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Poll After S","description":"Seconds to wait before polling status again.","examples":[5]},"status_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Url","examples":["/task/8fab6f34/state"]},"task_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Url","description":"API resource URL, relative to the API server. Open the chat in the browser at https://platform.autumn.ai/?task={task_id}.","examples":["/task/8fab6f34"]},"output_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Url","examples":["/task/8fab6f34/output"]},"stream_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Url","examples":["/task/8fab6f34/stream"]},"queue":{"anyOf":[{"$ref":"#/components/schemas/QueueState"},{"type":"null"}],"description":"Present while `activity` is `queued`."}},"additionalProperties":true,"type":"object","required":["task_id"],"title":"Task"},"TaskState":{"properties":{"task_id":{"type":"string","title":"Task Id"},"exists":{"type":"boolean","title":"Exists"},"active":{"type":"boolean","title":"Active","description":"True while a turn is running."},"status":{"type":"string","title":"Status"},"phase":{"type":"string","title":"Phase"},"activity":{"type":"string","title":"Activity"},"run_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Run Id"},"heartbeat_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Heartbeat At"},"pending_op":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pending Op","description":"A queued message or execute that has not started yet."},"pending_op_stale":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pending Op Stale","description":"True when the queued op has waited past its TTL and will not start."},"last_submit_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Submit Error","description":"Why the last queued (202) message or execute was rejected when it ran, e.g. out_of_credits. Empty when it ran."},"last_submit_error_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Submit Error At"},"queue":{"anyOf":[{"$ref":"#/components/schemas/QueueState"},{"type":"null"}],"description":"Present while `activity` is `queued`."}},"additionalProperties":true,"type":"object","required":["task_id","exists","active","status","phase","activity"],"title":"TaskState"},"UploadRequest":{"properties":{"task_id":{"type":"string","minLength":1,"title":"Task Id","description":"The task the file belongs to."},"filename":{"type":"string","minLength":1,"title":"Filename","description":"A .csv, .txt, .md or .markdown file name.","examples":["accounts.csv"]}},"type":"object","required":["task_id","filename"],"title":"UploadRequest"},"UploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"PUT the file bytes here with no Autumn auth headers."},"key":{"type":"string","title":"Key"},"filename":{"type":"string","title":"Filename"}},"additionalProperties":true,"type":"object","required":["upload_url","key","filename"],"title":"UploadUrlResponse"},"ValidateUploadResponse":{"properties":{"filename":{"type":"string","title":"Filename","description":"Pass this in input_files."},"path":{"type":"string","title":"Path"},"rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rows"},"fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Fields"},"renamed":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Renamed","description":"Duplicate or blank headers that were renamed: index, original, name."},"delimiter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Delimiter"},"extra_columns":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Extra Columns"}},"additionalProperties":true,"type":"object","required":["filename","path"],"title":"ValidateUploadResponse"}},"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your Autumn API key.","x-default":"YOUR_AUTUMN_API_KEY"},"BearerApiKey":{"type":"http","scheme":"bearer","bearerFormat":"Autumn API key","description":"The same key as `Authorization: Bearer <key>`.","x-default":"YOUR_AUTUMN_API_KEY"},"ClerkSession":{"type":"http","scheme":"bearer","bearerFormat":"Clerk session token","description":"A signed-in platform session; only the upload routes accept it."}}},"tags":[{"name":"Tasks","description":"Start, continue, execute, stop and read tasks."},{"name":"Outputs","description":"Rows a task produced."},{"name":"Credits","description":"Account balance."},{"name":"Uploads","description":"Attach a CSV or text file to a task."}],"externalDocs":{"description":"Guide and cookbook","url":"https://www.autumn.ai/docs"},"security":[{"ApiKeyHeader":[]},{"BearerApiKey":[]}]}