curl --request POST \
--url https://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",
"status": "pending",
"poll_url": "/v1/tasks/task_123",
"model": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}Images
Bildgenerierungsaufgabe erstellen
Erstellt eine asynchrone Bildaufgabe und gibt eine Aufgaben-ID zurück. GPT Image 2.6 nutzt output_format=png oder gif. Fragen Sie /v1/tasks/ ab und lesen Sie nach Abschluss result.data[0].url.
POST
/
v1
/
images
/
generations
curl --request POST \
--url https://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",
"status": "pending",
"poll_url": "/v1/tasks/task_123",
"model": "<string>"
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"param": "<string>",
"code": "<string>"
}
}Autorisierungen
Body
application/json
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5