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

# Video File Reader

Developers can stream pre-recorded video into a Lens by connecting a *Video File Reader* data connector to the [input data stream](/core-concepts/introduction/introduction#lens-data-streams) of a Lens.

Prior to streaming video to a lens, a developer should first **upload their video to the Archetype platform** using the [Files API](/core-concepts/files/files). Upon uploading their video, the developer will receive a **file\_id** that identifies that file throughout the Newton Platform.

For example, the bash command below demonstrates how to upload a local MP4 video from your terminal to the Newton Platform using the [Files API](/core-concepts/files/files).

```bash theme={"system"}
curl https://api.u1.archetypeai.app/v0.5/files \
  -H "Authorization: Bearer $ATAI_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F file="@my_video.mp4"
```

Upon successful upload, you will receive a JSON response similar to:

```bash theme={"system"}
{
  "is_valid":true
  "file_id":"my_video.mp4"
  "file_uid":"2508191b9ce198595febe4"
}
```

Like all data stream connectors, the video file reader can be identified and configured via the following *stream type* and *stream config*:

```
stream_type: video_file_reader
stream_config:
  file_id: "your_video_file_id.mp4"
```

This can be passed to Newton as an [event](/core-concepts/streams/events/overview):

```
event:
  type: input_stream.set
  event_data:
    stream_type: video_file_reader
    stream_config:
      file_id: "your_video_file_id.mp4"
```

# Parameters

You can pass the following parameters to the Video File Reader via the stream\_config.

| Parameter | Description                                                                                                                                            | Required |
| --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| `file_id` | The file\_id of the video you wish to pass to the Video File Reader. The file\_id should correspond to a valid file you've uploaded via the files API. | Yes      |
