Skip to main content
POST
/
v1
/
images
/
generations
curl --request POST \ --url https://api.apiany.ai/v1/images/generations \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "nano-banana", "prompt": "A clean product hero image for an AI API gateway", "size": "1k" } '
{
  "task_id": "task_123",
  "poll_url": "/v1/tasks/task_123",
  "model": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
model
string
required
Example:

"nano-banana"

prompt
string
required
size
string
Example:

"1k"

input_images
string<uri>[]
callback_url
string<uri>

Response

Task created.

task_id
string
required
Example:

"task_123"

status
enum<string>
required
Available options:
pending,
processing
poll_url
string
required
Example:

"/v1/tasks/task_123"

model
string