Beatra

Async tasks

Agent task lifecycle, the Task envelope, polling, callbacks, and cancellation.

Agent skills that take longer than an HTTP turn return 202 + a Task envelope. The task is queued, runs asynchronously, and can be observed by polling or callbacks:

queued → running → succeeded | failed | canceled

Task envelope

The create response, GET /v1/tasks/{task_id}, and the callback POST body all return the same structure:

FieldDescription
task_idtask_-prefixed task ID; stable across idempotent retries
statusqueued / running / succeeded / failed / canceled
capabilityCapability name, e.g. text_to_video
model / resolved_modelRequested model (may be auto) / model that actually ran
inputNormalized echo of the input
outputArtifacts; present only on succeeded. Structure documented on each capability page
progress{ percent, stage, message }; meaningful only while running
warnings[]Reserved; currently always an empty list
error{ code, message, retryable }; present only on failed
usage / billingBilling details → Billing & usage
callbackCallback delivery status → Callbacks
metadataReserved; accepted at creation, currently always null in responses
created_at / started_at / completed_atLifecycle timestamps (UTC)
links{ self, cancel }

Polling, listing, and cancellation

OperationEndpointDescription
Get oneGET /v1/tasks/{task_id}Returns the full envelope; poll at ~5s intervals until a terminal state
ListGET /v1/tasks?limit=100Cursor-paginated summaries; excludes output/usage
CancelPOST /v1/tasks/{task_id}/cancelIdempotent; terminal tasks are returned as-is, and an in-flight stop succeeds only when confirmed

Before remote execution starts, cancellation stops the task and releases its prepaid credits. Once execution has started, Beatra returns canceled only when the stop is confirmed. A 409 means execution continues: do not claim the task stopped or promise a refund, do not submit a replacement, and continue polling the same task to its terminal state.

MiniMax H3 can confirm cancellation only while its upstream task is still queued. Once it is running, Beatra returns 409 and does not refund the task; the upstream DELETE operation is not used because it would not represent a confirmed cancellation.

Explicit model vs auto

  • An explicitly specified model is never silently replaced: if it does not support a requested parameter, the request fails immediately with 422 unsupported_option naming the field.
  • With model: "auto", choosing and switching the concrete model is the platform's job by design; the terminal task's resolved_model records which model actually ran.

Storing artifacts

Resource URLs in output are CDN addresses. Copy them to your own storage promptly after fetching results — do not treat them as permanent links.

On this page