# MiniMax H3 Max Text to Video API > Generate 1080p video from text with the MiniMax H3 Max API on Muapi. Cinematic motion, prompt expansion, pay per generation. ## 개요 - **Endpoint**: `POST https://api.muapi.ai/api/v1/minimax-h3-max-text-to-video` - **모델 ID**: `minimax-h3-max-text-to-video` - **카테고리**: 텍스트를 비디오로 - **변형**: MiniMax H3 Max Text to Video - **패밀리**: minimax-h3-max - **비용**: 호출당 0.26 크레딧(일부 모델은 매개변수에 따라 동적으로 비용을 계산함) ## API 사용법 Muapi는 **제출 후 폴링(Submit-then-poll)** 패턴을 사용합니다. 즉, 작업을 제출하고 `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/minimax-h3-max-text-to-video Content-Type: application/json x-api-key: YOUR_API_KEY ``` **최소(필수):** ```json { "prompt": "" } ``` **전체 예(모든 매개변수):** ```json { "prompt": "", "aspect_ratio": "16:9", "resolution": "768p", "duration": 5, "prompt_expansion_mode": "balanced" } ``` **응답:** ```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/minimax-h3-max-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 ```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}/minimax-h3-max-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) ``` ## 입력 스키마 API는 다음 입력 매개변수를 허용합니다. - **`prompt`** (`string`, _필수_): 동영상, , . - **`aspect_ratio`** (`string`, _선택사항_): 설명이 없습니다. - 기본값: `"16:9"` - 옵션: `"21:9"`, `"16:9"`, `"4:3"`, `"1:1"`, `"3:4"`, `"9:16"` - **`resolution`** (`string`, _선택사항_): Output resolution. 1080p applies latent refinement from a 768p source. - 기본값: `"768p"` - 옵션: `"480p"`, `"768p"`, `"1080p"` - **`duration`** (`integer`, _선택사항_): 출력 지속 시간 () . - 기본값: `5` - 옵션: `"5"`, `"6"`, `"7"`, `"8"`, `"9"`, `"10"`, `"11"`, `"12"`, `"13"`, `"14"`, `"15"` - **`prompt_expansion_mode`** (`string`, _선택사항_): Prompt rewriting effort. 'quality' can add up to ~30s of processing. - 기본값: `"balanced"` - 옵션: `"disabled"`, `"balanced"`, `"quality"` ## 출력 스키마 폴링 엔드포인트는 다음 필드를 반환합니다. - **`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 감지 플래그입니다. ## 웹훅(선택사항) 제출 URL에 `?webhook=https://your-server/path`를 추가하세요. 작업이 최종 상태에 도달하면 Muapi가 해당 URL로 폴링 응답과 동일한 페이로드를 POST 전송하므로 별도의 폴링이 필요하지 않습니다. ## 에이전트 연동 Muapi는 MCP 서버와 CLI를 제공하므로 AI 에이전트(Claude Code, Cursor, 커스텀 에이전트)가 복잡한 HTTP 코드 없이도 이 엔드포인트를 호출할 수 있습니다. ```bash # CLI 설치 npm install -g muapi-cli # 1회 인증 muapi auth login # 모든 Muapi 모델을 에이전트에 MCP 도구로 제공합니다. muapi mcp serve ``` MCP 서버는 `minimax-h3-max-text-to-video`을 포함하여 모든 모델에 대해 제출 + 폴링을 래핑하는 도구를 노출합니다. 카테고리별 단축키(`muapi image generate`, `muapi video from-image` 등)는 `muapi --help`를 참조하세요. ## 관련 모델 - [MiniMax H3 Max Image to Video](https://muapi.ai/ko/playground/minimax-h3-max-image-to-video) - [MiniMax H3 Max Turbo Text to Video](https://muapi.ai/ko/playground/minimax-h3-max-turbo-text-to-video) - [MiniMax H3 Max Turbo Image to Video](https://muapi.ai/ko/playground/minimax-h3-max-turbo-image-to-video) - [MiniMax H3 Max Text to Video](https://muapi.ai/ko/playground/minimax-h3-max-text-to-video) - [MiniMax H3 Max Reference to Video](https://muapi.ai/ko/playground/minimax-h3-max-reference-to-video) ## 자원 - [플레이그라운드 페이지](https://muapi.ai/ko/playground/minimax-h3-max-text-to-video) - [API 참조](https://muapi.ai/ko/playground/minimax-h3-max-text-to-video/api) - [전역 llms.txt](https://muapi.ai/ko/llms.txt)