Retrieve the current state and results of a run
running
: The run is currently executingcompleted
: The run has successfully completedfailed
: The run encountered an error during executioncancelled
: The run was cancelled by the user or systemtimeout
: The run exceeded its maximum allowed execution timewaiting
: The run is waiting for user input before it can continue executioncreated_at
: When the run was first createdcompleted_at
: When execution finished (for completed, failed, cancelled, or timeout status)failed_at
: When the run failed (for failed status)result.prompt_tokens
: Number of tokens in the inputresult.cached_tokens
: Number of tokens retrieved from cache (typically billed at a lower rate)result.completion_tokens
: Number of tokens generated in the outputparent_run_id
: ID of the parent run if this is part of a larger workflowrunnable_id
: ID of the runnable (prompt, agent, or flow) that was executedexperiment_id
: ID of the experiment this run belongs to (if any)experiment_candidate_id
: ID of the experiment candidate this run represents (if any)telemetry_span_id
: Span ID for distributed tracingError Code | Description |
---|---|
INTERNAL_ERROR | An unexpected error occurred in the system |
INVALID_INPUT | The provided input was invalid or malformed |
RESOURCE_NOT_FOUND | A required resource was not found |
TIMEOUT | The run exceeded its maximum execution time |
RATE_LIMIT_EXCEEDED | Too many requests were made in a short period |
AUTHORIZATION_ERROR | The request lacks valid authentication credentials |
status
field and presence of error
/result
fields to determine the run’s outcome
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
The ID of the run to fetch
OK
The response is of type object
.