# Beta

# Indexes

## Get Index

`$ llp beta:indexes get`

**get** `/api/v1/indexes/{index_id}`

Get an index by ID.

### Parameters

- `--index-id: string`

- `--expand: optional array of "sync_in_progress"`

  Fields to expand. Supported value: sync_in_progress.

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaIndexGetResponse: object { id, export_config_id, name, 11 more }`

  A searchable index over a directory of documents.

  - `id: string`

    Unique identifier

  - `export_config_id: string`

    ID of the export configuration.

  - `name: string`

    Index name.

  - `output_directory_id: string`

    ID of the output directory holding the indexed files.

  - `project_id: string`

    Project this index belongs to.

  - `source_directory_id: string`

    ID of the source directory.

  - `sync_config_id: string`

    ID of the sync configuration.

  - `created_at: optional string`

    Creation datetime

  - `description: optional string`

    Index description.

  - `last_exported_at: optional string`

    Last export time.

  - `last_synced_at: optional string`

    Last sync time.

  - `metadata: optional map[unknown]`

    Build state and diagnostic info.

  - `sync_in_progress: optional boolean`

    Whether the index is syncing its source or exporting the result. Requires `expand=sync_in_progress`.

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:indexes get \
  --api-key 'My API Key' \
  --index-id index_id
```

#### Response

```json
{
  "id": "id",
  "export_config_id": "export_config_id",
  "name": "name",
  "output_directory_id": "output_directory_id",
  "project_id": "project_id",
  "source_directory_id": "source_directory_id",
  "sync_config_id": "sync_config_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "last_exported_at": "2019-12-27T18:11:19.117Z",
  "last_synced_at": "2019-12-27T18:11:19.117Z",
  "metadata": {
    "foo": "bar"
  },
  "sync_in_progress": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Index

`$ llp beta:indexes delete`

**delete** `/api/v1/indexes/{index_id}`

Delete an index.

### Parameters

- `--index-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Example

```cli
llp beta:indexes delete \
  --api-key 'My API Key' \
  --index-id index_id
```

## Create Index

`$ llp beta:indexes create`

**post** `/api/v1/indexes`

Create a searchable index over a source directory.

### Parameters

- `--source-directory-id: string`

  Body param: ID of the source directory containing your documents.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--description: optional string`

  Body param: Optional description of the index.

- `--name: optional string`

  Body param: Optional display name for the index. If omitted, the index is named after the source directory.

- `--product: optional array of object { product_config_id, product_type }`

  Body param: Product configurations for syncing. Omit to use a default parse configuration. Include an explicit entry per product type (e.g. parse, extract) to override the default.

- `--store-attachment: optional array of string`

  Body param: Attachment kinds to store alongside parsed output. Each entry must be one of: screenshots, items. For example, ['screenshots'] renders and stores per-page screenshots; ['items'] stores structured items with bounding boxes. Omit or pass an empty list to skip attachments.

- `--sync-frequency: optional string`

  Body param: How often to re-run the sync. One of: manual, daily, on_source_change. Defaults to manual.

- `--vector-target: optional "DEFAULT" or "DISABLED"`

  Body param: Vector export destination for the index. 'DEFAULT' exports to the managed vector DB destination resolved from configuration. 'DISABLED' skips vector export — the export destination falls back to 'Download'.

### Returns

- `BetaIndexNewResponse: object { id, export_config_id, name, 11 more }`

  A searchable index over a directory of documents.

  - `id: string`

    Unique identifier

  - `export_config_id: string`

    ID of the export configuration.

  - `name: string`

    Index name.

  - `output_directory_id: string`

    ID of the output directory holding the indexed files.

  - `project_id: string`

    Project this index belongs to.

  - `source_directory_id: string`

    ID of the source directory.

  - `sync_config_id: string`

    ID of the sync configuration.

  - `created_at: optional string`

    Creation datetime

  - `description: optional string`

    Index description.

  - `last_exported_at: optional string`

    Last export time.

  - `last_synced_at: optional string`

    Last sync time.

  - `metadata: optional map[unknown]`

    Build state and diagnostic info.

  - `sync_in_progress: optional boolean`

    Whether the index is syncing its source or exporting the result. Requires `expand=sync_in_progress`.

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:indexes create \
  --api-key 'My API Key' \
  --source-directory-id dir-abc123
```

#### Response

```json
{
  "id": "id",
  "export_config_id": "export_config_id",
  "name": "name",
  "output_directory_id": "output_directory_id",
  "project_id": "project_id",
  "source_directory_id": "source_directory_id",
  "sync_config_id": "sync_config_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "last_exported_at": "2019-12-27T18:11:19.117Z",
  "last_synced_at": "2019-12-27T18:11:19.117Z",
  "metadata": {
    "foo": "bar"
  },
  "sync_in_progress": true,
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Sync Index

`$ llp beta:indexes sync`

**post** `/api/v1/indexes/{index_id}/sync`

Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.

### Parameters

- `--index-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaIndexSyncResponse: unknown`

### Example

```cli
llp beta:indexes sync \
  --api-key 'My API Key' \
  --index-id index_id
```

#### Response

```json
{}
```

## List Indexes

`$ llp beta:indexes list`

**get** `/api/v1/indexes`

List indexes for the current project.

### Parameters

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

- `--source-directory-id: optional string`

### Returns

- `IndexQueryResponse: object { items, next_page_token, total_size }`

  Paginated list of indexes.

  - `items: array of object { id, export_config_id, name, 11 more }`

    The list of items.

    - `id: string`

      Unique identifier

    - `export_config_id: string`

      ID of the export configuration.

    - `name: string`

      Index name.

    - `output_directory_id: string`

      ID of the output directory holding the indexed files.

    - `project_id: string`

      Project this index belongs to.

    - `source_directory_id: string`

      ID of the source directory.

    - `sync_config_id: string`

      ID of the sync configuration.

    - `created_at: optional string`

      Creation datetime

    - `description: optional string`

      Index description.

    - `last_exported_at: optional string`

      Last export time.

    - `last_synced_at: optional string`

      Last sync time.

    - `metadata: optional map[unknown]`

      Build state and diagnostic info.

    - `sync_in_progress: optional boolean`

      Whether the index is syncing its source or exporting the result. Requires `expand=sync_in_progress`.

    - `updated_at: optional string`

      Update datetime

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:indexes list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "export_config_id": "export_config_id",
      "name": "name",
      "output_directory_id": "output_directory_id",
      "project_id": "project_id",
      "source_directory_id": "source_directory_id",
      "sync_config_id": "sync_config_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "last_exported_at": "2019-12-27T18:11:19.117Z",
      "last_synced_at": "2019-12-27T18:11:19.117Z",
      "metadata": {
        "foo": "bar"
      },
      "sync_in_progress": true,
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

# Retrieval

## Retrieve

`$ llp beta:retrieval retrieve`

**post** `/api/v1/retrieval/retrieve`

Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.

### Parameters

- `--index-id: string`

  Body param: ID of the index to retrieve against.

- `--query: string`

  Body param: Natural-language query to retrieve relevant chunks.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--custom-filters: optional map[object { operator, value }  or array of object { operator, value } ]`

  Body param: Filters on user-defined metadata fields.

- `--full-text-pipeline-weight: optional number`

  Body param: Weight of the full-text search pipeline (0-1).

- `--num-candidates: optional number`

  Body param: Number of candidates for approximate nearest neighbor search.

- `--rerank: optional object { enabled, top_n }`

  Body param: Reranking configuration applied after hybrid search. Enabled by default.

- `--score-threshold: optional number`

  Body param: Minimum score threshold for returned results.

- `--static-filters: optional object { parsed_directory_file_id }`

  Body param: Filters on built-in document fields (page range, chunk index, etc.).

- `--top-k: optional number`

  Body param: Maximum number of results to return. Values above 500 are capped at 500.

- `--vector-pipeline-weight: optional number`

  Body param: Weight of the vector search pipeline (0-1).

### Returns

- `BetaRetrievalGetResponse: object { results }`

  Response containing retrieval results.

  - `results: array of object { content, metadata, rerank_score, 2 more }`

    Ordered list of retrieved chunks.

    - `content: string`

      Text content of the retrieved chunk.

    - `metadata: optional map[string or number or number or 3 more]`

      User-defined metadata associated with the chunk.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: number`

      - `union_member_3: boolean`

      - `union_member_4: unknown`

      - `MetadataListValue: array of string`

    - `rerank_score: optional number`

      Relevance score from the reranker, if reranking was applied.

    - `score: optional number`

      Hybrid search relevance score.

    - `static_fields: optional object { attachments, chunk_end_char, chunk_index, 5 more }`

      Built-in fields stored for every exported chunk.

      - `attachments: optional array of object { attachment_name, source_id, type }`

        Attachments associated with the chunk

        - `attachment_name: string`

          Attachment-relative path, e.g. 'screenshots/page_7.jpg'.

        - `source_id: string`

          File ID to pass as source_id when fetching the attachment.

        - `type: string`

          Attachment kind, e.g. 'screenshot', 'items'.

      - `chunk_end_char: optional number`

        End character offset of the chunk.

      - `chunk_index: optional number`

        Index of the chunk within the file.

      - `chunk_start_char: optional number`

        Start character offset of the chunk.

      - `chunk_token_count: optional number`

        Token count of the chunk.

      - `page_range_end: optional number`

        Last page number covered by this chunk.

      - `page_range_start: optional number`

        First page number covered by this chunk.

      - `parsed_directory_file_id: optional string`

        ID of the parsed file.

### Example

```cli
llp beta:retrieval retrieve \
  --api-key 'My API Key' \
  --index-id idx-abc123 \
  --query 'What are the key findings?'
```

#### Response

```json
{
  "results": [
    {
      "content": "content",
      "metadata": {
        "foo": "string"
      },
      "rerank_score": 0,
      "score": 0,
      "static_fields": {
        "attachments": [
          {
            "attachment_name": "attachment_name",
            "source_id": "source_id",
            "type": "type"
          }
        ],
        "chunk_end_char": 0,
        "chunk_index": 0,
        "chunk_start_char": 0,
        "chunk_token_count": 0,
        "page_range_end": 0,
        "page_range_start": 0,
        "parsed_directory_file_id": "parsed_directory_file_id"
      }
    }
  ]
}
```

## Find Files

`$ llp beta:retrieval find`

**post** `/api/v1/retrieval/files/find`

Search for files by name.

### Parameters

- `--index-id: string`

  Body param: ID of the index to search within.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--file-name: optional string`

  Body param: Exact file name to match.

- `--file-name-contains: optional string`

  Body param: Substring match on file name (case-insensitive).

- `--page-size: optional number`

  Body param: The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.

- `--page-token: optional string`

  Body param: A page token, received from a previous list call. Provide this to retrieve the subsequent page.

### Returns

- `FileFindResult: object { items, next_page_token, total_size }`

  Paginated file find results.

  - `items: array of object { file_id, file_name }`

    The list of items.

    - `file_id: string`

      ID of the file.

    - `file_name: string`

      Display name of the file.

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:retrieval find \
  --api-key 'My API Key' \
  --index-id idx-abc123
```

#### Response

```json
{
  "items": [
    {
      "file_id": "file_id",
      "file_name": "file_name"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Grep File

`$ llp beta:retrieval grep`

**post** `/api/v1/retrieval/files/grep`

Grep within a file's parsed content using a regex pattern.

### Parameters

- `--file-id: string`

  Body param: ID of the file to grep.

- `--index-id: string`

  Body param: ID of the index the file belongs to.

- `--pattern: string`

  Body param: Regex pattern to search for.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--context-chars: optional number`

  Body param: Number of characters of context to include before and after the matched pattern in the content field of the response

- `--page-size: optional number`

  Body param: The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.

- `--page-token: optional string`

  Body param: A page token, received from a previous list call. Provide this to retrieve the subsequent page.

### Returns

- `FileGrepResult: object { items, next_page_token, total_size }`

  Paginated grep results for a file.

  - `items: array of object { content, end_char, start_char }`

    The list of items.

    - `content: string`

      Matched text content.

    - `end_char: number`

      End character offset of the match.

    - `start_char: number`

      Start character offset of the match.

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:retrieval grep \
  --api-key 'My API Key' \
  --file-id file_id \
  --index-id idx-abc123 \
  --pattern 'revenue|profit'
```

#### Response

```json
{
  "items": [
    {
      "content": "content",
      "end_char": 0,
      "start_char": 0
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Read File

`$ llp beta:retrieval read`

**post** `/api/v1/retrieval/files/read`

Read the parsed text content of a specific file.

### Parameters

- `--file-id: string`

  Body param: ID of the file to read.

- `--index-id: string`

  Body param: ID of the index the file belongs to.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--max-length: optional number`

  Body param: Maximum number of characters to read from the offset.

- `--offset: optional number`

  Body param: Starting character offset.

### Returns

- `BetaRetrievalReadResponse: object { content }`

  File read result.

  - `content: string`

    Parsed text content of the file.

### Example

```cli
llp beta:retrieval read \
  --api-key 'My API Key' \
  --file-id file_id \
  --index-id idx-abc123
```

#### Response

```json
{
  "content": "content"
}
```

# Chat

## List Sessions

`$ llp beta:chat list`

**get** `/api/v1/chat`

List all chat sessions for the current project.

### Parameters

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

### Returns

- `SessionList: object { items, next_page_token }`

  Paginated list of chat sessions.

  - `items: array of object { last_updated_at, session_id, shared_access, 3 more }`

    Chat sessions for the current page.

    - `last_updated_at: string`

      ISO-format timestamp showing when the session was last updated.

    - `session_id: string`

      Unique session identifier.

    - `shared_access: "query" or "read_only"`

      What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions).

      - `"query"`

      - `"read_only"`

    - `generated_title: optional string`

      Auto-generated title derived from the first user message.

    - `index_ids: optional array of string`

      Indexes this session is bound to. Null on unbound sessions.

    - `job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }`

      Token usage and status from the most recent run. Null if the session has not been run yet.

      - `duration_ms: optional number`

      - `error: optional string`

      - `export_config_ids: optional array of string`

      - `is_error: optional boolean`

      - `total_input_tokens: optional number`

      - `total_output_tokens: optional number`

      - `turns: optional number`

  - `next_page_token: optional string`

    Opaque token to retrieve the next page. Omitted when there are no further pages.

### Example

```cli
llp beta:chat list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "items": [
    {
      "last_updated_at": "2026-04-22T12:34:41.342245",
      "session_id": "ses-abc123",
      "shared_access": "read_only",
      "generated_title": "What were the main findings in Q3?...",
      "index_ids": [
        "idx-abc123",
        "idx-def456"
      ],
      "job_metadata": {
        "duration_ms": 0,
        "error": "error",
        "export_config_ids": [
          "string"
        ],
        "is_error": true,
        "total_input_tokens": 0,
        "total_output_tokens": 0,
        "turns": 0
      }
    }
  ],
  "next_page_token": "next_page_token"
}
```

## Create Session

`$ llp beta:chat create`

**post** `/api/v1/chat`

Create a chat session, optionally bound to indexes (locked after the first message).

### Parameters

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--index-id: optional array of string`

  Body param: Indexes this session will retrieve from. Once set and the first message has been sent, the source set is locked for the session's lifetime. Leave null to create an unbound session.

- `--shared-access: optional "query" or "read_only"`

  Body param: What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions). Null follows the deployment default.

### Returns

- `BetaChatNewResponse: object { last_updated_at, session_id, shared_access, 3 more }`

  Summary of a chat session, including its title and last run metadata.

  - `last_updated_at: string`

    ISO-format timestamp showing when the session was last updated.

  - `session_id: string`

    Unique session identifier.

  - `shared_access: "query" or "read_only"`

    What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions).

    - `"query"`

    - `"read_only"`

  - `generated_title: optional string`

    Auto-generated title derived from the first user message.

  - `index_ids: optional array of string`

    Indexes this session is bound to. Null on unbound sessions.

  - `job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }`

    Token usage and status from the most recent run. Null if the session has not been run yet.

    - `duration_ms: optional number`

    - `error: optional string`

    - `export_config_ids: optional array of string`

    - `is_error: optional boolean`

    - `total_input_tokens: optional number`

    - `total_output_tokens: optional number`

    - `turns: optional number`

### Example

```cli
llp beta:chat create \
  --api-key 'My API Key'
```

#### Response

```json
{
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "shared_access": "read_only",
  "generated_title": "What were the main findings in Q3?...",
  "index_ids": [
    "idx-abc123",
    "idx-def456"
  ],
  "job_metadata": {
    "duration_ms": 0,
    "error": "error",
    "export_config_ids": [
      "string"
    ],
    "is_error": true,
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "turns": 0
  }
}
```

## Get Full Session

`$ llp beta:chat retrieve`

**get** `/api/v1/chat/{session_id}`

Retrieve a full session by ID, including its event history.

### Parameters

- `--session-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaChatGetResponse: object { events, last_updated_at, session_id, 4 more }`

  Full chat session including its complete event history.

  - `events: array of object { error, is_error, usage, 2 more }  or object { content, type }  or object { content, type }  or 5 more`

    Ordered list of events that make up the conversation history.

    - `stop: object { error, is_error, usage, 2 more }`

      - `error: string`

      - `is_error: boolean`

      - `usage: object { duration_ms, total_input_tokens, total_output_tokens, turns }`

        - `duration_ms: optional number`

        - `total_input_tokens: optional number`

        - `total_output_tokens: optional number`

        - `turns: optional number`

      - `skipped_index_ids: optional array of string`

        Requested indexes this turn could not query.

      - `type: optional "stop"`

        - `"stop"`

    - `text_delta: object { content, type }`

      - `content: string`

      - `type: optional "text_delta"`

        - `"text_delta"`

    - `text: object { content, type }`

      - `content: string`

      - `type: optional "text"`

        - `"text"`

    - `thinking_delta: object { content, type }`

      - `content: string`

      - `type: optional "thinking_delta"`

        - `"thinking_delta"`

    - `thinking: object { content, type }`

      - `content: string`

      - `type: optional "thinking"`

        - `"thinking"`

    - `tool_call: object { arguments, call_id, name, type }`

      - `arguments: map[unknown]`

      - `call_id: string`

      - `name: string`

      - `type: optional "tool_call"`

        - `"tool_call"`

    - `tool_result: object { call_id, name, result, 2 more }`

      - `call_id: string`

      - `name: string`

      - `result: unknown`

      - `image_attachment: optional object { attachment_name, source_id }`

        Coordinates for lazily resolving a page screenshot presigned URL.

        - `attachment_name: string`

        - `source_id: string`

      - `type: optional "tool_result"`

        - `"tool_result"`

    - `user_input: object { content, type }`

      - `content: string`

      - `type: optional "user_input"`

        - `"user_input"`

  - `last_updated_at: string`

    ISO-format timestamp showing when the session was last updated.

  - `session_id: string`

    Unique session identifier.

  - `shared_access: "query" or "read_only"`

    What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions).

    - `"query"`

    - `"read_only"`

  - `generated_title: optional string`

    Auto-generated title derived from the first user message.

  - `index_ids: optional array of string`

    Indexes this session is bound to. Null on unbound sessions.

  - `job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }`

    Token usage and status from the most recent run. Null if the session has not been run yet.

    - `duration_ms: optional number`

    - `error: optional string`

    - `export_config_ids: optional array of string`

    - `is_error: optional boolean`

    - `total_input_tokens: optional number`

    - `total_output_tokens: optional number`

    - `turns: optional number`

### Example

```cli
llp beta:chat retrieve \
  --api-key 'My API Key' \
  --session-id session_id
```

#### Response

```json
{
  "events": [
    {
      "error": "error",
      "is_error": true,
      "usage": {
        "duration_ms": 0,
        "total_input_tokens": 0,
        "total_output_tokens": 0,
        "turns": 0
      },
      "skipped_index_ids": [
        "string"
      ],
      "type": "stop"
    }
  ],
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "shared_access": "read_only",
  "generated_title": "What were the main findings in Q3?...",
  "index_ids": [
    "idx-abc123",
    "idx-def456"
  ],
  "job_metadata": {
    "duration_ms": 0,
    "error": "error",
    "export_config_ids": [
      "string"
    ],
    "is_error": true,
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "turns": 0
  }
}
```

## Delete Session

`$ llp beta:chat delete`

**delete** `/api/v1/chat/{session_id}`

Delete a session.

### Parameters

- `--session-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Example

```cli
llp beta:chat delete \
  --api-key 'My API Key' \
  --session-id session_id
```

## Get Session Summary

`$ llp beta:chat get-summary`

**get** `/api/v1/chat/{session_id}/summary`

Retrieve a session summary by ID.

### Parameters

- `--session-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaChatGetSummaryResponse: object { last_updated_at, session_id, shared_access, 3 more }`

  Summary of a chat session, including its title and last run metadata.

  - `last_updated_at: string`

    ISO-format timestamp showing when the session was last updated.

  - `session_id: string`

    Unique session identifier.

  - `shared_access: "query" or "read_only"`

    What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions).

    - `"query"`

    - `"read_only"`

  - `generated_title: optional string`

    Auto-generated title derived from the first user message.

  - `index_ids: optional array of string`

    Indexes this session is bound to. Null on unbound sessions.

  - `job_metadata: optional object { duration_ms, error, export_config_ids, 4 more }`

    Token usage and status from the most recent run. Null if the session has not been run yet.

    - `duration_ms: optional number`

    - `error: optional string`

    - `export_config_ids: optional array of string`

    - `is_error: optional boolean`

    - `total_input_tokens: optional number`

    - `total_output_tokens: optional number`

    - `turns: optional number`

### Example

```cli
llp beta:chat get-summary \
  --api-key 'My API Key' \
  --session-id session_id
```

#### Response

```json
{
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "shared_access": "read_only",
  "generated_title": "What were the main findings in Q3?...",
  "index_ids": [
    "idx-abc123",
    "idx-def456"
  ],
  "job_metadata": {
    "duration_ms": 0,
    "error": "error",
    "export_config_ids": [
      "string"
    ],
    "is_error": true,
    "total_input_tokens": 0,
    "total_output_tokens": 0,
    "turns": 0
  }
}
```

## Stream Messages

`$ llp beta:chat stream`

**post** `/api/v1/chat/{session_id}/messages/stream`

Stream agent events for a chat turn as Server-Sent Events.

### Parameters

- `--session-id: string`

  Path param

- `--index-id: array of string`

  Body param: Indexes to retrieve data from.

- `--prompt: string`

  Body param: User message for this chat turn.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--require-all-indexes: optional boolean`

  Body param: Fail the turn if any requested index cannot be queried.

### Returns

- `BetaChatStreamResponse: unknown`

### Example

```cli
llp beta:chat stream \
  --api-key 'My API Key' \
  --session-id session_id \
  --index-id idx-abc123 \
  --index-id idx-def456 \
  --prompt 'What were the main findings in Q3?'
```

#### Response

```json
{}
```

# Attachments

## List Attachments

`$ llp beta:attachments list`

**get** `/api/v1/beta/attachments`

List the attachments associated with a file (e.g. per-page screenshots).

### Parameters

- `--source-id: string`

  File UUID or directory file ID (dfl-...).

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

### Returns

- `FileAttachmentListResponse: object { items, next_page_token, total_size }`

  Paginated list of file attachments.

  - `items: array of object { name, size, last_modified }`

    The list of items.

    - `name: string`

      Name of the attachment

    - `size: number`

      Size of the attachment in bytes

    - `last_modified: optional string`

      When the attachment was last modified

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:attachments list \
  --api-key 'My API Key' \
  --source-id source_id
```

#### Response

```json
{
  "items": [
    {
      "name": "name",
      "size": 0,
      "last_modified": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Attachment

`$ llp beta:attachments get`

**get** `/api/v1/beta/attachments/{attachment_name}`

Return a presigned download URL for a specific attachment.

### Parameters

- `--attachment-name: string`

- `--source-id: string`

  File UUID or directory file ID (dfl-...).

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `presigned_url: object { expires_at, url, form_fields }`

  Schema for a presigned URL.

  - `expires_at: string`

    The time at which the presigned URL expires

  - `url: string`

    A presigned URL for IO operations against a private file

  - `form_fields: optional map[string]`

    Form fields for a presigned POST request

### Example

```cli
llp beta:attachments get \
  --api-key 'My API Key' \
  --attachment-name attachment_name \
  --source-id source_id
```

#### Response

```json
{
  "expires_at": "2019-12-27T18:11:19.117Z",
  "url": "https://example.com",
  "form_fields": {
    "foo": "string"
  }
}
```

# Agent Data

## Get Agent Data

`$ llp beta:agent-data get`

**get** `/api/v1/beta/agent-data/{item_id}`

Get agent data by ID.

### Parameters

- `--item-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `agent_data: object { data, deployment_name, id, 4 more }`

  API Result for a single agent data item

  - `data: map[unknown]`

  - `deployment_name: string`

  - `id: optional string`

  - `collection: optional string`

  - `created_at: optional string`

  - `project_id: optional string`

  - `updated_at: optional string`

### Example

```cli
llp beta:agent-data get \
  --api-key 'My API Key' \
  --item-id item_id
```

#### Response

```json
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Agent Data

`$ llp beta:agent-data update`

**put** `/api/v1/beta/agent-data/{item_id}`

Update agent data by ID (overwrites).

### Parameters

- `--item-id: string`

  Path param

- `--data: map[unknown]`

  Body param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

### Returns

- `agent_data: object { data, deployment_name, id, 4 more }`

  API Result for a single agent data item

  - `data: map[unknown]`

  - `deployment_name: string`

  - `id: optional string`

  - `collection: optional string`

  - `created_at: optional string`

  - `project_id: optional string`

  - `updated_at: optional string`

### Example

```cli
llp beta:agent-data update \
  --api-key 'My API Key' \
  --item-id item_id \
  --data '{foo: bar}'
```

#### Response

```json
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Agent Data

`$ llp beta:agent-data delete`

**delete** `/api/v1/beta/agent-data/{item_id}`

Delete agent data by ID.

### Parameters

- `--item-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaAgentDataDeleteResponse: map[string]`

### Example

```cli
llp beta:agent-data delete \
  --api-key 'My API Key' \
  --item-id item_id
```

#### Response

```json
{
  "foo": "string"
}
```

## Create Agent Data

`$ llp beta:agent-data create`

**post** `/api/v1/beta/agent-data`

Create new agent data.

### Parameters

- `--data: map[unknown]`

  Body param

- `--deployment-name: string`

  Body param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--collection: optional string`

  Body param

### Returns

- `agent_data: object { data, deployment_name, id, 4 more }`

  API Result for a single agent data item

  - `data: map[unknown]`

  - `deployment_name: string`

  - `id: optional string`

  - `collection: optional string`

  - `created_at: optional string`

  - `project_id: optional string`

  - `updated_at: optional string`

### Example

```cli
llp beta:agent-data create \
  --api-key 'My API Key' \
  --data '{foo: bar}' \
  --deployment-name deployment_name
```

#### Response

```json
{
  "data": {
    "foo": "bar"
  },
  "deployment_name": "deployment_name",
  "id": "id",
  "collection": "collection",
  "created_at": "2019-12-27T18:11:19.117Z",
  "project_id": "project_id",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Search Agent Data

`$ llp beta:agent-data search`

**post** `/api/v1/beta/agent-data/:search`

Search agent data with filtering, sorting, and pagination.

### Parameters

- `--deployment-name: string`

  Body param: The agent deployment's name to search within

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--collection: optional string`

  Body param: The logical agent data collection to search within

- `--filter: optional map[object { eq, excludes, gt, 5 more } ]`

  Body param: A filter object or expression that filters resources listed in the response.

- `--include-total: optional boolean`

  Body param: Whether to include the total number of items in the response

- `--offset: optional number`

  Body param: The offset to start from. If not provided, the first page is returned

- `--order-by: optional string`

  Body param: A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.

- `--page-size: optional number`

  Body param: The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.

- `--page-token: optional string`

  Body param: A page token, received from a previous list call. Provide this to retrieve the subsequent page.

### Returns

- `AgentDataSearchResponse: object { items, next_page_token, total_size }`

  Paginated agent data search results.

  - `items: array of AgentData`

    The list of items.

    - `data: map[unknown]`

    - `deployment_name: string`

    - `id: optional string`

    - `collection: optional string`

    - `created_at: optional string`

    - `project_id: optional string`

    - `updated_at: optional string`

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:agent-data search \
  --api-key 'My API Key' \
  --deployment-name deployment_name
```

#### Response

```json
{
  "items": [
    {
      "data": {
        "foo": "bar"
      },
      "deployment_name": "deployment_name",
      "id": "id",
      "collection": "collection",
      "created_at": "2019-12-27T18:11:19.117Z",
      "project_id": "project_id",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Aggregate Agent Data

`$ llp beta:agent-data aggregate`

**post** `/api/v1/beta/agent-data/:aggregate`

Aggregate agent data with grouping and optional counting/first item retrieval.

### Parameters

- `--deployment-name: string`

  Body param: The agent deployment's name to aggregate data for

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--collection: optional string`

  Body param: The logical agent data collection to aggregate data for

- `--count: optional boolean`

  Body param: Whether to count the number of items in each group

- `--filter: optional map[object { eq, excludes, gt, 5 more } ]`

  Body param: A filter object or expression that filters resources listed in the response.

- `--first: optional boolean`

  Body param: Whether to return the first item in each group (Sorted by created_at)

- `--group-by: optional array of string`

  Body param: The fields to group by. If empty, the entire dataset is grouped on. e.g. if left out, can be used for simple count operations

- `--offset: optional number`

  Body param: The offset to start from. If not provided, the first page is returned

- `--order-by: optional string`

  Body param: A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.

- `--page-size: optional number`

  Body param: The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.

- `--page-token: optional string`

  Body param: A page token, received from a previous list call. Provide this to retrieve the subsequent page.

### Returns

- `AgentDataAggregateResponse: object { items, next_page_token, total_size }`

  Paginated agent data aggregation groups.

  - `items: array of object { group_key, count, first_item }`

    The list of items.

    - `group_key: map[unknown]`

    - `count: optional number`

    - `first_item: optional map[unknown]`

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:agent-data aggregate \
  --api-key 'My API Key' \
  --deployment-name deployment_name
```

#### Response

```json
{
  "items": [
    {
      "group_key": {
        "foo": "bar"
      },
      "count": 0,
      "first_item": {
        "foo": "bar"
      }
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Delete Agent Data By Query

`$ llp beta:agent-data delete-by-query`

**post** `/api/v1/beta/agent-data/:delete`

Bulk delete agent data by query (deployment_name, collection, optional filters).

### Parameters

- `--deployment-name: string`

  Body param: The agent deployment's name to delete data for

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--collection: optional string`

  Body param: The logical agent data collection to delete from

- `--filter: optional map[object { eq, excludes, gt, 5 more } ]`

  Body param: Optional filters to select which items to delete

### Returns

- `BetaAgentDataDeleteByQueryResponse: object { deleted_count }`

  API response for bulk delete operation

  - `deleted_count: number`

### Example

```cli
llp beta:agent-data delete-by-query \
  --api-key 'My API Key' \
  --deployment-name deployment_name
```

#### Response

```json
{
  "deleted_count": 0
}
```

## Domain Types

### Agent Data

- `agent_data: object { data, deployment_name, id, 4 more }`

  API Result for a single agent data item

  - `data: map[unknown]`

  - `deployment_name: string`

  - `id: optional string`

  - `collection: optional string`

  - `created_at: optional string`

  - `project_id: optional string`

  - `updated_at: optional string`

# Directories

## Create Directory

`$ llp beta:directories create`

**post** `/api/v1/beta/directories`

Create a new directory within the specified project.

A connector subscription syncs into at most one directory. Creating a second one for the same
subscription returns `409` with the existing directory's id in `detail.directory_id`.

### Parameters

- `--name: string`

  Body param: Human-readable name for the directory.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--connector-subscription-id: optional string`

  Body param: Connector Subscription whose files sync into this directory. Omit for manual uploads.

- `--description: optional string`

  Body param: Optional description shown to users.

- `--system-metadata: optional map[unknown]`

  Body param: Reserved system-managed metadata.

- `--type: optional "ephemeral" or "user"`

  Body param: Directory type. Use 'ephemeral' for batch processing with automatic cleanup.

### Returns

- `BetaDirectoryNewResponse: object { id, name, project_id, 8 more }`

  API response schema for a directory.

  - `id: string`

    Unique identifier for the directory.

  - `name: string`

    Human-readable name for the directory.

  - `project_id: string`

    Project the directory belongs to.

  - `connector_subscription_id: optional string`

    Connector Subscription whose files sync into this directory. Null for a directory populated by manual uploads.

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Optional timestamp of when the directory was deleted. Null if not deleted.

  - `description: optional string`

    Optional description shown to users.

  - `expires_at: optional string`

    When this directory expires and is eligible for cleanup.

  - `system_metadata: optional map[unknown]`

    Reserved system-managed metadata.

  - `type: optional "ephemeral" or "index" or "user"`

    Directory type: 'user', 'index', or 'ephemeral'.

    - `"ephemeral"`

    - `"index"`

    - `"user"`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories create \
  --api-key 'My API Key' \
  --name x
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "connector_subscription_id": "csub-abc123",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "ephemeral",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Directories

`$ llp beta:directories list`

**get** `/api/v1/beta/directories`

List Directories

### Parameters

- `--include-deleted: optional boolean`

  Include deleted directories.

- `--name: optional string`

  Directory name to match.

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

- `--type: optional "ephemeral" or "index" or "user"`

  Directory type to include.

- `--type: optional array of "ephemeral" or "index" or "user"`

  Filter by one or more directory types. Repeat the parameter for multiple values.

### Returns

- `DirectoryQueryResponse: object { items, next_page_token, total_size }`

  API query response schema for directories.

  - `items: array of object { id, name, project_id, 8 more }`

    The list of items.

    - `id: string`

      Unique identifier for the directory.

    - `name: string`

      Human-readable name for the directory.

    - `project_id: string`

      Project the directory belongs to.

    - `connector_subscription_id: optional string`

      Connector Subscription whose files sync into this directory. Null for a directory populated by manual uploads.

    - `created_at: optional string`

      Creation datetime

    - `deleted_at: optional string`

      Optional timestamp of when the directory was deleted. Null if not deleted.

    - `description: optional string`

      Optional description shown to users.

    - `expires_at: optional string`

      When this directory expires and is eligible for cleanup.

    - `system_metadata: optional map[unknown]`

      Reserved system-managed metadata.

    - `type: optional "ephemeral" or "index" or "user"`

      Directory type: 'user', 'index', or 'ephemeral'.

      - `"ephemeral"`

      - `"index"`

      - `"user"`

    - `updated_at: optional string`

      Update datetime

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:directories list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "name": "x",
      "project_id": "project_id",
      "connector_subscription_id": "csub-abc123",
      "created_at": "2019-12-27T18:11:19.117Z",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "expires_at": "2019-12-27T18:11:19.117Z",
      "system_metadata": {
        "foo": "bar"
      },
      "type": "ephemeral",
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Directory

`$ llp beta:directories get`

**get** `/api/v1/beta/directories/{directory_id}`

Retrieve a directory by its identifier.

### Parameters

- `--directory-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaDirectoryGetResponse: object { id, name, project_id, 8 more }`

  API response schema for a directory.

  - `id: string`

    Unique identifier for the directory.

  - `name: string`

    Human-readable name for the directory.

  - `project_id: string`

    Project the directory belongs to.

  - `connector_subscription_id: optional string`

    Connector Subscription whose files sync into this directory. Null for a directory populated by manual uploads.

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Optional timestamp of when the directory was deleted. Null if not deleted.

  - `description: optional string`

    Optional description shown to users.

  - `expires_at: optional string`

    When this directory expires and is eligible for cleanup.

  - `system_metadata: optional map[unknown]`

    Reserved system-managed metadata.

  - `type: optional "ephemeral" or "index" or "user"`

    Directory type: 'user', 'index', or 'ephemeral'.

    - `"ephemeral"`

    - `"index"`

    - `"user"`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories get \
  --api-key 'My API Key' \
  --directory-id directory_id
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "connector_subscription_id": "csub-abc123",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "ephemeral",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Directory

`$ llp beta:directories update`

**patch** `/api/v1/beta/directories/{directory_id}`

Update directory metadata.

### Parameters

- `--directory-id: string`

  Path param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--description: optional string`

  Body param: Updated description for the directory.

- `--name: optional string`

  Body param: Updated name for the directory.

### Returns

- `BetaDirectoryUpdateResponse: object { id, name, project_id, 8 more }`

  API response schema for a directory.

  - `id: string`

    Unique identifier for the directory.

  - `name: string`

    Human-readable name for the directory.

  - `project_id: string`

    Project the directory belongs to.

  - `connector_subscription_id: optional string`

    Connector Subscription whose files sync into this directory. Null for a directory populated by manual uploads.

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Optional timestamp of when the directory was deleted. Null if not deleted.

  - `description: optional string`

    Optional description shown to users.

  - `expires_at: optional string`

    When this directory expires and is eligible for cleanup.

  - `system_metadata: optional map[unknown]`

    Reserved system-managed metadata.

  - `type: optional "ephemeral" or "index" or "user"`

    Directory type: 'user', 'index', or 'ephemeral'.

    - `"ephemeral"`

    - `"index"`

    - `"user"`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories update \
  --api-key 'My API Key' \
  --directory-id directory_id
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "connector_subscription_id": "csub-abc123",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "expires_at": "2019-12-27T18:11:19.117Z",
  "system_metadata": {
    "foo": "bar"
  },
  "type": "ephemeral",
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Directory

`$ llp beta:directories delete`

**delete** `/api/v1/beta/directories/{directory_id}`

Permanently delete a directory, and the files in it that no other directory or index uses.

### Parameters

- `--directory-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Example

```cli
llp beta:directories delete \
  --api-key 'My API Key' \
  --directory-id directory_id
```

# Files

## Add Directory File

`$ llp beta:directories:files add`

**post** `/api/v1/beta/directories/{directory_id}/files`

Create a new file within the specified directory; the directory must exist in the project and `file_id` must reference an existing file.

### Parameters

- `--directory-id: string`

  Path param

- `--file-id: string`

  Body param: File ID for the storage location (required).

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--display-name: optional string`

  Body param: Display name for the file. If not provided, will use the file's name.

- `--metadata: optional map[string or number or number or 3 more]`

  Body param: User-defined metadata key-value pairs to associate with the file.

- `--unique-id: optional string`

  Body param: Unique identifier for the file in the directory. If not provided, will use the file's external_file_id or name.

### Returns

- `BetaDirectoryFileAddResponse: object { id, directory_id, display_name, 8 more }`

  API response schema for a directory file.

  - `id: string`

    Unique identifier for the directory file.

  - `directory_id: string`

    Directory the file belongs to.

  - `display_name: string`

    Display name for the file.

  - `project_id: string`

    Project the directory file belongs to.

  - `unique_id: string`

    Unique identifier for the file in the directory

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Soft delete marker when the file is removed upstream or by user action.

  - `download_url: optional object { expires_at, url, form_fields }`

    Schema for a presigned URL.

    - `expires_at: string`

      The time at which the presigned URL expires

    - `url: string`

      A presigned URL for IO operations against a private file

    - `form_fields: optional map[string]`

      Form fields for a presigned POST request

  - `file_id: optional string`

    File ID for the storage location.

  - `metadata: optional map[string or number or number or 3 more]`

    Merged metadata from all sources. Higher-priority sources override lower.

    - `union_member_0: string`

    - `union_member_1: number`

    - `union_member_2: number`

    - `union_member_3: boolean`

    - `union_member_4: unknown`

    - `MetadataListValue: array of string`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories:files add \
  --api-key 'My API Key' \
  --directory-id directory_id \
  --file-id file_id
```

#### Response

```json
{
  "id": "id",
  "directory_id": "directory_id",
  "display_name": "x",
  "project_id": "project_id",
  "unique_id": "x",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "download_url": {
    "expires_at": "2019-12-27T18:11:19.117Z",
    "url": "https://example.com",
    "form_fields": {
      "foo": "string"
    }
  },
  "file_id": "file_id",
  "metadata": {
    "foo": "string"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Directory Files

`$ llp beta:directories:files list`

**get** `/api/v1/beta/directories/{directory_id}/files`

List all files within the specified directory with optional filtering and pagination.

### Parameters

- `--directory-id: string`

- `--display-name: optional string`

- `--display-name-contains: optional string`

- `--expand: optional array of string`

  Fields to expand on each directory file.

- `--file-id: optional string`

- `--include-deleted: optional boolean`

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

- `--unique-id: optional string`

- `--updated-at-on-or-after: optional string`

  Include items updated at or after this timestamp (inclusive)

- `--updated-at-on-or-before: optional string`

  Include items updated at or before this timestamp (inclusive)

### Returns

- `DirectoryFileQueryResponse: object { items, next_page_token, total_size }`

  API query response schema for directory files.

  - `items: array of object { id, directory_id, display_name, 8 more }`

    The list of items.

    - `id: string`

      Unique identifier for the directory file.

    - `directory_id: string`

      Directory the file belongs to.

    - `display_name: string`

      Display name for the file.

    - `project_id: string`

      Project the directory file belongs to.

    - `unique_id: string`

      Unique identifier for the file in the directory

    - `created_at: optional string`

      Creation datetime

    - `deleted_at: optional string`

      Soft delete marker when the file is removed upstream or by user action.

    - `download_url: optional object { expires_at, url, form_fields }`

      Schema for a presigned URL.

      - `expires_at: string`

        The time at which the presigned URL expires

      - `url: string`

        A presigned URL for IO operations against a private file

      - `form_fields: optional map[string]`

        Form fields for a presigned POST request

    - `file_id: optional string`

      File ID for the storage location.

    - `metadata: optional map[string or number or number or 3 more]`

      Merged metadata from all sources. Higher-priority sources override lower.

      - `union_member_0: string`

      - `union_member_1: number`

      - `union_member_2: number`

      - `union_member_3: boolean`

      - `union_member_4: unknown`

      - `MetadataListValue: array of string`

    - `updated_at: optional string`

      Update datetime

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:directories:files list \
  --api-key 'My API Key' \
  --directory-id directory_id
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "directory_id": "directory_id",
      "display_name": "x",
      "project_id": "project_id",
      "unique_id": "x",
      "created_at": "2019-12-27T18:11:19.117Z",
      "deleted_at": "2019-12-27T18:11:19.117Z",
      "download_url": {
        "expires_at": "2019-12-27T18:11:19.117Z",
        "url": "https://example.com",
        "form_fields": {
          "foo": "string"
        }
      },
      "file_id": "file_id",
      "metadata": {
        "foo": "string"
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Directory File

`$ llp beta:directories:files get`

**get** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`

Get a directory file by `directory_file_id`; to look up by `unique_id`, use the list endpoint with a filter.

### Parameters

- `--directory-id: string`

  Path param

- `--directory-file-id: string`

  Path param

- `--expand: optional array of string`

  Query param: Fields to expand.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

### Returns

- `BetaDirectoryFileGetResponse: object { id, directory_id, display_name, 8 more }`

  API response schema for a directory file.

  - `id: string`

    Unique identifier for the directory file.

  - `directory_id: string`

    Directory the file belongs to.

  - `display_name: string`

    Display name for the file.

  - `project_id: string`

    Project the directory file belongs to.

  - `unique_id: string`

    Unique identifier for the file in the directory

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Soft delete marker when the file is removed upstream or by user action.

  - `download_url: optional object { expires_at, url, form_fields }`

    Schema for a presigned URL.

    - `expires_at: string`

      The time at which the presigned URL expires

    - `url: string`

      A presigned URL for IO operations against a private file

    - `form_fields: optional map[string]`

      Form fields for a presigned POST request

  - `file_id: optional string`

    File ID for the storage location.

  - `metadata: optional map[string or number or number or 3 more]`

    Merged metadata from all sources. Higher-priority sources override lower.

    - `union_member_0: string`

    - `union_member_1: number`

    - `union_member_2: number`

    - `union_member_3: boolean`

    - `union_member_4: unknown`

    - `MetadataListValue: array of string`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories:files get \
  --api-key 'My API Key' \
  --directory-id directory_id \
  --directory-file-id directory_file_id
```

#### Response

```json
{
  "id": "id",
  "directory_id": "directory_id",
  "display_name": "x",
  "project_id": "project_id",
  "unique_id": "x",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "download_url": {
    "expires_at": "2019-12-27T18:11:19.117Z",
    "url": "https://example.com",
    "form_fields": {
      "foo": "string"
    }
  },
  "file_id": "file_id",
  "metadata": {
    "foo": "string"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Update Directory File

`$ llp beta:directories:files update`

**patch** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`

Update directory-file metadata by `directory_file_id`; set `directory_id` to move the file to a different directory. To resolve from `unique_id`, list with a filter first.

### Parameters

- `--directory-id: string`

  Path param

- `--directory-file-id: string`

  Path param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--display-name: optional string`

  Body param: Updated display name.

- `--metadata: optional map[string or number or number or 3 more]`

  Body param: User-defined metadata key-value pairs. Replaces the user metadata layer.

- `--target-directory-id: optional string`

  Body param: Move file to a different directory.

- `--unique-id: optional string`

  Body param: Updated unique identifier.

### Returns

- `BetaDirectoryFileUpdateResponse: object { id, directory_id, display_name, 8 more }`

  API response schema for a directory file.

  - `id: string`

    Unique identifier for the directory file.

  - `directory_id: string`

    Directory the file belongs to.

  - `display_name: string`

    Display name for the file.

  - `project_id: string`

    Project the directory file belongs to.

  - `unique_id: string`

    Unique identifier for the file in the directory

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Soft delete marker when the file is removed upstream or by user action.

  - `download_url: optional object { expires_at, url, form_fields }`

    Schema for a presigned URL.

    - `expires_at: string`

      The time at which the presigned URL expires

    - `url: string`

      A presigned URL for IO operations against a private file

    - `form_fields: optional map[string]`

      Form fields for a presigned POST request

  - `file_id: optional string`

    File ID for the storage location.

  - `metadata: optional map[string or number or number or 3 more]`

    Merged metadata from all sources. Higher-priority sources override lower.

    - `union_member_0: string`

    - `union_member_1: number`

    - `union_member_2: number`

    - `union_member_3: boolean`

    - `union_member_4: unknown`

    - `MetadataListValue: array of string`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories:files update \
  --api-key 'My API Key' \
  --directory-id directory_id \
  --directory-file-id directory_file_id
```

#### Response

```json
{
  "id": "id",
  "directory_id": "directory_id",
  "display_name": "x",
  "project_id": "project_id",
  "unique_id": "x",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "download_url": {
    "expires_at": "2019-12-27T18:11:19.117Z",
    "url": "https://example.com",
    "form_fields": {
      "foo": "string"
    }
  },
  "file_id": "file_id",
  "metadata": {
    "foo": "string"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Directory File

`$ llp beta:directories:files delete`

**delete** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`

Delete a directory file by `directory_file_id`; to resolve from `unique_id`, list with a filter first.

The uploaded file is deleted with it unless another directory or index still uses it.

### Parameters

- `--directory-id: string`

  Path param

- `--directory-file-id: string`

  Path param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

### Example

```cli
llp beta:directories:files delete \
  --api-key 'My API Key' \
  --directory-id directory_id \
  --directory-file-id directory_file_id
```

## Upload File To Directory

`$ llp beta:directories:files upload`

**post** `/api/v1/beta/directories/{directory_id}/files/upload`

Upload a file and create its directory entry in one call; `unique_id` / `display_name` default to values derived from file metadata.

### Parameters

- `--directory-id: string`

  Path param

- `--upload-file: string`

  Body param

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--display-name: optional string`

  Body param

- `--external-file-id: optional string`

  Body param

- `--metadata: optional string`

  Body param: User metadata as a JSON object string.

- `--unique-id: optional string`

  Body param

### Returns

- `BetaDirectoryFileUploadResponse: object { id, directory_id, display_name, 8 more }`

  API response schema for a directory file.

  - `id: string`

    Unique identifier for the directory file.

  - `directory_id: string`

    Directory the file belongs to.

  - `display_name: string`

    Display name for the file.

  - `project_id: string`

    Project the directory file belongs to.

  - `unique_id: string`

    Unique identifier for the file in the directory

  - `created_at: optional string`

    Creation datetime

  - `deleted_at: optional string`

    Soft delete marker when the file is removed upstream or by user action.

  - `download_url: optional object { expires_at, url, form_fields }`

    Schema for a presigned URL.

    - `expires_at: string`

      The time at which the presigned URL expires

    - `url: string`

      A presigned URL for IO operations against a private file

    - `form_fields: optional map[string]`

      Form fields for a presigned POST request

  - `file_id: optional string`

    File ID for the storage location.

  - `metadata: optional map[string or number or number or 3 more]`

    Merged metadata from all sources. Higher-priority sources override lower.

    - `union_member_0: string`

    - `union_member_1: number`

    - `union_member_2: number`

    - `union_member_3: boolean`

    - `union_member_4: unknown`

    - `MetadataListValue: array of string`

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:directories:files upload \
  --api-key 'My API Key' \
  --directory-id directory_id \
  --upload-file 'Example data'
```

#### Response

```json
{
  "id": "id",
  "directory_id": "directory_id",
  "display_name": "x",
  "project_id": "project_id",
  "unique_id": "x",
  "created_at": "2019-12-27T18:11:19.117Z",
  "deleted_at": "2019-12-27T18:11:19.117Z",
  "download_url": {
    "expires_at": "2019-12-27T18:11:19.117Z",
    "url": "https://example.com",
    "form_fields": {
      "foo": "string"
    }
  },
  "file_id": "file_id",
  "metadata": {
    "foo": "string"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

# Split

## Create Split Job

`$ llp beta:split create`

**post** `/api/v1/beta/split/jobs`

Create a document split job.

### Parameters

- `--document-input: object { type, value }`

  Body param: Document to be split.

- `--organization-id: optional string`

  Query param

- `--project-id: optional string`

  Query param

- `--configuration: optional object { categories, splitting_strategy, version }`

  Body param: Split configuration with categories and splitting strategy.

- `--configuration-id: optional string`

  Body param: Saved split configuration ID.

### Returns

- `BetaSplitNewResponse: object { id, categories, document_input, 8 more }`

  Beta response — uses nested document_input object.

  - `id: string`

    Unique identifier for the split job.

  - `categories: array of SplitCategory`

    Categories used for splitting.

    - `name: string`

      Name of the category.

    - `description: optional string`

      Optional description of what content belongs in this category.

  - `document_input: object { type, value }`

    Document that was split.

    - `type: string`

      The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse job as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID as `file_input`.

    - `value: string`

      Document identifier.

  - `project_id: string`

    Project ID this job belongs to.

  - `status: string`

    Current status of the job. Valid values are: pending, processing, completed, failed, cancelled.

  - `user_id: string`

    User ID who created this job.

  - `configuration_id: optional string`

    Split configuration ID used for this job.

  - `created_at: optional string`

    Creation datetime

  - `error_message: optional string`

    Error message if the job failed.

  - `result: optional object { segments }`

    Result of a completed split job.

    - `segments: array of SplitSegmentResponse`

      List of document segments.

      - `category: string`

        Category name this split belongs to.

      - `confidence_category: string`

        Categorical confidence level. Valid values are: high, medium, low.

      - `pages: array of number`

        Page numbers in this segment, as numbered by the input document.

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:split create \
  --api-key 'My API Key' \
  --document-input '{type: type, value: value}'
```

#### Response

```json
{
  "id": "id",
  "categories": [
    {
      "name": "x",
      "description": "x"
    }
  ],
  "document_input": {
    "type": "type",
    "value": "value"
  },
  "project_id": "project_id",
  "status": "status",
  "user_id": "user_id",
  "configuration_id": "configuration_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "result": {
    "segments": [
      {
        "category": "category",
        "confidence_category": "confidence_category",
        "pages": [
          0
        ]
      }
    ]
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## List Split Jobs

`$ llp beta:split list`

**get** `/api/v1/beta/split/jobs`

List document split jobs.

### Parameters

- `--created-at-on-or-after: optional string`

  Include items created at or after this timestamp (inclusive)

- `--created-at-on-or-before: optional string`

  Include items created at or before this timestamp (inclusive)

- `--job-id: optional array of string`

  Filter by specific job IDs

- `--organization-id: optional string`

- `--page-size: optional number`

- `--page-token: optional string`

- `--project-id: optional string`

- `--status: optional "cancelled" or "completed" or "failed" or 2 more`

  Filter by job status (pending, processing, completed, failed, cancelled)

### Returns

- `SplitJobQueryResponseBeta: object { items, next_page_token, total_size }`

  Beta paginated list of split jobs.

  - `items: array of object { id, categories, document_input, 8 more }`

    The list of items.

    - `id: string`

      Unique identifier for the split job.

    - `categories: array of SplitCategory`

      Categories used for splitting.

      - `name: string`

        Name of the category.

      - `description: optional string`

        Optional description of what content belongs in this category.

    - `document_input: object { type, value }`

      Document that was split.

      - `type: string`

        The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse job as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID as `file_input`.

      - `value: string`

        Document identifier.

    - `project_id: string`

      Project ID this job belongs to.

    - `status: string`

      Current status of the job. Valid values are: pending, processing, completed, failed, cancelled.

    - `user_id: string`

      User ID who created this job.

    - `configuration_id: optional string`

      Split configuration ID used for this job.

    - `created_at: optional string`

      Creation datetime

    - `error_message: optional string`

      Error message if the job failed.

    - `result: optional object { segments }`

      Result of a completed split job.

      - `segments: array of SplitSegmentResponse`

        List of document segments.

        - `category: string`

          Category name this split belongs to.

        - `confidence_category: string`

          Categorical confidence level. Valid values are: high, medium, low.

        - `pages: array of number`

          Page numbers in this segment, as numbered by the input document.

    - `updated_at: optional string`

      Update datetime

  - `next_page_token: optional string`

    A token, which can be sent as page_token to retrieve the next page. If this field is omitted, there are no subsequent pages.

  - `total_size: optional number`

    The total number of items available. This is only populated when specifically requested. The value may be an estimate and can be used for display purposes only.

### Example

```cli
llp beta:split list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "categories": [
        {
          "name": "x",
          "description": "x"
        }
      ],
      "document_input": {
        "type": "type",
        "value": "value"
      },
      "project_id": "project_id",
      "status": "status",
      "user_id": "user_id",
      "configuration_id": "configuration_id",
      "created_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "result": {
        "segments": [
          {
            "category": "category",
            "confidence_category": "confidence_category",
            "pages": [
              0
            ]
          }
        ]
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Split Job

`$ llp beta:split get`

**get** `/api/v1/beta/split/jobs/{split_job_id}`

Get a document split job.

### Parameters

- `--split-job-id: string`

- `--organization-id: optional string`

- `--project-id: optional string`

### Returns

- `BetaSplitGetResponse: object { id, categories, document_input, 8 more }`

  Beta response — uses nested document_input object.

  - `id: string`

    Unique identifier for the split job.

  - `categories: array of SplitCategory`

    Categories used for splitting.

    - `name: string`

      Name of the category.

    - `description: optional string`

      Optional description of what content belongs in this category.

  - `document_input: object { type, value }`

    Document that was split.

    - `type: string`

      The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse job as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID as `file_input`.

    - `value: string`

      Document identifier.

  - `project_id: string`

    Project ID this job belongs to.

  - `status: string`

    Current status of the job. Valid values are: pending, processing, completed, failed, cancelled.

  - `user_id: string`

    User ID who created this job.

  - `configuration_id: optional string`

    Split configuration ID used for this job.

  - `created_at: optional string`

    Creation datetime

  - `error_message: optional string`

    Error message if the job failed.

  - `result: optional object { segments }`

    Result of a completed split job.

    - `segments: array of SplitSegmentResponse`

      List of document segments.

      - `category: string`

        Category name this split belongs to.

      - `confidence_category: string`

        Categorical confidence level. Valid values are: high, medium, low.

      - `pages: array of number`

        Page numbers in this segment, as numbered by the input document.

  - `updated_at: optional string`

    Update datetime

### Example

```cli
llp beta:split get \
  --api-key 'My API Key' \
  --split-job-id split_job_id
```

#### Response

```json
{
  "id": "id",
  "categories": [
    {
      "name": "x",
      "description": "x"
    }
  ],
  "document_input": {
    "type": "type",
    "value": "value"
  },
  "project_id": "project_id",
  "status": "status",
  "user_id": "user_id",
  "configuration_id": "configuration_id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "result": {
    "segments": [
      {
        "category": "category",
        "confidence_category": "confidence_category",
        "pages": [
          0
        ]
      }
    ]
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Domain Types

### Split Category

- `split_category: object { name, description }`

  Category definition for document splitting.

  - `name: string`

    Name of the category.

  - `description: optional string`

    Optional description of what content belongs in this category.

### Split Document Input

- `split_document_input: object { type, value }`

  Document input specification for beta API.

  - `type: string`

    The beta `POST /api/v1/beta/split/jobs` endpoint accepts only `file_id`. To use a Parse job as input, call `POST /api/v1/split/jobs` instead, where you can pass the Parse job ID as `file_input`.

  - `value: string`

    Document identifier.

### Split Result Response

- `split_result_response: object { segments }`

  Result of a completed split job.

  - `segments: array of SplitSegmentResponse`

    List of document segments.

    - `category: string`

      Category name this split belongs to.

    - `confidence_category: string`

      Categorical confidence level. Valid values are: high, medium, low.

    - `pages: array of number`

      Page numbers in this segment, as numbered by the input document.

### Split Segment Response

- `split_segment_response: object { category, confidence_category, pages }`

  A segment of the split document.

  - `category: string`

    Category name this split belongs to.

  - `confidence_category: string`

    Categorical confidence level. Valid values are: high, medium, low.

  - `pages: array of number`

    Page numbers in this segment, as numbered by the input document.
