curl --request POST \
--url https://api.acedata.cloud/happyhorse/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "generate",
"model": "happyhorse-1.1-t2v",
"prompt": "A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting",
"image_url": "https://cdn.acedata.cloud/b1c82e4937.png",
"image_urls": [
"<string>"
],
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": false,
"audio_setting": "auto",
"seed": 1073741823,
"callback_url": "<string>",
"async": true
}
'import requests
url = "https://api.acedata.cloud/happyhorse/videos"
payload = {
"action": "generate",
"model": "happyhorse-1.1-t2v",
"prompt": "A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting",
"image_url": "https://cdn.acedata.cloud/b1c82e4937.png",
"image_urls": ["<string>"],
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": False,
"audio_setting": "auto",
"seed": 1073741823,
"callback_url": "<string>",
"async": True
}
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({
action: 'generate',
model: 'happyhorse-1.1-t2v',
prompt: 'A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting',
image_url: 'https://cdn.acedata.cloud/b1c82e4937.png',
image_urls: ['<string>'],
video_url: 'https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4',
resolution: '720P',
ratio: '16:9',
duration: 5,
watermark: false,
audio_setting: 'auto',
seed: 1073741823,
callback_url: '<string>',
async: true
})
};
fetch('https://api.acedata.cloud/happyhorse/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1",
"trace_id": "6071ab5e-2f37-46f0-9e07-f1e378112e69",
"data": [
{
"id": "9650580f-6d9e-4bc1-823a-29011790c5cb",
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"state": "succeeded",
"duration": 5,
"resolution": "720P",
"ratio": null
}
]
}{
"error": {
"code": "bad_request",
"message": "prompt is required for text-to-video."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "used_up",
"message": "Your balance is not sufficient for current request, please buy more in Ace Data Cloud."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "Too many requests, please try again later."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Happyhorse Videos
curl --request POST \
--url https://api.acedata.cloud/happyhorse/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "generate",
"model": "happyhorse-1.1-t2v",
"prompt": "A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting",
"image_url": "https://cdn.acedata.cloud/b1c82e4937.png",
"image_urls": [
"<string>"
],
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": false,
"audio_setting": "auto",
"seed": 1073741823,
"callback_url": "<string>",
"async": true
}
'import requests
url = "https://api.acedata.cloud/happyhorse/videos"
payload = {
"action": "generate",
"model": "happyhorse-1.1-t2v",
"prompt": "A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting",
"image_url": "https://cdn.acedata.cloud/b1c82e4937.png",
"image_urls": ["<string>"],
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"resolution": "720P",
"ratio": "16:9",
"duration": 5,
"watermark": False,
"audio_setting": "auto",
"seed": 1073741823,
"callback_url": "<string>",
"async": True
}
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({
action: 'generate',
model: 'happyhorse-1.1-t2v',
prompt: 'A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting',
image_url: 'https://cdn.acedata.cloud/b1c82e4937.png',
image_urls: ['<string>'],
video_url: 'https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4',
resolution: '720P',
ratio: '16:9',
duration: 5,
watermark: false,
audio_setting: 'auto',
seed: 1073741823,
callback_url: '<string>',
async: true
})
};
fetch('https://api.acedata.cloud/happyhorse/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1",
"trace_id": "6071ab5e-2f37-46f0-9e07-f1e378112e69",
"data": [
{
"id": "9650580f-6d9e-4bc1-823a-29011790c5cb",
"video_url": "https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4",
"state": "succeeded",
"duration": 5,
"resolution": "720P",
"ratio": null
}
]
}{
"error": {
"code": "bad_request",
"message": "prompt is required for text-to-video."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "used_up",
"message": "Your balance is not sufficient for current request, please buy more in Ace Data Cloud."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "Too many requests, please try again later."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Autorisations
API token from https://platform.acedata.cloud
En-têtes
Happyhorse Videos Param Accept
application/json, application/x-ndjson Corps
Happyhorse Videos Action
generate, image_to_video, reference_to_video, video_edit "generate"
Happyhorse Videos Model
happyhorse-1.0-t2v, happyhorse-1.1-t2v, happyhorse-1.0-i2v, happyhorse-1.1-i2v, happyhorse-1.0-r2v, happyhorse-1.1-r2v, happyhorse-1.0-video-edit "happyhorse-1.1-t2v"
Happyhorse Videos Prompt
"A cinematic white horse lifts its head, the mane moves gently in the sunrise wind, slow camera push in, warm film lighting"
Happyhorse Videos Image Url
"https://cdn.acedata.cloud/b1c82e4937.png"
Happyhorse Videos Image Urls
Happyhorse Videos Video Url
"https://cdn.acedata.cloud/assets/examples/happyhorse/27837f92-d1c1-4db4-ad9a-4e6e81d9f6c1-2c108ce23554.mp4"
Happyhorse Videos Resolution
720P, 1080P "720P"
Happyhorse Videos Ratio
16:9, 9:16, 1:1, 4:3, 3:4 "16:9"
Happyhorse Videos Duration
3 <= x <= 155
Happyhorse Videos Watermark
Happyhorse Videos Audio Setting
auto, origin Happyhorse Videos Seed
0 <= x <= 2147483647Happyhorse Videos Callback Url
Happyhorse Videos Async
Cette page vous a-t-elle été utile ?

