Reports resource usage (tokens, compute time, etc.) for billing.
curl --request POST \
--url https://api.strait.dev/sdk/v1/runs/{runID}/usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"completion_tokens": 123,
"model": "<string>",
"prompt_tokens": 123,
"provider": "<string>",
"cost_microusd": 123,
"total_tokens": 123
}
'{
"completion_tokens": 123,
"cost_microusd": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"model": "<string>",
"prompt_tokens": 123,
"provider": "<string>",
"run_id": "<string>",
"total_tokens": 123,
"$schema": "<string>"
}Documentation Index
Fetch the complete documentation index at: https://docs.strait.dev/llms.txt
Use this file to discover all available pages before exploring further.
API key passed as Bearer token
OK
A URL to the JSON Schema for this object.
"https://api.strait.dev/schemas/RunUsage.json"
curl --request POST \
--url https://api.strait.dev/sdk/v1/runs/{runID}/usage \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"completion_tokens": 123,
"model": "<string>",
"prompt_tokens": 123,
"provider": "<string>",
"cost_microusd": 123,
"total_tokens": 123
}
'{
"completion_tokens": 123,
"cost_microusd": 123,
"created_at": "2023-11-07T05:31:56Z",
"id": "<string>",
"model": "<string>",
"prompt_tokens": 123,
"provider": "<string>",
"run_id": "<string>",
"total_tokens": 123,
"$schema": "<string>"
}