Sozdai LogoDocs
Docs/Vídeo/Texto a imagen

Seedance 2 Mini Ref To Video· Texto a imagen

Texto a imagen
POSThttps://api.foxwire.ai/v1/media/generations

#Enviar una tarea

La generación de medios es asíncrona: obtienes un id de tarea de inmediato, sin esperar.

bash
curl https://api.foxwire.ai/v1/media/generations \
  -H "Authorization: Bearer $CORRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "seedance-2-mini-ref-to-video", "prompt": "a cute robot mascot, flat vector logo" }'
# → { "id": "cmus7q0x9000108l3f5g2abcd", "status": "queued" }

#Parámetros de la solicitud

ParámetroTipoObligatorioPredeterminadoDescripción
promptstring
Text prompt describing the video (3–20000 chars).
reference_image_urlsstring[]No
Reference images (max 9).
reference_video_urlsstring[]No
Reference videos (max 3, total ≤15s).
reference_audio_urlsstring[]No
Reference audios (max 3, total ≤15s).
resolutionstringNo720p
Video resolution. Higher resolution costs more: 720p ≈ 2× of 480p — see the pricing page. (Only 480p / 720p.)
Opciones: 480p, 720p
aspect_ratiostringNo16:9
Aspect ratio.
Opciones: 1:1, 4:3, 3:4, 16:9, 9:16, 21:9, adaptive
durationnumberNo5
Video length in seconds (4–15). Billed per second × resolution.
generate_audiobooleanNotrue
Generate an audio track (default on).
web_searchbooleanNo
Use online search to enrich generation.
nsfw_checkerbooleanNofalse
Content filter; false disables filtering.
callback_urlstringNo
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).

GEThttps://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")

#Ejemplo de respuesta

Al enviar

json
{
  "id": "cmus7q0x9000108l3f5g2abcd",
  "status": "queued",
  "type": "video",
  "model": "seedance-2-mini-ref-to-video"
}

En caso de éxito (tras consultar)

json
{
  "id": "cmus7q0x9000108l3f5g2abcd",
  "status": "succeeded",
  "type": "video",
  "model": "seedance-2-mini-ref-to-video",
  "result": { "urls": ["https://cdn.sozdai.ai/video/1782537315223-b49c0c1b771f.mp4"] },
  "cost": "1.6000",
  "currency": "USD"
}

Campos de respuesta

CampoTipoDescripción
statusstringEstado de la tarea: queued / submitted / succeeded / failed / timeout.
typestringTipo de medio: image / video / music.
modelstringEl modelo que solicitaste.
resultobjectPresente en caso de éxito. result.urls es un array de URL de archivo permanentes.
errorstringMensaje de error, presente cuando la tarea falló.
coststringImporte cobrado por esta tarea: una cadena en USD (p. ej. "0.1200"). Consulta el campo currency.
currencystringCurrency of cost — always "USD".