> ## Documentation Index
> Fetch the complete documentation index at: https://docs.physionlabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Video inputs

> Evaluate a local file, a public URL, or a previously uploaded video.

Pass one video source in `input.video`:

| Source         | Python                                     | TypeScript                                 |
| -------------- | ------------------------------------------ | ------------------------------------------ |
| Local file     | `{"path": "./video.mp4"}`                  | `{ path: "./video.mp4" }`                  |
| Public URL     | `{"url": "https://example.com/video.mp4"}` | `{ url: "https://example.com/video.mp4" }` |
| Uploaded video | `{"upload_id": video.id}`                  | `{ upload_id: video.id }`                  |

Local paths are relative to your process's working directory. Both `create()` and
`submit()` upload and validate a local file automatically. A URL must point directly
to a downloadable video without authentication; keep it accessible until the evaluation finishes.

## Requirements

* MP4 container with H.264/AVC video.
* Up to 15 seconds and 50 MiB (52,428,800 bytes).
* Optional prompt, up to 2,500 characters. With a prompt, Galileo checks visual
  glitches and prompt alignment; without one, it checks visual glitches only.

## Reuse an upload

Upload once when you want to evaluate the same video with different prompts.
The upload call waits for validation; reuse the ID when its status is `ready`.
The examples below use the `client` from the [Quickstart](/).

<Tabs>
  <Tab title="Python">
    ```python theme={null}
    video = client.videos.upload("./video.mp4")
    if video.status.value != "ready":
        raise ValueError("Video failed validation.")

    evaluation = client.evaluations.create(
        model="galileo-1.0",
        input={"video": {"upload_id": video.id}, "prompt": "A red ball bounces twice."},
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ```ts theme={null}
    const video = await client.videos.upload({ path: "./video.mp4" });
    if (video.status !== "ready") throw new Error("Video failed validation.");

    const evaluation = await client.evaluations.create({
      model: "galileo-1.0",
      input: { video: { upload_id: video.id }, prompt: "A red ball bounces twice." },
    });
    ```
  </Tab>
</Tabs>
