Skip to main content
GET
One run, optionally waiting up to 60 s for a final state.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Query Parameters

wait_seconds
integer

Long poll up to this many seconds for a final state (default 0).

Required range: 0 <= x <= 60
end_user_id
string

The end user the caller expects this run to be for. A run created for another end user, or for none, answers RUN_NOT_FOUND, as a missing run does.

Pattern: ^[\x21-\x7E]{1,128}$

Response

The run (also when it failed or was canceled); Retry-After while it is not final.

id
string<uuid>
required
Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
object
string
required
Allowed value: "run"
status
enum<string>
required
Available options:
queued,
running,
completed,
failed,
canceled
provider
string
required
model
string
required
output
object | null
required
usage
object | null
required
cost
object | null
required

The run's cost in USD. Null for an API key Spiral set to the customer price view (ADR 0145), whose answers state no USD amount.

charge_reason
enum<string> | null
required
Available options:
provider_billed_failure,
provider_billed_cancel
timings
object
required
error
object | null
required
metadata
object | null
required
end_user_id
string | null
required
idempotency_key
string | null
required
app
object | null
required
sequence
required
customer_cost
object | null

Only for an API key in the customer price view (ADR 0145), in place of cost: the run's cost in the organization's own unit, as cost.customer_price with the cost's state; null when the run has no customer price. Absent for every other key.