Docs/Video/Tekst naar afbeelding
Seedance 2 Ref To Video· Tekst naar afbeelding
Tekst naar afbeelding
POST
https://api.foxwire.ai/v1/media/generationsPricing Model
480p 11,05 ₽/s · 720p 22,1 ₽/s · 1080p 55,25 ₽/s × 4–15s
Execution Flow
Asynchronous submission model. Submitting requests queues background workers.
#Een taak indienen
Mediageneratie is asynchroon: je krijgt direct een taak-id, zonder te wachten.
bash
curl https://api.foxwire.ai/v1/media/generations \
-H "Authorization: Bearer $CORRY_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "seedance-2-ref-to-video", "prompt": "a cute robot mascot, flat vector logo" }'
# → { "id": "cmus7q0x9000108l3f5g2abcd", "status": "queued" }#Aanvraagparameters
| Parameter | Type | Verplicht | Standaard | Beschrijving |
|---|---|---|---|---|
prompt | string | Ja | — | Text prompt describing the video (3–20000 chars). |
reference_image_urls | string[] | Nee | — | Reference images (max 9). |
reference_video_urls | string[] | Nee | — | Reference videos (max 3, total ≤15s). |
reference_audio_urls | string[] | Nee | — | Reference audios (max 3, total ≤15s). |
resolution | string | Nee | 720p | Video resolution. Higher resolution costs more: 720p ≈ 2×, 1080p ≈ 5× of 480p — see the pricing page. (4K not supported.) Opties: 480p, 720p, 1080p |
aspect_ratio | string | Nee | 16:9 | Aspect ratio. Opties: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive |
duration | number | Nee | 5 | Video length in seconds (4–15). Billed per second × resolution. |
generate_audio | boolean | Nee | true | Generate an audio track (default on). |
web_search | boolean | Nee | — | Use online search to enrich generation. |
nsfw_checker | boolean | Nee | false | Content filter; false disables filtering. |
callback_url | string | Nee | — | Optional public http(s) URL. We POST the task result here the moment generation finishes (success or failure). |
#Poll for the result
Generation runs asynchronously — the submit call returns immediately with a task id. Poll this endpoint with that id every few seconds until status becomes succeeded (result ready) or a terminal error (failed / timeout).
GET
https://api.foxwire.ai/v1/media/generations/{id}bash
# take the id from the submit response, then poll every ~3s
curl https://api.foxwire.ai/v1/media/generations/cmus7q0x9000108l3f5g2abcd \
-H "Authorization: Bearer $CORRY_KEY"
# repeat until "status" is "succeeded" (or "failed" / "timeout")#Antwoordvoorbeeld
Bij indienen
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "queued",
"type": "video",
"model": "seedance-2-ref-to-video"
}Bij succes (na pollen)
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "succeeded",
"type": "video",
"model": "seedance-2-ref-to-video",
"result": { "urls": ["https://cdn.sozdai.ai/video/1782537315223-b49c0c1b771f.mp4"] },
"cost": "1.6000",
"currency": "USD"
}Antwoordvelden
| Veld | Type | Beschrijving |
|---|---|---|
status | string | Taakstatus: queued / submitted / succeeded / failed / timeout. |
type | string | Mediatype: image / video / music. |
model | string | Het model dat je hebt aangevraagd. |
result | object | Aanwezig bij succes. result.urls is een array van permanente bestands-URL's. |
error | string | Foutmelding, aanwezig wanneer de taak is mislukt. |
cost | string | Voor deze taak in rekening gebracht bedrag — een USD-string (bijv. "0.1200"). Zie het currency-veld. |
currency | string | Currency of cost — always "USD". |