Skip to main content
POST
The standard OpenAI-compatible POST /v1/images/generations endpoint. As of September 30, 2026 it serves seedream-5-0-260128, wan2.7-image, wan2.7-image-pro, gpt-image-2, gpt-image-2.5-flare, and gpt-image-2.5-sunburst. No image model is served on POST /v1/chat/completions — image generation goes through this endpoint (and POST /v1/images/edits where noted).

Routing at a glance

Supported models

Current prices are on aisa.one/models.

Size constraint ⚠️ (Seedream routes)

Seedream’s upstream enforces a minimum of 3,686,400 pixels. Requests below that are rejected with:
Any aspect ratio works as long as width × height ≥ 3,686,400.

Request

Request fields

Response

AIsa’s response adds a few extensions over the vanilla OpenAI schema:
  • model echoed at the root
  • data[].size — actual dimensions of each returned image
  • usage — includes generated_images (drives billing), plus output_tokens / total_tokens for token accounting
URLs in data[].url are short-lived. Download and persist the image to your own storage before it expires.

Common 4xx causes

  • 400 InvalidParameter — image size must be at least 3686400 pixels — size was too small. Use 1920x1920 or larger.
  • 400 model_route_not_supported — the model doesn’t serve this endpoint (e.g., a text model like gpt-4.1-mini). The error body’s supported_routes lists the routes it does serve.
  • 404 model not found — the model ID doesn’t exist on the gateway (e.g., the retired seedream-4-5-251128). Check the model catalog.
  • 400 invalid_request — malformed size string (e.g., 1024 instead of 1024x1024).
See Error Codes and Rate Limits for more.

Model catalog

Current model IDs and the endpoints each one serves.

Gemini generateContent

Gemini-compatible generateContent endpoint.

Media Gen skill

Agent skill that wraps image + video generation.

Request contract

Complete OpenAPI definition Effective request and pricing declaration (including authentication and referenced schemas):

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
enum<string>
required

Image generation model. seedream-5-0-260128, wan2.7-image, wan2.7-image-pro, gpt-image-2, gpt-image-2.5-flare, or gpt-image-2.5-sunburst.

Available options:
seedream-5-0-260128,
wan2.7-image,
wan2.7-image-pro,
gpt-image-2,
gpt-image-2.5-flare,
gpt-image-2.5-sunburst
prompt
string
required

Text description of the image to generate.

n
integer
default:1

Number of images to generate. Each image is billed separately at the per-image rate.

Required range: x >= 1
size
string

Image dimensions as WIDTHxHEIGHT. Seedream routes require width × height ≥ 3,686,400 (e.g. 1920x1920, 2048x2048); Wan and gpt-image-2 accept smaller sizes such as 1024x1024.

Example:

"2048x2048"

Response

Images generated successfully.

model
string
Example:

"seedream-5-0-260128"

created
integer
Example:

1776495432

data
object[]

One entry per generated image.

usage
object