Responses
Creates responses with conversation state management. Supports previous_response_id for context continuity, function calling, web search, and file inputs. Compatible with OpenAI, Azure, and X-AI (Grok) providers.
FastRouter API Key. Get yours at https://fastrouter.ai
Format: Authorization: Bearer YOUR_API_KEY
Model ID in provider/model format. Examples: openai/o3, openai/gpt-4.1, x-ai/grok-4
openai/o3User input - can be a simple string or array of message objects for multimodal/file inputs
Simple text input
ID of a previous response to continue the conversation. Maintains context across requests.
fr_ID123Enable streaming responses for real-time output
falseControls tool usage. 'auto' lets model decide, 'none' disables tools.
autoPossible values: Sampling temperature for randomness control
1Maximum tokens to generate
Run response generation in background
falseSuccessful response
Unique response ID (use for previous_response_id)
fr_ID123responseUnix timestamp
1764138326Model used
o3-2025-04-16Whether request ran in background
Error message if any
Bad Request - Invalid parameters
Invalid Credentials - Your API key is invalid, missing, or disabled. Check your credentials.
Note: the 401 error body uses code, message, param, and type (there is no status field), and type is invalid_request_error.
Rate Limited - You have exceeded your request limits (TPM/RPM). Slow down or increase your limits.
Internal Server Error
POST /api/v1/responses HTTP/1.1
Host: api.fastrouter.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 102
{
"model": "openai/o3",
"input": "Tell me a three sentence bedtime story about a unicorn.",
"stream": false
}{
"background": false,
"created_at": 1764138326,
"error": null,
"id": "fr_ID123",
"model": "o3-2025-04-16",
"object": "response",
"output": [
{
"id": "rs_ID123",
"summary": [],
"type": "reasoning"
},
{
"id": "msg_ID123",
"role": "assistant",
"type": "message",
"status": "completed",
"content": [
{
"type": "output_text",
"text": "Under a silvery moon, a gentle unicorn named Liora tiptoed..."
}
]
}
]
}Last updated
