Docs/Vidéo/Texte vers image
Seedance 2 Fast Image To Video· Texte vers image
Texte vers image
POST
https://api.foxwire.ai/v1/media/generationsPricing Model
480p 7,01 ₽/s · 720p 14,03 ₽/s × 4–15s
Execution Flow
Asynchronous submission model. Submitting requests queues background workers.
#Soumettre une tâche
La génération de médias est asynchrone : vous obtenez immédiatement un identifiant de tâche, sans attendre.
bash
curl https://api.foxwire.ai/v1/media/generations \
-H "Authorization: Bearer $CORRY_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "seedance-2-fast-image-to-video", "prompt": "a cute robot mascot, flat vector logo" }'
# → { "id": "cmus7q0x9000108l3f5g2abcd", "status": "queued" }#Paramètres de la requête
| Paramètre | Type | Obligatoire | Par défaut | Description |
|---|---|---|---|---|
prompt | string | Oui | — | Text prompt describing the video (3–20000 chars). |
first_frame_url | string | Non | — | First-frame image (URL or asset://id). |
last_frame_url | string | Non | — | Last-frame image; pair with first_frame_url for first&last-frame mode. |
resolution | string | Non | 720p | Video resolution. Higher resolution costs more: 720p ≈ 2× of 480p — see the pricing page. (Only 480p / 720p.) Options: 480p, 720p |
aspect_ratio | string | Non | 16:9 | Aspect ratio. Options: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive |
duration | number | Non | 5 | Video length in seconds (4–15). Billed per second × resolution. |
generate_audio | boolean | Non | true | Generate an audio track (default on). |
web_search | boolean | Non | — | Use online search to enrich generation. |
nsfw_checker | boolean | Non | false | Content filter; false disables filtering. |
callback_url | string | Non | — | 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")#Exemple de réponse
À la soumission
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "queued",
"type": "video",
"model": "seedance-2-fast-image-to-video"
}En cas de succès (après interrogation)
json
{
"id": "cmus7q0x9000108l3f5g2abcd",
"status": "succeeded",
"type": "video",
"model": "seedance-2-fast-image-to-video",
"result": { "urls": ["https://cdn.sozdai.ai/video/1782537315223-b49c0c1b771f.mp4"] },
"cost": "1.6000",
"currency": "USD"
}Champs de réponse
| Champ | Type | Description |
|---|---|---|
status | string | Statut de la tâche : queued / submitted / succeeded / failed / timeout. |
type | string | Type de média : image / video / music. |
model | string | Le modèle que vous avez demandé. |
result | object | Présent en cas de succès. result.urls est un tableau d'URL de fichiers permanentes. |
error | string | Message d'erreur, présent lorsque la tâche a échoué. |
cost | string | Montant facturé pour cette tâche — une chaîne en USD (ex. "0.1200"). Voir le champ currency. |
currency | string | Currency of cost — always "USD". |