Tasks
Invoke an endpoint synchronously or asynchronously, then read the task back.
Introduction
Two routes start a task and they differ only in how the wait happens, not in whether you get a result. The synchronous route holds the connection open and answers with the finished task, or with 202 when the platform's wait window expires first. The asynchronous route accepts and returns immediately.
Both take the same body: a taskId you generate and a payload shaped by the endpoint you are calling. Sending the same id again returns the task it already names rather than starting a second run, which is what makes a retry after a lost response safe.
A 202 is not a failure. Poll the task with getTask under the appId the response names. See Invoking an app.
Start a sync task
Starts a new sync task on appId, routing the request body payload to an available worker. The request blocks until the task is terminal and returns the result inline (200). Resubmitting a task id waits on the task it already names rather than starting a second one, so the 200 carries that task's result and may name a different appId. Poll it under the one returned. A task that outlives the wait window is not a failure: the task is still queued or running, and the response is 202 carrying that task with status: pending, the same shape invoke-async returns, and it names the owning appId on a resubmission just as the 200 does. Poll GET /v1/apps/{appId}/tasks/{taskId} for its result. A request the platform cannot attribute to an accepted task fails instead, with no task to poll. Apps in initializing, active, or stopping accept invocation, with two exceptions: an initializing app whose first rollout has not produced a version returns 409 Conflict, and an active app the platform has observed to have no workload able to serve returns 503 Service Unavailable with no task minted, typed capacity-unavailable and carrying Retry-After. When the task service cannot be reached, the response is 502 Bad Gateway. The request may already have been accepted, so retry with the same taskId: an id already claimed returns its task. stopped, deleting, and failed return 409 Conflict. An app in an environment its budget pauses returns 429 Too Many Requests typed environment-paused, whatever its status. Unknown or deleted apps return 404 Not Found. An organization whose serverless tenancy is revoked, or has no tenancy receipt at all, returns 403 Forbidden, distinguishing that from an app that does not exist. An organization whose tenancy is still being provisioned returns 503 Service Unavailable instead. That state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns 404 whose endpointPath extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to, as returned by
listEndpoints: one or more bare lowercase segments joined by slashes, such asgenerateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
taskId
string (uuid)requiredUUID v4min: 36max: 36Client-generated task identifier, canonical lowercase UUID. One id is one task: resubmitting it is answered with the task it already names rather than starting a second, so a request whose response was lost can be sent again without paying for the work twice. Reusing an id for a different request returns the first task, so the id is the caller's to keep unique.
payload
objectrequiredThe body the endpoint's handler receives, validated against the endpoint's declared input schema. An endpoint that declares none takes it unvalidated.
Response
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
403 | Authenticated but not permitted to access this resource |
404 | The app does not exist, or it exists and does not declare the endpoint path. An undeclared endpoint carries endpointPath with the rejected path. Its absence means the app itself was not found.
|
409 | Resource already exists or the request conflicts with its current state |
413 | The request body exceeds its size limit: 10 MiB on invoke-sync and invoke-async, whose body carries the endpoint's payload, and 1 MiB on the other operations that answer with this response. detail names the limit in bytes.
|
415 | The request body arrived with a Content-Type this operation does not accept. The body was not decoded, so this is not a schema failure. A body of application/json that cannot be parsed returns 400. One that parses and breaks the schema returns 422. A body sent with no Content-Type is the same refusal.
|
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
429 | environment-paused means the app's environment is paused: its spend this UTC month has reached its monthly budget with pauseAtBudget on. No task is started. The pause holds until the budget is raised past the spend or the month turns, so there is no Retry-After; resume the app once it ends.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | The invocation could not be accepted and no task was minted. The problem type says which of two conditions applies, because the client's next move differs.
capacity-unavailable means the app is deployed and correct, and the platform has no workload able to serve it: the app is short of the workers it asks for, or it has work waiting and nothing running it. The request is unchanged by the refusal and succeeds as sent once capacity returns, so retry it rather than correct it, after Retry-After where that header is present. Read health.reason on the app to tell the two capacity conditions apart.
service-unavailable means something this route depends on is temporarily unreachable, or the organization's serverless tenancy is still being provisioned. That is retryable too, but it says nothing about the app.
|
Start an async task
Starts a new async task on appId, routing the request body payload to an available worker. The task runs asynchronously and the response is 202. Poll GET /v1/apps/{appId}/tasks/{taskId} for completion. Resubmitting a task id is answered with the task it already names rather than starting a second one, so the 202 can carry a task that has already finished: read its status instead of assuming pending, and note it may name a different appId. Apps in initializing, active, or stopping accept invocation, with two exceptions: an initializing app whose first rollout has not produced a version returns 409 Conflict, and an active app the platform has observed to have no workload able to serve returns 503 Service Unavailable with no task minted, typed capacity-unavailable and carrying Retry-After. When the task service cannot be reached, the response is 502 Bad Gateway. The request may already have been accepted, so retry with the same taskId: an id already claimed returns its task. stopped, deleting, and failed return 409 Conflict. An app in an environment its budget pauses returns 429 Too Many Requests typed environment-paused, whatever its status. Unknown or deleted apps return 404 Not Found. An organization whose serverless tenancy is revoked, or has no tenancy receipt at all, returns 403 Forbidden, distinguishing that from an app that does not exist. An organization whose tenancy is still being provisioned returns 503 Service Unavailable instead. That state is retryable, not a revocation, and clears once provisioning finishes. Endpoint membership is checked against the active version's endpoint set before the task is accepted: an endpoint the app does not declare returns 404 whose endpointPath extension member carries the rejected path, distinguishing it from an unknown app, and the task never enters the queue.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to, as returned by
listEndpoints: one or more bare lowercase segments joined by slashes, such asgenerateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
taskId
string (uuid)requiredUUID v4min: 36max: 36Client-generated task identifier, canonical lowercase UUID. One id is one task: resubmitting it is answered with the task it already names rather than starting a second, so a request whose response was lost can be sent again without paying for the work twice. Reusing an id for a different request returns the first task, so the id is the caller's to keep unique.
payload
objectrequiredThe body the endpoint's handler receives, validated against the endpoint's declared input schema. An endpoint that declares none takes it unvalidated.
Response
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
403 | Authenticated but not permitted to access this resource |
404 | The app does not exist, or it exists and does not declare the endpoint path. An undeclared endpoint carries endpointPath with the rejected path. Its absence means the app itself was not found.
|
409 | Resource already exists or the request conflicts with its current state |
413 | The request body exceeds its size limit: 10 MiB on invoke-sync and invoke-async, whose body carries the endpoint's payload, and 1 MiB on the other operations that answer with this response. detail names the limit in bytes.
|
415 | The request body arrived with a Content-Type this operation does not accept. The body was not decoded, so this is not a schema failure. A body of application/json that cannot be parsed returns 400. One that parses and breaks the schema returns 422. A body sent with no Content-Type is the same refusal.
|
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
429 | environment-paused means the app's environment is paused: its spend this UTC month has reached its monthly budget with pauseAtBudget on. No task is started. The pause holds until the budget is raised past the spend or the month turns, so there is no Retry-After; resume the app once it ends.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | The invocation could not be accepted and no task was minted. The problem type says which of two conditions applies, because the client's next move differs.
capacity-unavailable means the app is deployed and correct, and the platform has no workload able to serve it: the app is short of the workers it asks for, or it has work waiting and nothing running it. The request is unchanged by the refusal and succeeds as sent once capacity returns, so retry it rather than correct it, after Retry-After where that header is present. Read health.reason on the app to tell the two capacity conditions apart.
service-unavailable means something this route depends on is temporarily unreachable, or the organization's serverless tenancy is still being provisioned. That is retryable too, but it says nothing about the app.
|
Start a sync task on the default endpoint
Starts a new sync task on appId, routing the request body payload to the app's default endpoint: the one it marks as its default, or its only endpoint when it has exactly one. The request body, responses, and task semantics match POST /v1/apps/{appId}/invoke-sync/{endpointPath}. An app with more than one endpoint that marks none of them as its default returns 404 with no endpointPath member and a detail naming the requirement. An unknown or deleted app returns the same status with a detail that does not name a missing default. When the task service cannot be reached, the response is 502 Bad Gateway. The request may already have been accepted, so retry with the same taskId: an id already claimed returns its task.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
taskId
string (uuid)requiredUUID v4min: 36max: 36Client-generated task identifier, canonical lowercase UUID. One id is one task: resubmitting it is answered with the task it already names rather than starting a second, so a request whose response was lost can be sent again without paying for the work twice. Reusing an id for a different request returns the first task, so the id is the caller's to keep unique.
payload
objectrequiredThe body the endpoint's handler receives, validated against the endpoint's declared input schema. An endpoint that declares none takes it unvalidated.
Response
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
403 | Authenticated but not permitted to access this resource |
404 | The app does not exist, or it exists and does not declare the endpoint path. An undeclared endpoint carries endpointPath with the rejected path. Its absence means the app itself was not found.
|
409 | Resource already exists or the request conflicts with its current state |
413 | The request body exceeds its size limit: 10 MiB on invoke-sync and invoke-async, whose body carries the endpoint's payload, and 1 MiB on the other operations that answer with this response. detail names the limit in bytes.
|
415 | The request body arrived with a Content-Type this operation does not accept. The body was not decoded, so this is not a schema failure. A body of application/json that cannot be parsed returns 400. One that parses and breaks the schema returns 422. A body sent with no Content-Type is the same refusal.
|
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
429 | environment-paused means the app's environment is paused: its spend this UTC month has reached its monthly budget with pauseAtBudget on. No task is started. The pause holds until the budget is raised past the spend or the month turns, so there is no Retry-After; resume the app once it ends.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | The invocation could not be accepted and no task was minted. The problem type says which of two conditions applies, because the client's next move differs.
capacity-unavailable means the app is deployed and correct, and the platform has no workload able to serve it: the app is short of the workers it asks for, or it has work waiting and nothing running it. The request is unchanged by the refusal and succeeds as sent once capacity returns, so retry it rather than correct it, after Retry-After where that header is present. Read health.reason on the app to tell the two capacity conditions apart.
service-unavailable means something this route depends on is temporarily unreachable, or the organization's serverless tenancy is still being provisioned. That is retryable too, but it says nothing about the app.
|
Start an async task on the default endpoint
Starts a new async task on appId, routing the request body payload to the app's default endpoint: the one it marks as its default, or its only endpoint when it has exactly one. The request body, responses, and task semantics match POST /v1/apps/{appId}/invoke-async/{endpointPath}. An app with more than one endpoint that marks none of them as its default returns 404 with no endpointPath member and a detail naming the requirement. An unknown or deleted app returns the same status with a detail that does not name a missing default. When the task service cannot be reached, the response is 502 Bad Gateway. The request may already have been accepted, so retry with the same taskId: an id already claimed returns its task.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
taskId
string (uuid)requiredUUID v4min: 36max: 36Client-generated task identifier, canonical lowercase UUID. One id is one task: resubmitting it is answered with the task it already names rather than starting a second, so a request whose response was lost can be sent again without paying for the work twice. Reusing an id for a different request returns the first task, so the id is the caller's to keep unique.
payload
objectrequiredThe body the endpoint's handler receives, validated against the endpoint's declared input schema. An endpoint that declares none takes it unvalidated.
Response
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
403 | Authenticated but not permitted to access this resource |
404 | The app does not exist, or it exists and does not declare the endpoint path. An undeclared endpoint carries endpointPath with the rejected path. Its absence means the app itself was not found.
|
409 | Resource already exists or the request conflicts with its current state |
413 | The request body exceeds its size limit: 10 MiB on invoke-sync and invoke-async, whose body carries the endpoint's payload, and 1 MiB on the other operations that answer with this response. detail names the limit in bytes.
|
415 | The request body arrived with a Content-Type this operation does not accept. The body was not decoded, so this is not a schema failure. A body of application/json that cannot be parsed returns 400. One that parses and breaks the schema returns 422. A body sent with no Content-Type is the same refusal.
|
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
429 | environment-paused means the app's environment is paused: its spend this UTC month has reached its monthly budget with pauseAtBudget on. No task is started. The pause holds until the budget is raised past the spend or the month turns, so there is no Retry-After; resume the app once it ends.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | The invocation could not be accepted and no task was minted. The problem type says which of two conditions applies, because the client's next move differs.
capacity-unavailable means the app is deployed and correct, and the platform has no workload able to serve it: the app is short of the workers it asks for, or it has work waiting and nothing running it. The request is unchanged by the refusal and succeeds as sent once capacity returns, so retry it rather than correct it, after Retry-After where that header is present. Read health.reason on the app to tell the two capacity conditions apart.
service-unavailable means something this route depends on is temporarily unreachable, or the organization's serverless tenancy is still being provisioned. That is retryable too, but it says nothing about the app.
|
Get a task
Returns the task's current status, read through the inference transport layer from the shared result store. When completed, includes the result output and completedAt. When failed, includes error. When pending, neither is set. If the app is stopped, deleting, or failed, accepted task results stay readable. A 404 Not Found means the task cannot currently be verified for this app. Because enqueue-time ownership tracking is best effort, a recently returned task ID can temporarily return 404. Retry it within the normal polling window. Unknown or deleted apps also return 404 Not Found. When the task service cannot be reached, the response is 502 Bad Gateway, and the read can be retried. When the task or its output is temporarily unavailable, for example while the task service is being updated, the response is 503 Service Unavailable, and the read can be retried.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
taskId
string (uuid)requiredUUID v4min: 36max: 36Task identifier, supplied by the caller when the task was submitted.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
Response
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | A required service is temporarily unavailable |
List tasks
Lists TTL-bounded asynchronous task metadata for this app so a client can recover task ids after an interrupted long-poll or CLI session. Pending includes queued, running and retrying work. Tasks appear only within the configured recovery window. A page can be empty and still have nextCursor. Continue until it is null. Pending entries are best effort and may disappear if the recovery store restarts. Tracked tasks reappear on completion. A completed task carries the same output that GET /v1/apps/{appId}/tasks/{taskId} returns for it. A page holds fewer than limit tasks when their outputs are large; continue with nextCursor. A task whose output cannot be read yet is listed as pending, as that read would report it, and is left out of a page filtered on completed. This is not persisted task history. A task id names one task, so resubmitting one does not add a second entry here. If the app is stopped, deleting, or failed, recovery stays available. Unknown or deleted apps return 404 Not Found. When the task service cannot be reached, the response is 502 Bad Gateway, and the list can be retried.
Request
appId
stringrequiredmin: 6max: 30Immutable app identifier, unique among the authenticated organization's live apps in one environment. The
environmentquery parameter selects which copy the request addresses.
environment
stringmin: 1max: 63The environment the request addresses. An app id names one copy per environment, so this parameter completes the app's address:
appIdtogether withenvironmentselects the copy. The app list and the app summary are limited to the environment, and an app, build, endpoint, worker, event, usage or attached-secret cursor is valid only in the environment it came from. A metric query that names no app covers the whole organization, and a log query covers this environment; a metric query expanded by app returns only the apps live in this environment. Omitted meansproduction. A name the organization has no live environment under returns404.
limit
integerint32min: 1max: 100default: 20Maximum number of items to return.
cursor
stringOpaque pagination cursor returned by a previous call, as
nextCursoror, on the operations that offer one,prevCursor.
status
stringAllowed values3 values
Response
nextCursor
stringnullableCursor for the next page. Null when there are no more items.
data
object[]Array items9 properties each
id
stringrequiredTask identifier, supplied by the caller when the task was submitted.
status
stringrequiredPossible values3 values
appId
stringrequiredmin: 6max: 30Immutable app identifier. Unique among the authenticated organization's live apps in one environment: it cannot be changed after creation, it becomes available again once the app it named reaches
deleted, and the same id may run once in each environment as a separate copy.
endpointPath
stringrequiredmin: 1max: 255Path of the endpoint to route the task to: one or more bare lowercase segments joined by slashes, such as
generateorv1/chat/completions, with no leading or trailing slash. Send those slashes unencoded. A generated client that escapes/as%2Fis rejected with422.
endpointId
string (uuid)UUID v4Allocated endpoint row, the same UUID as
Endpoint.id. Present when the live row atendpointPathwas created at or before this task. Omitted when that path has no live row, when this task has no creation time, and when this task predates the live row: a path removed and added again is a different endpoint, and this id must not name it. Metrics filters take this id, notendpointPath.
output
anyInference result payload on success. Null otherwise. May be any JSON value, including an object, array, string, number, boolean, or null.
error
stringnullableUnstructured error message when
statusisfailed. Null otherwise. It reports a task the platform accepted and that then failed. Its wording is not part of this contract: it carries no stable code or retry signal, so do not parse it to classify a failure.
createdAt
string (date-time)requireddate-time
completedAt
string (date-time)nullabledate-time
Errors
| Status | When |
400 | The request was malformed and could not be parsed (e.g. invalid JSON). A well-formed request that fails validation returns 422 instead.
|
401 | Missing or invalid credentials |
404 | Resource not found |
422 | The request was well-formed but semantically invalid (e.g. a missing or out-of-range field). A request that could not be parsed returns 400. The errors array carries one entry per offending field.
|
500 | Unexpected server error |
502 | An upstream service was unreachable or refused the request |
503 | A required service is temporarily unavailable |