API by router
Usage internal
Record Usage
Record a usage event from the agent runtime. Proxy-key auth.
Path Parameters
instance_idInstance Id
Format
uuidconversation_id?Conversation Id
cost_platform_usd?Cost Platform Usd
cost_tenant_usd?Cost Tenant Usd
duration_seconds?Duration Seconds
is_byok?Is Byok
Default
falsekey_source?Key Source
Default
"platform"Length
length <= 20modalityModality
Length
length <= 30model_slugModel Slug
Length
length <= 100providerProvider
Length
length <= 50request_id?Request Id
task?Task
tokens_cached?Tokens Cached
tokens_input?Tokens Input
tokens_output?Tokens Output
total_ms?Total Ms
ttft_ms?Ttft Ms
units?Units
Response Body
curl -X POST "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage" \ -H "Content-Type: application/json" \ -d '{ "modality": "string", "model_slug": "string", "provider": "string" }'{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}Get Spend
Get real-time daily spend from Redis. Proxy-key auth.
Path Parameters
instance_idInstance Id
Format
uuidResponse Body
curl -X GET "https://loading/internal/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/usage/spend"{}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}