Create a generation
Creates an asynchronous generation task. The model id determines whether an image or video is produced — use the same endpoint for both.
Creates an asynchronous generation task. The model id determines whether an image or video is produced — use the same endpoint for both.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Unified image, video, or LLM request. model is required; type is recommended and avoids a model catalog lookup. Image/video requests normally use prompt, while LLM requests may use messages.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/generations" \ -H "Content-Type: application/json" \ -d '{ "model": "nano-banana-pro" }'{ "code": 0, "message": "string", "data": { "id": "img_44160", "taskId": 0, "model": "nano-banana-pro", "type": "image", "status": "pending", "progress": 0, "error": "string", "images": [ "http://example.com" ], "videoUrl": "http://example.com", "coverUrl": "http://example.com" }}{ "code": 0, "message": "string"}{ "code": 0, "message": "string"}{ "code": 0, "message": "string"}