What’s in this section
Chat Completions
Messages & Roles
How the
messages array works, what system, user, and assistant roles do, and how to build multi-turn conversations correctly.Tokens & Context
What tokens are, how context windows limit request size, and how to manage long conversations without hitting the limit or running up costs.
Models & Providers
How Routeway routes a request to the right upstream provider, how to pick the right model for your use case, and how to pin versions for stable production behavior.
Request & Response
The full anatomy of a chat completion request and response — every key parameter, what
finish_reason values mean, and how errors are shaped.Responses
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.
Image Generation
Generating Images
Turn a text prompt into an image. Covers models, sizes, quality presets, response formats, and saving images locally.
Editing Images
Modify an existing image with a prompt and optional mask. Covers inpainting, multi-image edits, and advanced parameters like
strength and guidance_scale.