Image Generation
/api/v1/image/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed Value i2i
Model name, fixed value: viduq1-image
"viduq1-image"Model Name, Required, Supported: VQ1
"VQ1"Reference image, URL input supported, number of images: VQ1 supports 1-7
Generated prompt text, required, up to 2000 characters
Random seed parameter; if omitted or set to 0, a random number will be used instead.
Image aspect ratio, default 16:9, VQ1 supports: 16:9, 9:16, 1:1, 3:4, 4:3;
Image resolution, default 1080p, VQ1 supports: 1080p;
Pass-through Parameters
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Number of Images
Video Seconds
Input Token Count
Total Token Count
Output Token Count
Validity Period
Task ID
Task Status
Status Information
Request ID
curl -X POST "https://api.ygw.ai/api/v1/image/generation" \ -H "Authorization: string" \ -H "Content-Type: application/json" \ -d '{ "_action": "string", "model": "viduq1-image", "ImageToImageVTaskInput": { "model": "VQ1", "images": [ "string" ], "prompt": "string" } }'{
"code": 0,
"data": {
"urls": [
"string"
],
"usage": {
"images": 0,
"seconds": 0,
"input_tokens": 0,
"total_tokens": 0,
"output_tokens": 0
},
"expired": "string",
"task_id": "string",
"task_status": "string"
},
"message": "string",
"request_id": "string"
}