Bearer <YOUR_API_KEY>. See Authentication.
Image-to-Image
Create an asynchronous image-to-image generation with gemini-2.5-flash-image (fast model) from URLs.
Returns 202 Accepted with a job_id — poll GET /jobs/{job_id} until
the job is done or failed.
POST /api/v1/generationsHeaders
Section titled “Headers”Authorization string requiredIdempotency-Key stringOptional. Replaying the same key returns the original job_id without creating a duplicate job
or charging again.
Response
Section titled “Response”Returns 202 Accepted.
job_id stringUUID of the created job.
status stringAlways queued on creation.
status_url stringRelative path to poll for status and result.
curl -s -X POST https://api.moonez.ai/api/v1/generations \ -H "Authorization: Bearer $API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-2.5-flash-image", "prompt": "make it look like a watercolor painting", "aspect_ratio": "1:1", "input_images_urls": [ "https://example.com/photo-1.jpg", "https://example.com/photo-2.jpg" ] }'import requests
resp = requests.post( "https://api.moonez.ai/api/v1/generations", headers={"Authorization": f"Bearer {API_KEY}"}, json={ "model": "gemini-2.5-flash-image", "prompt": "make it look like a watercolor painting", "aspect_ratio": "1:1", "input_images_urls": [ "https://example.com/photo-1.jpg", "https://example.com/photo-2.jpg", ], },)print(resp.json())const resp = await fetch("https://api.moonez.ai/api/v1/generations", { method: "POST", headers: { Authorization: `Bearer ${API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "gemini-2.5-flash-image", prompt: "make it look like a watercolor painting", aspect_ratio: "1:1", input_images_urls: [ "https://example.com/photo-1.jpg", "https://example.com/photo-2.jpg", ], }),});console.log(await resp.json());{ "job_id": "0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55", "status": "queued", "status_url": "/api/v1/jobs/0193a7f2-1c4a-7e0b-9b3a-2f1d8c6e4a55"}