Grok Videos
curl --request POST \
--url https://api.acedata.cloud/grok/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A cinematic shot of a kitten chasing a butterfly in a sunlit garden",
"model": "grok-imagine-video-1.5-fast:reverse",
"image_url": "https://cdn.acedata.cloud/5hmkdg.jpg",
"reference_image_urls": [
"<string>"
],
"aspect_ratio": "16:9",
"resolution": "480p",
"duration": 6,
"callback_url": "<string>",
"async": true
}
'import requests
url = "https://api.acedata.cloud/grok/videos"
payload = {
"prompt": "A cinematic shot of a kitten chasing a butterfly in a sunlit garden",
"model": "grok-imagine-video-1.5-fast:reverse",
"image_url": "https://cdn.acedata.cloud/5hmkdg.jpg",
"reference_image_urls": ["<string>"],
"aspect_ratio": "16:9",
"resolution": "480p",
"duration": 6,
"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({
prompt: 'A cinematic shot of a kitten chasing a butterfly in a sunlit garden',
model: 'grok-imagine-video-1.5-fast:reverse',
image_url: 'https://cdn.acedata.cloud/5hmkdg.jpg',
reference_image_urls: ['<string>'],
aspect_ratio: '16:9',
resolution: '480p',
duration: 6,
callback_url: '<string>',
async: true
})
};
fetch('https://api.acedata.cloud/grok/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"trace_id": "fb751e1e-4705-49ea-9fd4-5024b7865ea2",
"data": [
{
"id": "grok-imagine-video-1.5-fast:41eb9a5f-3b2d-4d1e-9f5a-6c2f1a0b9e77",
"video_url": "https://cdn.acedata.cloud/c8cbf53aa0.mp4",
"state": "succeeded"
}
]
}{
"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"
}API Reference
Grok Videos
POST
/
grok
/
videos
Grok Videos
curl --request POST \
--url https://api.acedata.cloud/grok/videos \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"prompt": "A cinematic shot of a kitten chasing a butterfly in a sunlit garden",
"model": "grok-imagine-video-1.5-fast:reverse",
"image_url": "https://cdn.acedata.cloud/5hmkdg.jpg",
"reference_image_urls": [
"<string>"
],
"aspect_ratio": "16:9",
"resolution": "480p",
"duration": 6,
"callback_url": "<string>",
"async": true
}
'import requests
url = "https://api.acedata.cloud/grok/videos"
payload = {
"prompt": "A cinematic shot of a kitten chasing a butterfly in a sunlit garden",
"model": "grok-imagine-video-1.5-fast:reverse",
"image_url": "https://cdn.acedata.cloud/5hmkdg.jpg",
"reference_image_urls": ["<string>"],
"aspect_ratio": "16:9",
"resolution": "480p",
"duration": 6,
"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({
prompt: 'A cinematic shot of a kitten chasing a butterfly in a sunlit garden',
model: 'grok-imagine-video-1.5-fast:reverse',
image_url: 'https://cdn.acedata.cloud/5hmkdg.jpg',
reference_image_urls: ['<string>'],
aspect_ratio: '16:9',
resolution: '480p',
duration: 6,
callback_url: '<string>',
async: true
})
};
fetch('https://api.acedata.cloud/grok/videos', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "b8976e18-32dc-4718-9ed8-1ea090fcb6ea",
"trace_id": "fb751e1e-4705-49ea-9fd4-5024b7865ea2",
"data": [
{
"id": "grok-imagine-video-1.5-fast:41eb9a5f-3b2d-4d1e-9f5a-6c2f1a0b9e77",
"video_url": "https://cdn.acedata.cloud/c8cbf53aa0.mp4",
"state": "succeeded"
}
]
}{
"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"
}Czy ta strona była pomocna?

