API Reference
Base URL
Section titled “Base URL”https://api.tokenrouter.ioAuthentication
Section titled “Authentication”All requests require a TokenRouter API key in the Authorization header:
Authorization: Bearer tr_your_api_keyEndpoints
Section titled “Endpoints”POST /v1/responses
Section titled “POST /v1/responses”Create a new AI model response.
POST /v1/responses/{request_id}
Section titled “POST /v1/responses/{request_id}”Replay a previous response.
Rate Limits
Section titled “Rate Limits”Rate limits vary by plan. See your dashboard for current limits.
Errors
Section titled “Errors”All errors follow this format:
{ "error": { "type": "error_type", "message": "Human-readable message", "http_status": 400 }}