# Beta

# Indexes

## Get Index

`IndexGetResponse Beta.Indexes.Get(IndexGetParamsparameters, CancellationTokencancellationToken = default)`

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

Get an index by ID.

### Parameters

- `IndexGetParams parameters`

  - `required string indexID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class IndexGetResponse:`

  A searchable index over a directory of documents.

  - `required string ID`

    Unique identifier

  - `required string ExportConfigID`

    ID of the export configuration.

  - `required string Name`

    Index name.

  - `required string OutputDirectoryID`

    ID of the output directory holding the indexed files.

  - `required string ProjectID`

    Project this index belongs to.

  - `required string SourceDirectoryID`

    ID of the source directory.

  - `required string SyncConfigID`

    ID of the sync configuration.

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `string? Description`

    Index description.

  - `DateTimeOffset? LastExportedAt`

    Last export time.

  - `DateTimeOffset? LastSyncedAt`

    Last sync time.

  - `IReadOnlyDictionary<string, JsonElement> Metadata`

    Build state and diagnostic info.

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
IndexGetParams parameters = new() { IndexID = "index_id" };

var index = await client.Beta.Indexes.Get(parameters);

Console.WriteLine(index);
```

#### 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"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Index

`Beta.Indexes.Delete(IndexDeleteParamsparameters, CancellationTokencancellationToken = default)`

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

Delete an index.

### Parameters

- `IndexDeleteParams parameters`

  - `required string indexID`

  - `string? organizationID`

  - `string? projectID`

### Example

```csharp
IndexDeleteParams parameters = new() { IndexID = "index_id" };

await client.Beta.Indexes.Delete(parameters);
```

## Create Index

`IndexCreateResponse Beta.Indexes.Create(IndexCreateParamsparameters, CancellationTokencancellationToken = default)`

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

Create a searchable index over a source directory.

### Parameters

- `IndexCreateParams parameters`

  - `required string sourceDirectoryID`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? description`

    Body param: Optional description of the index.

  - `string? name`

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

  - `IReadOnlyList<Product>? products`

    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.

    - `required string ProductConfigID`

      ID of the product configuration.

    - `required string ProductType`

      Product type. One of: parse, extract.

  - `IReadOnlyList<string>? storeAttachments`

    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.

  - `string syncFrequency`

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

  - `VectorTarget vectorTarget`

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

    - `"DEFAULT"Default`

    - `"DISABLED"Disabled`

### Returns

- `class IndexCreateResponse:`

  A searchable index over a directory of documents.

  - `required string ID`

    Unique identifier

  - `required string ExportConfigID`

    ID of the export configuration.

  - `required string Name`

    Index name.

  - `required string OutputDirectoryID`

    ID of the output directory holding the indexed files.

  - `required string ProjectID`

    Project this index belongs to.

  - `required string SourceDirectoryID`

    ID of the source directory.

  - `required string SyncConfigID`

    ID of the sync configuration.

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `string? Description`

    Index description.

  - `DateTimeOffset? LastExportedAt`

    Last export time.

  - `DateTimeOffset? LastSyncedAt`

    Last sync time.

  - `IReadOnlyDictionary<string, JsonElement> Metadata`

    Build state and diagnostic info.

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };

var index = await client.Beta.Indexes.Create(parameters);

Console.WriteLine(index);
```

#### 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"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Sync Index

`JsonElement Beta.Indexes.Sync(IndexSyncParamsparameters, CancellationTokencancellationToken = default)`

**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

- `IndexSyncParams parameters`

  - `required string indexID`

  - `string? organizationID`

  - `string? projectID`

### Example

```csharp
IndexSyncParams parameters = new() { IndexID = "index_id" };

var response = await client.Beta.Indexes.Sync(parameters);

Console.WriteLine(response);
```

#### Response

```json
{}
```

## List Indexes

`IndexListPageResponse Beta.Indexes.List(IndexListParams?parameters, CancellationTokencancellationToken = default)`

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

List indexes for the current project.

### Parameters

- `IndexListParams parameters`

  - `string? organizationID`

  - `Long? pageSize`

  - `string? pageToken`

  - `string? projectID`

  - `string? sourceDirectoryID`

### Returns

- `class IndexListPageResponse:`

  Paginated list of indexes.

  - `required IReadOnlyList<IndexListResponse> Items`

    The list of items.

    - `required string ID`

      Unique identifier

    - `required string ExportConfigID`

      ID of the export configuration.

    - `required string Name`

      Index name.

    - `required string OutputDirectoryID`

      ID of the output directory holding the indexed files.

    - `required string ProjectID`

      Project this index belongs to.

    - `required string SourceDirectoryID`

      ID of the source directory.

    - `required string SyncConfigID`

      ID of the sync configuration.

    - `DateTimeOffset? CreatedAt`

      Creation datetime

    - `string? Description`

      Index description.

    - `DateTimeOffset? LastExportedAt`

      Last export time.

    - `DateTimeOffset? LastSyncedAt`

      Last sync time.

    - `IReadOnlyDictionary<string, JsonElement> Metadata`

      Build state and diagnostic info.

    - `DateTimeOffset? UpdatedAt`

      Update datetime

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
IndexListParams parameters = new();

var page = await client.Beta.Indexes.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### 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"
      },
      "updated_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

# Retrieval

## Retrieve

`RetrievalRetrieveResponse Beta.Retrieval.Retrieve(RetrievalRetrieveParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `RetrievalRetrieveParams parameters`

  - `required string indexID`

    Body param: ID of the index to retrieve against.

  - `required string query`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `IReadOnlyDictionary<string, CustomFilter?>? customFilters`

    Body param: Filters on user-defined metadata fields.

    - `class ValueFilter:`

      Filter on a single metadata field value.

      - `required Operator Operator`

        - `"eq"Eq`

        - `"gt"Gt`

        - `"gte"Gte`

        - `"in"In`

        - `"lt"Lt`

        - `"lte"Lte`

        - `"ne"Ne`

        - `"nin"Nin`

      - `required Value Value`

        - `string`

        - `Boolean`

        - `Double`

        - `IReadOnlyList<UnnamedSchemaWithArrayParent0>`

          - `string`

          - `Boolean`

          - `Double`

    - `IReadOnlyList<NumericRangeFilter>`

      - `required Operator Operator`

        - `"eq"Eq`

        - `"gt"Gt`

        - `"gte"Gte`

        - `"in"In`

        - `"lt"Lt`

        - `"lte"Lte`

        - `"ne"Ne`

        - `"nin"Nin`

      - `required Value Value`

        - `Double`

        - `IReadOnlyList<Double>`

  - `Double? fullTextPipelineWeight`

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

  - `Long? numCandidates`

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

  - `Rerank rerank`

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

    - `Boolean Enabled`

      Set to false to disable reranking.

    - `Long? TopN`

      Number of results to return after reranking.

  - `Double? scoreThreshold`

    Body param: Minimum score threshold for returned results.

  - `StaticFilters? staticFilters`

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

    - `ParsedDirectoryFileID? ParsedDirectoryFileID`

      Filter on a string field.

      - `required Operator Operator`

        - `"eq"Eq`

        - `"gt"Gt`

        - `"gte"Gte`

        - `"in"In`

        - `"lt"Lt`

        - `"lte"Lte`

        - `"ne"Ne`

        - `"nin"Nin`

      - `required Value Value`

        - `string`

        - `IReadOnlyList<string>`

  - `Long? topK`

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

  - `Double? vectorPipelineWeight`

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

### Returns

- `class RetrievalRetrieveResponse:`

  Response containing retrieval results.

  - `required IReadOnlyList<Result> Results`

    Ordered list of retrieved chunks.

    - `required string Content`

      Text content of the retrieved chunk.

    - `IReadOnlyDictionary<string, Metadata>? Metadata`

      User-defined metadata associated with the chunk.

      - `string`

      - `Long`

      - `Double`

      - `Boolean`

      - `JsonElement`

      - `IReadOnlyList<string>`

    - `Double? RerankScore`

      Relevance score from the reranker, if reranking was applied.

    - `Double? Score`

      Hybrid search relevance score.

    - `StaticFields StaticFields`

      Built-in fields stored for every exported chunk.

      - `IReadOnlyList<Attachment> Attachments`

        Attachments associated with the chunk

        - `required string AttachmentName`

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

        - `required string SourceID`

          File ID to pass as source_id when fetching the attachment.

        - `required string Type`

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

      - `Long? ChunkEndChar`

        End character offset of the chunk.

      - `Long? ChunkIndex`

        Index of the chunk within the file.

      - `Long? ChunkStartChar`

        Start character offset of the chunk.

      - `Long? ChunkTokenCount`

        Token count of the chunk.

      - `Long? PageRangeEnd`

        Last page number covered by this chunk.

      - `Long? PageRangeStart`

        First page number covered by this chunk.

      - `string? ParsedDirectoryFileID`

        ID of the parsed file.

### Example

```csharp
RetrievalRetrieveParams parameters = new()
{
    IndexID = "idx-abc123",
    Query = "What are the key findings?",
};

var retrieval = await client.Beta.Retrieval.Retrieve(parameters);

Console.WriteLine(retrieval);
```

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

`RetrievalFindPageResponse Beta.Retrieval.Find(RetrievalFindParamsparameters, CancellationTokencancellationToken = default)`

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

Search for files by name.

### Parameters

- `RetrievalFindParams parameters`

  - `required string indexID`

    Body param: ID of the index to search within.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? fileName`

    Body param: Exact file name to match.

  - `string? fileNameContains`

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

  - `Long? pageSize`

    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.

  - `string? pageToken`

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

### Returns

- `class RetrievalFindPageResponse:`

  Paginated file find results.

  - `required IReadOnlyList<RetrievalFindResponse> Items`

    The list of items.

    - `required string FileID`

      ID of the file.

    - `required string FileName`

      Display name of the file.

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };

var page = await client.Beta.Retrieval.Find(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

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

## Grep File

`RetrievalGrepPageResponse Beta.Retrieval.Grep(RetrievalGrepParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `RetrievalGrepParams parameters`

  - `required string fileID`

    Body param: ID of the file to grep.

  - `required string indexID`

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

  - `required string pattern`

    Body param: Regex pattern to search for.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `Long? contextChars`

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

  - `Long? pageSize`

    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.

  - `string? pageToken`

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

### Returns

- `class RetrievalGrepPageResponse:`

  Paginated grep results for a file.

  - `required IReadOnlyList<RetrievalGrepResponse> Items`

    The list of items.

    - `required string Content`

      Matched text content.

    - `required Long EndChar`

      End character offset of the match.

    - `required Long StartChar`

      Start character offset of the match.

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
RetrievalGrepParams parameters = new()
{
    FileID = "file_id",
    IndexID = "idx-abc123",
    Pattern = "revenue|profit",
};

var page = await client.Beta.Retrieval.Grep(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

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

## Read File

`RetrievalReadResponse Beta.Retrieval.Read(RetrievalReadParamsparameters, CancellationTokencancellationToken = default)`

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

Read the parsed text content of a specific file.

### Parameters

- `RetrievalReadParams parameters`

  - `required string fileID`

    Body param: ID of the file to read.

  - `required string indexID`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `Long? maxLength`

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

  - `Long offset`

    Body param: Starting character offset.

### Returns

- `class RetrievalReadResponse:`

  File read result.

  - `required string Content`

    Parsed text content of the file.

### Example

```csharp
RetrievalReadParams parameters = new()
{
    FileID = "file_id",
    IndexID = "idx-abc123",
};

var response = await client.Beta.Retrieval.Read(parameters);

Console.WriteLine(response);
```

#### Response

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

# Chat

## List Sessions

`ChatListPageResponse Beta.Chat.List(ChatListParams?parameters, CancellationTokencancellationToken = default)`

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

List all chat sessions for the current project.

### Parameters

- `ChatListParams parameters`

  - `string? organizationID`

  - `Long? pageSize`

  - `string? pageToken`

  - `string? projectID`

### Returns

- `class ChatListPageResponse:`

  Paginated list of chat sessions.

  - `required IReadOnlyList<ChatListResponse> Items`

    Chat sessions for the current page.

    - `required string LastUpdatedAt`

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

    - `required string SessionID`

      Unique session identifier.

    - `string? GeneratedTitle`

      Auto-generated title derived from the first user message.

    - `IReadOnlyList<string>? IndexIds`

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

    - `JobMetadata? JobMetadata`

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

      - `Double DurationMs`

      - `string? Error`

      - `IReadOnlyList<string>? ExportConfigIds`

      - `Boolean IsError`

      - `Long? TotalInputTokens`

      - `Long? TotalOutputTokens`

      - `Long Turns`

  - `string? NextPageToken`

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

### Example

```csharp
ChatListParams parameters = new();

var page = await client.Beta.Chat.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

#### Response

```json
{
  "items": [
    {
      "last_updated_at": "2026-04-22T12:34:41.342245",
      "session_id": "ses-abc123",
      "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

`ChatCreateResponse Beta.Chat.Create(ChatCreateParams?parameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `ChatCreateParams parameters`

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `IReadOnlyList<string>? indexIds`

    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.

### Returns

- `class ChatCreateResponse:`

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

  - `required string LastUpdatedAt`

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

  - `required string SessionID`

    Unique session identifier.

  - `string? GeneratedTitle`

    Auto-generated title derived from the first user message.

  - `IReadOnlyList<string>? IndexIds`

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

  - `JobMetadata? JobMetadata`

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

    - `Double DurationMs`

    - `string? Error`

    - `IReadOnlyList<string>? ExportConfigIds`

    - `Boolean IsError`

    - `Long? TotalInputTokens`

    - `Long? TotalOutputTokens`

    - `Long Turns`

### Example

```csharp
ChatCreateParams parameters = new();

var chat = await client.Beta.Chat.Create(parameters);

Console.WriteLine(chat);
```

#### Response

```json
{
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "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

`ChatRetrieveResponse Beta.Chat.Retrieve(ChatRetrieveParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `ChatRetrieveParams parameters`

  - `required string sessionID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class ChatRetrieveResponse:`

  Full chat session including its complete event history.

  - `required IReadOnlyList<Event> Events`

    Ordered list of events that make up the conversation history.

    - `class Stop:`

      - `required string? Error`

      - `required Boolean IsError`

      - `required Usage Usage`

        - `Double DurationMs`

        - `Long? TotalInputTokens`

        - `Long? TotalOutputTokens`

        - `Long Turns`

      - `Type Type`

        - `"stop"Stop`

    - `class TextDelta:`

      - `required string Content`

      - `Type Type`

        - `"text_delta"TextDelta`

    - `class Text:`

      - `required string Content`

      - `Type Type`

        - `"text"Text`

    - `class ThinkingDelta:`

      - `required string Content`

      - `Type Type`

        - `"thinking_delta"ThinkingDelta`

    - `class Thinking:`

      - `required string Content`

      - `Type Type`

        - `"thinking"Thinking`

    - `class ToolCall:`

      - `required IReadOnlyDictionary<string, JsonElement> Arguments`

      - `required string CallID`

      - `required string Name`

      - `Type Type`

        - `"tool_call"ToolCall`

    - `class ToolResult:`

      - `required string CallID`

      - `required string Name`

      - `required JsonElement Result`

      - `ImageAttachment? ImageAttachment`

        Coordinates for lazily resolving a page screenshot presigned URL.

        - `required string AttachmentName`

        - `required string SourceID`

      - `Type Type`

        - `"tool_result"ToolResult`

    - `class UserInput:`

      - `required string Content`

      - `Type Type`

        - `"user_input"UserInput`

  - `required string LastUpdatedAt`

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

  - `required string SessionID`

    Unique session identifier.

  - `string? GeneratedTitle`

    Auto-generated title derived from the first user message.

  - `IReadOnlyList<string>? IndexIds`

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

  - `JobMetadata? JobMetadata`

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

    - `Double DurationMs`

    - `string? Error`

    - `IReadOnlyList<string>? ExportConfigIds`

    - `Boolean IsError`

    - `Long? TotalInputTokens`

    - `Long? TotalOutputTokens`

    - `Long Turns`

### Example

```csharp
ChatRetrieveParams parameters = new() { SessionID = "session_id" };

var chat = await client.Beta.Chat.Retrieve(parameters);

Console.WriteLine(chat);
```

#### Response

```json
{
  "events": [
    {
      "error": "error",
      "is_error": true,
      "usage": {
        "duration_ms": 0,
        "total_input_tokens": 0,
        "total_output_tokens": 0,
        "turns": 0
      },
      "type": "stop"
    }
  ],
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "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

`Beta.Chat.Delete(ChatDeleteParamsparameters, CancellationTokencancellationToken = default)`

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

Delete a session.

### Parameters

- `ChatDeleteParams parameters`

  - `required string sessionID`

  - `string? organizationID`

  - `string? projectID`

### Example

```csharp
ChatDeleteParams parameters = new() { SessionID = "session_id" };

await client.Beta.Chat.Delete(parameters);
```

## Get Session Summary

`ChatGetSummaryResponse Beta.Chat.GetSummary(ChatGetSummaryParamsparameters, CancellationTokencancellationToken = default)`

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

Retrieve a session summary by ID.

### Parameters

- `ChatGetSummaryParams parameters`

  - `required string sessionID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class ChatGetSummaryResponse:`

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

  - `required string LastUpdatedAt`

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

  - `required string SessionID`

    Unique session identifier.

  - `string? GeneratedTitle`

    Auto-generated title derived from the first user message.

  - `IReadOnlyList<string>? IndexIds`

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

  - `JobMetadata? JobMetadata`

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

    - `Double DurationMs`

    - `string? Error`

    - `IReadOnlyList<string>? ExportConfigIds`

    - `Boolean IsError`

    - `Long? TotalInputTokens`

    - `Long? TotalOutputTokens`

    - `Long Turns`

### Example

```csharp
ChatGetSummaryParams parameters = new() { SessionID = "session_id" };

var response = await client.Beta.Chat.GetSummary(parameters);

Console.WriteLine(response);
```

#### Response

```json
{
  "last_updated_at": "2026-04-22T12:34:41.342245",
  "session_id": "ses-abc123",
  "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

`JsonElement Beta.Chat.Stream(ChatStreamParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `ChatStreamParams parameters`

  - `required string sessionID`

    Path param

  - `required IReadOnlyList<string> indexIds`

    Body param: Indexes to retrieve data from.

  - `required string prompt`

    Body param: User message for this chat turn.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

### Example

```csharp
ChatStreamParams parameters = new()
{
    SessionID = "session_id",
    IndexIds =
    [
        "idx-abc123", "idx-def456"
    ],
    Prompt = "What were the main findings in Q3?",
};

var response = await client.Beta.Chat.Stream(parameters);

Console.WriteLine(response);
```

#### Response

```json
{}
```

# Agent Data

## Get Agent Data

`AgentData Beta.AgentData.Get(AgentDataGetParamsparameters, CancellationTokencancellationToken = default)`

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

Get agent data by ID.

### Parameters

- `AgentDataGetParams parameters`

  - `required string itemID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class AgentData:`

  API Result for a single agent data item

  - `required IReadOnlyDictionary<string, JsonElement> Data`

  - `required string DeploymentName`

  - `string? ID`

  - `string Collection`

  - `DateTimeOffset? CreatedAt`

  - `string? ProjectID`

  - `DateTimeOffset? UpdatedAt`

### Example

```csharp
AgentDataGetParams parameters = new() { ItemID = "item_id" };

var agentData = await client.Beta.AgentData.Get(parameters);

Console.WriteLine(agentData);
```

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

`AgentData Beta.AgentData.Update(AgentDataUpdateParamsparameters, CancellationTokencancellationToken = default)`

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

Update agent data by ID (overwrites).

### Parameters

- `AgentDataUpdateParams parameters`

  - `required string itemID`

    Path param

  - `required IReadOnlyDictionary<string, JsonElement> data`

    Body param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

### Returns

- `class AgentData:`

  API Result for a single agent data item

  - `required IReadOnlyDictionary<string, JsonElement> Data`

  - `required string DeploymentName`

  - `string? ID`

  - `string Collection`

  - `DateTimeOffset? CreatedAt`

  - `string? ProjectID`

  - `DateTimeOffset? UpdatedAt`

### Example

```csharp
AgentDataUpdateParams parameters = new()
{
    ItemID = "item_id",
    Data = new Dictionary<string, JsonElement>()
    {
        { "foo", JsonSerializer.SerializeToElement("bar") }
    },
};

var agentData = await client.Beta.AgentData.Update(parameters);

Console.WriteLine(agentData);
```

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

`IReadOnlyDictionary<string, string> Beta.AgentData.Delete(AgentDataDeleteParamsparameters, CancellationTokencancellationToken = default)`

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

Delete agent data by ID.

### Parameters

- `AgentDataDeleteParams parameters`

  - `required string itemID`

  - `string? organizationID`

  - `string? projectID`

### Example

```csharp
AgentDataDeleteParams parameters = new() { ItemID = "item_id" };

var agentData = await client.Beta.AgentData.Delete(parameters);

Console.WriteLine(agentData);
```

#### Response

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

## Create Agent Data

`AgentData Beta.AgentData.Create(AgentDataCreateParamsparameters, CancellationTokencancellationToken = default)`

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

Create new agent data.

### Parameters

- `AgentDataCreateParams parameters`

  - `required IReadOnlyDictionary<string, JsonElement> data`

    Body param

  - `required string deploymentName`

    Body param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string collection`

    Body param

### Returns

- `class AgentData:`

  API Result for a single agent data item

  - `required IReadOnlyDictionary<string, JsonElement> Data`

  - `required string DeploymentName`

  - `string? ID`

  - `string Collection`

  - `DateTimeOffset? CreatedAt`

  - `string? ProjectID`

  - `DateTimeOffset? UpdatedAt`

### Example

```csharp
AgentDataCreateParams parameters = new()
{
    Data = new Dictionary<string, JsonElement>()
    {
        { "foo", JsonSerializer.SerializeToElement("bar") }
    },
    DeploymentName = "deployment_name",
};

var agentData = await client.Beta.AgentData.Create(parameters);

Console.WriteLine(agentData);
```

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

`AgentDataSearchPageResponse Beta.AgentData.Search(AgentDataSearchParamsparameters, CancellationTokencancellationToken = default)`

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

Search agent data with filtering, sorting, and pagination.

### Parameters

- `AgentDataSearchParams parameters`

  - `required string deploymentName`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string collection`

    Body param: The logical agent data collection to search within

  - `IReadOnlyDictionary<string, FilterItem>? filter`

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

    - `Eq? Eq`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Exclude?> Excludes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gt? Gt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gte? Gte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Include?> Includes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lt? Lt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lte? Lte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Ne? Ne`

      - `Double`

      - `string`

      - `DateTimeOffset`

  - `Boolean includeTotal`

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

  - `Long? offset`

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

  - `string? orderBy`

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

  - `Long? pageSize`

    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.

  - `string? pageToken`

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

### Returns

- `class AgentDataSearchPageResponse:`

  Paginated agent data search results.

  - `required IReadOnlyList<AgentData> Items`

    The list of items.

    - `required IReadOnlyDictionary<string, JsonElement> Data`

    - `required string DeploymentName`

    - `string? ID`

    - `string Collection`

    - `DateTimeOffset? CreatedAt`

    - `string? ProjectID`

    - `DateTimeOffset? UpdatedAt`

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
AgentDataSearchParams parameters = new() { DeploymentName = "deployment_name" };

var page = await client.Beta.AgentData.Search(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

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

`AgentDataAggregatePageResponse Beta.AgentData.Aggregate(AgentDataAggregateParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `AgentDataAggregateParams parameters`

  - `required string deploymentName`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string collection`

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

  - `Boolean? count`

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

  - `IReadOnlyDictionary<string, FilterItem>? filter`

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

    - `Eq? Eq`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Exclude?> Excludes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gt? Gt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gte? Gte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Include?> Includes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lt? Lt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lte? Lte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Ne? Ne`

      - `Double`

      - `string`

      - `DateTimeOffset`

  - `Boolean? first`

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

  - `IReadOnlyList<string>? groupBy`

    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

  - `Long? offset`

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

  - `string? orderBy`

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

  - `Long? pageSize`

    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.

  - `string? pageToken`

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

### Returns

- `class AgentDataAggregatePageResponse:`

  Paginated agent data aggregation groups.

  - `required IReadOnlyList<AgentDataAggregateResponse> Items`

    The list of items.

    - `required IReadOnlyDictionary<string, JsonElement> GroupKey`

    - `Long? Count`

    - `IReadOnlyDictionary<string, JsonElement>? FirstItem`

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
AgentDataAggregateParams parameters = new()
{
    DeploymentName = "deployment_name"
};

var page = await client.Beta.AgentData.Aggregate(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

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

`AgentDataDeleteByQueryResponse Beta.AgentData.DeleteByQuery(AgentDataDeleteByQueryParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `AgentDataDeleteByQueryParams parameters`

  - `required string deploymentName`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string collection`

    Body param: The logical agent data collection to delete from

  - `IReadOnlyDictionary<string, FilterItem>? filter`

    Body param: Optional filters to select which items to delete

    - `Eq? Eq`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Exclude?> Excludes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gt? Gt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Gte? Gte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `IReadOnlyList<Include?> Includes`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lt? Lt`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Lte? Lte`

      - `Double`

      - `string`

      - `DateTimeOffset`

    - `Ne? Ne`

      - `Double`

      - `string`

      - `DateTimeOffset`

### Returns

- `class AgentDataDeleteByQueryResponse:`

  API response for bulk delete operation

  - `required Long DeletedCount`

### Example

```csharp
AgentDataDeleteByQueryParams parameters = new()
{
    DeploymentName = "deployment_name"
};

var response = await client.Beta.AgentData.DeleteByQuery(parameters);

Console.WriteLine(response);
```

#### Response

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

## Domain Types

### Agent Data

- `class AgentData:`

  API Result for a single agent data item

  - `required IReadOnlyDictionary<string, JsonElement> Data`

  - `required string DeploymentName`

  - `string? ID`

  - `string Collection`

  - `DateTimeOffset? CreatedAt`

  - `string? ProjectID`

  - `DateTimeOffset? UpdatedAt`

# Directories

## Create Directory

`DirectoryCreateResponse Beta.Directories.Create(DirectoryCreateParamsparameters, CancellationTokencancellationToken = default)`

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

Create a new directory within the specified project.

### Parameters

- `DirectoryCreateParams parameters`

  - `required string name`

    Body param: Human-readable name for the directory.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? connectorSubscriptionID`

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

  - `string? description`

    Body param: Optional description shown to users.

  - `IReadOnlyDictionary<string, JsonElement>? systemMetadata`

    Body param: Reserved system-managed metadata.

  - `Type type`

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

    - `"ephemeral"Ephemeral`

    - `"user"User`

### Returns

- `class DirectoryCreateResponse:`

  API response schema for a directory.

  - `required string ID`

    Unique identifier for the directory.

  - `required string Name`

    Human-readable name for the directory.

  - `required string ProjectID`

    Project the directory belongs to.

  - `string? ConnectorSubscriptionID`

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

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `string? Description`

    Optional description shown to users.

  - `DateTimeOffset? ExpiresAt`

    When this directory expires and is eligible for cleanup.

  - `IReadOnlyDictionary<string, JsonElement>? SystemMetadata`

    Reserved system-managed metadata.

  - `Type? Type`

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

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
DirectoryCreateParams parameters = new() { Name = "x" };

var directory = await client.Beta.Directories.Create(parameters);

Console.WriteLine(directory);
```

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

`DirectoryListPageResponse Beta.Directories.List(DirectoryListParams?parameters, CancellationTokencancellationToken = default)`

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

List Directories

### Parameters

- `DirectoryListParams parameters`

  - `Boolean includeDeleted`

    Include deleted directories.

  - `string? name`

    Directory name to match.

  - `string? organizationID`

  - `Long? pageSize`

  - `string? pageToken`

  - `string? projectID`

  - `Type? type`

    Directory type to include.

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

  - `IReadOnlyList<Type>? types`

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

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

### Returns

- `class DirectoryListPageResponse:`

  API query response schema for directories.

  - `required IReadOnlyList<DirectoryListResponse> Items`

    The list of items.

    - `required string ID`

      Unique identifier for the directory.

    - `required string Name`

      Human-readable name for the directory.

    - `required string ProjectID`

      Project the directory belongs to.

    - `string? ConnectorSubscriptionID`

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

    - `DateTimeOffset? CreatedAt`

      Creation datetime

    - `DateTimeOffset? DeletedAt`

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

    - `string? Description`

      Optional description shown to users.

    - `DateTimeOffset? ExpiresAt`

      When this directory expires and is eligible for cleanup.

    - `IReadOnlyDictionary<string, JsonElement>? SystemMetadata`

      Reserved system-managed metadata.

    - `Type? Type`

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

      - `"ephemeral"Ephemeral`

      - `"index"Index`

      - `"user"User`

    - `DateTimeOffset? UpdatedAt`

      Update datetime

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
DirectoryListParams parameters = new();

var page = await client.Beta.Directories.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

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

`DirectoryGetResponse Beta.Directories.Get(DirectoryGetParamsparameters, CancellationTokencancellationToken = default)`

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

Retrieve a directory by its identifier.

### Parameters

- `DirectoryGetParams parameters`

  - `required string directoryID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class DirectoryGetResponse:`

  API response schema for a directory.

  - `required string ID`

    Unique identifier for the directory.

  - `required string Name`

    Human-readable name for the directory.

  - `required string ProjectID`

    Project the directory belongs to.

  - `string? ConnectorSubscriptionID`

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

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `string? Description`

    Optional description shown to users.

  - `DateTimeOffset? ExpiresAt`

    When this directory expires and is eligible for cleanup.

  - `IReadOnlyDictionary<string, JsonElement>? SystemMetadata`

    Reserved system-managed metadata.

  - `Type? Type`

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

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
DirectoryGetParams parameters = new() { DirectoryID = "directory_id" };

var directory = await client.Beta.Directories.Get(parameters);

Console.WriteLine(directory);
```

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

`DirectoryUpdateResponse Beta.Directories.Update(DirectoryUpdateParamsparameters, CancellationTokencancellationToken = default)`

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

Update directory metadata.

### Parameters

- `DirectoryUpdateParams parameters`

  - `required string directoryID`

    Path param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? description`

    Body param: Updated description for the directory.

  - `string? name`

    Body param: Updated name for the directory.

### Returns

- `class DirectoryUpdateResponse:`

  API response schema for a directory.

  - `required string ID`

    Unique identifier for the directory.

  - `required string Name`

    Human-readable name for the directory.

  - `required string ProjectID`

    Project the directory belongs to.

  - `string? ConnectorSubscriptionID`

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

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `string? Description`

    Optional description shown to users.

  - `DateTimeOffset? ExpiresAt`

    When this directory expires and is eligible for cleanup.

  - `IReadOnlyDictionary<string, JsonElement>? SystemMetadata`

    Reserved system-managed metadata.

  - `Type? Type`

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

    - `"ephemeral"Ephemeral`

    - `"index"Index`

    - `"user"User`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
DirectoryUpdateParams parameters = new() { DirectoryID = "directory_id" };

var directory = await client.Beta.Directories.Update(parameters);

Console.WriteLine(directory);
```

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

`Beta.Directories.Delete(DirectoryDeleteParamsparameters, CancellationTokencancellationToken = default)`

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

Permanently delete a directory.

### Parameters

- `DirectoryDeleteParams parameters`

  - `required string directoryID`

  - `string? organizationID`

  - `string? projectID`

### Example

```csharp
DirectoryDeleteParams parameters = new() { DirectoryID = "directory_id" };

await client.Beta.Directories.Delete(parameters);
```

# Files

## Add Directory File

`FileAddResponse Beta.Directories.Files.Add(FileAddParamsparameters, CancellationTokencancellationToken = default)`

**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

- `FileAddParams parameters`

  - `required string directoryID`

    Path param

  - `required string fileID`

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

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? displayName`

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

  - `IReadOnlyDictionary<string, Metadata>? metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `string? uniqueID`

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

### Returns

- `class FileAddResponse:`

  API response schema for a directory file.

  - `required string ID`

    Unique identifier for the directory file.

  - `required string DirectoryID`

    Directory the file belongs to.

  - `required string DisplayName`

    Display name for the file.

  - `required string ProjectID`

    Project the directory file belongs to.

  - `required string UniqueID`

    Unique identifier for the file in the directory

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `PresignedUrl? DownloadUrl`

    Schema for a presigned URL.

    - `required DateTimeOffset ExpiresAt`

      The time at which the presigned URL expires

    - `required string Url`

      A presigned URL for IO operations against a private file

    - `IReadOnlyDictionary<string, string>? FormFields`

      Form fields for a presigned POST request

  - `string? FileID`

    File ID for the storage location.

  - `IReadOnlyDictionary<string, Metadata> Metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
FileAddParams parameters = new()
{
    DirectoryID = "directory_id",
    FileID = "file_id",
};

var response = await client.Beta.Directories.Files.Add(parameters);

Console.WriteLine(response);
```

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

`FileListPageResponse Beta.Directories.Files.List(FileListParamsparameters, CancellationTokencancellationToken = default)`

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

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

### Parameters

- `FileListParams parameters`

  - `required string directoryID`

  - `string? displayName`

  - `string? displayNameContains`

  - `IReadOnlyList<string>? expand`

    Fields to expand on each directory file.

  - `string? fileID`

  - `Boolean includeDeleted`

  - `string? organizationID`

  - `Long? pageSize`

  - `string? pageToken`

  - `string? projectID`

  - `string? uniqueID`

  - `DateTimeOffset? updatedAtOnOrAfter`

    Include items updated at or after this timestamp (inclusive)

  - `DateTimeOffset? updatedAtOnOrBefore`

    Include items updated at or before this timestamp (inclusive)

### Returns

- `class FileListPageResponse:`

  API query response schema for directory files.

  - `required IReadOnlyList<FileListResponse> Items`

    The list of items.

    - `required string ID`

      Unique identifier for the directory file.

    - `required string DirectoryID`

      Directory the file belongs to.

    - `required string DisplayName`

      Display name for the file.

    - `required string ProjectID`

      Project the directory file belongs to.

    - `required string UniqueID`

      Unique identifier for the file in the directory

    - `DateTimeOffset? CreatedAt`

      Creation datetime

    - `DateTimeOffset? DeletedAt`

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

    - `PresignedUrl? DownloadUrl`

      Schema for a presigned URL.

      - `required DateTimeOffset ExpiresAt`

        The time at which the presigned URL expires

      - `required string Url`

        A presigned URL for IO operations against a private file

      - `IReadOnlyDictionary<string, string>? FormFields`

        Form fields for a presigned POST request

    - `string? FileID`

      File ID for the storage location.

    - `IReadOnlyDictionary<string, Metadata> Metadata`

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

      - `string`

      - `Long`

      - `Double`

      - `Boolean`

      - `JsonElement`

      - `IReadOnlyList<string>`

    - `DateTimeOffset? UpdatedAt`

      Update datetime

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
FileListParams parameters = new() { DirectoryID = "directory_id" };

var page = await client.Beta.Directories.Files.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

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

`FileGetResponse Beta.Directories.Files.Get(FileGetParamsparameters, CancellationTokencancellationToken = default)`

**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

- `FileGetParams parameters`

  - `required string directoryID`

    Path param

  - `required string directoryFileID`

    Path param

  - `IReadOnlyList<string>? expand`

    Query param: Fields to expand.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

### Returns

- `class FileGetResponse:`

  API response schema for a directory file.

  - `required string ID`

    Unique identifier for the directory file.

  - `required string DirectoryID`

    Directory the file belongs to.

  - `required string DisplayName`

    Display name for the file.

  - `required string ProjectID`

    Project the directory file belongs to.

  - `required string UniqueID`

    Unique identifier for the file in the directory

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `PresignedUrl? DownloadUrl`

    Schema for a presigned URL.

    - `required DateTimeOffset ExpiresAt`

      The time at which the presigned URL expires

    - `required string Url`

      A presigned URL for IO operations against a private file

    - `IReadOnlyDictionary<string, string>? FormFields`

      Form fields for a presigned POST request

  - `string? FileID`

    File ID for the storage location.

  - `IReadOnlyDictionary<string, Metadata> Metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
FileGetParams parameters = new()
{
    DirectoryID = "directory_id",
    DirectoryFileID = "directory_file_id",
};

var file = await client.Beta.Directories.Files.Get(parameters);

Console.WriteLine(file);
```

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

`FileUpdateResponse Beta.Directories.Files.Update(FileUpdateParamsparameters, CancellationTokencancellationToken = default)`

**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

- `FileUpdateParams parameters`

  - `required string directoryID`

    Path param

  - `required string directoryFileID`

    Path param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? displayName`

    Body param: Updated display name.

  - `IReadOnlyDictionary<string, Metadata>? metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `string? targetDirectoryID`

    Body param: Move file to a different directory.

  - `string? uniqueID`

    Body param: Updated unique identifier.

### Returns

- `class FileUpdateResponse:`

  API response schema for a directory file.

  - `required string ID`

    Unique identifier for the directory file.

  - `required string DirectoryID`

    Directory the file belongs to.

  - `required string DisplayName`

    Display name for the file.

  - `required string ProjectID`

    Project the directory file belongs to.

  - `required string UniqueID`

    Unique identifier for the file in the directory

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `PresignedUrl? DownloadUrl`

    Schema for a presigned URL.

    - `required DateTimeOffset ExpiresAt`

      The time at which the presigned URL expires

    - `required string Url`

      A presigned URL for IO operations against a private file

    - `IReadOnlyDictionary<string, string>? FormFields`

      Form fields for a presigned POST request

  - `string? FileID`

    File ID for the storage location.

  - `IReadOnlyDictionary<string, Metadata> Metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
FileUpdateParams parameters = new()
{
    DirectoryID = "directory_id",
    DirectoryFileID = "directory_file_id",
};

var file = await client.Beta.Directories.Files.Update(parameters);

Console.WriteLine(file);
```

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

`Beta.Directories.Files.Delete(FileDeleteParamsparameters, CancellationTokencancellationToken = default)`

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

### Parameters

- `FileDeleteParams parameters`

  - `required string directoryID`

    Path param

  - `required string directoryFileID`

    Path param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

### Example

```csharp
FileDeleteParams parameters = new()
{
    DirectoryID = "directory_id",
    DirectoryFileID = "directory_file_id",
};

await client.Beta.Directories.Files.Delete(parameters);
```

## Upload File To Directory

`FileUploadResponse Beta.Directories.Files.Upload(FileUploadParamsparameters, CancellationTokencancellationToken = default)`

**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

- `FileUploadParams parameters`

  - `required string directoryID`

    Path param

  - `required string uploadFile`

    Body param

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `string? displayName`

    Body param

  - `string? externalFileID`

    Body param

  - `string? metadata`

    Body param: User metadata as a JSON object string.

  - `string? uniqueID`

    Body param

### Returns

- `class FileUploadResponse:`

  API response schema for a directory file.

  - `required string ID`

    Unique identifier for the directory file.

  - `required string DirectoryID`

    Directory the file belongs to.

  - `required string DisplayName`

    Display name for the file.

  - `required string ProjectID`

    Project the directory file belongs to.

  - `required string UniqueID`

    Unique identifier for the file in the directory

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `DateTimeOffset? DeletedAt`

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

  - `PresignedUrl? DownloadUrl`

    Schema for a presigned URL.

    - `required DateTimeOffset ExpiresAt`

      The time at which the presigned URL expires

    - `required string Url`

      A presigned URL for IO operations against a private file

    - `IReadOnlyDictionary<string, string>? FormFields`

      Form fields for a presigned POST request

  - `string? FileID`

    File ID for the storage location.

  - `IReadOnlyDictionary<string, Metadata> Metadata`

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

    - `string`

    - `Long`

    - `Double`

    - `Boolean`

    - `JsonElement`

    - `IReadOnlyList<string>`

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
FileUploadParams parameters = new()
{
    DirectoryID = "directory_id",
    UploadFile = Encoding.UTF8.GetBytes("Example data"),
};

var response = await client.Beta.Directories.Files.Upload(parameters);

Console.WriteLine(response);
```

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

`SplitCreateResponse Beta.Split.Create(SplitCreateParamsparameters, CancellationTokencancellationToken = default)`

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

Create a document split job.

### Parameters

- `SplitCreateParams parameters`

  - `required SplitDocumentInput documentInput`

    Body param: Document to be split.

  - `string? organizationID`

    Query param

  - `string? projectID`

    Query param

  - `Configuration? configuration`

    Body param: Split configuration with categories and splitting strategy.

    - `required IReadOnlyList<SplitCategory> Categories`

      Categories to split documents into.

      - `required string Name`

        Name of the category.

      - `string? Description`

        Optional description of what content belongs in this category.

    - `SplittingStrategy SplittingStrategy`

      Strategy for splitting documents.

      - `AllowUncategorized AllowUncategorized`

        Controls handling of pages that don't match any category. 'include': pages can be grouped as 'uncategorized' and included in results. 'forbid': all pages must be assigned to a defined category. 'omit': pages can be classified as 'uncategorized' but are excluded from results.

        - `"forbid"Forbid`

        - `"include"Include`

        - `"omit"Omit`

      - `string? CustomInstructions`

        Free-form guidance for where segment boundaries are placed.

      - `Long MinPagesPerSplit`

        Minimum pages per segment. Shorter segments are merged into an adjacent segment; 1 disables merging.

  - `string? configurationID`

    Body param: Saved split configuration ID.

### Returns

- `class SplitCreateResponse:`

  Beta response — uses nested document_input object.

  - `required string ID`

    Unique identifier for the split job.

  - `required IReadOnlyList<SplitCategory> Categories`

    Categories used for splitting.

    - `required string Name`

      Name of the category.

    - `string? Description`

      Optional description of what content belongs in this category.

  - `required SplitDocumentInput DocumentInput`

    Document that was split.

    - `required string Type`

      Type of document input. Valid values are: file_id

    - `required string Value`

      Document identifier.

  - `required string ProjectID`

    Project ID this job belongs to.

  - `required string Status`

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

  - `required string UserID`

    User ID who created this job.

  - `string? ConfigurationID`

    Split configuration ID used for this job.

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `string? ErrorMessage`

    Error message if the job failed.

  - `SplitResultResponse? Result`

    Result of a completed split job.

    - `required IReadOnlyList<SplitSegmentResponse> Segments`

      List of document segments.

      - `required string Category`

        Category name this split belongs to.

      - `required string ConfidenceCategory`

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

      - `required IReadOnlyList<Long> Pages`

        1-indexed page numbers in this split.

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
SplitCreateParams parameters = new()
{
    DocumentInput = new()
    {
        Type = "type",
        Value = "value",
    },
};

var split = await client.Beta.Split.Create(parameters);

Console.WriteLine(split);
```

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

`SplitListPageResponse Beta.Split.List(SplitListParams?parameters, CancellationTokencancellationToken = default)`

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

List document split jobs.

### Parameters

- `SplitListParams parameters`

  - `DateTimeOffset? createdAtOnOrAfter`

    Include items created at or after this timestamp (inclusive)

  - `DateTimeOffset? createdAtOnOrBefore`

    Include items created at or before this timestamp (inclusive)

  - `IReadOnlyList<string>? jobIds`

    Filter by specific job IDs

  - `string? organizationID`

  - `Long? pageSize`

  - `string? pageToken`

  - `string? projectID`

  - `Status? status`

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

    - `"cancelled"Cancelled`

    - `"completed"Completed`

    - `"failed"Failed`

    - `"pending"Pending`

    - `"processing"Processing`

### Returns

- `class SplitListPageResponse:`

  Beta paginated list of split jobs.

  - `required IReadOnlyList<SplitListResponse> Items`

    The list of items.

    - `required string ID`

      Unique identifier for the split job.

    - `required IReadOnlyList<SplitCategory> Categories`

      Categories used for splitting.

      - `required string Name`

        Name of the category.

      - `string? Description`

        Optional description of what content belongs in this category.

    - `required SplitDocumentInput DocumentInput`

      Document that was split.

      - `required string Type`

        Type of document input. Valid values are: file_id

      - `required string Value`

        Document identifier.

    - `required string ProjectID`

      Project ID this job belongs to.

    - `required string Status`

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

    - `required string UserID`

      User ID who created this job.

    - `string? ConfigurationID`

      Split configuration ID used for this job.

    - `DateTimeOffset? CreatedAt`

      Creation datetime

    - `string? ErrorMessage`

      Error message if the job failed.

    - `SplitResultResponse? Result`

      Result of a completed split job.

      - `required IReadOnlyList<SplitSegmentResponse> Segments`

        List of document segments.

        - `required string Category`

          Category name this split belongs to.

        - `required string ConfidenceCategory`

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

        - `required IReadOnlyList<Long> Pages`

          1-indexed page numbers in this split.

    - `DateTimeOffset? UpdatedAt`

      Update datetime

  - `string? NextPageToken`

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

  - `Long? TotalSize`

    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

```csharp
SplitListParams parameters = new();

var page = await client.Beta.Split.List(parameters);
await foreach (var item in page.Paginate())
{
    Console.WriteLine(item);
}
```

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

`SplitGetResponse Beta.Split.Get(SplitGetParamsparameters, CancellationTokencancellationToken = default)`

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

Get a document split job.

### Parameters

- `SplitGetParams parameters`

  - `required string splitJobID`

  - `string? organizationID`

  - `string? projectID`

### Returns

- `class SplitGetResponse:`

  Beta response — uses nested document_input object.

  - `required string ID`

    Unique identifier for the split job.

  - `required IReadOnlyList<SplitCategory> Categories`

    Categories used for splitting.

    - `required string Name`

      Name of the category.

    - `string? Description`

      Optional description of what content belongs in this category.

  - `required SplitDocumentInput DocumentInput`

    Document that was split.

    - `required string Type`

      Type of document input. Valid values are: file_id

    - `required string Value`

      Document identifier.

  - `required string ProjectID`

    Project ID this job belongs to.

  - `required string Status`

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

  - `required string UserID`

    User ID who created this job.

  - `string? ConfigurationID`

    Split configuration ID used for this job.

  - `DateTimeOffset? CreatedAt`

    Creation datetime

  - `string? ErrorMessage`

    Error message if the job failed.

  - `SplitResultResponse? Result`

    Result of a completed split job.

    - `required IReadOnlyList<SplitSegmentResponse> Segments`

      List of document segments.

      - `required string Category`

        Category name this split belongs to.

      - `required string ConfidenceCategory`

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

      - `required IReadOnlyList<Long> Pages`

        1-indexed page numbers in this split.

  - `DateTimeOffset? UpdatedAt`

    Update datetime

### Example

```csharp
SplitGetParams parameters = new() { SplitJobID = "split_job_id" };

var split = await client.Beta.Split.Get(parameters);

Console.WriteLine(split);
```

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

- `class SplitCategory:`

  Category definition for document splitting.

  - `required string Name`

    Name of the category.

  - `string? Description`

    Optional description of what content belongs in this category.

### Split Document Input

- `class SplitDocumentInput:`

  Document input specification for beta API.

  - `required string Type`

    Type of document input. Valid values are: file_id

  - `required string Value`

    Document identifier.

### Split Result Response

- `class SplitResultResponse:`

  Result of a completed split job.

  - `required IReadOnlyList<SplitSegmentResponse> Segments`

    List of document segments.

    - `required string Category`

      Category name this split belongs to.

    - `required string ConfidenceCategory`

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

    - `required IReadOnlyList<Long> Pages`

      1-indexed page numbers in this split.

### Split Segment Response

- `class SplitSegmentResponse:`

  A segment of the split document.

  - `required string Category`

    Category name this split belongs to.

  - `required string ConfidenceCategory`

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

  - `required IReadOnlyList<Long> Pages`

    1-indexed page numbers in this split.
