File tree Expand file tree Collapse file tree
create-video-character-performance-generation
create-video-to-video-generation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ {
2+ "title" : " Generate a video" ,
3+ "docs" : " https://docs.aimlapi.com/api-references/video-models/runway" ,
4+ "payload" : {
5+ "baseUrl" : " https://api.aimlapi.com/v2" ,
6+ "apiKey" : " <YOUR_API_KEY>"
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ const main = async () => {
2+ const response = await fetch('{{ baseUrl }} /generate/video/runway/generation', {
3+ method: 'POST',
4+ headers: {
5+ Authorization: 'Bearer {{ apiKey }} ',
6+ 'Content-Type': 'application/json',
7+ },
8+ body: JSON.stringify({
9+ model: '{{ model }} ',
10+ character: {
11+ type: 'image',
12+ url: 'https://fs.tonkosti.ru/33/ol/33olc2eyzj6s4w8ksg8kkc0gg.jpg',
13+ },
14+ reference: {
15+ type: 'video',
16+ url: 'https://www.shutterstock.com/shutterstock/videos/1068048734/preview/stock-footage-cheerful-businessman-talking-on-the-phone-on-a-green-screen-chroma-key.webm',
17+ }
18+ }),
19+ }).then((res) => res.json());
20+
21+ console.log('Generation:', response);
22+ };
23+
24+ main()
Original file line number Diff line number Diff line change 1+ import requests
2+
3+
4+ def main():
5+ url = "{{ baseUrl }} /generate/video/runway/generation"
6+ payload = {
7+ "model": "{{ model }} ",
8+ "character": {
9+ "type": "image",
10+ "url": "https://fs.tonkosti.ru/33/ol/33olc2eyzj6s4w8ksg8kkc0gg.jpg",
11+ },
12+ "reference": {
13+ "type": "video",
14+ "url": "https://www.shutterstock.com/shutterstock/videos/1068048734/preview/stock-footage-cheerful-businessman-talking-on-the-phone-on-a-green-screen-chroma-key.webm",
15+ }
16+ }
17+ headers = {"Authorization": "Bearer {{ apiKey }} ", "Content-Type": "application/json"}
18+
19+ response = requests.post(url, json=payload, headers=headers)
20+ print("Generation:", response.json())
21+
22+ if __name__ == "__main__":
23+ main()
Original file line number Diff line number Diff line change 1+ {
2+ "title" : " Generate a video" ,
3+ "docs" : " https://docs.aimlapi.com/api-references/video-models/runway" ,
4+ "payload" : {
5+ "baseUrl" : " https://api.aimlapi.com/v2" ,
6+ "apiKey" : " <YOUR_API_KEY>"
7+ }
8+ }
Original file line number Diff line number Diff line change 1+ const main = async () => {
2+ const response = await fetch('{{ baseUrl }} /generate/video/runway/generation', {
3+ method: 'POST',
4+ headers: {
5+ Authorization: 'Bearer {{ apiKey }} ',
6+ 'Content-Type': 'application/json',
7+ },
8+ body: JSON.stringify({
9+ model: '{{ model }} ',
10+ prompt: 'Replace the pink background color with the color of the image',
11+ video_url : 'https://cdn.pixabay.com/video/2019/09/04/26566-358041233_large.mp4',
12+ references: [{
13+ type: 'image',
14+ url: 'https://thumbs.dreamstime.com/b/yellow-square-background-shape-blank-high-quality-photo-214458702.jpg'
15+ }]
16+ }),
17+ }).then((res) => res.json());
18+
19+ console.log('Generation:', response);
20+ };
21+
22+ main()
Original file line number Diff line number Diff line change 1+ import requests
2+
3+
4+ def main():
5+ url = "{{ baseUrl }} /generate/video/runway/generation"
6+ payload = {
7+ "model": "{{ model }} ",
8+ "prompt": "Replace the pink background color with the color of the image",
9+ "video_url" : f"https://cdn.pixabay.com/video/2019/09/04/26566-358041233_large.mp4",
10+ "references": [{
11+ "type": "image",
12+ "url": "https://thumbs.dreamstime.com/b/yellow-square-background-shape-blank-high-quality-photo-214458702.jpg"
13+ }]
14+ }
15+ headers = {"Authorization": "Bearer {{ apiKey }} ", "Content-Type": "application/json"}
16+
17+ response = requests.post(url, json=payload, headers=headers)
18+ print("Generation:", response.json())
19+
20+ if __name__ == "__main__":
21+ main()
You can’t perform that action at this time.
0 commit comments