Skip to content

Commit 512a91f

Browse files
feat: add wan-2.6 (5 models)
1 parent ef60f9d commit 512a91f

5 files changed

Lines changed: 862 additions & 11 deletions

File tree

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
{
2+
"openapi": "3.0.0",
3+
"info": {
4+
"title": "AIML API",
5+
"version": "1.0.0"
6+
},
7+
"servers": [
8+
{
9+
"url": "https://api.aimlapi.com"
10+
}
11+
],
12+
"paths": {
13+
"/v1/images/generations": {
14+
"post": {
15+
"operationId": "_v1_images_generations",
16+
"requestBody": {
17+
"required": true,
18+
"content": {
19+
"application/json": {
20+
"schema": {
21+
"type": "object",
22+
"properties": {
23+
"model": {
24+
"type": "string",
25+
"enum": [
26+
"alibaba/wan-2-6-image"
27+
]
28+
},
29+
"prompt": {
30+
"type": "string",
31+
"maxLength": 2000,
32+
"description": "A positive prompt that describes the desired elements and visual features in the edited image."
33+
},
34+
"image_urls": {
35+
"type": "array",
36+
"items": {
37+
"type": "string",
38+
"format": "uri"
39+
},
40+
"minItems": 1,
41+
"maxItems": 3,
42+
"description": "List of URLs or local Base64 encoded images to edit."
43+
},
44+
"image_size": {
45+
"anyOf": [
46+
{
47+
"type": "object",
48+
"properties": {
49+
"width": {
50+
"type": "integer",
51+
"minimum": 512,
52+
"maximum": 1440
53+
},
54+
"height": {
55+
"type": "integer",
56+
"minimum": 512,
57+
"maximum": 1440
58+
}
59+
},
60+
"required": [
61+
"width",
62+
"height"
63+
],
64+
"description": "For both height and width, the value must be a multiple of 32."
65+
},
66+
{
67+
"type": "string",
68+
"enum": [
69+
"square_hd",
70+
"square",
71+
"portrait_4_3",
72+
"portrait_16_9",
73+
"landscape_4_3",
74+
"landscape_16_9"
75+
],
76+
"description": "The size of the generated image."
77+
}
78+
],
79+
"default": "landscape_4_3",
80+
"description": "The size of the generated image."
81+
},
82+
"enhance_prompt": {
83+
"type": "boolean",
84+
"default": true,
85+
"description": "Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment."
86+
},
87+
"negative_prompt": {
88+
"type": "string",
89+
"maxLength": 500,
90+
"description": "The description of elements to avoid in the generated image."
91+
},
92+
"seed": {
93+
"type": "integer",
94+
"minimum": 0,
95+
"maximum": 2147483647,
96+
"description": "The same seed and the same prompt given to the same version of the model will output the same image every time."
97+
},
98+
"watermark": {
99+
"type": "boolean",
100+
"default": false,
101+
"description": "Add an invisible watermark to the generated images."
102+
}
103+
},
104+
"required": [
105+
"model",
106+
"prompt"
107+
],
108+
"title": "alibaba/wan-2-6-image"
109+
}
110+
}
111+
}
112+
},
113+
"responses": {
114+
"200": {
115+
"content": {
116+
"application/json": {
117+
"schema": {
118+
"type": "object",
119+
"properties": {
120+
"data": {
121+
"type": "array",
122+
"nullable": true,
123+
"items": {
124+
"type": "object",
125+
"properties": {
126+
"url": {
127+
"type": "string",
128+
"nullable": true,
129+
"description": "The URL where the file can be downloaded from.",
130+
"example": "https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png"
131+
},
132+
"b64_json": {
133+
"type": "string",
134+
"nullable": true,
135+
"description": "The base64-encoded JSON of the generated image.",
136+
"example": null
137+
}
138+
}
139+
},
140+
"description": "The list of generated images."
141+
},
142+
"meta": {
143+
"type": "object",
144+
"nullable": true,
145+
"properties": {
146+
"usage": {
147+
"type": "object",
148+
"nullable": true,
149+
"properties": {
150+
"credits_used": {
151+
"type": "number",
152+
"description": "The number of tokens consumed during generation.",
153+
"example": 120000
154+
}
155+
},
156+
"required": [
157+
"credits_used"
158+
]
159+
}
160+
},
161+
"description": "Additional details about the generation."
162+
}
163+
}
164+
}
165+
}
166+
}
167+
}
168+
},
169+
"x-hideTryItPanel": true
170+
}
171+
}
172+
},
173+
"components": {
174+
"securitySchemes": {
175+
"access-token": {
176+
"scheme": "bearer",
177+
"bearerFormat": "<YOUR_AIMLAPI_KEY>",
178+
"type": "http",
179+
"description": "Bearer key"
180+
}
181+
}
182+
}
183+
}

0 commit comments

Comments
 (0)