modelId.
Request
Headers
| Header | Value |
|---|---|
| Authorization | Bearer meigen_sk_YOUR_API_KEY |
| Content-Type | application/json |
Body Parameters
The text description of the image to generate. Length limits vary by model (see Models).
The model to use for generation. Get available models from the List Models endpoint.Image models:
nanobanana-2, gemini-3-pro-image-preview, seedream-5.0-lite, seedream-4.5, midjourney-v7, midjourney-niji7, z-image-turbo, rhart-1.5Video models: seedance-2-0, veo-3.1The aspect ratio for the generated output.
- Default
auto(recommended): a suitable ratio is picked for you. Video models withautouse that model’s primary ratio. - You can also pass an explicit value, which must be one of the ratios supported by the selected model. Common image ratios:
1:1,3:4,4:3,16:9,9:16,21:9. Seedance also accepts the special valueadaptive(matches the reference image/video dimensions).
The output resolution. Availability depends on the model.Available values: image models
2K / 3K / 4K; video models 480p / 720p / 1080p (depends on the model — see Models).Array of image URLs to use as references. Must be publicly accessible HTTPS URLs.Maximum number of reference images depends on the model (0–5).
Advanced parameters for Midjourney Niji 7 model only. Ignored for other models.
| Field | Type | Default | Range |
|---|---|---|---|
| stylize | number | 100 | 0–1000 |
| chaos | number | 0 | 0–100 |
| weird | number | 0 | 0–3000 |
| raw | boolean | false | — |
| iw | number | 1 | 0–2 |
| sref | string | — | URL or text |
| sw | number | 100 | 0–1000 |
| sv | number | 4 | 1–4 |
For Midjourney V7 / Niji 7 only. How to interpret the reference image.
content— use as subject matter referencestyle— extract visual style only
For Seedance 2.0 only. Video duration in seconds, range 4–15, default 5. Veo 3.1 is fixed at 8 seconds and ignores this parameter.
For Seedance 2.0 only. Reference video URL for “video continuation” mode. Must be a publicly accessible HTTPS URL (typically a previous generation result or an R2 upload URL).When this field is present, billing uses the “with reference video” tier: 480p 8 credits/sec, 720p 16 credits/sec, with the minimum-billable-seconds floor applied (see Models).
For Seedance 2.0 + reference-video continuation only. Duration of the reference video itself (seconds). The server uses this to compute
max(referenceVideoDuration + duration, minBillable) for billing. Required when referenceVideo is set — otherwise the server treats it as 0, leading to under-billing (and likely a broken continuation).Response
Whether the request was accepted.
The unique ID of the generation request. Use this to poll for status.
Initial status, always
"processing".The number of credits deducted for this generation.
The model used for this generation.
Updated credit balances after deduction.
| Field | Type | Description |
|---|---|---|
| daily | number | Remaining daily free credits |
| purchased | number | Remaining purchased credits |
| unlimited | boolean | Whether user has unlimited credits |
Check Generation Status
Response (Processing)
Response (Image Completed)
Response (Video Completed)
aspectRatiois the final ratio applied to this generation (if you passedauto, this is the value that was actually used).mediaTypeisimageorvideo. For video generationsimageUrl/imageUrlsarenull, and vice versa.- Midjourney V7 / Niji 7 return 4 candidate images per generation.
imageUrlscontains all candidates;imageUrlalways points to the first one. Other image models return a single image.
Response (Failed)
Examples
Basic generation
With reference image
Niji 7 with style reference
Seedance video (text-to-video)
Seedance video continuation (with reference video)
Auto ratio selection
OmitaspectRatio or pass "auto" explicitly:
16:9 image. The actual ratio used is returned in the response’s aspectRatio field.