|
23 | 23 | "model": { |
24 | 24 | "type": "string", |
25 | 25 | "enum": [ |
26 | | - "alibaba/wan2.2-vace-fun-a14b-depth" |
| 26 | + "alibaba/wan2.2-i2v-plus" |
27 | 27 | ] |
28 | 28 | }, |
29 | 29 | "prompt": { |
30 | 30 | "type": "string", |
31 | 31 | "description": "The text description of the scene, subject, or action to generate in the video." |
32 | 32 | }, |
33 | | - "video_url": { |
| 33 | + "image_url": { |
34 | 34 | "type": "string", |
35 | 35 | "format": "uri", |
36 | | - "description": "A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation." |
37 | | - }, |
38 | | - "negative_prompt": { |
39 | | - "type": "string", |
40 | | - "default": "letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards", |
41 | | - "description": "The description of elements to avoid in the generated video." |
42 | | - }, |
43 | | - "match_input_num_frames": { |
44 | | - "type": "boolean" |
45 | | - }, |
46 | | - "num_frames": { |
47 | | - "type": "integer", |
48 | | - "minimum": 17, |
49 | | - "maximum": 241, |
50 | | - "default": 81, |
51 | | - "description": "Number of frames to generate." |
52 | | - }, |
53 | | - "match_input_frames_per_second": { |
54 | | - "type": "boolean", |
55 | | - "description": "Whether to match the input video's frames per second (FPS)." |
56 | | - }, |
57 | | - "frames_per_second": { |
58 | | - "type": "integer", |
59 | | - "minimum": 5, |
60 | | - "maximum": 30, |
61 | | - "default": 16, |
62 | | - "description": "Frames per second of the generated video." |
| 36 | + "description": "A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video." |
63 | 37 | }, |
64 | 38 | "resolution": { |
65 | 39 | "type": "string", |
66 | 40 | "enum": [ |
67 | | - "480p", |
68 | | - "580p", |
69 | | - "720p" |
| 41 | + "480P", |
| 42 | + "1080P" |
70 | 43 | ], |
71 | | - "default": "480p", |
72 | | - "description": "The resolution of the output video, where the number refers to the short side in pixels." |
| 44 | + "default": "1080P", |
| 45 | + "description": "An enumeration where the short side of the video frame determines the resolution." |
73 | 46 | }, |
74 | | - "aspect_ratio": { |
| 47 | + "negative_prompt": { |
75 | 48 | "type": "string", |
76 | | - "enum": [ |
77 | | - "auto", |
78 | | - "16:9", |
79 | | - "1:1", |
80 | | - "9:16" |
81 | | - ], |
82 | | - "default": "auto", |
83 | | - "description": "The aspect ratio of the generated video." |
84 | | - }, |
85 | | - "num_inference_steps": { |
86 | | - "type": "integer", |
87 | | - "default": 30, |
88 | | - "description": "Number of inference steps for sampling. Higher values give better quality but take longer." |
89 | | - }, |
90 | | - "guidance_scale": { |
91 | | - "type": "number", |
92 | | - "default": 5, |
93 | | - "description": "Classifier-free guidance scale. Controls prompt adherence / creativity." |
94 | | - }, |
95 | | - "shift": { |
96 | | - "type": "number", |
97 | | - "default": 5, |
98 | | - "description": "Noise schedule shift parameter. Affects temporal dynamics." |
99 | | - }, |
100 | | - "enable_safety_checker": { |
101 | | - "type": "boolean", |
102 | | - "description": "If set to true, the safety checker will be enabled." |
103 | | - }, |
104 | | - "enable_prompt_expansion": { |
105 | | - "type": "boolean", |
106 | | - "description": "Whether to enable prompt expansion." |
| 49 | + "description": "The description of elements to avoid in the generated video." |
107 | 50 | }, |
108 | | - "preprocess": { |
| 51 | + "watermark": { |
109 | 52 | "type": "boolean", |
110 | | - "description": "Whether to preprocess the input video." |
111 | | - }, |
112 | | - "acceleration": { |
113 | | - "type": "string", |
114 | | - "enum": [ |
115 | | - "none", |
116 | | - "regular" |
117 | | - ], |
118 | | - "default": "regular", |
119 | | - "description": "Acceleration to use for inference." |
120 | | - }, |
121 | | - "video_quality": { |
122 | | - "type": "string", |
123 | | - "enum": [ |
124 | | - "low", |
125 | | - "medium", |
126 | | - "high", |
127 | | - "maximum" |
128 | | - ], |
129 | | - "default": "high", |
130 | | - "description": "The quality of the generated video." |
| 53 | + "default": false, |
| 54 | + "description": "Whether the video contains a watermark." |
131 | 55 | }, |
132 | | - "video_write_mode": { |
133 | | - "type": "string", |
134 | | - "enum": [ |
135 | | - "fast", |
136 | | - "balanced", |
137 | | - "small" |
138 | | - ], |
139 | | - "default": "balanced", |
140 | | - "description": "The method used to write the video." |
141 | | - }, |
142 | | - "num_interpolated_frames": { |
143 | | - "type": "integer", |
144 | | - "description": "Number of frames to interpolate between the original frames." |
145 | | - }, |
146 | | - "temporal_downsample_factor": { |
| 56 | + "seed": { |
147 | 57 | "type": "integer", |
148 | | - "description": "Temporal downsample factor for the video." |
| 58 | + "description": "Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen." |
149 | 59 | }, |
150 | | - "enable_auto_downsample": { |
| 60 | + "enhance_prompt": { |
151 | 61 | "type": "boolean", |
152 | | - "description": "The minimum frames per second to downsample the video to." |
153 | | - }, |
154 | | - "auto_downsample_min_fps": { |
155 | | - "type": "number", |
156 | | - "default": 15, |
157 | | - "description": "The minimum frames per second to downsample the video to." |
158 | | - }, |
159 | | - "interpolator_model": { |
160 | | - "type": "string", |
161 | | - "enum": [ |
162 | | - "rife", |
163 | | - "film" |
164 | | - ], |
165 | | - "default": "film", |
166 | | - "description": "The model to use for interpolation. Rife, or film are available." |
167 | | - }, |
168 | | - "sync_mode": { |
169 | | - "type": "boolean", |
170 | | - "description": "The synchronization mode for audio and video. Loose or tight are available." |
| 62 | + "default": true, |
| 63 | + "description": "Whether to enable prompt expansion." |
171 | 64 | } |
172 | 65 | }, |
173 | 66 | "required": [ |
174 | 67 | "model", |
175 | 68 | "prompt", |
176 | | - "video_url" |
| 69 | + "image_url" |
177 | 70 | ], |
178 | | - "title": "alibaba/wan2.2-vace-fun-a14b-depth" |
| 71 | + "title": "alibaba/wan2.2-i2v-plus" |
179 | 72 | } |
180 | 73 | } |
181 | 74 | } |
|
270 | 163 | "x-codeSamples": [ |
271 | 164 | { |
272 | 165 | "lang": "JavaScript", |
273 | | - "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.2-vace-fun-a14b-depth\",\n \"video_url\": \"https://zovi0.github.io/public_misc/kling-v2-master-t2v-racoon.mp4\",\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 }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
| 166 | + "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.2-i2v-plus\",\n \"prompt\": \"Mona Lisa puts on glasses with her hands.\",\n \"image_url\": \"https://s2-111386.kwimgs.com/bs2/mmu-aiplatform-temp/kling/20240620/1.jpeg\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();" |
274 | 167 | }, |
275 | 168 | { |
276 | 169 | "lang": "Python", |
277 | | - "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.2-vace-fun-a14b-depth\",\n \"video_url\": \"https://zovi0.github.io/public_misc/kling-v2-master-t2v-racoon.mp4\",\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 }\n)\n\ndata = response.json()\nprint(data)" |
| 170 | + "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.2-i2v-plus\",\n \"prompt\": \"Mona Lisa puts on glasses with her hands.\",\n \"image_url\": \"https://s2-111386.kwimgs.com/bs2/mmu-aiplatform-temp/kling/20240620/1.jpeg\"\n }\n)\n\ndata = response.json()\nprint(data)" |
278 | 171 | }, |
279 | 172 | { |
280 | 173 | "lang": "cURL", |
281 | | - "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.2-vace-fun-a14b-depth\",\n \"video_url\": \"https://zovi0.github.io/public_misc/kling-v2-master-t2v-racoon.mp4\",\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 }'" |
| 174 | + "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.2-i2v-plus\",\n \"prompt\": \"Mona Lisa puts on glasses with her hands.\",\n \"image_url\": \"https://s2-111386.kwimgs.com/bs2/mmu-aiplatform-temp/kling/20240620/1.jpeg\"\n }'" |
282 | 175 | }, |
283 | 176 | { |
284 | 177 | "lang": "HTTP", |
285 | | - "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.2-vace-fun-a14b-depth\",\n \"video_url\": \"https://zovi0.github.io/public_misc/kling-v2-master-t2v-racoon.mp4\",\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}" |
| 178 | + "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.2-i2v-plus\",\n \"prompt\": \"Mona Lisa puts on glasses with her hands.\",\n \"image_url\": \"https://s2-111386.kwimgs.com/bs2/mmu-aiplatform-temp/kling/20240620/1.jpeg\"\n}" |
286 | 179 | } |
287 | 180 | ] |
288 | 181 | } |
|
0 commit comments