GPT Image 2.6 Generator API documentation
Generate images with GPT Image 2.6 Generator in VidMage. Supports both text and image input modes.
Endpoints
| Contract item | Value |
|---|---|
| Capability | gpt-image-2-6-generator |
| Submit | POST https://vidmage.ai/api/v1/gpt-image-2-6-generator/submit |
| Query | POST https://vidmage.ai/api/v1/gpt-image-2-6-generator/query |
| Task identifier | taskId |
| Result field | imageUrl |
Authenticate with Authorization: Bearer YOUR_API_KEY. Save the task identifier and query the same capability. Use a stable Idempotency-Key for submission retries.
Product guide: GPT Image 2.6 API
Parameters and input rules
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
mode | string | No | "text-to-image" | Explicit operation selector. Omit to infer from the supplied inputs. Values: "text-to-image", "image-edit" |
prompt | string | Yes | Not specified | Text prompt describing the image to generate (max 32000 chars). For an unspecified character or figurine, use an original non-branded character with no logos and no resemblance to existing copyrighted superheroes; preserve any character the user explicitly names. Minimum characters: 1Maximum characters: 32000 |
imageUrl | string | No | Not specified | Optional input image URL. When provided, the task runs in image operation mode. |
imageUrls | string[] | No | Not specified | Ordered input image URLs for image editing mode. The prompt can reference them by their one-based order. Up to 50 MB per file. Minimum items: 1Maximum items: 16 |
size | string | No | "auto" | Output size such as auto or WIDTHxHEIGHT. Minimum characters: 1Maximum characters: 32 |
background | string | No | "auto" | Output background mode. Values: "auto", "transparent", "opaque" |
quality | string | No | "auto" | Generation quality. Values: "auto", "low", "medium", "high", "xhigh", "max" |
outputFormat | string | No | "png" | Output format. Values: "jpeg", "png", "webp", "gif", "svg" |
complexity | string | No | Not specified | Planning intensity before generation. Values: "low", "medium", "high" |
frameCount | integer | No | Not specified | GIF frame count; use only with GIF output. Applies when outputFormat is gif. Minimum: 2Maximum: 16 |
frameDurationMs | integer | No | Not specified | GIF frame duration in milliseconds. Applies when outputFormat is gif. Minimum: 20Maximum: 2000Multiple of: 10 |
outputCompression | integer | No | Not specified | JPEG or WEBP compression value. Applies when outputFormat is jpeg or webp. Minimum: 0Maximum: 100 |
text to image
Input media selects the mode. Use the VidMage field names and mode limits below together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 2–32000 characters. |
aspectRatio | Not used in this mode. |
resolution | Not used in this mode. |
size | Output size such as auto or WIDTHxHEIGHT. Minimum characters: 1Maximum characters: 32Default: "auto" |
background | Output background mode. Values: "auto", "transparent", "opaque"Default: "auto" |
quality | Generation quality. Values: "auto", "low", "medium", "high", "xhigh", "max"Default: "auto" |
outputFormat | Output format. Values: "jpeg", "png", "webp", "gif", "svg"Default: "png" |
image edit
Input media selects the mode. Use the VidMage field names and mode limits below together with the parameter table.
| Control | Mode-specific rule |
|---|---|
prompt | Required; 1–32000 characters. |
aspectRatio | Not used in this mode. |
resolution | Not used in this mode. |
imageUrls | Up to 16 files. Maximum 50 MB per file. Formats: jpg, jpeg, png, webp. |
| References | At least one reference input is required. |
size | Output size such as auto or WIDTHxHEIGHT. Minimum characters: 1Maximum characters: 32Default: "auto" |
background | Output background mode. Values: "auto", "transparent", "opaque"Default: "auto" |
quality | Generation quality. Values: "auto", "low", "medium", "high", "xhigh", "max"Default: "auto" |
complexity | Planning intensity before generation. Values: "low", "medium", "high" |
outputFormat | Output format. Values: "jpeg", "png", "webp", "gif"Default: "png" |
frameCount | GIF frame count; use only with GIF output. Minimum: 2Maximum: 16 |
frameDurationMs | GIF frame duration in milliseconds. Minimum: 20Maximum: 2000Multiple of: 10 |
outputCompression | JPEG or WEBP compression value. Minimum: 0Maximum: 100 |
Example request
{
"prompt": "A polished editorial product image with natural light and precise typography",
"size": "auto",
"background": "auto",
"quality": "auto",
"outputFormat": "png"
}# Set VIDMAGE_IDEMPOTENCY_KEY to a unique value for this task; preserve it for transport retries.
curl -X POST "https://vidmage.ai/api/v1/gpt-image-2-6-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"A polished editorial product image with natural light and precise typography","size":"auto","background":"auto","quality":"auto","outputFormat":"png"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Task results and recovery
URL of the generated image. Read imageUrl from the completed query response. Preserve taskId while the task is running.
curl -X POST "https://vidmage.ai/api/v1/gpt-image-2-6-generator/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }Submission and task queries report the available task and usage information. A timeout is not a confirmed failure. Recover the existing task instead of resubmitting.
For face selection and error recovery, follow Task lifecycle. MCP uses the normalized taskId argument in get_task_result, including capabilities whose REST identifier is requestId.
Credits
| Component / option | Rate | Minimum |
|---|---|---|
| Base rate | 10 credits / generation | — |
Base charge is per generation at the selected resolution.
Use the Playground or the MCP credit estimator for your exact inputs. Credits and billing.
