.f0rge/wiki/docs/capabilities/t2v-gen.v1.md 4.2 KiB 119 lines Raw

t2v-gen.v1

Status: v1. A published shape is frozen by spec.md section 20.1. Capability key: t2v-gen Route: POST /video/text-to-video

Parts in

One row for each part kind that this capability accepts. A kind that is not in this table is invalid_part.

kindrolerequiredmeaning
textpromptyes, exactly onethe description of the clip to make.
imagefirst_framenoa frame that the clip starts from. At most one.

Parameters

The plugin validates these. A parameter that is not in this table is ignored, not an error (R26). A default of catalogue means the model entry in the catalogue gives the value.

nametypedefaultmeaning
fpsuintcatalogueframes per second of the clip
stepsuintcataloguethe count of denoising steps
guidancefloatcataloguethe strength of the prompt
seeduintnonea fixed seed for a repeatable job

Channels out

One row for each channel that this capability can emit.

channelmimepayload
clipvideo/mp4the whole clip, as one mp4 stream.
progressapplication/json{stage, pct} while the plugin denoises

Terminal metadata

done.meta is vocabulary-defined. The core stores it and never reads it. done without meta means {}.

keytypemeaning
modelstringthe served name that ran the job
fpsuintframes per second of the clip
framesuintthe frame count of the clip
duration_msuintthe clip length in milliseconds
widthuintthe width of each frame, in pixels
heightuintthe height of each frame, in pixels

These keys are present when outcome is completed. They are absent when the outcome is cancelled or expired.

Request

POST /video/text-to-video
{
  "model": "<served-name>",
  "input": [
    {"kind": "text", "role": "prompt", "text": "A drone crosses a frozen lake."},
    {"kind": "image", "role": "first_frame", "mime": "image/png", "inline": "<png bytes>"}
  ],
  "params": {"fps": 16, "steps": 30, "guidance": 5.0, "seed": 7},
  "stream": true
}

Response, no stream

{"job": "019...", "outcome": "completed",
 "clip": {"mime": "video/mp4", "inline": "<mp4 bytes>"},
 "usage": {"frames": 128, "tokens_in": 12},
 "meta": {"model": "<served-name>", "fps": 16, "frames": 128, "duration_ms": 8000,
          "width": 832, "height": 480}}

Stream

event  ch=progress {"stage": "denoise", "pct": 0.4}
event  ch=clip     video/mp4  <mp4 bytes>
done   outcome=completed meta={"model":"<served-name>","fps":16,"frames":128}

Rules

  1. Exactly one text part with role prompt is required. A request without it is invalid_part.
  2. At most one image part is accepted. Its role must be first_frame. A second image part is invalid_part.
  3. An audio, video, tokens, or json part is invalid_part.
  4. The mime of every clip event is video/mp4. The mime is fixed, so this page has no output format parameter.
  5. A fps value below one gives a refusal that names fps.
  6. fps, steps, and guidance default to the catalogue value of the model. A value above the catalogue limit gives a refusal that names that parameter.
  7. meta.fps equals the fps that the job used. meta.frames counts every frame of the clip.
  8. meta.duration_ms is frames scaled by fps, in milliseconds, rounded down.
  9. Every frame of the clip has the size named by meta.width and meta.height. The two keys never name a frame that is missing.
  10. When an image part is present, frame zero of the clip comes from that part.
  11. When seed is given, two jobs with the same request give the same frames, width, and height.
  12. meta never names the seed that the plugin chose.
  13. usage.frames equals meta.frames. usage.tokens_in counts the prompt tokens.
  14. progress.pct never decreases inside one job, and each stage is a non-empty string.
  15. No event follows a cancel. The terminal frame is done with outcome = cancelled, and it carries no metadata keys.
  16. The plugin emits the clip channel and progress events. It emits nothing else for this job.

view raw