Documentation Index
Fetch the complete documentation index at: https://docs.routeway.ai/llms.txt
Use this file to discover all available pages before exploring further.
This API endpoint allows you to generate images from text prompts using various image generation models.
Images stored via URL are only available for 1 hour after generation. Make sure to download and save important images locally.
Create Image Generation
To generate an image, use the following endpoint:
POST /v1/images/generations
Request Body
The image generation model to use (e.g., “flux-1-schnell”)
The text prompt for image generation
Provider-specific quality preset
Target image resolution (e.g., “1024x1024”)
Number of images to generate (default: 1)
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.routeway.ai/v1",
api_key=os.getenv("Routeway_API_KEY")
)
response = client.images.generate(
model="flux-1-schnell",
prompt="A beautiful sunset over a mountain lake",
size="1024x1024",
n=1,
quality="standard"
)
print(response.data[0].url)
Image generation model (e.g., flux-1-schnell)
The text prompt for image generation
Provider-specific quality preset
Target image resolution (e.g., 1024x1024)
Number of images to generate
Available options:
url,
b64_json
Unix timestamp of request creation
data
ImageData · object[]
required
Array of generated image objects