# Seedance 2 Omni Reference VIP > Tích hợp mô hình AI seedance-2-vip-omni-reference qua API hiệu suất cao và giá cả linh hoạt. ## Tổng quan - **Điểm cuối**: `POST https://api.muapi.ai/api/v1/seedance-2-vip-omni-reference` - **Mã mẫu**: `seedance-2-vip-omni-reference` - **Danh mục**: Hình ảnh thành video - **Biến thể**: Omni Reference VIP - **Nhóm**: sd-2 - **Chi phí**: 1.5 tín dụng cho mỗi cuộc gọi (một số mô hình tính toán chi phí linh hoạt dựa trên thông số) ## Sử dụng API MuApi sử dụng mẫu **gửi rồi thăm dò ý kiến**: gửi công việc, nhận `request_id`, sau đó thăm dò điểm cuối dự đoán cho đến khi `trạng thái` là `hoàn thành`. Tùy chọn chuyển `?webhook=YOUR_URL` trong lệnh gọi gửi để nhận lệnh gọi lại POST khi công việc kết thúc (bỏ qua bỏ phiếu). **Xác thực**: gửi khóa MuApi của bạn trong tiêu đề `x-api-key`. Nhận một cái tại https://muapi.ai/access-keys. ### 1. Gửi tác vụ ```http POST https://api.muapi.ai/api/v1/seedance-2-vip-omni-reference Content-Type: application/json x-api-key: YOUR_API_KEY ``` **Tối thiểu (chỉ bắt buộc):** ```json { "prompt": "" } ``` **Ví dụ đầy đủ (tất cả các thông số):** ```json { "prompt": "", "resolution": "720p", "images_list": "https://d3adwkbyhxyrtq.cloudfront.net/ai-images/186/712345784292/4a8c5c70-abcc-4920-873e-b0e219986453.jpg", "video_files": [], "audio_files": [], "aspect_ratio": "16:9", "duration": 5, "high_bitrate": false } ``` **Phản hồi:** ```json { "request_id": "abc123", "status": "processing" } ``` ### 2. Kiểm tra kết quả ```http GET https://api.muapi.ai/api/v1/predictions/{request_id}/result x-api-key: YOUR_API_KEY ``` Các giá trị `trạng thái` có thể có: `được xếp hàng`, `đang chờ`, `đang xử lý`, `đã hoàn thành`, `không thành công`, `đã hủy`. Thăm dò ý kiến ​​cứ sau 2-5 giây cho đến khi kết thúc. Khi `hoàn thành`, các URL kết quả nằm trong mảng `đầu ra`. **Phản hồi ví dụ khi `hoàn thành`:** ```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. Gửi tác vụ REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/seedance-2-vip-omni-reference \ -H "x-api-key: $MUAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":""}' | jq -r .request_id) 2. Thăm dò cho đến khi hoàn thành 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 ```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}/seedance-2-vip-omni-reference", 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) ``` ## Lược đồ đầu vào API chấp nhận các tham số đầu vào sau: - **`prompt`** (`string`, _required_): Video description. Use @image1…@image9 to , @video1…@video3 for videos, and @audio1…@audio3 for audio. Use @character: for a Seedance 2 character sheet or @omni-character: for a trained omni-character. Multiple characters are supported. - **`resolution`** (`string`, _optional_): Output resolution. Price scales with resolution: 720p is cheapest, 4K is most expensive. - Mặc định: `"720p"` - Tùy chọn: `"720p"`, `"1080p"`, `"4k"` - **`images_list`** (`array`, _optional_): 9 URL(JPEG/PNG/WebP)。 N @imageN。 - **`video_files`** (`array`, _optional_): 3 URL(MP4, 15 )。 N @videoN。 - **`audio_files`** (`array`, _optional_): 3 files (MP3/WAV, total max 15s). Each Nth audio corresponds to @audioN in the prompt. - **`aspect_ratio`** (`string`, _optional_): Tỷ lệ khung hình mong muốn. - Mặc định: `"16:9"` - Tùy chọn: `"21:9"`, `"16:9"`, `"4:3"`, `"1:1"`, `"3:4"`, `"9:16"` - **`duration`** (`int`, _optional_): ()。 - Mặc định: `5` - **`high_bitrate`** (`boolean`, _optional_): ,。 - Mặc định: `false` ## Lược đồ đầu ra Điểm cuối bỏ phiếu trả về các trường sau: - **`id`** (`string`): ID yêu cầu. - **`status`** (`string`): Một trong số `xếp hàng`, `đang chờ xử lý`, `đang xử lý`, `đã hoàn thành`, `không thành công`, `đã hủy`. - **`outputs`** (`array`): URL tới hình ảnh/video/âm thanh được tạo. Để trống cho đến khi `trạng thái` được` hoàn thành`. - **`urls.get`** (`string`): Tự liên kết để tìm nạp lại dự đoán này. - **`error`** (`string` | `null`): Thông báo lỗi nếu `trạng thái` là `không thành công`. - **`created_at`** (`string`): Dấu thời gian ISO-8601 về thời điểm yêu cầu được tạo. - **`has_nsfw_contents`** (`array of boolean`): Cờ phát hiện NSFW trên mỗi đầu ra. ## Webhooks (tùy chọn) Nối `?webhook=https://your-server/path` vào URL gửi. Khi công việc đạt đến trạng thái cuối, MuApi sẽ ĐĂNG hình dạng giống như phản hồi bỏ phiếu cho URL của bạn - không cần bỏ phiếu. ## Tích hợp đại lý MuApi gửi máy chủ MCP và CLI để các đại lý (Mã Claude, Con trỏ, tùy chỉnh) có thể gọi điểm cuối này mà không cần viết mã HTTP: ```bash # Cài đặt CLI npm install -g muapi-cli # Xác thực một lần muapi auth login # Hiển thị tất cả các mô hình MuApi dưới dạng công cụ MCP cho đại lý của bạn muapi mcp serve ``` Máy chủ MCP hiển thị các công cụ bao gồm việc gửi + thăm dò ý kiến cho mọi mô hình, bao gồm cả `seedance-2-vip-omni-reference`. Xem `muapi --help` để biết các phím tắt dành riêng cho danh mục (`tạo hình ảnh muaapi`, `muapi video từ hình ảnh`, v.v.). ## Mô hình liên quan - [Chuyển văn bản thành video](https://muapi.ai/vi/playground/seedance-2-text-to-video) - [Text to Video Fast](https://muapi.ai/vi/playground/seedance-2-text-to-video-fast) - [Hình ảnh thành video](https://muapi.ai/vi/playground/seedance-2-image-to-video) - [Image to Video Fast](https://muapi.ai/vi/playground/seedance-2-image-to-video-fast) - [First & Last Frame](https://muapi.ai/vi/playground/seedance-2-first-last-frame) - [First & Last Frame Fast](https://muapi.ai/vi/playground/seedance-2-first-last-frame-fast) - [Omni Reference](https://muapi.ai/vi/playground/seedance-2-omni-reference-no-video) - [Text to Video VIP](https://muapi.ai/vi/playground/seedance-2-vip-text-to-video) - [Text to Video VIP Fast](https://muapi.ai/vi/playground/seedance-2-vip-text-to-video-fast) - [Image to Video VIP](https://muapi.ai/vi/playground/seedance-2-vip-image-to-video) - [Image to Video VIP Fast](https://muapi.ai/vi/playground/seedance-2-vip-image-to-video-fast) - [First & Last Frame VIP](https://muapi.ai/vi/playground/seedance-2-vip-first-last-frame) - [First & Last Frame VIP Fast](https://muapi.ai/vi/playground/seedance-2-vip-first-last-frame-fast) - [Omni Reference VIP Fast](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference-fast) - [Text to Video VIP 1080p](https://muapi.ai/vi/playground/seedance-2-vip-text-to-video-1080p) - [Text to Video VIP 1080p Fast](https://muapi.ai/vi/playground/seedance-2-vip-text-to-video-fast-1080p) - [Image to Video VIP 1080p](https://muapi.ai/vi/playground/seedance-2-vip-image-to-video-1080p) - [Image to Video VIP 1080p Fast](https://muapi.ai/vi/playground/seedance-2-vip-image-to-video-fast-1080p) - [Omni Reference VIP 1080p](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference-1080p) - [Omni Reference VIP 1080p Fast](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference-fast-1080p) - [First & Last Frame VIP 1080p](https://muapi.ai/vi/playground/seedance-2-vip-first-last-frame-1080p) - [Text to Video VIP 4K](https://muapi.ai/vi/playground/seedance-2-vip-text-to-video-4k) - [Image to Video VIP 4K](https://muapi.ai/vi/playground/seedance-2-vip-image-to-video-4k) - [First & Last Frame VIP 4K](https://muapi.ai/vi/playground/seedance-2-vip-first-last-frame-4k) - [Omni Reference VIP 4K](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference-4k) - [Seedance 2 Spicy Text to Video](https://muapi.ai/vi/playground/seedance-2-spicy-text-to-video) - [Seedance 2 Spicy Text to Video Fast](https://muapi.ai/vi/playground/seedance-2-spicy-text-to-video-fast) - [Seedance 2 Spicy Image to Video](https://muapi.ai/vi/playground/seedance-2-spicy-image-to-video) - [Seedance 2 Spicy Image to Video Fast](https://muapi.ai/vi/playground/seedance-2-spicy-image-to-video-fast) - [Omni Reference Fast](https://muapi.ai/vi/playground/seedance-2-omni-reference-no-video-fast) - [Spicy Omni Reference](https://muapi.ai/vi/playground/seedance-2-spicy-omni-reference) - [Spicy Omni Reference Fast](https://muapi.ai/vi/playground/seedance-2-spicy-omni-reference-fast) - [Omni Reference VIP](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference) ## Tài nguyên - [Trang sân chơi](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference) - [Tham khảo API](https://muapi.ai/vi/playground/seedance-2-vip-omni-reference/api) - [llms.txt toàn cầu](https://muapi.ai/vi/llms.txt)