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
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.
CustomerApiKeyheader
AuthorizationBearer <API Key>Customer API key sent as a bearer token
run_id*stringFormat
uuidcustomer_id?|nullRequest fulfilled, document follows
application/json- response
executor_tokens_in*integerexecutor_tokens_out*integerrun_id*stringFormat
uuidsandbox_cost_usd*numbersandbox_minutes*numbertotal_usd*numbervalidation_minutes_by_runner*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 }}