Image generation API
One request in.
One image out.
The concept: a plain HTTP API for products that need pictures on demand. Send a prompt, get back a URL to the finished image, or a webhook when a batch is done.
Quickstart
The whole idea in one call. (An illustration: there is no live API behind this concept.)
# create an image curl https://api.aimagegenerator.com/v1/images \ -H "Authorization: Bearer $AIG_KEY" \ -H "Content-Type: application/json" \ -d '{ "prompt": "a red bicycle against a white wall, morning light", "size": "1024x1024", "count": 2, "style": "photo" }'
{
"id": "img_01J9EXAMPLE",
"status": "done",
"images": [
{ "url": "https://cdn.aimagegenerator.com/i/01J9EXAMPLE-1.png", "width": 1024, "height": 1024 },
{ "url": "https://cdn.aimagegenerator.com/i/01J9EXAMPLE-2.png", "width": 1024, "height": 1024 }
]
}
Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v1/images | Create one or more images from a prompt |
| POST | /v1/images/{id}/edit | Repaint a masked region of an existing image |
| POST | /v1/images/{id}/upscale | Enlarge with added detail |
| GET | /v1/images/{id} | Status and URLs of a job |
| GET | /v1/styles | The style presets you can name |
Parameters
| Name | Type | Notes |
|---|---|---|
prompt | string | What to draw, in plain words |
size | string | For example 1024x1024, 1536x1024 |
count | integer | How many versions, 1 to 4 |
style | string | A preset from /v1/styles |
seed | integer | Repeat a result exactly |
webhook_url | string | Called when the job is done |
Webhooks
Long batches answer at once with "status": "queued"; your webhook_url receives the finished job, signed, so you can trust where it came from.
Example pricing
$0.01per standard image (example)
$0.03per upscale or edit (example)
1,000free images to test (example)
Example numbers for the concept only. Nothing here is on sale except the domain.
Run your image API on aimagegenerator.com
A name developers can guess, for an endpoint they will remember. The domain is for sale.