/v1/chat/completions format, so any existing client or SDK works without changes.
Routeway supports the same request and response schema as the OpenAI Chat Completions API. Point your base URL to
https://api.routeway.ai/v1 and you’re set.Quick Example
- Python
- Node.js
- cURL
Response Shape
A successful response looks like this:| Field | Description |
|---|---|
choices[0].message.content | The model’s text response. |
choices[0].finish_reason | Why the model stopped: stop, length, or tool_calls. |
usage | Token counts for billing and monitoring. |
Request Model
These are the most common fields you can include in a Chat Completions request:| Field | Type | Description |
|---|---|---|
model | string | The model to use (e.g. gpt-4o-mini, claude-sonnet-4-20250514). |
messages | array | The conversation history. Each message has a role and content. |
tools | array | Function definitions the model can call. See Tool Calling. |
response_format | object | Constrain output to JSON or a JSON Schema. See Structured Outputs. |
stream | boolean | Return tokens incrementally via SSE. See Streaming. |
stream_options | object | Options for streaming (e.g. include_usage). |
reasoning_effort | string | Control thinking depth for reasoning models. See Reasoning. |
Learn More
Streaming
Receive tokens as they are generated for real-time output.
Tool Calling
Let the model invoke functions and external tools.
Structured Outputs
Constrain responses to JSON or a specific schema.
Reasoning
Use extended thinking for complex multi-step problems.
Multimodal Inputs
Send images and other media alongside text messages.
Caching
Reduce costs and latency with prompt caching.
Presets
Apply reusable configurations to your requests.