Responses API

FastRouter's Responses API provides a unified interface for generating model responses, invoking tools, handling conversation context, streaming output, and engaging with multiple model providers.

The Responses API is FastRouter’s unified interface for generating model responses, calling tools/functions, handling prior conversation context, streaming output, and interacting with multiple model providers like OpenAI, Azure (for OpenAI models) and X-AI (for Grok models) — all through a single endpoint.


Endpoint

POST https://go.fastrouter.ai/api/v1/responses

Base URL

https://go.fastrouter.ai/api/v1

Basic Usage (OpenAI / Azure Providers)

Example: Simple Text Response

curl --location 'https://go.fastrouter.ai/api/v1/responses' \
--header 'Authorization: Bearer API-KEY' \
--header 'Content-Type: application/json' \
--data '{
    "model": "openai/o3",
    "input": "Tell me a three sentence bedtime story about a unicorn.",
    "stream": false
}'

Sample Response


Python Example Using OpenAI SDK


Using a Previous Response ID (Thread Continuity)


Function Calling


Web Search Tool Calling


File Input Example


Grok Provider Examples

Basic Grok Request

Using Previous Response ID

Streaming Responses

Streaming + Previous Response ID

Last updated