API quickstart
Send one request and read one job.
Make a key
Make a key on the API page of your account once access is open.
YOUR_API_KEY is a placeholder. Replace it with your own key and never share it.
Start a job
Start a job with one request. The answer holds a job id.
curl -X POST https://easyimage.ae/v1/images/generations \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Prefer: respond-async" \
-d '{"prompt":"A lighthouse on a cliff at dusk, soft light","size":"1024x1024","n":1}'The Prefer header with respond-async makes the call answer at once with the job.
Send an Idempotency-Key header of 1 to 190 characters so a retry never makes a second job or charge.
Check the job
Check the job until it succeeds, or wait for a webhook.
curl https://easyimage.ae/v1/jobs/JOB_ID \
-H "Authorization: Bearer YOUR_API_KEY"Download the result
Download the result from the link in the job.
Routes
Every route is listed with its method, its path and the scope a key needs.
| Method | Path | Scope |
|---|---|---|
POST | /v1/images/generations | images |
POST | /v1/images/edits | images |
POST | /v1/images/background-removal | images |
POST | /v1/images/upscale | images |
POST | /v1/images/outpaint | images |
POST | /v1/images/erase | images |
POST | /v1/batches | images |
GET | /v1/batches/{id} | jobs |
POST | /v1/batches/{id}/cancel | jobs |
GET | /v1/jobs/{id} | jobs |
POST | /v1/jobs/{id}/cancel | jobs |
GET | /v1/usage | usage |
GET | /v1/openapi.json | No key needed |
GET | /v1/images | images |