Skip to main content
POST
The standard OpenAI-compatible POST /v1/images/generations endpoint. As of July 28, 2026 it serves seedream-5-0-260128, wan2.7-image, wan2.7-image-pro, and gpt-image-2. The older seedream-4-5-251128 route is reached through Image Generation via Chat instead.

Routing at a glance

Supported 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 pixelssize was too small. Use 1920x1920 or larger.
  • 404 openai_error — you passed a model that isn’t routed through this endpoint (e.g., wan2.7-image). Use the chat-based route instead.
  • 400 invalid_request — malformed size string (e.g., 1024 instead of 1024x1024).
See Error Codes and Rate Limits for more.

Image Generation via Chat

The /v1/chat/completions route for the Wan 2.7 family.

Gemini generateContent

Gemini-compatible generateContent endpoint.

Media Gen skill

Agent skill that wraps image + video generation.

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 ($0.035/request), wan2.7-image ($0.030/request), wan2.7-image-pro ($0.075/request), or gpt-image-2 ($0.03/request or $0.05 per 1024×1024 image).

Available options:
seedream-5-0-260128,
wan2.7-image,
wan2.7-image-pro,
gpt-image-2
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