|
172 | 172 | "x-codeSamples": [ |
173 | 173 | { |
174 | 174 | "lang": "JavaScript", |
175 | | - "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: \\\"Hello, two-legged!\\\" His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: \\\"Wanna some?\\\" — while extending the half-eaten ice cream toward the camera.\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
| 175 | + "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: ’Hello, two-legged!’ His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: ’Wanna some?’ — while extending the half-eaten ice cream toward the camera.\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
176 | 176 | }, |
177 | 177 | { |
178 | 178 | "lang": "Python", |
179 | | - "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: \\\"Hello, two-legged!\\\" His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: \\\"Wanna some?\\\" — while extending the half-eaten ice cream toward the camera.\"\n }\n)\n\ndata = response.json()\nprint(data)" |
| 179 | + "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: ’Hello, two-legged!’ His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: ’Wanna some?’ — while extending the half-eaten ice cream toward the camera.\"\n }\n)\n\ndata = response.json()\nprint(data)" |
180 | 180 | }, |
181 | 181 | { |
182 | 182 | "lang": "cURL", |
183 | | - "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: \\\"Hello, two-legged!\\\" His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: \\\"Wanna some?\\\" — while extending the half-eaten ice cream toward the camera.\"\n }'" |
| 183 | + "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: ’Hello, two-legged!’ His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: ’Wanna some?’ — while extending the half-eaten ice cream toward the camera.\"\n }'" |
184 | 184 | }, |
185 | 185 | { |
186 | 186 | "lang": "HTTP", |
187 | | - "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: \\\"Hello, two-legged!\\\" His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: \\\"Wanna some?\\\" — while extending the half-eaten ice cream toward the camera.\"\n}" |
| 187 | + "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/wan2.5-t2v-preview\",\n \"prompt\": \"A racoon is happily eating an ice cream. Suddenly, he pauses, looks directly into the camera, and says with full confidence: ’Hello, two-legged!’ His lip movements perfectly match the speech. Then, in a strong Irish accent, he adds: ’Wanna some?’ — while extending the half-eaten ice cream toward the camera.\"\n}" |
188 | 188 | } |
189 | 189 | ] |
190 | 190 | } |
|
0 commit comments