|
194 | 194 | "x-codeSamples": [ |
195 | 195 | { |
196 | 196 | "lang": "JavaScript", |
197 | | - "source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v2/video/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": \"5\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
| 197 | + "source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v2/video/generations', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": 5\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
198 | 198 | }, |
199 | 199 | { |
200 | 200 | "lang": "Python", |
201 | | - "source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v2/video/generations\",\n headers={\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": \"5\"\n }\n)\n\ndata = response.json()\nprint(data)" |
| 201 | + "source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v2/video/generations\",\n headers={\n \"Content-Type\": \"application/json\",\n \"Authorization\": \"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": 5\n }\n)\n\ndata = response.json()\nprint(data)" |
202 | 202 | }, |
203 | 203 | { |
204 | 204 | "lang": "cURL", |
205 | | - "source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v2/video/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": \"5\"\n }'" |
| 205 | + "source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v2/video/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": 5\n }'" |
206 | 206 | }, |
207 | 207 | { |
208 | 208 | "lang": "HTTP", |
209 | | - "source": "POST /v2/video/generations HTTP/1.1\nHost: api.aimlapi.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nContent-Type: application/json\nAccept: */*\n\n{\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": \"5\"\n}" |
| 209 | + "source": "POST /v2/video/generations HTTP/1.1\nHost: api.aimlapi.com\nAuthorization: Bearer <YOUR_AIMLAPI_KEY>\nContent-Type: application/json\nAccept: */*\n\n{\n \"model\": \"alibaba/wan-2-6-r2v\",\n \"prompt\": \"Add a small fairy as a rider on the raccoon’s back. She must have a black-and-golden face and a cloak in the colors of a dark emerald tropical butterfly with bright blue shimmering spots.\",\n \"video_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4\"\n ],\n \"duration\": 5\n}" |
210 | 210 | } |
211 | 211 | ] |
212 | 212 | } |
|
0 commit comments