Tài liệu API

article-to-video

Tin tức thành video — Dán link bài báo hoặc nội dung, AI viết kịch bản, đọc lời và dựng thành video tin tức MP4 hoàn chỉnh (TikTok, Reels, YouTube).

type: videooutput: videoTheo tham số — dùng POST /v1/generations/estimate để báo giá

Input — tham số đầu vào

POST/v1/generations

Gửi JSON gồm "model": "article-to-video" và các tham số dưới đây ở cùng cấp. Tham số không có trong bảng sẽ bị từ chối (400).

Tham sốKiểuGiá trị hỗ trợMô tả
modelrequiredstringarticle-to-videoMã model
urlstring

Tối đa 2.000 ký tự

Link bài báo — Điền link bài báo hoặc dán nội dung ở ô bên dưới
textstring

Tối đa 20.000 ký tự

Hoặc nội dung bài viết
target_durationrequiredenum
30s60s90s120s

Mặc định: 60s

Thời lượng video
aspect_ratiorequiredenum
9:1616:91:1

Mặc định: 9:16

Tỉ lệ khung hình
languagerequiredenum
vienzhjakothidesfrde

Mặc định: vi

Ngôn ngữ video
style_presetrequiredenum
news_breakingnews_editorialnews_social_splitnews_text_storynews_listiclenews_photo_storynews_timelinenews_quotenews_sport_resultnews_sport_rankingnews_job_postlife_recipelife_travellife_health_tipslife_howto_stepslife_entertainmentlife_eventengage_quizengage_did_you_knowengage_myth_factengage_social_postengage_countdownengage_pollengage_guessengage_faqnews_football_matchnews_football_transfernews_football_statsnews_realestate_projectnews_realestate_marketnews_realestate_locationnews_market_wrapnews_price_chartnews_crypto_spotlightnews_stock_spotlightminimal_pointsminimal_statsminimal_stepsminimal_compareminimal_quoteminimal_timelineminimal_uiminimal_autominimal_points_darkminimal_stats_darkminimal_steps_darkminimal_compare_darkminimal_quote_darkminimal_timeline_darkminimal_ui_darkminimal_auto_darktech_cardstech_code_editortech_spec_comparetech_github_launchtech_tool_reviewtech_changelogtech_keynotetech_explainertech_explainer_blueprinttech_explainer_hudexplainer_chalkboardexplainer_paperexplainer_isometricexplainer_comicexplainer_flashcardproduct_showcaseproduct_flash_saleproduct_lookbookproduct_reviewsproduct_compareproduct_top_listproduct_ugcsaas_introbrand_ui_tourbrand_logo_revealbrand_social_proofbrand_launchbrand_problem_solutionbrand_pricing

Mặc định: news_editorial

Mẫu dựng video
voiceenum
DDC251VV0002VV0012ECF913VV0041DFE237VV0022EFC483VV0021VV0009VV0024DFE601VV0005BEB861ADC689VV0006AEE454F00277VV0045VI0001VV0003VV0086DBD914VV0019EFC482VI0010BAD084VV0038F06966VI0017VI0005VV0065VV0046CAF969VI0019VV0007F00231F06846VV0048VV0069EDB974VV0059VV0089VV0075F05503VV0020BCB483VV0066EFC481VI0002

Mặc định: VV0012

Giọng đọc — Bấm ▶ để nghe thử; cần giọng khác (hơn 3.000 giọng, nhiều ngôn ngữ) thì nhập mã giọng ở ô bên dưới

Chỉ có hiệu lực khi language ∈ vi

voice_codestring

Tối đa 20 ký tự

Hoặc nhập mã giọng khác (tuỳ chọn) — Điền mã giọng thì bỏ qua giọng đã chọn ở trên. Video ngôn ngữ khác tiếng Việt: bỏ trống để AI dùng giọng mặc định của ngôn ngữ đó
  • Tham số file (string URL) nhận link công khai http(s) — máy chủ tự tải về — hoặc URL trả về từ API tải file POST /account/ai/uploads.
  • Bỏ trống tham số không bắt buộc thì dùng giá trị mặc định.

Ví dụ request

curl -X POST https://nov.ai.vn/api/v1/generations \
  -H "X-API-Key: $API_KEY" -H "Content-Type: application/json" \
  -d '{
  "model": "article-to-video",
  "target_duration": "60s",
  "aspect_ratio": "9:16",
  "language": "vi",
  "style_preset": "news_editorial"
}'

Output — kết quả trả về

Tác vụ chạy bất đồng bộ. POST /v1/generations trả ngay đối tượng generation với status queued hoặc processing; hỏi lại GET /v1/generations/{id} mỗi 5–10 giây tới khi status là succeeded, failed hoặc cancelled.

GET/v1/generations/{id}
{
  "id": "3f1c...-uuid",
  "object": "generation",
  "code": "T8KQ2M4X",
  "model": "article-to-video",
  "status": "succeeded",       // queued | processing | succeeded | failed | cancelled
  "progress": 100,
  "cost": 2400,                // số tiền đã trừ
  "currency": "VND",
  "refunded": false,
  "output": {
    "type": "video",
    "files": [{ "url": "https://nov.ai.vn/uploads/ai/outputs/....mp4", "type": "video", "name": "video.mp4" }],
    "text": null
  },
  "error": null,
  "created_at": "2026-10-30T08:00:00.000Z",
  "completed_at": "2026-10-30T08:01:12.000Z"
}
TrườngÝ nghĩa
output.files[].urlLink file kết quả — nên tải về hệ thống của bạn, file trên máy chủ có thể được dọn sau một thời gian.
output.textNội dung văn bản (chỉ có với model trả văn bản).
costSố tiền VND đã trừ vào số dư; lỗi hoặc huỷ thì tự hoàn lại (refunded = true).
errorLý do lỗi khi status = failed.

Báo giá trước khi chạy

POST/v1/generations/estimate

Cùng body với POST /v1/generations, không chạy và không trừ tiền.

# => { "object": "estimate", "model": "article-to-video", "cost": 2400, "currency": "VND" }
Lấy API key
article-to-video · Tài liệu API | NOV AI