⌘K

Kirin V4 Flash - Text to Video

kirin_v4_flash_t2v

Kirin V4 Flash supports 720p video output with a 3–20 second target duration through the unified asynchronous generation API

API notes

kirin_v4_flash_t2v generates videos by describing scenes, actions, and camera movement in prompt.

Use the asynchronous task flow: create a task, save its top-level id, poll until completed, then download and store the video. Check model permissions and available balance before calling.

Authentication

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Create a task

Use POST https://cloud.vtrix.ai/model/v1/generation. Complete curl examples appear on the right; put model parameters in input[0].params.

Replace YOUR_API_KEY with your platform API Key. URLs under https://example.com/... are illustrative and must be replaced with accessible media.

ParameterTypeRequiredDescription
modelstringYeskirin_v4_flash_t2v
inputarrayYesInput list; the examples use one object
input[0].paramsobjectYesModel parameters listed below

Model parameters

All fields below are inside input[0].params.

ParameterTypeRequiredDescription
promptstringYesText prompt, including positive and negative descriptions
settingsobjectNoOutput settings; omission uses model defaults
settings.resolutionstringNoOnly 720p; defaults to 720p
settings.durationintegerNoAn integer from 3 to 20 seconds; see “Target duration” for omission behavior
settings.aspect_ratiostringNo21:9, 16:9, 9:16, 1:1, 4:3, 3:4; default 16:9
options.external_task_idstringNoAccount-unique business ID; does not replace the system ID or guarantee idempotent creation
options.watermark_info.enabledbooleanNoWhether to also generate a watermarked result; defaults to false; custom watermarks are unsupported

Target duration

You may omit duration. If supplied, use a JSON integer such as 5, not "5", a fraction, or null.

The target duration follows this priority:

  1. Explicit settings.duration.
  2. An explicit duration recognized by the model in the prompt.
  3. Otherwise, 10 seconds.

Omission does not always mean 10 seconds. Supply the field for a fixed target duration. Final billing uses terminal usage.output_duration, not the media-file duration.

Prompt and media requirements

Prompts allow up to 26,000 English characters or 11,000 non-English characters. Mixed text must satisfy: English characters / 26,000 + non-English characters / 11,000 ≤ 1.

Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

Use GET https://cloud.vtrix.ai/model/v1/generation/task/{task_id}, replacing {task_id} with the top-level id from creation. Keep task IDs as strings and query with an API Key for the same platform account.

StatusMeaningAction
in_queueQueuedContinue polling
in_progressProcessingContinue polling
completedCompletedRead output[].content[]
failedFailedRead error

Poll every 5–10 seconds and increase the interval during extended waits or rate limiting. Creation only acknowledges acceptance; HTTP 200 alone does not indicate generation success. Retain the task ID and keep querying the original task after a client-side timeout.

Response fields

FieldTypeDescription
idstringSystem task ID for subsequent queries
created_atintegerCreation time as a Unix timestamp in milliseconds
statusstringTask status, listed above
modelstringPublic model ID
progressnumberOptional progress; not proof of completion or payment
output[].content[].typestringvideo
output[].content[].urlstringVideo URL; preserve signed query parameters and store the result promptly
output[].content[].durationstring or numberActual media-file duration, which may include fractional seconds
output[].content[].watermark_urlstringOptional watermarked video URL
errorobjectRead code and message on failure

Usage and amounts

The following fields are under usage; use terminal results.

FieldTypeDescription
durationnumberActual media duration in seconds, for display
output_durationnumberOutput billable duration O, in seconds
input_durationnumberNormalized total input-video billable duration I, including video-character subjects; 0 without video input
quantitynumber or nullFinal billable seconds Q, not a video count; may be null until ready
unit_pricestringThe tier unit price determined for this task, in USD/second
coststring or nullPlatform pricing amount in USD; not proof of the actual charge
payable_amountstring or nullLedger payable amount in USD; may be null or omitted
charged_amountstring or nullLedger charged amount in USD; may be null or omitted
user_discountnumberCompatibility field; 0 does not mean free; do not use it to recalculate the final discount
extra_info.DurationnumberCompatibility field for actual media duration, not output billable duration
extra_info.InputDurationnumberCompatibility field for input-video billable duration
input_tokens / output_tokens / total_tokensnumber or nullThis model is billed by seconds; null in the examples

Optional fields may be absent. Null payable_amount or charged_amount does not mean free or uncharged; null quantity or cost must not be treated as zero. Query again later and check the platform ledger.

Failure response example

{
  "id": "task_id",
  "created_at": 1793836800000,
  "status": "failed",
  "model": "kirin_v4_flash_t2v",
  "error": {
    "code": "example_error_code",
    "message": "Example failure message"
  }
}

Billing

This model has no video input and uses the 720p tier without video input. Billable quantity Q equals output billable duration O:

O = usage.output_duration
Q = usage.quantity = O

For example, a media file can last 3.041 seconds while O=3, giving Q=3. Do not substitute media duration for O. See the Omni page for video-input billing.

In the success response on the right, the media lasts 5.041 seconds, while the output billable duration and billable quantity are both 5 seconds.

The response value unit_price=0.100000 and amounts only illustrate fields and arithmetic; they are not a quote. Prices and account discounts are governed by platform pricing and your account terms. Read charged_amount or the platform ledger for the actual charge.

Error handling

SituationAction
Authentication, permission, or balance errorCheck the platform Key, model permissions, and available balance
Invalid parameters or mediaCheck 720p, the 3–20 second range, field types, and media access before resubmitting
Query rate limit or network errorIncrease the interval and retry the original task’s GET query
Task failedRead error.message and resolve the cause; generating again requires a new task
Creation POST timed out or disconnectedDo not blindly repeat creation; query the ID if available, otherwise retain the time and X-Request-Id and contact platform support

For troubleshooting, provide the request time and time zone, model ID, task ID, and X-Request-Id. Do not share the full API Key.