Skip to main content
Routeway exposes two image endpoints that mirror the OpenAI images API — so any code that calls api.openai.com/v1/images/generations works against Routeway with only a base URL swap.

What’s in this section

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.

Endpoints

Image models use dedicated endpoints — they are not available on /v1/chat/completions. Use the OpenAI SDK’s client.images.generate() and client.images.edit() helpers, or call the endpoints directly with cURL.

Response formats

Both endpoints support two ways to receive the result:
URLs returned by the API expire after 1 hour. Download and store any image you want to keep — don’t rely on the URL long-term.

Supported models

Routeway routes image requests to the underlying provider based on the model field. A non-exhaustive selection: Check the Models catalog for the full list and current pricing.