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.Available values:
nanobanana-2, gemini-3-pro-image-preview, seedream-5.0-lite, seedream-4.5, midjourney-niji7, z-image-turbo, rhart-1.5, veo-3.1The aspect ratio for the generated image. Must be one of the ratios supported by the selected model.Common values:
1:1, 3:4, 4:3, 16:9, 9:16The output resolution. Availability depends on the model.Available values:
2K, 3K, 4K, 720pArray 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 | 150 | 0–1000 |
| chaos | number | 0 | 0–100 |
| weird | number | 0 | 0–3000 |
| raw | boolean | true | — |
| iw | number | 1.5 | 0–3 |
| sref | string | — | URL or text |
| sw | number | 100 | 0–1000 |
| sv | number | 4 | 1–4 |
For Niji 7 only. How to interpret the reference image.
content— use as subject matter referencestyle— extract visual style only
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 |