Image and Video Models

Generate images (gpt-image, Seedream, Qwen) and videos (Seedance, Wan) through the OpenAI-compatible endpoint — per-call pricing, async task flow and parameter notes.

Image and video models on the platform bill two ways: per token (multimodal chat models that draw) and per call (most dedicated image/video models, marked "$/call" on the pricing page). Both are called through the OpenAI-compatible endpoint.

Image generation (images/generations)

Endpoint: POST https://api.zaimod.com/v1/images/generations

Python
resp = client.images.generate(
    model="gpt-image-2",
    prompt="Cyberpunk city at night, neon rain, cinematic composition",
    size="1024x1024",
    n=1,
)
print(resp.data[0].url)        # or b64_json

Main image models on the platform (per-call reference pricing):

ModelPriceNotes
gpt-image-2$0.06/callOpenAI family, strong prompt adherence
doubao-seedream-5-0-260128$0.033/callGreat Chinese semantics, poster feel
qwen-image-3.0$0.20/callQwen family, text rendering
wan2.7-image-pro$0.5/callWan pro tier

In-chat image models (gpt-4o-image family)

Some models live on the chat endpoint — iterate on an image through conversation:

Python
resp = client.chat.completions.create(
    model="gpt-4o-image",
    messages=[{"role": "user", "content": "Draw a ginger cat wearing glasses, flat illustration"}],
)

Billed per token or per call (see the pricing page). Ideal for generate → tweak → regenerate loops.

Video generation (async tasks)

Video models are asynchronous: submit a task, then poll.

1. Submit

Shell
curl https://api.zaimod.com/v1/videos/generations \
  -H "Authorization: Bearer $ZAIMOD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "prompt": "A corgi running on grass, tracking shot, slow motion",
    "duration": 5
  }'

Returns a task_id.

2. Poll

Shell
curl https://api.zaimod.com/v1/videos/generations/{task_id} \
  -H "Authorization: Bearer $ZAIMOD_API_KEY"

Status flows submitted → running → succeeded/failed; success returns a video URL.

Main video models:

ModelPriceNotes
doubao-seedance-2-0-260128$0.01/callBest value
wan2.7-t2v$0.5/callWan text-to-video
wan2.6-i2v$4/callImage-to-video
doubao-seedance-1-5-pro$0.5/callPrevious pro tier

General notes

  • Per-call models don't charge on failure, but duplicate submissions do bill — make task submission idempotent
  • When size/duration affects price, it's marked on the pricing page or in the console
  • For batch jobs, trial 10–20 items first and check the success rate before scaling up
← Gemini-Native Endpoint: generateContent Billing Rules and Error Codes →