Skip to content

A race and how each racer is doing

GET
/races/{race_id}
curl --request GET \
--url https://api.global.stillbox.example/v1/races/race-7k2m9q4x8w3z5r6t \
--header 'Authorization: Bearer <token>'
race_id
required
string

The race

Media typeapplication/json
object
id
required
string
sandbox_id
required

The sandbox that was copied.

string
task
required
string
check
string
dir
required
string
state
required
string
Allowed values: running finished kept cancelled
winner_id

The kept copy.

string
deadline
required
string format: date-time
created_at
required
string format: date-time
finished_at
string format: date-time
by

The person who started the race.

string
racers
required
Array<object>
object
n
required

The racer’s number, from 1.

integer
sandbox_id
required
string
sandbox_name
required
string
sandbox_deleted
boolean
state
required

Starting until its copy runs; working while its agent works; checking while the check runs.

string
Allowed values: starting working checking done failed
response_id

The agent’s response in the copy; read it through /sandboxes/{id}/agent/v1/responses/{response_id}.

string
turn_status

How the agent’s turn ended (completed, failed or cancelled).

string
started_at
string format: date-time
finished_at
string format: date-time
duration_ms

How long the agent worked, once it reported its run.

integer format: int64
input_tokens
required
integer format: int64
output_tokens
required
integer format: int64
cost_usd
required

As the agent reported it.

number format: double
changes
required

Git’s summary of the files changed in dir, untracked files included; empty without changes or git.

string
check_exit_code

The check’s exit code; absent without a check.

integer
check_output
required

The last 4 KB of the check’s output.

string
error
string

Example

{
"state": "running",
"racers": [
{
"state": "starting"
}
]
}

The API key is missing or invalid

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}

No such sandbox in your organization (or no such file)

Media typeapplication/json
object
code
required
string
message
required
string

Example

{
"code": "not_found"
}