Create Response
Creates a model response. Supports streaming via `stream: true`. Compatible with the OpenAI Responses API. Automatically routes to the best available provider (OpenAI, Anthropic, Google, etc.).
Authorization
ApiKeyAuth Your Yolo Router API key. Format: Bearer sk-...
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X POST "https://api.yolorouter.com/v1/responses" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o", "input": "Say hello in French." }'{
"id": "resp_abc123",
"object": "response",
"model": "gpt-4o",
"status": "completed",
"output": [
{
"type": "message",
"id": "string",
"role": "string",
"content": [
{
"type": "string",
"text": "string"
}
],
"status": "string",
"call_id": "string",
"name": "string",
"arguments": "string"
}
],
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"input_tokens_details": {
"cached_tokens": 0
}
},
"error": {
"code": "string",
"message": "string"
},
"incomplete_details": {
"reason": "max_output_tokens"
}
}{
"error": {
"type": "invalid_request_error",
"code": "invalid_api_key",
"message": "Invalid API key"
}
}{
"error": {
"type": "insufficient_quota",
"code": "insufficient_quota",
"message": "Quota exceeded"
}
}{
"error": {
"type": "string",
"code": "string",
"message": "string"
}
}Create Message POST
Creates a model response using the Anthropic Claude Messages API format. Supports streaming via `stream: true`. Automatically routes to the best available provider (Anthropic, Google, OpenAI-compatible). Set `ANTHROPIC_BASE_URL` to this server's base URL in Claude Code or any Anthropic SDK to use Yolo Router as a drop-in replacement.
List Models GET
Returns the list of models available for your API key's group.