Skip to main content

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.

Routes of the API
MethodPathScope
POST/v1/images/generationsimages
POST/v1/images/editsimages
POST/v1/images/background-removalimages
POST/v1/images/upscaleimages
POST/v1/images/outpaintimages
POST/v1/images/eraseimages
POST/v1/batchesimages
GET/v1/batches/{id}jobs
POST/v1/batches/{id}/canceljobs
GET/v1/jobs/{id}jobs
POST/v1/jobs/{id}/canceljobs
GET/v1/usageusage
GET/v1/openapi.jsonNo key needed
GET/v1/imagesimages

Read the API reference