Saltar al cuntegna

Hunyuan Video

Integrar

ID dal model hunyuan-video
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hunyuan-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Questa dumonda: $0,40 400 credits API Lantschar sin questa pagina

Obtegna ina clav API
Tencent · Video

Tes emprim resultat vegn qua

Construis ina dumonda sutvart e l'exequescha cun tia clav API. Outputs vegnan copiads en nossa memorisaziun, conservads per adina u 7 dis gratuitamain.

Construir ina dumonda

Ils controls vegnan generads dal schema dal model. Il code e ​​il pretsch s'actualiseschan durant che ti als midas.

•obligatori

Prompt utilisà sco basa per la generaziun dal video.

aspect_ratio standard 16:9

Proporziun d'aspect da il video d'output.

resolution standard 720p

Resoluziun dal video d'output.

Avanzà num_frames · seed · pro_mode · enable_safety_checker
num_frames standard 129

Dumber da frames per l'output generà.

Valur da seed per la generaziun da video.

POST /run/hunyuan-video?wait=20 calculaziun → $0,40
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/hunyuan-video?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

Executar questa dumonda

Tia clav resta en quest browser: ella vegn tramessa mo al Doitong API e memorisada (localStorage) mo sch'ella scheccas Tiar a memoria. Obtegnair ina clav API

Davart Hunyuan Video

Crea un vídeo a partir d'un prompt de text. Tria `aspect_ratio` 16:9 o 9:16, `resolution` 480p, 580p o 720p, i `num_frames` 129 o 85. `pro_mode` modifica el nombre de passos respecte dels 35 per defecte. Es pot establir una llavor per garantir la reproductibilitat.

Parameters

NumTip StandardPermess Descripziun
promptobligatori
Tipstring
Prompt utilisà sco basa per la generaziun dal video.
seedopziunal
Tipinteger | null
Valur da seed per la generaziun da video.
pro_modeopziunal
Tipboolean
Standardfalse
La generaziun utilisescha 35 pass standardmain.
aspect_ratioopziunal
Tipenum
Standard16:9
16:99:16
Proporziun d'aspect da il video d'output.
resolutionopziunal
Tipenum
Standard720p
480p580p720p
Resoluziun dal video d'output.
num_framesopziunal
Tipenum
Standard129
12985
Dumber da frames per l'output generà.
enable_safety_checkeropziunal
Tipboolean
Standardfalse
Interrutur da controlla da segirezza, dal qual la configuraziun spustada pretenda l'autorisaziun dal conto. Senza questa autorisaziun vegn mintga dumonda controllada independentamain da la configuraziun; true activa il controllader.
obligatori

Output

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "hunyuan-video",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 400,
    "usd": "0.40",
    "charged": 400,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "video": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_name": "0-output.mp4",
      "file_size": 1843200
    },
    "seed": 42
  },
  "outputs": [
    {
      "type": "video",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp4",
      "content_type": "video/mp4",
      "file_size": 1843200,
      "width": 1280,
      "height": 720,
      "duration": 5,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
Tias datotecas, tia decisiunMintga outputs[].url è ina copia en nossa memorisaziun: conservada per adina (pajà per GB-mes) u 7 dis gratuitamain, tenor la configuraziun dal conto u ?storage=.
La medema structura per mintga modeltype, url, content_type, width, height e duration, tant per maletgs sco per video e audio. output è l'object da resultat dal model sez.
Champs da l'output
video
object {url, content_type, file_name, file_size}
seed
integerValur da seed utilisada durant la generaziun da video.

Dapli models: Text a video

Per agents AI: questa pagina sco Markdown è disponibla sut https://doitong.com/rm/developers/models/hunyuan-video.md. Tut ils models e las guidas: https://doitong.com/developers/llms.txt