POST
/
images
/
generations
curl --request POST \
--url https://api.anyapi.ai/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MODEL_EXAMPLE",
"prompt": "A cute baby sea otter",
"n": 1,
"size": "1024x1024"
}'
{
  "created": 123,
  "data": [
    {
      "url": "<string>",
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Get your API key from the dashboard.

Body

application/json

Response

200
application/json

Successful response

The response is of type object.