Skip to content

Commit b0b17eb

Browse files
feat: re-gen wan-2-6-image
1 parent 75637d8 commit b0b17eb

2 files changed

Lines changed: 25 additions & 16 deletions

File tree

docs/api-references/image-models/Alibaba-Cloud/wan-2-6-image.json

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,25 @@
166166
}
167167
}
168168
},
169-
"x-hideTryItPanel": true
169+
"x-hideTryItPanel": true,
170+
"x-codeSamples": [
171+
{
172+
"lang": "JavaScript",
173+
"source": "async function main() {\n const response = await fetch('https://api.aimlapi.com/v1/images/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-image\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
174+
},
175+
{
176+
"lang": "Python",
177+
"source": "import requests\n\nresponse = requests.post(\n \"https://api.aimlapi.com/v1/images/generations\",\n headers={\n \"Content-Type\":\"application/json\", \n \"Authorization\":\"Bearer <YOUR_AIMLAPI_KEY>\",\n },\n json={\n \"model\": \"alibaba/wan-2-6-image\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }\n)\n\ndata = response.json()\nprint(data)"
178+
},
179+
{
180+
"lang": "cURL",
181+
"source": "curl -L \\\n --request POST \\\n --url 'https://api.aimlapi.com/v1/images/generations' \\\n --header 'Authorization: Bearer <YOUR_AIMLAPI_KEY>' \\\n --header 'Content-Type: application/json' \\\n --data '{\n \"model\": \"alibaba/wan-2-6-image\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n }'"
182+
},
183+
{
184+
"lang": "HTTP",
185+
"source": "POST /v1/images/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-image\",\n \"prompt\": \"Combine the images so the T-Rex is wearing a business suit, sitting in a cozy small café, drinking from the mug. Blur the background slightly to create a bokeh effect.\",\n \"image_urls\": [\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/t-rex.png\",\n \"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/blue-mug.jpg\"\n ]\n}"
186+
}
187+
]
170188
}
171189
}
172190
},
Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
11
[
22
{
3-
"name": "alibaba/wan-2-6-r2v",
4-
"alias": "wan2.6-r2v",
5-
"category": "video-models",
6-
"vendor": "Alibaba Cloud",
7-
"url": "https://ai.aimlapi.com/docs-json?endpoint=internal/video-generations/submit&model=alibaba/wan-2-6-r2v",
8-
"codeSamples": "custom",
9-
"customUrlApi": "https://api.aimlapi.com/v2/video/generations",
10-
"customParams":{
11-
"model": "alibaba/wan-2-6-r2v",
12-
"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.",
13-
"video_urls":[
14-
"https://raw.githubusercontent.com/aimlapi/api-docs/main/reference-files/racoon-in-the-forest.mp4"
15-
],
16-
"duration": 5
17-
}
3+
"name": "alibaba/wan-2-6-image",
4+
"url": "https://ai.aimlapi.com/docs-json?endpoint=openai/image-generations&model=alibaba/wan-2-6-image",
5+
"alias": "wan-2-6-image",
6+
"category": "image-models",
7+
"vendor": "Alibaba-Cloud",
8+
"codeSamples": "image-models:image_url(s)"
189
}
1910
]

0 commit comments

Comments
 (0)