gpt-image-2 is the AnyRoute model ID for image generation and editing through an OpenAI-compatible Images API. Usage and charges appear in the AnyRoute console.gpt-image-2.https://cc.anyroute.io.Treat the API key as a password. Never commit it to a repository or publish it.
POST /v1/images/generationsb64_json, which is Base64-encoded image data. Decode it and save it using the requested output format.auto1024x1024 — square1536x1024 — landscape1024x1536 — portrait8,294,400 pixels3840 × 2160 = 8,294,400
2880 × 2880 = 8,294,400
2160 × 3840 = 8,294,400
3264 × 2448 = 7,990,272
2448 × 3264 = 7,990,2723328 × 2496 = 8,306,688Requested resolution exceeds the current pixel budgetPOST /v1/images/editsmultipart/form-data with at least model, prompt, and image:mask. State explicitly which people, products, logos, or brand elements must remain unchanged.subject + scene + composition + lighting + material/style + intended use + constraintsA premium skincare product photo. One frosted-glass serum bottle on a white marble surface, natural window light from the left, shallow depth of field, clean background, empty copy space on the right, suitable for an ecommerce landing-page hero. No watermark, no text, and no extra bottles.3328x2496 fail?3264x2448.response_format: "url"?b64_json unless the active model documentation explicitly supports URL output.{
"background": "transparent",
"output_format": "png"
}n, but start with n: 1. For batch generation, separate requests are easier to retry and track.