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 tracing| 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 |
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
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