Create Image
Changed onGenerate one or more AI images from a text prompt, with optional reference images. Returns immediately with 202 Accepted and the task object.
- gtmage-2.5 (default when model is omitted): when one or more reference_images are supplied the request is treated as an image edit; otherwise it is a plain generation. 1 credit per request, regardless of n.
- gtmage-2.5-sunburst / gtmage-2.5-flare: add quality and resolution; up to 16 reference images.
Credits — Sunburst / Flare
Billed per request: credits = max(1, floor(points / 30)), with points = (base + number of reference images) × n. points must not exceed 150, otherwise 400.
| quality | base @ 1k | base @ 2k | base @ 4k |
|---|---|---|---|
| low | 2 | 5 | 10 |
| medium | 5 | 11 | 22 |
| high (default) | 8 | 20 | 40 |
| xhigh | 17 | 42 | 84 |
| max | 35 | 100 | — |
Without reference images, credits for n = 1 / 2 / 3 / 4 (current prices, subject to change; — = not available):
| quality | 1k | 2k | 4k |
|---|---|---|---|
| low | 1 / 1 / 1 / 1 | 1 / 1 / 1 / 1 | 1 / 1 / 1 / 1 |
| medium | 1 / 1 / 1 / 1 | 1 / 1 / 1 / 1 | 1 / 1 / 2 / 2 |
| high | 1 / 1 / 1 / 1 | 1 / 1 / 2 / 2 | 1 / 2 / 4 / — |
| xhigh | 1 / 1 / 1 / 2 | 1 / 2 / 4 / — | 2 / — / — / — |
| max | 1 / 2 / 3 / 4 | 3 / — / — / — | — |
Limits
- gtmage-2.5: 0–3 reference images, each max 50 MB.
- Sunburst / Flare: 0–16 reference images, each JPEG/PNG/WebP, max 20 MB, short side ≥ 300 px, long side ≤ 5760 px, aspect ratio 2:5–5:2.
- Whole request (all files and fields together): at most 100 MiB (104,857,600 bytes) — e.g. three 50 MB images do not fit. Larger requests are rejected by the CDN in front of the API with an HTML 413 Payload Too Large page, not a JSON error.
Example
curl -X POST https://genaipro.io/api/v2/gt-mage/create-image \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "prompt=A futuristic city at night" \
-F "size=16:9" \
-F "n=2"
Example — with reference images (edit)
curl -X POST https://genaipro.io/api/v2/gt-mage/create-image \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "prompt=Turn this into a watercolor painting" \
-F "reference_images=@photo.jpg"
Example — Sunburst
curl -X POST https://genaipro.io/api/v2/gt-mage/create-image \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "model=gtmage-2.5-sunburst" \
-F "prompt=A futuristic city at night, neon reflections on wet streets" \
-F "quality=high" \
-F "resolution=2k" \
-F "size=21:9" \
-F "n=2"
Rate limit: 30 requests/minute (Sunburst / Flare also count toward the H3 Video creation budget)
Request
- Base URLhttps://genaipro.io/api
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body multipart/form-data
Example request
{
"prompt": "A futuristic city at night, neon reflections on wet streets",
"model": "gtmage-2.5-sunburst",
"size": "16:9",
"n": "2",
"callback_url": "https://your-server.example.com/genaipro-webhook"
}Response
Task accepted for processing
Example response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"prompt": "A cat walking on the beach at sunset",
"file_urls": []
}Changes
- breaking
removed the media type
application/jsonfor the response with the status - info
added the media type
text/htmlfor the response with the status
- breaking
- info
added the new optional request property
- info
added the new optional request property
- info
added the new optional request property
- info
added the new
21:9enum value to the request property - info
added the new
4:5enum value to the request property - info
added the new
5:4enum value to the request property - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info