Key points for AI agents
- Async (recommended):
POST https://1788.love/v1/images/generations/async(text-to-image) orPOST https://1788.love/v1/images/edits/async(editing) -> returns{ "id": "task_...", "status": "queued" }; pollGET https://1788.love/v1/images/tasks/{id}untilstatusiscompleted, then downloaddata[0].url. Async avoids HTTP timeout loss during peak load. - Sync:
POST /v1/images/generationsandPOST /v1/images/editsare provided for OpenAI-standard SDKs/clients. Routes 5 and 8 are async-only; Route 3 is sync-only (set HTTP timeout >= 2 minutes). - Model names and resolution: Model names include only the route (
gpt-image-2-route3), not the resolution tier—resolution (1K/2K/4K) is determined bysize, which must match the size table below (otherwise 400). Legacy suffixed names likegpt-image-2-route3-2kstill work ifsizematches that tier. - Reference images depend on route: Routes 1, 2, 4, and 6 use
multipart/form-dataimagefile fields; Routes 3, 5, 7, and 8 use JSONimage_urls(public HTTPS URLs from Upload media; Route 3 also acceptsdata:image/png;base64,...data URLs (PNG / JPEG / WebP / GIF), recommended for large reference images to avoid cross-border download timeouts). - One image per request (
n: 1). Submit concurrent requests for multiple images. - Route 5 policy note: Repeated content-policy violations can revoke upstream keys. If you receive
content_policy_violation, change the prompt/images—do not retry unchanged.
Models and routes
- Routes 1, 2, 3, and 6 are sync-only (calling async endpoints on Route 3 returns 400).
- In 2.5/2.6,
flareprioritizes speed (daily & batch generation) andsunburstprioritizes quality (detailed generation & editing). On Route 7,autois HD redraw andecois native 4K only. - 2.6 (Routes 1, 2, 3) also supports animated GIF and SVG vector output via
output_format(see below). - See the Price List for live per-image pricing.
Size tables
The pixel value insize determines the billing tier (1K / 2K / 4K). Table A and Table B differ only in the 2K column.
Table A (Routes 1, 2, 4, 6, 8):
Table B (Routes 3, 5, 7):
Async API (recommended)
1. Create a task
Text-to-image:image_urls (Routes 5, 7, 8):
2. Poll task status
PollGET https://1788.love/v1/images/tasks/{id} every 3–5 seconds (typically finishes in 30 seconds to 3 minutes). Treat completed as done, failed as error (refunded automatically), and keep polling otherwise (Route 8 uses task_id and processing).
3. Download the image
- Routes 4, 7:
data[0].urlis a signed URL—download directly without auth headers. - Sync Routes 1, 2, 3, 6:
data[0].urlis a direct CDN URL—do not attach anAuthorizationheader (some CDNs return 403). For Routes 2 and 3, include a standardUser-Agentheader (e.g.curl/8.5.0) when downloading from scripts. - Route 5: Requires
Authorization: Bearer YOUR_1788_API_KEYto download; retained for 24 hours.
Sync API (OpenAI-compatible)
UsePOST /v1/images/generations (JSON) or POST /v1/images/edits (multipart for Routes 1, 2, 4, 6; JSON image_urls for Routes 3, 7). Route 3 image_urls accepts both public HTTPS URLs and Base64 image data URLs (data:image/png;base64,..., supporting PNG / JPEG / WebP / GIF, up to 16 MB encoded per image)—for large reference images or mainland-hosted URLs, passing a Base64 data URL (or uploading via https://1788.love/v1/uploads/images-2) prevents upstream download timeouts. Set your HTTP client timeout to at least 15 minutes (Route 3 fails and refunds if > 85 s; Routes 4 and 7 time out after 10 minutes with 504 task_timeout—do not immediately resubmit on 504).
GIF and SVG output (2.6 only)
gpt-image-2.6-* models on Routes 1, 2, and 3 support animated GIF and SVG via POST /v1/images/generations at the same price as a static image:
Route 2 does not support SVG at the 4K tier.