Syndai Docs

Get a run's usage

Use a key with only read scopes. Your customer_id is in the reply to Get the calling API key.

GET
/api/v1/external/coding/runs/{run_id}/usage

Read a run's aggregated usage and cost: tokens, sandbox minutes and the charged total. A run outside your workspace is a 404. Requires the coding:runs:usage scope.

Authorization

CustomerApiKey
headerAuthorizationBearer <API Key>

Customer API key sent as a bearer token

Path Parameters

run_id*string
Formatuuid

Query Parameters

customer_id?|null

Response Body

Request fulfilled, document follows

application/json
  1. response
executor_tokens_in*integer
executor_tokens_out*integer
run_id*string
Formatuuid
sandbox_cost_usd*number
sandbox_minutes*number
total_usd*number
validation_minutes_by_runner*
Example Request
curl -X GET 'https://api.syndai.ai/api/v1/external/coding/runs/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage'
Example Response
{  "executor_tokens_in": 0,  "executor_tokens_out": 0,  "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",  "sandbox_cost_usd": 0,  "sandbox_minutes": 0,  "total_usd": 0,  "validation_minutes_by_runner": {    "property1": 0,    "property2": 0  }}
Was this page helpful?