Creates an image given a text prompt. Supports streaming responses for real-time generation updates.
cURL
Generation
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>" } ] }
Bearer token authentication. Get your API key from the dashboard.
Successful response
The response is of type object.
object