# Create Video Generation Task This file is the focused AI-readable context for one UniAll documentation page. URL: https://docs.uniall.ai/models/video/happy-horse/create-task Locale: en Markdown: https://docs.uniall.ai/ai/pages/models/video/happy-horse/create-task.md Description: Happy-Horse create video generation task endpoint. Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - Treat examples such as `sk-***`, `{BASE_URL}`, and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown This document explains Happy Horse video model call. ## Public Models | Public Models | Capability | Resolution tier | |---|---|---:| | `happy-horse-720p` | text-to-video, image-to-video, reference-image-to-video | 720p | | `happy-horse-1080p` | text-to-video, image-to-video, reference-image-to-video | 1080p | | `happy-horse-edit-720p` | video editing | 720p | | `happy-horse-edit-1080p` | video editing | 1080p | Note: - `duration` Happy Horse Public Models Yesrequired parameter,`3` `15`. - video editingModel, `duration` billing detail andtask, editing video, up toprocessing `15`. - generation model `aspect_ratio` text-to-videoandreference-image-to-video; image-to-video Input image. - video editingModeldoes not support `aspect_ratio`. ## Endpoint submit task: ```http POST /v1/videos/generations Authorization: Bearer Content-Type: application/json ``` Query Task: ```http GET /v1/videos/generations/{task_id} Authorization: Bearer ``` ## Parameter Reference | Parameters | Type | Required | Model | Note | |---|---|---:|---|---| | `model` | string | Yes | all | Public model name | | `prompt`| string | Yes | all | prompt, up to `2500` | | `duration`| integer | Yes | all |`3` `15`; editingModel billing detail | | `size`| string | No | all | Optional values: pass value: 720p Modelpass `720p`, 1080p Modelpass `1080p` | | `seed`| integer | No | all | random seed, range `0` `2147483647` | | `aspect_ratio`| string | No | text-to-video, reference-image-to-video | Optional values `16:9`, `9:16`, `1:1`, `4:3`, `3:4` | | `image` | string | image-to-videoRequired | image-to-video | single source image URL | | `images` | string[] | reference-image-to-videoRequired | reference-image-to-video | 1 9 reference image URL | | `reference_image_urls`| string[] | reference-image-to-video | reference-image-to-video |`images` | imageconstraints: - image-to-video `image` supports `jpeg`, `jpg`, `png`, `bmp`, `webp`, imagesize `300px`, Ratio `1:2.5` `2.5:1`, `10MB`. - reference-image-to-video `images` supports `jpeg`, `jpg`, `png`, `webp`, 1 9, `400px`, recommended 720p, `10MB`. - reference-image-to-videoprompt use `character1` `character9` image. ### video editingParameters | Parameters | Type | Required | Note | |---|---|---:|---| | `video` | string | Yes | video URL | | `reference_image_urls` | string[] | No | reference image URL, up to 5 | | `audio_setting`| string | No | Optional values `auto` or `origin`, default follows the upstream default `auto` | videoconstraints: - supports `mp4`, `mov`, recommended H.264. - video `3` `60`. - `2160px`, `320px`. - Ratio `1:2.5` `2.5:1`. - `8fps`, file `100MB`. reference imageconstraints: - up to 5. - supports `jpeg`, `jpg`, `png`, `webp`. - size `300px`, Ratio `1:2.5` `2.5:1`. - `10MB`. ## API Parameters and Examples ### Endpoint ```http POST /v1/video/generations ``` ### Header Parameters | Name | Type | Required | Description | Example | | --- | --- | --- | --- | --- | | `Authorization` | string | No | | Bearer {your_token} | ### Request Body Parameters | Field | Type | Required | Title | Description | | --- | --- | --- | --- | --- | | `model` | string | Yes | Model name | Public model name | | `prompt`| string | Yes | prompt | prompt, up to `2500` | | `image` | string | Yes | reference URL | single source image URL, must be public URLimage URL | | `images` | string | Yes | reference-image-to-video | 1 9 reference image URL | | `aspect_ratio`| string | No | Ratio | Optional values `16:9`, `9:16`, `1:1`, `4:3`, `3:4` | | `duration`| string | No | description |`3` `15`; editingModel billing detail | | `seed`| string | Yes | random seed | random seed, range `0` `2147483647` | | `video` | string | Yes | video URL | must be public URL URL | | `audio_setting`| string | Yes | | Optional values `auto` or `origin`, default follows the upstream default `auto` | | `size` | string | No | Example field | Appears in a request example; no separate field description is provided. | | `reference_image_urls` | array | No | Example field | Appears in a request example; no separate field description is provided. | ### Request Examples #### text-to-video ```json { "model": "happy-horse-720p", "prompt": "A cinematic wide shot of a white horse running across a misty grassland at sunrise, realistic motion, soft rim light.", "duration": 4, "aspect_ratio": "16:9", "size": "720p", "seed": 12345 } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{"model": "happy-horse-720p", "prompt": "A cinematic wide shot of a white horse running across a misty grassland at sunrise, realistic motion, soft rim light.", "duration": 4, "aspect_ratio": "16:9", "size": "720p", "seed": 12345}' ``` #### image-to-video ```json { "model": "happy-horse-1080p", "prompt": "Animate the subject naturally, with subtle camera push-in and realistic cloth movement.", "image": "https://example.com/source-frame.png", "duration": 6, "size": "1080p", "seed": 67890 } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{"model": "happy-horse-1080p", "prompt": "Animate the subject naturally, with subtle camera push-in and realistic cloth movement.", "image": "https://example.com/source-frame.png", "duration": 6, "size": "1080p", "seed": 67890}' ``` #### reference-image-to-video ```json { "model": "happy-horse-1080p", "prompt": "character1 rides character2 through a futuristic city street, keep both identities consistent.", "images": [ "https://example.com/character1.png", "https://example.com/character2.png" ], "duration": 8, "aspect_ratio": "9:16", "seed": 24680 } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{"model": "happy-horse-1080p", "prompt": "character1 rides character2 through a futuristic city street, keep both identities consistent.", "images": ["https://example.com/character1.png", "https://example.com/character2.png"], "duration": 8, "aspect_ratio": "9:16", "seed": 24680}' ``` #### video editing ```json { "model": "happy-horse-edit-720p", "prompt": "Change the actor jacket into a red leather jacket while preserving motion, face identity, camera movement, and background.", "video": "https://example.com/source-video.mp4", "reference_image_urls": [ "https://example.com/jacket-reference.png" ], "duration": 4, "size": "720p", "audio_setting": "origin", "seed": 13579 } ``` ```bash curl -X POST "{BASE_URL}/v1/video/generations" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{"model": "happy-horse-edit-720p", "prompt": "Change the actor jacket into a red leather jacket while preserving motion, face identity, camera movement, and background.", "video": "https://example.com/source-video.mp4", "reference_image_urls": ["https://example.com/jacket-reference.png"], "duration": 4, "size": "720p", "audio_setting": "origin", "seed": 13579}' ``` ### Response Fields | Field | Type | Required | Title | Description | | --- | --- | --- | --- | --- | | `id` | string | Yes | task ID | | | `object` | string | Yes | Task type | | | `model` | string | Yes | Model name | | | `status` | string | Yes | Status | | | `progress` | string | Yes | | | | `created_at` | string | Yes | Created time | | | `seconds` | string | Yes | duration | | ### Response Examples #### Success ```json { "id": "task_xxxxxxxxxxxxx", "task_id": "task_xxxxxxxxxxxxx", "object": "video.generation.job", "model": "happy-horse-edit-720p", "status": "queued", "progress": 0, "created_at": 1777355454 } ```