Skip to main content
POST
/
sdk
/
v1
/
runs
/
{runID}
/
usage
Report resource usage
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.

Authorizations

Authorization
string
header
required

API key passed as Bearer token

Path Parameters

runID
string
required

Body

application/json
completion_tokens
integer<int64>
required
model
string
required
prompt_tokens
integer<int64>
required
provider
string
required
cost_microusd
integer<int64>
total_tokens
integer<int64>

Response

OK

completion_tokens
integer<int64>
required
cost_microusd
integer<int64>
required
created_at
string<date-time>
required
id
string
required
model
string
required
prompt_tokens
integer<int64>
required
provider
string
required
run_id
string
required
total_tokens
integer<int64>
required
$schema
string<uri>
read-only

A URL to the JSON Schema for this object.

Example:

"https://api.strait.dev/schemas/RunUsage.json"