# HappyHorse 1.1 Videobewerking > Happy Horse 1.1 Videobewerking modifies an existing video using a natural-language instruction, met keuze uit uitvoerresoluties van 720p en 1080p. ## Overview - **Eindpunt**: `POST https://api.muapi.ai/api/v1/happy-horse-1.1-video-edit` - **Model ID**: `happy-horse-1.1-video-edit` - **Categorie**: Videobewerking - **Variant**: Video Edit - **Familie**: happy-horse-1.1 - **Cost**: 0.7 credits per call (some modellen compute cost dynamically based on params) ## API Usage MuApi gebruikt het patroon **verzenden-dan-poll**: dien een taak in, verkrijg een `request_id` en peil vervolgens het eindpunt van de voorspellingen totdat `status` `voltooid` is. Optioneel kunt u `?webhook=YOUR_URL` doorgeven bij de submission-aanroep om een ​​POST-callback te ontvangen wanneer de taak is voltooid (polling overslaan). **Authenticatie**: stuur uw MuApi-sleutel in de `x-api-key` header. Koop er een op https://muapi.ai/access-keys. ### 1. Submit a job ```http POST https://api.muapi.ai/api/v1/happy-horse-1.1-video-edit Content-Type: application/json x-api-key: YOUR_API_KEY ``` **Minimum (alleen vereist):** ```json { "prompt": "", "video_url": "https://example.com/your-video_url" } ``` **Volledig voorbeeld (alle parameters):** ```json { "prompt": "", "resolution": "720p", "video_url": "https://example.com/your-video_url", "images_list": "https://d3adwkbyhxyrtq.cloudfront.net/webassets/videomodels/happy-horse-1-video-edit-1080p-1.jpg", "audio_setting": "auto", "seed": 0 } ``` **Response:** ```json { "request_id": "abc123", "status": "processing" } ``` ### 2. Poll voor het resultaat ```http GET https://api.muapi.ai/api/v1/predictions/{request_id}/result x-api-key: YOUR_API_KEY ``` Mogelijke `status`-waarden: `in wachtrij geplaatst`, `in behandeling`, `verwerking`, `voltooid`, `mislukt`, `geannuleerd`. Poll elke 2-5 seconden tot de terminal. Wanneer 'voltooid', bevinden de resultaat-URL's zich in de array 'outputs'. **Voorbeeldreactie bij 'voltooid':** ```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": [] } ``` ### krul ```bash 1. Submit REQUEST_ID=$(curl -s -X POST https://api.muapi.ai/api/v1/happy-horse-1.1-video-edit \ -H "x-api-key: $MUAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt":"","video_url":"https://example.com/your-video_url"}' | jq -r .request_id) 2. Poll tot voltooid 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}/happy-horse-1.1-video-edit", headers=headers, json={"prompt":"","video_url":"https://example.com/your-video_url"}) 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 De API accepteert de volgende invoerparameters: - **`prompt`** (`string`, _required_): video. - **`resolution`** (`string`, _optional_): Output resolution. Price scales with resolution: 720p is cheaper, 1080p is more expensive. - Default: `"720p"` - Options: `"720p"`, `"1080p"` - **`video_url`** (`string`, _required_): URL-video. MP4/MOV (H.264), duur 3-60, <=100 MB, <=2160px, >=320px, >8 fps. - **`images_list`** (`array`, _optional_): Optional 0-5 reference image URLs to guide the edit. - **`audio_setting`** (`string`, _optional_): audio: 'auto', 'oorsprong' audio. - Default: `"auto"` - Options: `"auto"`, `"origin"` - **`seed`** (`int`, _optional_): zaad, (0-2147483647) . - Default: `0` ## Resultaat Schema Het polling-eindpunt retourneert de volgende velden: - **`id`** (`string`): De aanvraag-ID. - **`status`** (`string`): Eén van de opties 'in wachtrij', 'in behandeling', 'bezig met verwerken', 'voltooid', 'mislukt', 'geannuleerd'. - **`outputs`** (`array`): URL's naar gegenereerde afbeeldingen/video's/audio. Leeg totdat `status` `voltooid` is. - **`urls.get`** (`string`): Zelfkoppeling om deze voorspelling opnieuw op te halen. - **`error`** (`string` | `null`): Foutmelding als `status` `mislukt` is. - **`created_at`** (`string`): ISO-8601-tijdstempel van het moment waarop de aanvraag is gemaakt. - **`has_nsfw_contents`** (`array of boolean`): NSFW-detectievlaggen per uitgang. ## Webhooks (optional) Voeg `?webhook=https://uw-server/pad` toe aan de verzend-URL. Wanneer de taak een eindstatus bereikt, POST MuApi dezelfde vorm als het polling-antwoord op uw URL - geen polling nodig. ## Agent Integration MuApi levert een MCP-server en CLI zodat agenten (Claude Code, Cursor, aangepast) dit eindpunt kunnen aanroepen zonder HTTP-code te schrijven: ```bash # Installeer de CLI npm install -g muapi-cli # Authenticate once muapi auth login # Expose all MuApi modellen as MCP tools to your agent muapi mcp serve ``` De MCP-server stelt tools beschikbaar die verzend + poll voor elk model inpakken, inclusief `happy-horse-1.1-video-edit`. Zie `muapi --help` voor categoriespecifieke snelkoppelingen (`muapi image genereren`, `muapi video from-image`, etc.). ## Related Models - [Video Edit](https://muapi.ai/nl/playground/happy-horse-1.1-video-edit) - [Tekst naar video](https://muapi.ai/nl/playground/happy-horse-1.1-text-to-video-1080p) - [Reference to Video](https://muapi.ai/nl/playground/happy-horse-1.1-reference-to-video-1080p) - [Reference to Video](https://muapi.ai/nl/playground/happy-horse-1.1-reference-to-video-720p) - [Video Edit](https://muapi.ai/nl/playground/happy-horse-1.1-video-edit-720p) - [Afbeelding to Video](https://muapi.ai/nl/playground/happy-horse-1.1-image-to-video-1080p) - [Tekst naar video](https://muapi.ai/nl/playground/happy-horse-1.1-text-to-video-720p) - [Afbeelding to Video](https://muapi.ai/nl/playground/happy-horse-1.1-image-to-video-720p) - [Video Edit](https://muapi.ai/nl/playground/happy-horse-1.1-video-edit-1080p) - [Tekst naar video](https://muapi.ai/nl/playground/happy-horse-1.1-text-to-video) - [Afbeelding to Video](https://muapi.ai/nl/playground/happy-horse-1.1-image-to-video) - [Reference to Video](https://muapi.ai/nl/playground/happy-horse-1.1-reference-to-video) ## Bronnen - [Playground Page](https://muapi.ai/nl/playground/happy-horse-1.1-video-edit) - [API Reference](https://muapi.ai/nl/playground/happy-horse-1.1-video-edit/api) - [Global llms.txt](https://muapi.ai/nl/llms.txt)