Skip to content

Commit 76be37b

Browse files
authored
feat: add videos-to-video snippets
feat: add videos-to-video snippets
2 parents 97e4034 + 6c505db commit 76be37b

3 files changed

Lines changed: 44 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"title": "Generate a video",
3+
"docs": "https://docs.aimlapi.com/api-references/video-models",
4+
"payload": {
5+
"baseUrl": "https://api.aimlapi.com/v2",
6+
"apiKey": "<YOUR_API_KEY>"
7+
}
8+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
const main = async () => {
2+
const response = await fetch('{{baseUrl}}/video/generations', {
3+
method: 'POST',
4+
headers: {
5+
Authorization: 'Bearer {{apiKey}}',
6+
'Content-Type': 'application/json',
7+
},
8+
body: JSON.stringify({
9+
model: '{{model}}',
10+
prompt: 'A powerful, matte black jeep, its robust frame contrasting with the lush green surroundings, navigates a winding jungle road, kicking up small clouds of dust and loose earth from its tires.',
11+
video_urls: ['https://storage.googleapis.com/falserverless/example_inputs/krea_wan_14b_v2v_input.mp4']
12+
}),
13+
}).then((res) => res.json());
14+
15+
console.log('Generation:', response);
16+
};
17+
18+
main()
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import requests
2+
3+
4+
def main():
5+
url = "{{baseUrl}}/video/generations"
6+
payload = {
7+
"model": "{{model}}",
8+
"prompt": "A powerful, matte black jeep, its robust frame contrasting with the lush green surroundings, navigates a winding jungle road, kicking up small clouds of dust and loose earth from its tires.",
9+
"video_urls": ["https://storage.googleapis.com/falserverless/example_inputs/krea_wan_14b_v2v_input.mp4"]
10+
}
11+
headers = {"Authorization": "Bearer {{apiKey}}", "Content-Type": "application/json"}
12+
13+
response = requests.post(url, json=payload, headers=headers)
14+
print("Generation:", response.json())
15+
16+
17+
if __name__ == "__main__":
18+
main()

0 commit comments

Comments
 (0)