happyhorse-1.1-t2v
Before use, press Access Basics to set the site root address
SHANHAI_BASE_URLand the site tokenSHANHAI_API_KEY. Thecurlcommand below is for Bash (Linux, macOS, or Git Bash).
Basic information
| Item | Content |
|---|---|
| Site model name | happyhorse-1.1-t2v |
| Model type | Video generation (Wensheng video) |
| Request interface | POST /v1/videos |
| Query interface | GET /v1/videos/{task_id} |
| Get video content | GET /v1/videos/{task_id}/content |
request parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Must fill in happyhorse-1.1-t2v |
prompt |
string | is | describes the main body, action and lens of the screen |
seconds |
integer | No | Video duration, 3 ~ 15 An integer of seconds; it is recommended to fill in |
resolution |
string | No | Can be filled in 480P, 720P, 1080P; It is recommended to fill in |
ratio |
string | No | Can be filled in 16:9, 9:16, 1:1, 4:3, 3:4, 4:5, 5:4, 9:21, 21:9 |
watermark |
boolean | No | Whether to add video watermark; added by default; fill in explicitly when needed to close false |
seed |
integer | No | Random seed, 0 ~ 2147483647 |
material and default behavior
When omitted, use 5 seconds and 1080P; the default frame for text generation and reference generation is 16:9, and the first frame is generated according to the image ratio. Chinese prompt words should not exceed 2,500 characters, and pure English should not exceed 5,000 characters. The model generates sounds and does not provide an independent audio switch. Do not pass in this field.
This model only receives text and does not transmit pictures or audio references.
Request Example
{
"model": "happyhorse-1.1-t2v",
"prompt": "红色陶瓷杯放在桌面上,镜头缓慢移动",
"seconds": 3,
"resolution": "720P",
"ratio": "16:9"
}
curl "$SHANHAI_BASE_URL/v1/videos" \
-H "Authorization: Bearer $SHANHAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.1-t2v",
"prompt": "红色陶瓷杯放在桌面上,镜头缓慢移动",
"seconds": 3,
"resolution": "720P",
"ratio": "16:9"
}'
The JSON above is the request body, and the command that follows will submit the same request.
calling process
- Submit request to
POST /v1/videos. - Saves the real task number
idfrom the response. - Use
GET /v1/videos/{task_id}to query the status. - Continue to wait when the status is
queuedorin_progress; stop and handle the error when the status isfailed. - The final result can only be obtained when the status is
completedandGET /v1/videos/{task_id}/contentcan return video content.
Query status:
curl "$SHANHAI_BASE_URL/v1/videos/TASK_ID" \
-H "Authorization: Bearer $SHANHAI_API_KEY"
Get the video content after the task is completed:
curl "$SHANHAI_BASE_URL/v1/videos/TASK_ID/content" \
-H "Authorization: Bearer $SHANHAI_API_KEY" \
-o result.mp4
TASK_ID must be replaced with the real id returned by the create request. Successful submission only means that the task has been received, not that the video has been generated. After the request times out, please check the existing tasks first to avoid repeated generation.
encountered a problem
If you encounter problems with calling or configuration, please contact the site customer service and provide the model name, error time and error information to facilitate troubleshooting.