Skip to main content
Before diving into advanced guides, it helps to understand a handful of concepts that underpin every request you make through Routeway. This section covers them in depth — read it once and the rest of the docs will make much more sense.

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.

Where to go next

Once you’re comfortable with these fundamentals, the Guides show you how to use streaming, tool calling, structured outputs, reasoning models, multimodal inputs, and caching — all of which build directly on what’s covered here.