Run Statuses
A run can be in one of the following statuses: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 execution
Timing Information
The response includes several timestamps to track the run’s lifecycle:created_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)
Token Usage
For runs that involve LLM interactions: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 output
Run Hierarchy and Context
parent_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 tracing
Examples
Running Run
Completed Run
Failed Run
Experiment Run
Common Error Codes
| Error 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 |
Usage Tips
-
Polling Interval: When polling for run status, we recommend:
- Start with 1-second intervals for the first 5 seconds
- Then increase to 5-second intervals until 30 seconds
- Finally use 30-second intervals until completion
-
Timeouts: Different run types have different timeout limits:
- Prompts: 30 seconds
- Agents: 5 minutes
- Flows: 15 minutes
-
Error Handling: Always check both the
statusfield and presence oferror/resultfields to determine the run’s outcome
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The ID of the run to fetch
Response
OK
Unique identifier for the run
ID of the account that owns this run
Current status of the run
running, completed, failed, cancelled, timeout, waiting When the run was created
ID of the parent run if this is a child run
ID of the runnable that was executed
Telemetry span ID for tracing
ID of the experiment this run belongs to
ID of the experiment candidate this run represents
Current state of the run
ID of the user who created the run
When the run completed (for completed, failed, cancelled, or timeout status)
Total number of input tokens used
Total number of cached tokens used
Total number of output tokens generated
Total cost of the run in USD
When the run failed (for failed status)
Result of the run. If the run has not yet completed, this will be partially populated and is subject to change over time. This may be null if the run has yet to generate any output.
Additional metadata about the run

