API reference
Endpoint
Base URL, authentication, and the two routes Router implements.
Router implements two OpenAI routes, model listing and response creation, under one base URL:
https://router-api.ramp.com/v1POST /v1/chat/completions is not supported yet, so pointing a Chat
Completions client at this base URL will 404.
Authentication
Send a Router API key using either header:
Authorization: Bearer <router-api-key>X-Api-Key: <router-api-key>Authorization wins when both are present. Rejected keys return 401 with one
of two codes:
| Code | When |
|---|---|
invalid_api_key | The key is unknown, expired, or locked by a recurring spend cap |
api_key_deactivated | The key was disabled, including by a lifetime spend cap. The message carries the reason |
A deactivated key can be re-enabled; an unknown one cannot. Handle them separately if your client surfaces the difference.
GET /v1/models
Returns the models available to the current key, in the OpenAI model-list shape. See Choose a model.
curl "https://router-api.ramp.com/v1/models" \
-H "Authorization: Bearer $RAMP_ROUTER_API_KEY"POST /v1/responses
Accepts an OpenAI Responses create payload plus a few Router-only fields. See Request fields for the full list.
curl "https://router-api.ramp.com/v1/responses" \
-H "Authorization: Bearer $RAMP_ROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "your-model-id",
"input": "Reply with exactly one word: pong.",
"max_output_tokens": 16
}'A buffered request returns one OpenAI Response object. stream: true returns
OpenAI Responses server-sent events.
Request correlation
Router echoes x-request-id and x-trace-id, generating either one when you
do not send it. See Monitor and debug.