Skip to main content
The Responses API is a newer text generation endpoint that builds on top of Chat Completions with a simpler interface, built-in tools, and optional server-side conversation state. Routeway supports it at POST /v1/responses for all models that advertise this endpoint.
The Responses API uses the same OpenAI SDK methods (client.responses.create). Any code written for OpenAI’s Responses API works with Routeway by changing base_url and api_key.

Quick Example

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.routeway.ai/v1",
    api_key=os.getenv("ROUTEWAY_API_KEY")
)

response = client.responses.create(
    model="gpt-4o",
    input="What is the capital of France?"
)

print(response.output_text)

Which Models Support It?

Not every model on Routeway supports the Responses API. Check the model’s endpoints array via GET /v1/models:
{
  "id": "gpt-4o",
  "endpoints": ["/v1/chat/completions", "/v1/responses"],
  ...
}
If /v1/responses is listed, the model is compatible. See Models for the full list.

What’s in This Section

Request & Response

The full anatomy of a Responses API request and response — input formats, output structure, and key parameters.

Multi-turn Conversations

Use previous_response_id to build stateful conversations without resending full message history.

Built-in Tools

Leverage web search, file search, and code interpreter without defining custom function schemas.