# HappyHorse 1.1 تبدیل متن به ویدئو > Happy Horse 1.1 تبدیل متن به ویدئو، با حرکت‌های زنده شخصیت‌ها از روی پرامپت‌های متنی کلیپ‌های ویدئویی پرجنب‌وجوش می‌سازد و امکان انتخاب وضوح خروجی 720p/1080p را فراهم می‌کند. ## نمای کلی - **نقطه پایانی**: `POST https://api.muapi.ai/api/v1/happy-horse-1.1-text-to-video` - **مدل‌ها ID**: `happy-horse-1.1-text-to-video` - **دسته‌بندی**: متن به ویدیو - **نسخه مدل**: Text to Video - **خانواده مدل**: happy-horse-1.1 - **هزینه**: 0.7 credits(مدل‌ها) ## API MuApi ****:, `request_id`,, `status` `completed`。 `?webhook=YOUR_URL`, POST ()。 ****: `x-api-key` MuApi 。 https://muapi.ai/access-keys 。 ### 1. ```http POST https://api.muapi.ai/api/v1/happy-horse-1.1-text-to-video Content-Type: application/json x-api-key: YOUR_API_KEY ``` **():** ```json { "prompt": "" } ``` **(همه):** ```json { "prompt": "", "resolution": "720p", "aspect_ratio": "16:9", "duration": 5 } ``` **:** ```json { "request_id": "abc123", "status": "processing" } ``` ### 2. نتیجه ```http GET https://api.muapi.ai/api/v1/predictions/{request_id}/result x-api-key: YOUR_API_KEY ``` `status` :`queued`、`pending`、`processing`、`completed`、`failed`、`cancelled`。 2–5 ,。 `completed` ,نتیجه URL `outputs` 。 **`completed` :** ```json { "id": "abc123", "status": "completed", "outputs": [ "https://cdn.muapi.ai/.../output.png" ], "urls": { "get": "https://api.muapi.ai/api/v1/predictions/abc123/result" }, "created_at": "2026-05-08T12:34:56Z", "has_nsfw_contents": [] } ``` ### CURL ```bash 1. REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/happy-horse-1.1-text-to-video \ -H "x-api-key: $MUAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":""}' | jq -r .request_id) 2. while :; do RESP=$(curl -s https://api.muapi.ai/api/v1/predictions/$REQUEST_ID/result -H "x-api-key: $MUAPI_API_KEY") STATUS=$(echo "$RESP" | jq -r .status) [ "$STATUS" = "completed" ] && echo "$RESP" | jq .outputs && break [ "$STATUS" = "failed" ] && echo "$RESP" && exit 1 sleep 3 done ``` ### پایتون ```python import os, time, requests API = "https://api.muapi.ai/api/v1" headers = {"x-api-key": os.environ["MUAPI_API_KEY"]} r = requests.post(f"{API}/happy-horse-1.1-text-to-video", headers=headers, json={"prompt":""}) request_id = r.json()["request_id"] while True: res = requests.get(f"{API}/predictions/{request_id}/result", headers=headers).json() if res["status"] == "completed": print(res["outputs"]); break if res["status"] == "failed": raise RuntimeError(res.get("error")); time.sleep(3) ``` ## طرح ورودی (Input Schema) API : - **`prompt`** (`string`, __): تنظیم پارامتر Text description of the desired video content. جهت هدایت دقیق فرآیند تولید مدل. - **`resolution`** (`string`, __): Output resolution. Price scales with resolution: 720p is cheaper, 1080p is more expensive. - پیش‌فرض: `"720p"` - گزینه‌ها: `"720p"`, `"1080p"` - **`aspect_ratio`** (`string`, __): نسبت ابعاد تصویر خروجی (مانند 16:9 یا 1:1). - پیش‌فرض: `"16:9"` - گزینه‌ها: `"16:9"`, `"9:16"`, `"1:1"`, `"4:3"`, `"3:4"` - **`duration`** (`int`, __): مدت زمان ویدیوی خروجی بر حسب ثانیه. - پیش‌فرض: `5` ## طرح خروجی (Output Schema) : - **`id`** (`string`): ID。 - **`status`** (`string`): :`queued`、`pending`、`processing`、`completed`、`failed`、`cancelled`。 - **`outputs`** (`array`): تصویر、ویدیوصدا URL。`status` `completed` 。 - **`urls.get`** (`string`): نتیجه。 - **`error`** (`string` | `null`): `status` `failed` 。 - **`created_at`** (`string`): ISO-8601 。 - **`has_nsfw_contents`** (`array of boolean`): NSFW 。 ## Webhook() URL `?webhook=https://your-server/path`。,MuApi POST URL,。 ## Agent MuApi MCP CLI, Agent(Claude Code、Cursor Agent) HTTP : ```bash # CLI npm install -g muapi-cli # muapi auth login # MuApi مدل‌ها MCP Agent muapi mcp serve ``` MCP مدل‌ها, `happy-horse-1.1-text-to-video`。 `muapi --help` (`muapi image generate`、`muapi video from-image` )。 ## مدل‌ها - [Video Edit](https://muapi.ai/fa/playground/happy-horse-1.1-video-edit) - [متن به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-text-to-video-1080p) - [Reference to Video](https://muapi.ai/fa/playground/happy-horse-1.1-reference-to-video-1080p) - [Reference to Video](https://muapi.ai/fa/playground/happy-horse-1.1-reference-to-video-720p) - [Video Edit](https://muapi.ai/fa/playground/happy-horse-1.1-video-edit-720p) - [تصویر به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-image-to-video-1080p) - [متن به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-text-to-video-720p) - [تصویر به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-image-to-video-720p) - [Video Edit](https://muapi.ai/fa/playground/happy-horse-1.1-video-edit-1080p) - [متن به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-text-to-video) - [تصویر به ویدیو](https://muapi.ai/fa/playground/happy-horse-1.1-image-to-video) - [Reference to Video](https://muapi.ai/fa/playground/happy-horse-1.1-reference-to-video) ## منابع و مستندات - [زمین بازی](https://muapi.ai/fa/playground/happy-horse-1.1-text-to-video) - [API ](https://muapi.ai/fa/playground/happy-horse-1.1-text-to-video/api) - [ llms.txt](https://muapi.ai/fa/llms.txt)