Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/control/v1/billing/invoices" \ -H "Content-Type: application/json" \ -d '{}'{
"stripe_invoice_id": "string",
"hosted_invoice_url": "string",
"amount_cents": 0,
"currency": "string",
"period_start": "2019-08-24T14:15:22Z",
"period_end": "2019-08-24T14:15:22Z",
"status": "string"
}{
"status_code": 400,
"detail": "Bad Request",
"extra": {}
}Query Parameters
nonce*string
Client-generated nonce to stabilize idempotency.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
amount_usd*string
Response Body
application/json
application/json
curl -X POST "https://example.com/control/v1/billing/topups?nonce=string" \ -H "Content-Type: application/json" \ -d '{ "amount_usd": "string" }'{
"stripe_session_id": "string",
"checkout_url": "string"
}{
"status_code": 400,
"detail": "Bad Request",
"extra": {}
}Query Parameters
days?integer
Default
30Range
1 <= value <= 365Response Body
application/json
application/json
curl -X GET "https://example.com/control/v1/billing/summary"{
"summary": {
"days": 0,
"total_prompt_tokens": 0,
"total_completion_tokens": 0,
"total_tokens": 0,
"total_cached_prompt_tokens": 0,
"total_requests": 0,
"estimated_cost_micros": 0,
"credit_balance_micros": 0
},
"by_model": [
{
"model": "string",
"service_tier": "default",
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0,
"cached_prompt_tokens": 0,
"total_requests": 0,
"cost_micros": 0,
"pricing": {
"model": "string",
"prompt_token_price_micros": 0,
"completion_token_price_micros": 0,
"effective_from": "2019-08-24T14:15:22Z"
}
}
]
}{
"status_code": 400,
"detail": "Bad Request",
"extra": {}
}Query Parameters
limit?integer
Default
25Range
1 <= value <= 100starting_after?string|null
Response Body
application/json
application/json
curl -X GET "https://example.com/control/v1/billing/transactions"{
"items": [
{
"id": "string",
"created_at": "2019-08-24T14:15:22Z",
"type": "string",
"amount_micros": 0,
"balance_after_micros": 0,
"description": "string",
"external_provider": "string",
"external_payment_id": "string"
}
],
"next_starting_after": "string"
}{
"status_code": 400,
"detail": "Bad Request",
"extra": {}
}