GPT Image Generator
POST /api/v1/gpt-image-generator/submit
prompt is required.
Required inputs
promptstring- Text prompt describing the image to generate (max 20000 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.
Edit the sample inputs for your own task before submitting.
# 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-generator/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"Clean product photograph of a minimalist ceramic desk lamp on a warm neutral background","aspectRatio":"1280x720","model":"g-4.2"}'
# -> { "success": true, "taskId": "...", "creditsConsumed": ... }Parameters and input rules3 fields
| Field | Type | Required | Default | Meaning and limits |
|---|---|---|---|---|
prompt | string | Yes | Not specified | Text prompt describing the image to generate (max 20000 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 length: 1 · Maximum length: 20000 |
aspectRatio | string | No | Not specified | Output aspect ratio. Values: "960x960", "720x1280", "1280x720", "1168x784", "784x1168" |
model | string | No | "g-4.2" | Choose the GPT image model generation tier. Values: "g-3", "g-4", "g-4.1", "g-4.2" · Default: "g-4.2" |
Mode-specific fields & media limits
Text To Image rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 20000 characters |
aspectRatio | Values: "960x960", "720x1280", "1280x720", "1168x784", "784x1168"; mode default: "1280x720" |
model | Values: "g-3", "g-4", "g-4.1", "g-4.2"; Default: "g-4.2" |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/gpt-image-generator/query
Use the same Bearer API key. On completion, read the imageUrl result field.
curl -X POST "https://vidmage.ai/api/v1/gpt-image-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://..." } }