> ## 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.

> ## Agent Instructions
> Start with /introduction/getting-started. Use the Direct Query API (POST /query) with the Newton Fusion model (text, image, and video reasoning) or the Newton Omega encoder (time-series embeddings). ATAI_API_ENDPOINT must include the version path: /v0.5 for most APIs, /v0.6 for the Fine-Tuning Service. Pages whose descriptions are marked (Archived) document the legacy Lens runtime — do not use them for new projects.

# JSONL File Reader

> (Archived) Legacy Lens runtime: stream JSONL data into a lens with the JSONL File Reader connector.

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

Prior to streaming JSONL data to a lens, a developer should first **upload their JSONL file to the Archetype platform** using the [Files API](/core-concepts/files/files). Upon uploading their JSONL file, 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 JSONL file from your terminal to the Archetype 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_data.jsonl"
```

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

```bash theme={"system"}
{
  "is_valid":true
  "file_id":"my_data.jsonl"
  "file_uid":"25081907c598752e7e71ef"
}
```

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

```
stream_type: jsonl_file_reader
stream_config:
  file_id: "your_file_id.jsonl"
```

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

```
event:
  type: input_stream.set
  event_data:
    stream_type: jsonl_file_reader
    stream_config:
      file_id: "your_file_id.jsonl"
```

# Parameters

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

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