Text-to-Video
/api/v1/video/generationHeader Parameters
Format: Authorization: Bearer sk-xxxxxx
Request Body
application/json
Fixed value t2v
Model name, supported: aisphere-v5.5 aisphere-v5 aisphere-v4.5 aisphere-v4 aisphere-v3.5
Prompt, maximum length 2048 characters
Negative prompt, used to describe elements that should not appear in the generated image.
Video duration, in s; aisphere-v3.5 ~ v5 supports: 5, 8; aisphere-v5.5 supports: 5, 8, 10.
Video resolution, supported: 360p, 540p, 720p, 1080p
Aspect ratio, supported: 16:9, 9:16, 1:1, 4:3, 3:4
Generation mode, default: normal. aisphere-v3.5 ~ v4.5 support: normal, fast; aisphere-v5 and v5.5 only support normal. (fast is only available when duration=5, and resolution=1080p does not support fast)
Style, supports: anime, 3d_animation, clay, comic, cyberpunk
Random Seed
Whether to enable background music (not supported by the aisphere-v5.5 model), default false
Background music type (not supported by the aisphere-v5.5 model), automatically matched by default, supports string input, e.g., birdsong
Camera movement parameters (supported only by the aisphere-v4.5 model), supporting: horizontal_left: horizontal movement to the left, horizontal_right: horizontal movement to the right, vertical_up: vertical upward movement, vertical_down: vertical downward movement, zoom_in: zoom in and enlarge the frame, zoom_out: zoom out and shrink the frame, crane_up: rise from a low angle, quickly_zoom_in: quick zoom in, quickly_zoom_out: quick zoom out, smooth_zoom_in: smooth zoom in, camera_rotation: rotate around an axis, robo_arm: complex movement using a robotic arm, super_dolly_out: rapid backward dolly, whip_pan: rapid horizontal pan creating motion blur, hitchcock: simultaneous zoom and dolly to change background perspective, left_follow: follow subject to the left, right_follow: follow subject to the right, pan_left: horizontal pan to the left from a fixed position, pan_right: horizontal pan to the right from a fixed position, fix_bg: keep background fixed during movement.
Audio control switch (only supported by the aisphere-v5.5 model) true: Audio on false: Audio off
Controls single-shot and multi-shot (supported only by the aisphere-v5.5 model), true: multi-shot, false: single-shot
Whether to use the system prompt optimization feature (supported only by the aisphere-v5.5 model), optional. "enabled": on, "disabled": off. "auto" or omitted: let the model decide automatically.
Response Body
application/json
Success
TypeScript Definitions
Use the response body type in TypeScript.
Status Code
Data Object
Result Set
Usage Information
Image Count
Video Duration in Seconds
Input Token Count
Total Tokens
Output Token Count
Validity Period
Task ID
Task Status
Status Information
Request ID
curl -X POST "https://api.ygw.ai/api/v1/video/generation" \ -H "Authorization: string" \ -H "Content-Type: application/json" \ -d '{ "_action": "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"
}