Z-Image AI Model
POST /api/v1/z-image-ai-model/submit
prompt is required.
Required inputs
promptstring- Text prompt describing the image to generate (max 2500 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/z-image-ai-model/submit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Idempotency-Key: ${VIDMAGE_IDEMPOTENCY_KEY}" \
-H "Content-Type: application/json" \
-d '{"prompt":"Architectural visualization of a compact lakeside cabin with timber walls and large windows at twilight","aspectRatio":"1:1","outputFormat":"png"}'
# -> { "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 2500 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: 2500 |
aspectRatio | string | No | "1:1" | Output aspect ratio. Values: "1:1", "3:4", "4:3", "9:16", "16:9", "2:3", "3:2" · Default: "1:1" |
outputFormat | string | No | "png" | Output image file format. Values: "png", "jpeg", "webp-lossless", "webp-lossy" · Default: "png" |
Mode-specific fields & media limits
Text To Image rules
| Control | Mode-specific rule |
|---|---|
prompt | Required; minimum 1 characters; maximum 2500 characters |
aspectRatio | Values: "1:1", "3:4", "4:3", "9:16", "16:9", "2:3", "3:2"; mode default: "1:1" |
outputFormat | Values: "png", "jpeg", "webp-lossless", "webp-lossy"; Default: "png" |
Retrieve the result
Save taskId from the accepted submission and send it to this endpoint:
POST /api/v1/z-image-ai-model/query
Use the same Bearer API key. On completion, read the imageUrl result field.
curl -X POST "https://vidmage.ai/api/v1/z-image-ai-model/query" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "taskId": "TASK_ID_FROM_SUBMIT" }'
# -> { "success": true, "data": { "status": "...", "imageUrl": "https://..." } }