Retrieve a customer
Retrieve a customer by their identifier. Returns usage stats, budgets, and metadata.
Path parameters
customer_identifier
Your unique identifier for this customer.
Headers
Authorization
Bearer token. Use Bearer YOUR_API_KEY.
Query parameters
environment
Specify environment if you are not using the default. Options: prod, test.
Response
Customer details.
id
Internal customer ID.
customer_identifier
Your unique identifier for this customer.
email
Customer email.
name
Customer display name.
environment
Environment.
Allowed values:
period_budget
Budget for the current period in USD.
budget_duration
Budget reset period.
Allowed values:
total_period_usage
Spending in the current budget period (USD).
period_start
Start of current budget period.
period_end
End of current budget period.
total_budget
Lifetime budget limit (USD).
total_usage
Lifetime spending (USD).
total_requests
Total number of requests.
total_prompt_tokens
Total prompt tokens.
total_completion_tokens
Total completion tokens.
total_tokens
Total tokens.
total_cache_hits
Total cache hits.
average_latency
Average latency in seconds.
average_ttft
Average time to first token in seconds.
average_monthly_cost
Average monthly cost (USD).
top_models
Most used models.
last_active
Last activity timestamp.
created_at
When the customer was created.
updated_at
Last update timestamp.
metadata
Custom metadata.
markup_percentage
Markup percentage.
Errors
401
Unauthorized Error
429
Too Many Requests Error
500
Internal Server Error