> ## Documentation Index
> Fetch the complete documentation index at: https://stir-vid.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How it works

> The pipeline behind StirVid.

StirVid is a thin, opinionated layer on top of our generation infrastructure. This page walks through the pipeline.

## Pipeline

<Steps>
  <Step title="Upload">
    You upload a source clip or paste a public video URL. StirVid accepts standard video formats and validates duration, resolution, and audio track presence up front.
  </Step>

  <Step title="Frame extraction">
    The source video is decoded server-side. Frames and metadata (duration, fps, resolution) are extracted and a driving signal is prepared for the motion engine.
  </Step>

  <Step title="Motion engine">
    The driving signal and your chosen character are handed to our motion engine. Two quality tiers are exposed:

    | Mode  | Notes                                                                      |
    | ----- | -------------------------------------------------------------------------- |
    | `std` | Standard quality, faster turnaround. Good default for previews and social. |
    | `pro` | Higher fidelity, slower render. Use for final output.                      |
  </Step>

  <Step title="Image edits">
    For still images (portraits, thumbnails), StirVid routes the job to the image editor. It applies the character reference and returns a finished still.
  </Step>

  <Step title="Credit deduction">
    Before generation starts, the API returns a **quote** and atomically deducts credits **server-side** from your `CREDITS` balance. Failed jobs are refunded automatically.
  </Step>

  <Step title="Durable job record">
    Every generation writes a durable job record. Output media is archived to storage and served via signed URLs.
  </Step>
</Steps>

<Note>
  Purchases automatically fund the credits ledger. See [Funding Autopilot](/ops/funding-autopilot).
</Note>
