Create Video Edit Task
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "happyhorse-1.0-video-edit",
"input": {
"prompt": "Make the character in the video wear the striped sweater from the image",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/cloth.webp"
}
]
},
"parameters": {
"resolution": "720P",
"watermark": false,
"seed": 1073741823
}
}
'import requests
url = "https://www.anyfast.ai/v1/video/generations"
payload = {
"model": "happyhorse-1.0-video-edit",
"input": {
"prompt": "Make the character in the video wear the striped sweater from the image",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/cloth.webp"
}
]
},
"parameters": {
"resolution": "720P",
"watermark": False,
"seed": 1073741823
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1.0-video-edit',
input: {
prompt: 'Make the character in the video wear the striped sweater from the image',
media: [
{type: 'video', url: 'https://example.com/source.mp4'},
{type: 'reference_image', url: 'https://example.com/cloth.webp'}
]
},
parameters: {resolution: '720P', watermark: false, seed: 1073741823}
})
};
fetch('https://www.anyfast.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'happyhorse-1.0-video-edit',
'input' => [
'prompt' => 'Make the character in the video wear the striped sweater from the image',
'media' => [
[
'type' => 'video',
'url' => 'https://example.com/source.mp4'
],
[
'type' => 'reference_image',
'url' => 'https://example.com/cloth.webp'
]
]
],
'parameters' => [
'resolution' => '720P',
'watermark' => false,
'seed' => 1073741823
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
"task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
"object": "video",
"model": "happyhorse-1.0-video-edit",
"status": "queued",
"progress": 0,
"created_at": 1777343862
}Alibaba
happyhorse-1.0-video-edit
Submit a video editing task that combines an input video and a reference image. Must use the native request format with input.media[] array — flat top-level / unified-framework simplifications are not supported. Returns a task_id immediately.
POST
/
v1
/
video
/
generations
Create Video Edit Task
curl --request POST \
--url https://www.anyfast.ai/v1/video/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "happyhorse-1.0-video-edit",
"input": {
"prompt": "Make the character in the video wear the striped sweater from the image",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/cloth.webp"
}
]
},
"parameters": {
"resolution": "720P",
"watermark": false,
"seed": 1073741823
}
}
'import requests
url = "https://www.anyfast.ai/v1/video/generations"
payload = {
"model": "happyhorse-1.0-video-edit",
"input": {
"prompt": "Make the character in the video wear the striped sweater from the image",
"media": [
{
"type": "video",
"url": "https://example.com/source.mp4"
},
{
"type": "reference_image",
"url": "https://example.com/cloth.webp"
}
]
},
"parameters": {
"resolution": "720P",
"watermark": False,
"seed": 1073741823
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'happyhorse-1.0-video-edit',
input: {
prompt: 'Make the character in the video wear the striped sweater from the image',
media: [
{type: 'video', url: 'https://example.com/source.mp4'},
{type: 'reference_image', url: 'https://example.com/cloth.webp'}
]
},
parameters: {resolution: '720P', watermark: false, seed: 1073741823}
})
};
fetch('https://www.anyfast.ai/v1/video/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://www.anyfast.ai/v1/video/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'happyhorse-1.0-video-edit',
'input' => [
'prompt' => 'Make the character in the video wear the striped sweater from the image',
'media' => [
[
'type' => 'video',
'url' => 'https://example.com/source.mp4'
],
[
'type' => 'reference_image',
'url' => 'https://example.com/cloth.webp'
]
]
],
'parameters' => [
'resolution' => '720P',
'watermark' => false,
'seed' => 1073741823
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://www.anyfast.ai/v1/video/generations"
payload := strings.NewReader("{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://www.anyfast.ai/v1/video/generations")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.anyfast.ai/v1/video/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"happyhorse-1.0-video-edit\",\n \"input\": {\n \"prompt\": \"Make the character in the video wear the striped sweater from the image\",\n \"media\": [\n {\n \"type\": \"video\",\n \"url\": \"https://example.com/source.mp4\"\n },\n {\n \"type\": \"reference_image\",\n \"url\": \"https://example.com/cloth.webp\"\n }\n ]\n },\n \"parameters\": {\n \"resolution\": \"720P\",\n \"watermark\": false,\n \"seed\": 1073741823\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
"task_id": "asyntask_jwgfhsG0m2aDjLmiiELRf74eoWmss6ya",
"object": "video",
"model": "happyhorse-1.0-video-edit",
"status": "queued",
"progress": 0,
"created_at": 1777343862
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Task created successfully
Was this page helpful?
⌘I