Skip to content

Commit 9b33dbf

Browse files
Кристина Ореховаclaude
authored andcommitted
docs: update seedance-2-0 schema to match fast version structure
Add x-hideTryItPanel, x-codeSamples (cURL/JS/Python), and components.securitySchemes; remove example.com from Try It panel. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 7edf42a commit 9b33dbf

1 file changed

Lines changed: 99 additions & 28 deletions

File tree

‎docs/api-references/video-models/ByteDance/seedance-2-0.json‎

Lines changed: 99 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@
1919
"application/json": {
2020
"schema": {
2121
"type": "object",
22-
"title": "bytedance/seedance-2-0",
23-
"required": ["model", "prompt"],
2422
"properties": {
2523
"model": {
2624
"type": "string",
27-
"enum": ["bytedance/seedance-2-0"]
28-
},
29-
"provider": {
30-
"type": "string",
31-
"description": "Provider routing override. `bytedance` runs native ByteDance with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the ByteDance -> fal.ai fallback chain. Case-insensitive.",
32-
"example": "auto"
25+
"enum": [
26+
"bytedance/seedance-2-0"
27+
]
3328
},
3429
"prompt": {
3530
"type": "string",
@@ -87,21 +82,46 @@
8782
},
8883
"aspect_ratio": {
8984
"type": "string",
90-
"enum": ["21:9", "16:9", "4:3", "1:1", "3:4", "9:16"],
85+
"enum": [
86+
"21:9",
87+
"16:9",
88+
"4:3",
89+
"1:1",
90+
"3:4",
91+
"9:16"
92+
],
9193
"default": "16:9",
9294
"description": "The aspect ratio of the generated video."
9395
},
9496
"resolution": {
9597
"type": "string",
96-
"enum": ["480p", "720p", "1080p", "4k"],
98+
"enum": [
99+
"480p",
100+
"720p",
101+
"1080p",
102+
"4k"
103+
],
97104
"default": "720p",
98105
"description": "An enumeration where the short side of the video frame determines the resolution."
99106
},
100107
"duration": {
101108
"type": "integer",
102-
"enum": [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15],
103-
"default": "5",
104-
"description": "The length of the output video in seconds."
109+
"description": "The length of the output video in seconds.",
110+
"enum": [
111+
4,
112+
5,
113+
6,
114+
7,
115+
8,
116+
9,
117+
10,
118+
11,
119+
12,
120+
13,
121+
14,
122+
15
123+
],
124+
"default": "5"
105125
},
106126
"generate_audio": {
107127
"type": "boolean",
@@ -116,8 +136,18 @@
116136
"type": "boolean",
117137
"default": false,
118138
"description": "Whether the video contains a watermark."
139+
},
140+
"provider": {
141+
"type": "string",
142+
"description": "Provider routing override. `bytedance` runs native ByteDance with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the ByteDance -> fal.ai fallback chain. Case-insensitive.",
143+
"example": "auto"
119144
}
120-
}
145+
},
146+
"required": [
147+
"model",
148+
"prompt"
149+
],
150+
"title": "bytedance/seedance-2-0"
121151
}
122152
}
123153
}
@@ -128,7 +158,6 @@
128158
"application/json": {
129159
"schema": {
130160
"type": "object",
131-
"required": ["id", "status"],
132161
"properties": {
133162
"id": {
134163
"type": "string",
@@ -137,46 +166,54 @@
137166
},
138167
"status": {
139168
"type": "string",
140-
"enum": ["queued", "generating", "completed", "error"],
169+
"enum": [
170+
"queued",
171+
"generating",
172+
"completed",
173+
"error"
174+
],
141175
"description": "The current status of the generation task.",
142176
"example": "completed"
143177
},
144178
"video": {
145179
"type": "object",
146180
"nullable": true,
147-
"required": ["url"],
148181
"properties": {
149182
"url": {
150183
"type": "string",
151184
"format": "uri",
152185
"description": "The URL where the file can be downloaded from.",
153186
"example": "https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4"
154187
}
155-
}
188+
},
189+
"required": [
190+
"url"
191+
]
156192
},
157193
"error": {
158194
"type": "object",
159195
"nullable": true,
160-
"required": ["name", "message"],
161-
"description": "Description of the error, if any.",
162196
"properties": {
163197
"name": {
164198
"type": "string"
165199
},
166200
"message": {
167201
"type": "string"
168202
}
169-
}
203+
},
204+
"required": [
205+
"name",
206+
"message"
207+
],
208+
"description": "Description of the error, if any."
170209
},
171210
"meta": {
172211
"type": "object",
173212
"nullable": true,
174-
"description": "Additional details about the generation.",
175213
"properties": {
176214
"usage": {
177215
"type": "object",
178216
"nullable": true,
179-
"required": ["credits_used", "usd_spent"],
180217
"properties": {
181218
"credits_used": {
182219
"type": "number",
@@ -188,17 +225,51 @@
188225
"description": "The total amount of money spent by the user in USD.",
189226
"example": 0.06
190227
}
191-
}
228+
},
229+
"required": [
230+
"credits_used",
231+
"usd_spent"
232+
]
192233
}
193-
}
234+
},
235+
"description": "Additional details about the generation."
194236
}
195-
}
237+
},
238+
"required": [
239+
"id",
240+
"status"
241+
]
196242
}
197243
}
198244
}
199245
}
200-
}
246+
},
247+
"x-hideTryItPanel": true,
248+
"x-codeSamples": [
249+
{
250+
"lang": "cURL",
251+
"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\": \"bytedance/seedance-2-0\",\n \"prompt\": \"A menacing evil dragon appears in a distance above the tallest mountain, then rushes toward the camera with its jaws open, revealing massive fangs. We see it's coming.\"\n }'"
252+
},
253+
{
254+
"lang": "JavaScript",
255+
"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\": \"bytedance/seedance-2-0\",\n \"prompt\": \"A menacing evil dragon appears in a distance above the tallest mountain, then rushes toward the camera with its jaws open, revealing massive fangs. We see it's coming.\"\n }),\n });\n\n const data = await response.json();\n console.log(JSON.stringify(data, null, 2));\n}\n\nmain();"
256+
},
257+
{
258+
"lang": "Python",
259+
"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\": \"bytedance/seedance-2-0\",\n \"prompt\": \"A menacing evil dragon appears in a distance above the tallest mountain, then rushes toward the camera with its jaws open, revealing massive fangs. We see it's coming.\"\n }\n)\n\ndata = response.json()\nprint(data)"
260+
}
261+
]
262+
}
263+
}
264+
},
265+
"components": {
266+
"securitySchemes": {
267+
"access-token": {
268+
"scheme": "bearer",
269+
"bearerFormat": "<YOUR_AIMLAPI_KEY>",
270+
"type": "http",
271+
"description": "Bearer key"
201272
}
202273
}
203274
}
204-
}
275+
}

0 commit comments

Comments
 (0)