# Beta

# Indexes

## Get Index

`client.Beta.Indexes.Get(ctx, indexID, query) (*BetaIndexGetResponse, error)`

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

Get an index by ID.

### Parameters

- `indexID string`

- `query BetaIndexGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaIndexGetResponse struct{…}`

  A searchable index over a directory of documents.

  - `ID string`

    Unique identifier

  - `ExportConfigID string`

    ID of the export configuration.

  - `Name string`

    Index name.

  - `OutputDirectoryID string`

    ID of the output directory holding the indexed files.

  - `ProjectID string`

    Project this index belongs to.

  - `SourceDirectoryID string`

    ID of the source directory.

  - `SyncConfigID string`

    ID of the sync configuration.

  - `CreatedAt Time`

    Creation datetime

  - `Description string`

    Index description.

  - `LastExportedAt Time`

    Last export time.

  - `LastSyncedAt Time`

    Last sync time.

  - `Metadata map[string, any]`

    Build state and diagnostic info.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  index, err := client.Beta.Indexes.Get(
    context.TODO(),
    "index_id",
    llamacloud.BetaIndexGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Delete Index

`client.Beta.Indexes.Delete(ctx, indexID, body) error`

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

Delete an index.

### Parameters

- `indexID string`

- `body BetaIndexDeleteParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Example

```go
package main

import (
  "context"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Beta.Indexes.Delete(
    context.TODO(),
    "index_id",
    llamacloud.BetaIndexDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Create Index

`client.Beta.Indexes.New(ctx, params) (*BetaIndexNewResponse, error)`

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

Create a searchable index over a source directory.

### Parameters

- `params BetaIndexNewParams`

  - `SourceDirectoryID param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Description param.Field[string]`

    Body param: Optional description of the index.

  - `Name param.Field[string]`

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

  - `Products param.Field[[]BetaIndexNewParamsProduct]`

    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.

    - `ProductConfigID string`

      ID of the product configuration.

    - `ProductType string`

      Product type. One of: parse, extract.

  - `StoreAttachments param.Field[[]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.

  - `SyncFrequency param.Field[string]`

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

  - `VectorTarget param.Field[BetaIndexNewParamsVectorTarget]`

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

    - `const BetaIndexNewParamsVectorTargetDefault BetaIndexNewParamsVectorTarget = "DEFAULT"`

    - `const BetaIndexNewParamsVectorTargetDisabled BetaIndexNewParamsVectorTarget = "DISABLED"`

### Returns

- `type BetaIndexNewResponse struct{…}`

  A searchable index over a directory of documents.

  - `ID string`

    Unique identifier

  - `ExportConfigID string`

    ID of the export configuration.

  - `Name string`

    Index name.

  - `OutputDirectoryID string`

    ID of the output directory holding the indexed files.

  - `ProjectID string`

    Project this index belongs to.

  - `SourceDirectoryID string`

    ID of the source directory.

  - `SyncConfigID string`

    ID of the sync configuration.

  - `CreatedAt Time`

    Creation datetime

  - `Description string`

    Index description.

  - `LastExportedAt Time`

    Last export time.

  - `LastSyncedAt Time`

    Last sync time.

  - `Metadata map[string, any]`

    Build state and diagnostic info.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  index, err := client.Beta.Indexes.New(context.TODO(), llamacloud.BetaIndexNewParams{
    SourceDirectoryID: "dir-abc123",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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"
  },
  "updated_at": "2019-12-27T18:11:19.117Z"
}
```

## Sync Index

`client.Beta.Indexes.Sync(ctx, indexID, body) (*BetaIndexSyncResponse, error)`

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

- `indexID string`

- `body BetaIndexSyncParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaIndexSyncResponse interface{…}`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Indexes.Sync(
    context.TODO(),
    "index_id",
    llamacloud.BetaIndexSyncParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

#### Response

```json
{}
```

## List Indexes

`client.Beta.Indexes.List(ctx, query) (*PaginatedCursor[BetaIndexListResponse], error)`

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

List indexes for the current project.

### Parameters

- `query BetaIndexListParams`

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `SourceDirectoryID param.Field[string]`

### Returns

- `type BetaIndexListResponse struct{…}`

  A searchable index over a directory of documents.

  - `ID string`

    Unique identifier

  - `ExportConfigID string`

    ID of the export configuration.

  - `Name string`

    Index name.

  - `OutputDirectoryID string`

    ID of the output directory holding the indexed files.

  - `ProjectID string`

    Project this index belongs to.

  - `SourceDirectoryID string`

    ID of the source directory.

  - `SyncConfigID string`

    ID of the sync configuration.

  - `CreatedAt Time`

    Creation datetime

  - `Description string`

    Index description.

  - `LastExportedAt Time`

    Last export time.

  - `LastSyncedAt Time`

    Last sync time.

  - `Metadata map[string, any]`

    Build state and diagnostic info.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Indexes.List(context.TODO(), llamacloud.BetaIndexListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.Retrieval.Get(ctx, params) (*BetaRetrievalGetResponse, error)`

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

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

### Parameters

- `params BetaRetrievalGetParams`

  - `IndexID param.Field[string]`

    Body param: ID of the index to retrieve against.

  - `Query param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `CustomFilters param.Field[map[string, *BetaRetrievalGetParamsCustomFilterUnion]]`

    Body param: Filters on user-defined metadata fields.

    - `type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloat struct{…}`

      - `Operator string`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorEq BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "eq"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorGt BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "gt"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorGte BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "gte"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorIn BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "in"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorLt BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "lt"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorLte BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "lte"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorNe BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "ne"`

        - `const BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperatorNin BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatOperator = "nin"`

      - `Value BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueUnion`

        - `string`

        - `bool`

        - `float64`

        - `type BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArray []BetaRetrievalGetParamsCustomFilterFilterTypeUnionStrIntBoolFloatValueArrayItemUnion`

          - `string`

          - `bool`

          - `float64`

    - `type BetaRetrievalGetParamsCustomFilterArray []BetaRetrievalGetParamsCustomFilterArrayItem`

      - `Operator string`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorEq BetaRetrievalGetParamsCustomFilterArrayItemOperator = "eq"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorGt BetaRetrievalGetParamsCustomFilterArrayItemOperator = "gt"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorGte BetaRetrievalGetParamsCustomFilterArrayItemOperator = "gte"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorIn BetaRetrievalGetParamsCustomFilterArrayItemOperator = "in"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorLt BetaRetrievalGetParamsCustomFilterArrayItemOperator = "lt"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorLte BetaRetrievalGetParamsCustomFilterArrayItemOperator = "lte"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorNe BetaRetrievalGetParamsCustomFilterArrayItemOperator = "ne"`

        - `const BetaRetrievalGetParamsCustomFilterArrayItemOperatorNin BetaRetrievalGetParamsCustomFilterArrayItemOperator = "nin"`

      - `Value BetaRetrievalGetParamsCustomFilterArrayItemValueUnion`

        - `float64`

        - `type BetaRetrievalGetParamsCustomFilterArrayItemValueArray []float64`

  - `FullTextPipelineWeight param.Field[float64]`

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

  - `NumCandidates param.Field[int64]`

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

  - `Rerank param.Field[BetaRetrievalGetParamsRerank]`

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

    - `Enabled bool`

      Set to false to disable reranking.

    - `TopN int64`

      Number of results to return after reranking.

  - `ScoreThreshold param.Field[float64]`

    Body param: Minimum score threshold for returned results.

  - `StaticFilters param.Field[BetaRetrievalGetParamsStaticFilters]`

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

    - `ParsedDirectoryFileID BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileID`

      - `Operator string`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorEq BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "eq"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorGt BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "gt"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorGte BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "gte"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorIn BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "in"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorLt BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "lt"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorLte BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "lte"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorNe BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "ne"`

        - `const BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperatorNin BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDOperator = "nin"`

      - `Value BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueUnion`

        - `string`

        - `type BetaRetrievalGetParamsStaticFiltersParsedDirectoryFileIDValueArray []string`

  - `TopK param.Field[int64]`

    Body param: Maximum number of results to return.

  - `VectorPipelineWeight param.Field[float64]`

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

### Returns

- `type BetaRetrievalGetResponse struct{…}`

  Response containing retrieval results.

  - `Results []BetaRetrievalGetResponseResult`

    Ordered list of retrieved chunks.

    - `Content string`

      Text content of the retrieved chunk.

    - `Metadata map[string, BetaRetrievalGetResponseResultMetadataUnion]`

      User-defined metadata associated with the chunk.

      - `string`

      - `int64`

      - `float64`

      - `bool`

      - `type BetaRetrievalGetResponseResultMetadataMetadataListValue []string`

    - `RerankScore float64`

      Relevance score from the reranker, if reranking was applied.

    - `Score float64`

      Hybrid search relevance score.

    - `StaticFields BetaRetrievalGetResponseResultStaticFields`

      Built-in fields stored for every exported chunk.

      - `Attachments []BetaRetrievalGetResponseResultStaticFieldsAttachment`

        Attachments associated with the chunk

        - `AttachmentName string`

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

        - `SourceID string`

          File ID to pass as source_id when fetching the attachment.

        - `Type string`

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

      - `ChunkEndChar int64`

        End character offset of the chunk.

      - `ChunkIndex int64`

        Index of the chunk within the file.

      - `ChunkStartChar int64`

        Start character offset of the chunk.

      - `ChunkTokenCount int64`

        Token count of the chunk.

      - `PageRangeEnd int64`

        Last page number covered by this chunk.

      - `PageRangeStart int64`

        First page number covered by this chunk.

      - `ParsedDirectoryFileID string`

        ID of the parsed file.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  retrieval, err := client.Beta.Retrieval.Get(context.TODO(), llamacloud.BetaRetrievalGetParams{
    IndexID: "idx-abc123",
    Query: "What are the key findings?",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", retrieval.Results)
}
```

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

`client.Beta.Retrieval.Find(ctx, params) (*PaginatedCursorPost[BetaRetrievalFindResponse], error)`

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

Search for files by name.

### Parameters

- `params BetaRetrievalFindParams`

  - `IndexID param.Field[string]`

    Body param: ID of the index to search within.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `FileName param.Field[string]`

    Body param: Exact file name to match.

  - `FileNameContains param.Field[string]`

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

  - `PageSize param.Field[int64]`

    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.

  - `PageToken param.Field[string]`

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

### Returns

- `type BetaRetrievalFindResponse struct{…}`

  A file returned by find.

  - `FileID string`

    ID of the file.

  - `FileName string`

    Display name of the file.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Retrieval.Find(context.TODO(), llamacloud.BetaRetrievalFindParams{
    IndexID: "idx-abc123",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

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

## Grep File

`client.Beta.Retrieval.Grep(ctx, params) (*PaginatedCursorPost[BetaRetrievalGrepResponse], error)`

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

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

### Parameters

- `params BetaRetrievalGrepParams`

  - `FileID param.Field[string]`

    Body param: ID of the file to grep.

  - `IndexID param.Field[string]`

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

  - `Pattern param.Field[string]`

    Body param: Regex pattern to search for.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `ContextChars param.Field[int64]`

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

  - `PageSize param.Field[int64]`

    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.

  - `PageToken param.Field[string]`

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

### Returns

- `type BetaRetrievalGrepResponse struct{…}`

  A single grep match within a file.

  - `Content string`

    Matched text content.

  - `EndChar int64`

    End character offset of the match.

  - `StartChar int64`

    Start character offset of the match.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Retrieval.Grep(context.TODO(), llamacloud.BetaRetrievalGrepParams{
    FileID: "file_id",
    IndexID: "idx-abc123",
    Pattern: "revenue|profit",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

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

## Read File

`client.Beta.Retrieval.Read(ctx, params) (*BetaRetrievalReadResponse, error)`

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

Read the parsed text content of a specific file.

### Parameters

- `params BetaRetrievalReadParams`

  - `FileID param.Field[string]`

    Body param: ID of the file to read.

  - `IndexID param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `MaxLength param.Field[int64]`

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

  - `Offset param.Field[int64]`

    Body param: Starting character offset.

### Returns

- `type BetaRetrievalReadResponse struct{…}`

  File read result.

  - `Content string`

    Parsed text content of the file.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Retrieval.Read(context.TODO(), llamacloud.BetaRetrievalReadParams{
    FileID: "file_id",
    IndexID: "idx-abc123",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Content)
}
```

#### Response

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

# Chat

## List Sessions

`client.Beta.Chat.List(ctx, query) (*PaginatedCursor[BetaChatListResponse], error)`

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

List all chat sessions for the current project.

### Parameters

- `query BetaChatListParams`

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaChatListResponse struct{…}`

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

  - `LastUpdatedAt string`

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

  - `SessionID string`

    Unique session identifier.

  - `GeneratedTitle string`

    Auto-generated title derived from the first user message.

  - `IndexIDs []string`

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

  - `JobMetadata BetaChatListResponseJobMetadata`

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

    - `DurationMs float64`

    - `Error string`

    - `ExportConfigIDs []string`

    - `IsError bool`

    - `TotalInputTokens int64`

    - `TotalOutputTokens int64`

    - `Turns int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Chat.List(context.TODO(), llamacloud.BetaChatListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.Chat.New(ctx, params) (*BetaChatNewResponse, error)`

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

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

### Parameters

- `params BetaChatNewParams`

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `IndexIDs param.Field[[]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.

### Returns

- `type BetaChatNewResponse struct{…}`

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

  - `LastUpdatedAt string`

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

  - `SessionID string`

    Unique session identifier.

  - `GeneratedTitle string`

    Auto-generated title derived from the first user message.

  - `IndexIDs []string`

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

  - `JobMetadata BetaChatNewResponseJobMetadata`

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

    - `DurationMs float64`

    - `Error string`

    - `ExportConfigIDs []string`

    - `IsError bool`

    - `TotalInputTokens int64`

    - `TotalOutputTokens int64`

    - `Turns int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  chat, err := client.Beta.Chat.New(context.TODO(), llamacloud.BetaChatNewParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", chat.SessionID)
}
```

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

`client.Beta.Chat.Get(ctx, sessionID, query) (*BetaChatGetResponse, error)`

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

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

### Parameters

- `sessionID string`

- `query BetaChatGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaChatGetResponse struct{…}`

  Full chat session including its complete event history.

  - `Events []BetaChatGetResponseEventUnion`

    Ordered list of events that make up the conversation history.

    - `type BetaChatGetResponseEventStop struct{…}`

      - `Error string`

      - `IsError bool`

      - `Usage BetaChatGetResponseEventStopUsage`

        - `DurationMs float64`

        - `TotalInputTokens int64`

        - `TotalOutputTokens int64`

        - `Turns int64`

      - `Type string`

        - `const BetaChatGetResponseEventStopTypeStop BetaChatGetResponseEventStopType = "stop"`

    - `type BetaChatGetResponseEventTextDelta struct{…}`

      - `Content string`

      - `Type string`

        - `const BetaChatGetResponseEventTextDeltaTypeTextDelta BetaChatGetResponseEventTextDeltaType = "text_delta"`

    - `type BetaChatGetResponseEventText struct{…}`

      - `Content string`

      - `Type string`

        - `const BetaChatGetResponseEventTextTypeText BetaChatGetResponseEventTextType = "text"`

    - `type BetaChatGetResponseEventThinkingDelta struct{…}`

      - `Content string`

      - `Type string`

        - `const BetaChatGetResponseEventThinkingDeltaTypeThinkingDelta BetaChatGetResponseEventThinkingDeltaType = "thinking_delta"`

    - `type BetaChatGetResponseEventThinking struct{…}`

      - `Content string`

      - `Type string`

        - `const BetaChatGetResponseEventThinkingTypeThinking BetaChatGetResponseEventThinkingType = "thinking"`

    - `type BetaChatGetResponseEventToolCall struct{…}`

      - `Arguments map[string, any]`

      - `CallID string`

      - `Name string`

      - `Type string`

        - `const BetaChatGetResponseEventToolCallTypeToolCall BetaChatGetResponseEventToolCallType = "tool_call"`

    - `type BetaChatGetResponseEventToolResult struct{…}`

      - `CallID string`

      - `Name string`

      - `Result any`

      - `ImageAttachment BetaChatGetResponseEventToolResultImageAttachment`

        Coordinates for lazily resolving a page screenshot presigned URL.

        - `AttachmentName string`

        - `SourceID string`

      - `Type string`

        - `const BetaChatGetResponseEventToolResultTypeToolResult BetaChatGetResponseEventToolResultType = "tool_result"`

    - `type BetaChatGetResponseEventUserInput struct{…}`

      - `Content string`

      - `Type string`

        - `const BetaChatGetResponseEventUserInputTypeUserInput BetaChatGetResponseEventUserInputType = "user_input"`

  - `LastUpdatedAt string`

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

  - `SessionID string`

    Unique session identifier.

  - `GeneratedTitle string`

    Auto-generated title derived from the first user message.

  - `IndexIDs []string`

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

  - `JobMetadata BetaChatGetResponseJobMetadata`

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

    - `DurationMs float64`

    - `Error string`

    - `ExportConfigIDs []string`

    - `IsError bool`

    - `TotalInputTokens int64`

    - `TotalOutputTokens int64`

    - `Turns int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  chat, err := client.Beta.Chat.Get(
    context.TODO(),
    "session_id",
    llamacloud.BetaChatGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", chat.SessionID)
}
```

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

`client.Beta.Chat.Delete(ctx, sessionID, body) error`

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

Delete a session.

### Parameters

- `sessionID string`

- `body BetaChatDeleteParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Example

```go
package main

import (
  "context"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Beta.Chat.Delete(
    context.TODO(),
    "session_id",
    llamacloud.BetaChatDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Get Session Summary

`client.Beta.Chat.GetSummary(ctx, sessionID, query) (*BetaChatGetSummaryResponse, error)`

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

Retrieve a session summary by ID.

### Parameters

- `sessionID string`

- `query BetaChatGetSummaryParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaChatGetSummaryResponse struct{…}`

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

  - `LastUpdatedAt string`

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

  - `SessionID string`

    Unique session identifier.

  - `GeneratedTitle string`

    Auto-generated title derived from the first user message.

  - `IndexIDs []string`

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

  - `JobMetadata BetaChatGetSummaryResponseJobMetadata`

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

    - `DurationMs float64`

    - `Error string`

    - `ExportConfigIDs []string`

    - `IsError bool`

    - `TotalInputTokens int64`

    - `TotalOutputTokens int64`

    - `Turns int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Chat.GetSummary(
    context.TODO(),
    "session_id",
    llamacloud.BetaChatGetSummaryParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.SessionID)
}
```

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

`client.Beta.Chat.Stream(ctx, sessionID, params) (*BetaChatStreamResponse, error)`

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

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

### Parameters

- `sessionID string`

- `params BetaChatStreamParams`

  - `IndexIDs param.Field[[]string]`

    Body param: Indexes to retrieve data from.

  - `Prompt param.Field[string]`

    Body param: User message for this chat turn.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Returns

- `type BetaChatStreamResponse interface{…}`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Chat.Stream(
    context.TODO(),
    "session_id",
    llamacloud.BetaChatStreamParams{
      IndexIDs: []string{"idx-abc123", "idx-def456"},
      Prompt: "What were the main findings in Q3?",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

#### Response

```json
{}
```

# Agent Data

## Get Agent Data

`client.Beta.AgentData.Get(ctx, itemID, query) (*AgentData, error)`

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

Get agent data by ID.

### Parameters

- `itemID string`

- `query BetaAgentDataGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type AgentData struct{…}`

  API Result for a single agent data item

  - `Data map[string, any]`

  - `DeploymentName string`

  - `ID string`

  - `Collection string`

  - `CreatedAt Time`

  - `ProjectID string`

  - `UpdatedAt Time`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  agentData, err := client.Beta.AgentData.Get(
    context.TODO(),
    "item_id",
    llamacloud.BetaAgentDataGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", agentData.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

`client.Beta.AgentData.Update(ctx, itemID, params) (*AgentData, error)`

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

Update agent data by ID (overwrites).

### Parameters

- `itemID string`

- `params BetaAgentDataUpdateParams`

  - `Data param.Field[map[string, any]]`

    Body param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Returns

- `type AgentData struct{…}`

  API Result for a single agent data item

  - `Data map[string, any]`

  - `DeploymentName string`

  - `ID string`

  - `Collection string`

  - `CreatedAt Time`

  - `ProjectID string`

  - `UpdatedAt Time`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  agentData, err := client.Beta.AgentData.Update(
    context.TODO(),
    "item_id",
    llamacloud.BetaAgentDataUpdateParams{
      Data: map[string]any{
      "foo": "bar",
      },
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", agentData.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"
}
```

## Delete Agent Data

`client.Beta.AgentData.Delete(ctx, itemID, body) (*BetaAgentDataDeleteResponse, error)`

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

Delete agent data by ID.

### Parameters

- `itemID string`

- `body BetaAgentDataDeleteParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaAgentDataDeleteResponse map[string, string]`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  agentData, err := client.Beta.AgentData.Delete(
    context.TODO(),
    "item_id",
    llamacloud.BetaAgentDataDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", agentData)
}
```

#### Response

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

## Create Agent Data

`client.Beta.AgentData.New(ctx, params) (*AgentData, error)`

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

Create new agent data.

### Parameters

- `params BetaAgentDataNewParams`

  - `Data param.Field[map[string, any]]`

    Body param

  - `DeploymentName param.Field[string]`

    Body param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Collection param.Field[string]`

    Body param

### Returns

- `type AgentData struct{…}`

  API Result for a single agent data item

  - `Data map[string, any]`

  - `DeploymentName string`

  - `ID string`

  - `Collection string`

  - `CreatedAt Time`

  - `ProjectID string`

  - `UpdatedAt Time`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  agentData, err := client.Beta.AgentData.New(context.TODO(), llamacloud.BetaAgentDataNewParams{
    Data: map[string]any{
    "foo": "bar",
    },
    DeploymentName: "deployment_name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", agentData.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"
}
```

## Search Agent Data

`client.Beta.AgentData.Search(ctx, params) (*PaginatedCursorPost[AgentData], error)`

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

Search agent data with filtering, sorting, and pagination.

### Parameters

- `params BetaAgentDataSearchParams`

  - `DeploymentName param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Collection param.Field[string]`

    Body param: The logical agent data collection to search within

  - `Filter param.Field[map[string, BetaAgentDataSearchParamsFilter]]`

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

    - `Eq BetaAgentDataSearchParamsFilterEqUnion`

      - `float64`

      - `string`

      - `Time`

    - `Excludes []*BetaAgentDataSearchParamsFilterExcludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gt BetaAgentDataSearchParamsFilterGtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gte BetaAgentDataSearchParamsFilterGteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Includes []*BetaAgentDataSearchParamsFilterIncludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lt BetaAgentDataSearchParamsFilterLtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lte BetaAgentDataSearchParamsFilterLteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Ne BetaAgentDataSearchParamsFilterNeUnion`

      - `float64`

      - `string`

      - `Time`

  - `IncludeTotal param.Field[bool]`

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

  - `Offset param.Field[int64]`

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

  - `OrderBy param.Field[string]`

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

  - `PageSize param.Field[int64]`

    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.

  - `PageToken param.Field[string]`

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

### Returns

- `type AgentData struct{…}`

  API Result for a single agent data item

  - `Data map[string, any]`

  - `DeploymentName string`

  - `ID string`

  - `Collection string`

  - `CreatedAt Time`

  - `ProjectID string`

  - `UpdatedAt Time`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.AgentData.Search(context.TODO(), llamacloud.BetaAgentDataSearchParams{
    DeploymentName: "deployment_name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.AgentData.Aggregate(ctx, params) (*PaginatedCursorPost[BetaAgentDataAggregateResponse], error)`

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

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

### Parameters

- `params BetaAgentDataAggregateParams`

  - `DeploymentName param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Collection param.Field[string]`

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

  - `Count param.Field[bool]`

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

  - `Filter param.Field[map[string, BetaAgentDataAggregateParamsFilter]]`

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

    - `Eq BetaAgentDataAggregateParamsFilterEqUnion`

      - `float64`

      - `string`

      - `Time`

    - `Excludes []*BetaAgentDataAggregateParamsFilterExcludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gt BetaAgentDataAggregateParamsFilterGtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gte BetaAgentDataAggregateParamsFilterGteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Includes []*BetaAgentDataAggregateParamsFilterIncludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lt BetaAgentDataAggregateParamsFilterLtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lte BetaAgentDataAggregateParamsFilterLteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Ne BetaAgentDataAggregateParamsFilterNeUnion`

      - `float64`

      - `string`

      - `Time`

  - `First param.Field[bool]`

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

  - `GroupBy param.Field[[]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 param.Field[int64]`

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

  - `OrderBy param.Field[string]`

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

  - `PageSize param.Field[int64]`

    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.

  - `PageToken param.Field[string]`

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

### Returns

- `type BetaAgentDataAggregateResponse struct{…}`

  API Result for a single group in the aggregate response

  - `GroupKey map[string, any]`

  - `Count int64`

  - `FirstItem map[string, any]`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.AgentData.Aggregate(context.TODO(), llamacloud.BetaAgentDataAggregateParams{
    DeploymentName: "deployment_name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.AgentData.DeleteByQuery(ctx, params) (*BetaAgentDataDeleteByQueryResponse, error)`

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

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

### Parameters

- `params BetaAgentDataDeleteByQueryParams`

  - `DeploymentName param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Collection param.Field[string]`

    Body param: The logical agent data collection to delete from

  - `Filter param.Field[map[string, BetaAgentDataDeleteByQueryParamsFilter]]`

    Body param: Optional filters to select which items to delete

    - `Eq BetaAgentDataDeleteByQueryParamsFilterEqUnion`

      - `float64`

      - `string`

      - `Time`

    - `Excludes []*BetaAgentDataDeleteByQueryParamsFilterExcludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gt BetaAgentDataDeleteByQueryParamsFilterGtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Gte BetaAgentDataDeleteByQueryParamsFilterGteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Includes []*BetaAgentDataDeleteByQueryParamsFilterIncludeUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lt BetaAgentDataDeleteByQueryParamsFilterLtUnion`

      - `float64`

      - `string`

      - `Time`

    - `Lte BetaAgentDataDeleteByQueryParamsFilterLteUnion`

      - `float64`

      - `string`

      - `Time`

    - `Ne BetaAgentDataDeleteByQueryParamsFilterNeUnion`

      - `float64`

      - `string`

      - `Time`

### Returns

- `type BetaAgentDataDeleteByQueryResponse struct{…}`

  API response for bulk delete operation

  - `DeletedCount int64`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.AgentData.DeleteByQuery(context.TODO(), llamacloud.BetaAgentDataDeleteByQueryParams{
    DeploymentName: "deployment_name",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.DeletedCount)
}
```

#### Response

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

## Domain Types

### Agent Data

- `type AgentData struct{…}`

  API Result for a single agent data item

  - `Data map[string, any]`

  - `DeploymentName string`

  - `ID string`

  - `Collection string`

  - `CreatedAt Time`

  - `ProjectID string`

  - `UpdatedAt Time`

# Sheets

## Create Spreadsheet Job

`client.Beta.Sheets.New(ctx, params) (*SheetsJob, error)`

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

Create a spreadsheet parsing job.

Provide at most one of `configuration` (an inline parsing configuration) or
`configuration_id` (a saved configuration preset). If neither is provided, a
default configuration is used. Optionally include `webhook_configurations`
to receive `sheets.*` status notifications.

### Parameters

- `params BetaSheetNewParams`

  - `FileID param.Field[string]`

    Body param: The ID of the file to parse

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Config param.Field[SheetsParsingConfig]`

    Body param: Configuration for spreadsheet parsing and region extraction

  - `Configuration param.Field[SheetsParsingConfig]`

    Body param: Configuration for spreadsheet parsing and region extraction

  - `ConfigurationID param.Field[string]`

    Body param: Saved configuration ID

  - `WebhookConfigurations param.Field[[]BetaSheetNewParamsWebhookConfiguration]`

    Body param: Outbound webhook endpoints to notify on job status changes

    - `WebhookEvents []string`

      Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifyCancelled BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.cancelled"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifyError BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.error"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifyPartialSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.partial_success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifyPending BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.pending"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifyRunning BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.running"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventClassifySuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "classify.success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventExtractCancelled BetaSheetNewParamsWebhookConfigurationWebhookEvent = "extract.cancelled"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventExtractError BetaSheetNewParamsWebhookConfigurationWebhookEvent = "extract.error"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventExtractPartialSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "extract.partial_success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventExtractPending BetaSheetNewParamsWebhookConfigurationWebhookEvent = "extract.pending"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventExtractSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "extract.success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParseCancelled BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.cancelled"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParseError BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.error"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParsePartialSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.partial_success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParsePending BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.pending"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParseRunning BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.running"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventParseSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "parse.success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSheetsCancelled BetaSheetNewParamsWebhookConfigurationWebhookEvent = "sheets.cancelled"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSheetsError BetaSheetNewParamsWebhookConfigurationWebhookEvent = "sheets.error"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSheetsPartialSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "sheets.partial_success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSheetsPending BetaSheetNewParamsWebhookConfigurationWebhookEvent = "sheets.pending"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSheetsSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "sheets.success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSplitCancelled BetaSheetNewParamsWebhookConfigurationWebhookEvent = "split.cancelled"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSplitError BetaSheetNewParamsWebhookConfigurationWebhookEvent = "split.error"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSplitPending BetaSheetNewParamsWebhookConfigurationWebhookEvent = "split.pending"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSplitProcessing BetaSheetNewParamsWebhookConfigurationWebhookEvent = "split.processing"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventSplitSuccess BetaSheetNewParamsWebhookConfigurationWebhookEvent = "split.success"`

      - `const BetaSheetNewParamsWebhookConfigurationWebhookEventUnmappedEvent BetaSheetNewParamsWebhookConfigurationWebhookEvent = "unmapped_event"`

    - `WebhookHeaders map[string, string]`

      Custom HTTP headers sent with each webhook request (e.g. auth tokens)

    - `WebhookOutputFormat string`

      Response format sent to the webhook: 'string' (default) or 'json'

    - `WebhookSigningSecret string`

      Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

    - `WebhookURL string`

      URL to receive webhook POST notifications

### Returns

- `type SheetsJob struct{…}`

  A spreadsheet parsing job.

  - `ID string`

    The ID of the job

  - `Configuration SheetsParsingConfig`

    Configuration applied to the parsing job (inline or resolved from a saved preset).

    - `ExtractionRange string`

      A1 notation of the range to extract a single region from. If None, the entire sheet is used.

    - `FlattenHierarchicalTables bool`

      Return a flattened dataframe when a detected table is recognized as hierarchical.

    - `GenerateAdditionalMetadata bool`

      Deprecated: controlled by `tier`. Whether to generate additional metadata (title, description) for each extracted region. Honored only on `agentic`.

    - `IncludeHiddenCells bool`

      Whether to include hidden cells when extracting regions from the spreadsheet.

    - `SheetNames []string`

      The names of the sheets to extract regions from. If empty, all sheets will be processed.

    - `Specialization string`

      Deprecated: controlled by `tier`. Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline. Honored only on `agentic`.

    - `TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity`

      Deprecated: controlled by `tier`. Influences how likely similar-looking regions are merged into a single table. Honored only on `agentic`.

      - `const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"`

      - `const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"`

    - `Tier SheetsParsingConfigTier`

      Spreadsheet extraction tier. `cost_effective` uses the rule-based/ML-only pipeline; `agentic` uses the full pipeline.

      - `const SheetsParsingConfigTierAgentic SheetsParsingConfigTier = "agentic"`

      - `const SheetsParsingConfigTierCostEffective SheetsParsingConfigTier = "cost_effective"`

    - `UseExperimentalProcessing bool`

      Deprecated: controlled by `tier`. Enables experimental processing. Honored only on `agentic`.

  - `CreatedAt string`

    When the job was created

  - `FileID string`

    The ID of the input file

  - `ProjectID string`

    The ID of the project

  - `Status SheetsJobStatus`

    The status of the parsing job

    - `const SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED"`

    - `const SheetsJobStatusError SheetsJobStatus = "ERROR"`

    - `const SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS"`

    - `const SheetsJobStatusPending SheetsJobStatus = "PENDING"`

    - `const SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS"`

  - `UpdatedAt string`

    When the job was last updated

  - `UserID string`

    The ID of the user

  - `Config SheetsParsingConfig`

    Configuration for spreadsheet parsing and region extraction

  - `ConfigurationID string`

    The saved product configuration ID used at create time, if any.

  - `Errors []string`

    Any errors encountered

  - `File File`

    Schema for a file.

    - `ID string`

      Unique identifier

    - `Name string`

    - `ProjectID string`

      The ID of the project that the file belongs to

    - `CreatedAt Time`

      Creation datetime

    - `DataSourceID string`

      The ID of the data source that the file belongs to

    - `ExpiresAt Time`

      The expiration date for the file. Files past this date can be deleted.

    - `ExternalFileID string`

      The ID of the file in the external system

    - `FileSize int64`

      Size of the file in bytes

    - `FileType string`

      File type (e.g. pdf, docx, etc.)

    - `LastModifiedAt Time`

      The last modified time of the file

    - `PermissionInfo map[string, *FilePermissionInfoUnion]`

      Permission information for the file

      - `type FilePermissionInfoMap map[string, any]`

      - `type FilePermissionInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `Purpose string`

      The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

    - `ResourceInfo map[string, *FileResourceInfoUnion]`

      Resource information for the file

      - `type FileResourceInfoMap map[string, any]`

      - `type FileResourceInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `UpdatedAt Time`

      Update datetime

  - `MetadataStateTransitions map[string, any]`

    Per-status entry timestamps. Returned only when requested via `?expand=metadata_state_transitions`.

  - `Parameters SheetsJobParameters`

    Job-time parameters such as webhook configurations.

    - `WebhookConfigurations []SheetsJobParametersWebhookConfiguration`

      Webhook configurations for job status notifications.

      - `WebhookEvents []string`

        Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyError SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPending SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifySuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractError SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPending SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseError SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePending SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsError SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPending SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitError SheetsJobParametersWebhookConfigurationWebhookEvent = "split.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitPending SheetsJobParametersWebhookConfigurationWebhookEvent = "split.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitProcessing SheetsJobParametersWebhookConfigurationWebhookEvent = "split.processing"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "split.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventUnmappedEvent SheetsJobParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

      - `WebhookHeaders map[string, string]`

        Custom HTTP headers sent with each webhook request (e.g. auth tokens)

      - `WebhookOutputFormat string`

        Response format sent to the webhook: 'string' (default) or 'json'

      - `WebhookSigningSecret string`

        Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

      - `WebhookURL string`

        URL to receive webhook POST notifications

  - `Regions []SheetsJobRegion`

    All extracted regions (populated when job is complete)

    - `Location string`

      Location of the region in the spreadsheet

    - `RegionType string`

      Type of the extracted region

    - `SheetName string`

      Worksheet name where region was found

    - `Description string`

      Generated description for the region

    - `RegionID string`

      Unique identifier for this region within the file

    - `Title string`

      Generated title for the region

  - `Success bool`

    Whether the job completed successfully

  - `WorksheetMetadata []SheetsJobWorksheetMetadata`

    Metadata for each processed worksheet (populated when job is complete)

    - `SheetName string`

      Name of the worksheet

    - `Description string`

      Generated description of the worksheet

    - `Title string`

      Generated title for the worksheet

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sheetsJob, err := client.Beta.Sheets.New(context.TODO(), llamacloud.BetaSheetNewParams{
    FileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sheetsJob.ID)
}
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "extraction_range": "extraction_range",
    "flatten_hierarchical_tables": true,
    "generate_additional_metadata": true,
    "include_hidden_cells": true,
    "sheet_names": [
      "string"
    ],
    "specialization": "specialization",
    "table_merge_sensitivity": "strong",
    "tier": "agentic",
    "use_experimental_processing": true
  },
  "created_at": "created_at",
  "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "status": "CANCELLED",
  "updated_at": "updated_at",
  "user_id": "user_id",
  "config": {
    "extraction_range": "extraction_range",
    "flatten_hierarchical_tables": true,
    "generate_additional_metadata": true,
    "include_hidden_cells": true,
    "sheet_names": [
      "string"
    ],
    "specialization": "specialization",
    "table_merge_sensitivity": "strong",
    "tier": "agentic",
    "use_experimental_processing": true
  },
  "configuration_id": "configuration_id",
  "errors": [
    "string"
  ],
  "file": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "name": "x",
    "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "external_file_id": "external_file_id",
    "file_size": 0,
    "file_type": "x",
    "last_modified_at": "2019-12-27T18:11:19.117Z",
    "permission_info": {
      "foo": {
        "foo": "bar"
      }
    },
    "purpose": "purpose",
    "resource_info": {
      "foo": {
        "foo": "bar"
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "metadata_state_transitions": {
    "foo": "bar"
  },
  "parameters": {
    "webhook_configurations": [
      {
        "webhook_events": [
          "parse.success",
          "parse.error"
        ],
        "webhook_headers": {
          "Authorization": "Bearer sk-..."
        },
        "webhook_output_format": "json",
        "webhook_signing_secret": "whsec_...",
        "webhook_url": "https://example.com/webhooks/llamacloud"
      }
    ]
  },
  "regions": [
    {
      "location": "location",
      "region_type": "region_type",
      "sheet_name": "sheet_name",
      "description": "description",
      "region_id": "region_id",
      "title": "title"
    }
  ],
  "success": true,
  "worksheet_metadata": [
    {
      "sheet_name": "sheet_name",
      "description": "description",
      "title": "title"
    }
  ]
}
```

## List Spreadsheet Jobs

`client.Beta.Sheets.List(ctx, query) (*PaginatedCursor[SheetsJob], error)`

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

List spreadsheet parsing jobs.

### Parameters

- `query BetaSheetListParams`

  - `ConfigurationID param.Field[string]`

    Filter by saved configuration ID

  - `CreatedAtOnOrAfter param.Field[Time]`

    Include items created at or after this timestamp (inclusive)

  - `CreatedAtOnOrBefore param.Field[Time]`

    Include items created at or before this timestamp (inclusive)

  - `IncludeResults param.Field[bool]`

  - `JobIDs param.Field[[]string]`

    Filter by specific job IDs

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Status param.Field[BetaSheetListParamsStatus]`

    Filter by job status

    - `const BetaSheetListParamsStatusCancelled BetaSheetListParamsStatus = "CANCELLED"`

    - `const BetaSheetListParamsStatusError BetaSheetListParamsStatus = "ERROR"`

    - `const BetaSheetListParamsStatusPartialSuccess BetaSheetListParamsStatus = "PARTIAL_SUCCESS"`

    - `const BetaSheetListParamsStatusPending BetaSheetListParamsStatus = "PENDING"`

    - `const BetaSheetListParamsStatusSuccess BetaSheetListParamsStatus = "SUCCESS"`

### Returns

- `type SheetsJob struct{…}`

  A spreadsheet parsing job.

  - `ID string`

    The ID of the job

  - `Configuration SheetsParsingConfig`

    Configuration applied to the parsing job (inline or resolved from a saved preset).

    - `ExtractionRange string`

      A1 notation of the range to extract a single region from. If None, the entire sheet is used.

    - `FlattenHierarchicalTables bool`

      Return a flattened dataframe when a detected table is recognized as hierarchical.

    - `GenerateAdditionalMetadata bool`

      Deprecated: controlled by `tier`. Whether to generate additional metadata (title, description) for each extracted region. Honored only on `agentic`.

    - `IncludeHiddenCells bool`

      Whether to include hidden cells when extracting regions from the spreadsheet.

    - `SheetNames []string`

      The names of the sheets to extract regions from. If empty, all sheets will be processed.

    - `Specialization string`

      Deprecated: controlled by `tier`. Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline. Honored only on `agentic`.

    - `TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity`

      Deprecated: controlled by `tier`. Influences how likely similar-looking regions are merged into a single table. Honored only on `agentic`.

      - `const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"`

      - `const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"`

    - `Tier SheetsParsingConfigTier`

      Spreadsheet extraction tier. `cost_effective` uses the rule-based/ML-only pipeline; `agentic` uses the full pipeline.

      - `const SheetsParsingConfigTierAgentic SheetsParsingConfigTier = "agentic"`

      - `const SheetsParsingConfigTierCostEffective SheetsParsingConfigTier = "cost_effective"`

    - `UseExperimentalProcessing bool`

      Deprecated: controlled by `tier`. Enables experimental processing. Honored only on `agentic`.

  - `CreatedAt string`

    When the job was created

  - `FileID string`

    The ID of the input file

  - `ProjectID string`

    The ID of the project

  - `Status SheetsJobStatus`

    The status of the parsing job

    - `const SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED"`

    - `const SheetsJobStatusError SheetsJobStatus = "ERROR"`

    - `const SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS"`

    - `const SheetsJobStatusPending SheetsJobStatus = "PENDING"`

    - `const SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS"`

  - `UpdatedAt string`

    When the job was last updated

  - `UserID string`

    The ID of the user

  - `Config SheetsParsingConfig`

    Configuration for spreadsheet parsing and region extraction

  - `ConfigurationID string`

    The saved product configuration ID used at create time, if any.

  - `Errors []string`

    Any errors encountered

  - `File File`

    Schema for a file.

    - `ID string`

      Unique identifier

    - `Name string`

    - `ProjectID string`

      The ID of the project that the file belongs to

    - `CreatedAt Time`

      Creation datetime

    - `DataSourceID string`

      The ID of the data source that the file belongs to

    - `ExpiresAt Time`

      The expiration date for the file. Files past this date can be deleted.

    - `ExternalFileID string`

      The ID of the file in the external system

    - `FileSize int64`

      Size of the file in bytes

    - `FileType string`

      File type (e.g. pdf, docx, etc.)

    - `LastModifiedAt Time`

      The last modified time of the file

    - `PermissionInfo map[string, *FilePermissionInfoUnion]`

      Permission information for the file

      - `type FilePermissionInfoMap map[string, any]`

      - `type FilePermissionInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `Purpose string`

      The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

    - `ResourceInfo map[string, *FileResourceInfoUnion]`

      Resource information for the file

      - `type FileResourceInfoMap map[string, any]`

      - `type FileResourceInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `UpdatedAt Time`

      Update datetime

  - `MetadataStateTransitions map[string, any]`

    Per-status entry timestamps. Returned only when requested via `?expand=metadata_state_transitions`.

  - `Parameters SheetsJobParameters`

    Job-time parameters such as webhook configurations.

    - `WebhookConfigurations []SheetsJobParametersWebhookConfiguration`

      Webhook configurations for job status notifications.

      - `WebhookEvents []string`

        Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyError SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPending SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifySuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractError SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPending SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseError SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePending SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsError SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPending SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitError SheetsJobParametersWebhookConfigurationWebhookEvent = "split.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitPending SheetsJobParametersWebhookConfigurationWebhookEvent = "split.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitProcessing SheetsJobParametersWebhookConfigurationWebhookEvent = "split.processing"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "split.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventUnmappedEvent SheetsJobParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

      - `WebhookHeaders map[string, string]`

        Custom HTTP headers sent with each webhook request (e.g. auth tokens)

      - `WebhookOutputFormat string`

        Response format sent to the webhook: 'string' (default) or 'json'

      - `WebhookSigningSecret string`

        Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

      - `WebhookURL string`

        URL to receive webhook POST notifications

  - `Regions []SheetsJobRegion`

    All extracted regions (populated when job is complete)

    - `Location string`

      Location of the region in the spreadsheet

    - `RegionType string`

      Type of the extracted region

    - `SheetName string`

      Worksheet name where region was found

    - `Description string`

      Generated description for the region

    - `RegionID string`

      Unique identifier for this region within the file

    - `Title string`

      Generated title for the region

  - `Success bool`

    Whether the job completed successfully

  - `WorksheetMetadata []SheetsJobWorksheetMetadata`

    Metadata for each processed worksheet (populated when job is complete)

    - `SheetName string`

      Name of the worksheet

    - `Description string`

      Generated description of the worksheet

    - `Title string`

      Generated title for the worksheet

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Sheets.List(context.TODO(), llamacloud.BetaSheetListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "configuration": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "tier": "agentic",
        "use_experimental_processing": true
      },
      "created_at": "created_at",
      "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "status": "CANCELLED",
      "updated_at": "updated_at",
      "user_id": "user_id",
      "config": {
        "extraction_range": "extraction_range",
        "flatten_hierarchical_tables": true,
        "generate_additional_metadata": true,
        "include_hidden_cells": true,
        "sheet_names": [
          "string"
        ],
        "specialization": "specialization",
        "table_merge_sensitivity": "strong",
        "tier": "agentic",
        "use_experimental_processing": true
      },
      "configuration_id": "configuration_id",
      "errors": [
        "string"
      ],
      "file": {
        "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "name": "x",
        "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "created_at": "2019-12-27T18:11:19.117Z",
        "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "expires_at": "2019-12-27T18:11:19.117Z",
        "external_file_id": "external_file_id",
        "file_size": 0,
        "file_type": "x",
        "last_modified_at": "2019-12-27T18:11:19.117Z",
        "permission_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "purpose": "purpose",
        "resource_info": {
          "foo": {
            "foo": "bar"
          }
        },
        "updated_at": "2019-12-27T18:11:19.117Z"
      },
      "metadata_state_transitions": {
        "foo": "bar"
      },
      "parameters": {
        "webhook_configurations": [
          {
            "webhook_events": [
              "parse.success",
              "parse.error"
            ],
            "webhook_headers": {
              "Authorization": "Bearer sk-..."
            },
            "webhook_output_format": "json",
            "webhook_signing_secret": "whsec_...",
            "webhook_url": "https://example.com/webhooks/llamacloud"
          }
        ]
      },
      "regions": [
        {
          "location": "location",
          "region_type": "region_type",
          "sheet_name": "sheet_name",
          "description": "description",
          "region_id": "region_id",
          "title": "title"
        }
      ],
      "success": true,
      "worksheet_metadata": [
        {
          "sheet_name": "sheet_name",
          "description": "description",
          "title": "title"
        }
      ]
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Spreadsheet Job

`client.Beta.Sheets.Get(ctx, spreadsheetJobID, query) (*SheetsJob, error)`

**get** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}`

Get a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call.

### Parameters

- `spreadsheetJobID string`

- `query BetaSheetGetParams`

  - `Expand param.Field[[]string]`

    Optional fields to populate on the response. Valid values: metadata_state_transitions.

  - `IncludeResults param.Field[bool]`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type SheetsJob struct{…}`

  A spreadsheet parsing job.

  - `ID string`

    The ID of the job

  - `Configuration SheetsParsingConfig`

    Configuration applied to the parsing job (inline or resolved from a saved preset).

    - `ExtractionRange string`

      A1 notation of the range to extract a single region from. If None, the entire sheet is used.

    - `FlattenHierarchicalTables bool`

      Return a flattened dataframe when a detected table is recognized as hierarchical.

    - `GenerateAdditionalMetadata bool`

      Deprecated: controlled by `tier`. Whether to generate additional metadata (title, description) for each extracted region. Honored only on `agentic`.

    - `IncludeHiddenCells bool`

      Whether to include hidden cells when extracting regions from the spreadsheet.

    - `SheetNames []string`

      The names of the sheets to extract regions from. If empty, all sheets will be processed.

    - `Specialization string`

      Deprecated: controlled by `tier`. Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline. Honored only on `agentic`.

    - `TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity`

      Deprecated: controlled by `tier`. Influences how likely similar-looking regions are merged into a single table. Honored only on `agentic`.

      - `const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"`

      - `const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"`

    - `Tier SheetsParsingConfigTier`

      Spreadsheet extraction tier. `cost_effective` uses the rule-based/ML-only pipeline; `agentic` uses the full pipeline.

      - `const SheetsParsingConfigTierAgentic SheetsParsingConfigTier = "agentic"`

      - `const SheetsParsingConfigTierCostEffective SheetsParsingConfigTier = "cost_effective"`

    - `UseExperimentalProcessing bool`

      Deprecated: controlled by `tier`. Enables experimental processing. Honored only on `agentic`.

  - `CreatedAt string`

    When the job was created

  - `FileID string`

    The ID of the input file

  - `ProjectID string`

    The ID of the project

  - `Status SheetsJobStatus`

    The status of the parsing job

    - `const SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED"`

    - `const SheetsJobStatusError SheetsJobStatus = "ERROR"`

    - `const SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS"`

    - `const SheetsJobStatusPending SheetsJobStatus = "PENDING"`

    - `const SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS"`

  - `UpdatedAt string`

    When the job was last updated

  - `UserID string`

    The ID of the user

  - `Config SheetsParsingConfig`

    Configuration for spreadsheet parsing and region extraction

  - `ConfigurationID string`

    The saved product configuration ID used at create time, if any.

  - `Errors []string`

    Any errors encountered

  - `File File`

    Schema for a file.

    - `ID string`

      Unique identifier

    - `Name string`

    - `ProjectID string`

      The ID of the project that the file belongs to

    - `CreatedAt Time`

      Creation datetime

    - `DataSourceID string`

      The ID of the data source that the file belongs to

    - `ExpiresAt Time`

      The expiration date for the file. Files past this date can be deleted.

    - `ExternalFileID string`

      The ID of the file in the external system

    - `FileSize int64`

      Size of the file in bytes

    - `FileType string`

      File type (e.g. pdf, docx, etc.)

    - `LastModifiedAt Time`

      The last modified time of the file

    - `PermissionInfo map[string, *FilePermissionInfoUnion]`

      Permission information for the file

      - `type FilePermissionInfoMap map[string, any]`

      - `type FilePermissionInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `Purpose string`

      The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

    - `ResourceInfo map[string, *FileResourceInfoUnion]`

      Resource information for the file

      - `type FileResourceInfoMap map[string, any]`

      - `type FileResourceInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `UpdatedAt Time`

      Update datetime

  - `MetadataStateTransitions map[string, any]`

    Per-status entry timestamps. Returned only when requested via `?expand=metadata_state_transitions`.

  - `Parameters SheetsJobParameters`

    Job-time parameters such as webhook configurations.

    - `WebhookConfigurations []SheetsJobParametersWebhookConfiguration`

      Webhook configurations for job status notifications.

      - `WebhookEvents []string`

        Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyError SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPending SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifySuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractError SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPending SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseError SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePending SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsError SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPending SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitError SheetsJobParametersWebhookConfigurationWebhookEvent = "split.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitPending SheetsJobParametersWebhookConfigurationWebhookEvent = "split.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitProcessing SheetsJobParametersWebhookConfigurationWebhookEvent = "split.processing"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "split.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventUnmappedEvent SheetsJobParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

      - `WebhookHeaders map[string, string]`

        Custom HTTP headers sent with each webhook request (e.g. auth tokens)

      - `WebhookOutputFormat string`

        Response format sent to the webhook: 'string' (default) or 'json'

      - `WebhookSigningSecret string`

        Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

      - `WebhookURL string`

        URL to receive webhook POST notifications

  - `Regions []SheetsJobRegion`

    All extracted regions (populated when job is complete)

    - `Location string`

      Location of the region in the spreadsheet

    - `RegionType string`

      Type of the extracted region

    - `SheetName string`

      Worksheet name where region was found

    - `Description string`

      Generated description for the region

    - `RegionID string`

      Unique identifier for this region within the file

    - `Title string`

      Generated title for the region

  - `Success bool`

    Whether the job completed successfully

  - `WorksheetMetadata []SheetsJobWorksheetMetadata`

    Metadata for each processed worksheet (populated when job is complete)

    - `SheetName string`

      Name of the worksheet

    - `Description string`

      Generated description of the worksheet

    - `Title string`

      Generated title for the worksheet

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  sheetsJob, err := client.Beta.Sheets.Get(
    context.TODO(),
    "spreadsheet_job_id",
    llamacloud.BetaSheetGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", sheetsJob.ID)
}
```

#### Response

```json
{
  "id": "id",
  "configuration": {
    "extraction_range": "extraction_range",
    "flatten_hierarchical_tables": true,
    "generate_additional_metadata": true,
    "include_hidden_cells": true,
    "sheet_names": [
      "string"
    ],
    "specialization": "specialization",
    "table_merge_sensitivity": "strong",
    "tier": "agentic",
    "use_experimental_processing": true
  },
  "created_at": "created_at",
  "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
  "status": "CANCELLED",
  "updated_at": "updated_at",
  "user_id": "user_id",
  "config": {
    "extraction_range": "extraction_range",
    "flatten_hierarchical_tables": true,
    "generate_additional_metadata": true,
    "include_hidden_cells": true,
    "sheet_names": [
      "string"
    ],
    "specialization": "specialization",
    "table_merge_sensitivity": "strong",
    "tier": "agentic",
    "use_experimental_processing": true
  },
  "configuration_id": "configuration_id",
  "errors": [
    "string"
  ],
  "file": {
    "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "name": "x",
    "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "created_at": "2019-12-27T18:11:19.117Z",
    "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
    "expires_at": "2019-12-27T18:11:19.117Z",
    "external_file_id": "external_file_id",
    "file_size": 0,
    "file_type": "x",
    "last_modified_at": "2019-12-27T18:11:19.117Z",
    "permission_info": {
      "foo": {
        "foo": "bar"
      }
    },
    "purpose": "purpose",
    "resource_info": {
      "foo": {
        "foo": "bar"
      }
    },
    "updated_at": "2019-12-27T18:11:19.117Z"
  },
  "metadata_state_transitions": {
    "foo": "bar"
  },
  "parameters": {
    "webhook_configurations": [
      {
        "webhook_events": [
          "parse.success",
          "parse.error"
        ],
        "webhook_headers": {
          "Authorization": "Bearer sk-..."
        },
        "webhook_output_format": "json",
        "webhook_signing_secret": "whsec_...",
        "webhook_url": "https://example.com/webhooks/llamacloud"
      }
    ]
  },
  "regions": [
    {
      "location": "location",
      "region_type": "region_type",
      "sheet_name": "sheet_name",
      "description": "description",
      "region_id": "region_id",
      "title": "title"
    }
  ],
  "success": true,
  "worksheet_metadata": [
    {
      "sheet_name": "sheet_name",
      "description": "description",
      "title": "title"
    }
  ]
}
```

## Get Result Region

`client.Beta.Sheets.GetResultTable(ctx, regionType, params) (*PresignedURL, error)`

**get** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}`

Generate a presigned URL to download a specific extracted region.

### Parameters

- `regionType BetaSheetGetResultTableParamsRegionType`

  - `const BetaSheetGetResultTableParamsRegionTypeCellMetadata BetaSheetGetResultTableParamsRegionType = "cell_metadata"`

  - `const BetaSheetGetResultTableParamsRegionTypeExtra BetaSheetGetResultTableParamsRegionType = "extra"`

  - `const BetaSheetGetResultTableParamsRegionTypeTable BetaSheetGetResultTableParamsRegionType = "table"`

- `params BetaSheetGetResultTableParams`

  - `SpreadsheetJobID param.Field[string]`

    Path param

  - `RegionID param.Field[string]`

    Path param

  - `ExpiresAtSeconds param.Field[int64]`

    Query param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Returns

- `type PresignedURL struct{…}`

  Schema for a presigned URL.

  - `ExpiresAt Time`

    The time at which the presigned URL expires

  - `URL string`

    A presigned URL for IO operations against a private file

  - `FormFields map[string, string]`

    Form fields for a presigned POST request

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  presignedURL, err := client.Beta.Sheets.GetResultTable(
    context.TODO(),
    llamacloud.BetaSheetGetResultTableParamsRegionTypeCellMetadata,
    llamacloud.BetaSheetGetResultTableParams{
      SpreadsheetJobID: "spreadsheet_job_id",
      RegionID: "region_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", presignedURL.ExpiresAt)
}
```

#### Response

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

## Delete Spreadsheet Job

`client.Beta.Sheets.DeleteJob(ctx, spreadsheetJobID, body) (*BetaSheetDeleteJobResponse, error)`

**delete** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}`

Delete a spreadsheet parsing job and its associated data.

### Parameters

- `spreadsheetJobID string`

- `body BetaSheetDeleteJobParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaSheetDeleteJobResponse interface{…}`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Sheets.DeleteJob(
    context.TODO(),
    "spreadsheet_job_id",
    llamacloud.BetaSheetDeleteJobParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
```

#### Response

```json
{}
```

## Domain Types

### Sheets Job

- `type SheetsJob struct{…}`

  A spreadsheet parsing job.

  - `ID string`

    The ID of the job

  - `Configuration SheetsParsingConfig`

    Configuration applied to the parsing job (inline or resolved from a saved preset).

    - `ExtractionRange string`

      A1 notation of the range to extract a single region from. If None, the entire sheet is used.

    - `FlattenHierarchicalTables bool`

      Return a flattened dataframe when a detected table is recognized as hierarchical.

    - `GenerateAdditionalMetadata bool`

      Deprecated: controlled by `tier`. Whether to generate additional metadata (title, description) for each extracted region. Honored only on `agentic`.

    - `IncludeHiddenCells bool`

      Whether to include hidden cells when extracting regions from the spreadsheet.

    - `SheetNames []string`

      The names of the sheets to extract regions from. If empty, all sheets will be processed.

    - `Specialization string`

      Deprecated: controlled by `tier`. Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline. Honored only on `agentic`.

    - `TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity`

      Deprecated: controlled by `tier`. Influences how likely similar-looking regions are merged into a single table. Honored only on `agentic`.

      - `const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"`

      - `const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"`

    - `Tier SheetsParsingConfigTier`

      Spreadsheet extraction tier. `cost_effective` uses the rule-based/ML-only pipeline; `agentic` uses the full pipeline.

      - `const SheetsParsingConfigTierAgentic SheetsParsingConfigTier = "agentic"`

      - `const SheetsParsingConfigTierCostEffective SheetsParsingConfigTier = "cost_effective"`

    - `UseExperimentalProcessing bool`

      Deprecated: controlled by `tier`. Enables experimental processing. Honored only on `agentic`.

  - `CreatedAt string`

    When the job was created

  - `FileID string`

    The ID of the input file

  - `ProjectID string`

    The ID of the project

  - `Status SheetsJobStatus`

    The status of the parsing job

    - `const SheetsJobStatusCancelled SheetsJobStatus = "CANCELLED"`

    - `const SheetsJobStatusError SheetsJobStatus = "ERROR"`

    - `const SheetsJobStatusPartialSuccess SheetsJobStatus = "PARTIAL_SUCCESS"`

    - `const SheetsJobStatusPending SheetsJobStatus = "PENDING"`

    - `const SheetsJobStatusSuccess SheetsJobStatus = "SUCCESS"`

  - `UpdatedAt string`

    When the job was last updated

  - `UserID string`

    The ID of the user

  - `Config SheetsParsingConfig`

    Configuration for spreadsheet parsing and region extraction

  - `ConfigurationID string`

    The saved product configuration ID used at create time, if any.

  - `Errors []string`

    Any errors encountered

  - `File File`

    Schema for a file.

    - `ID string`

      Unique identifier

    - `Name string`

    - `ProjectID string`

      The ID of the project that the file belongs to

    - `CreatedAt Time`

      Creation datetime

    - `DataSourceID string`

      The ID of the data source that the file belongs to

    - `ExpiresAt Time`

      The expiration date for the file. Files past this date can be deleted.

    - `ExternalFileID string`

      The ID of the file in the external system

    - `FileSize int64`

      Size of the file in bytes

    - `FileType string`

      File type (e.g. pdf, docx, etc.)

    - `LastModifiedAt Time`

      The last modified time of the file

    - `PermissionInfo map[string, *FilePermissionInfoUnion]`

      Permission information for the file

      - `type FilePermissionInfoMap map[string, any]`

      - `type FilePermissionInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `Purpose string`

      The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

    - `ResourceInfo map[string, *FileResourceInfoUnion]`

      Resource information for the file

      - `type FileResourceInfoMap map[string, any]`

      - `type FileResourceInfoArray []any`

      - `string`

      - `float64`

      - `bool`

    - `UpdatedAt Time`

      Update datetime

  - `MetadataStateTransitions map[string, any]`

    Per-status entry timestamps. Returned only when requested via `?expand=metadata_state_transitions`.

  - `Parameters SheetsJobParameters`

    Job-time parameters such as webhook configurations.

    - `WebhookConfigurations []SheetsJobParametersWebhookConfiguration`

      Webhook configurations for job status notifications.

      - `WebhookEvents []string`

        Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyError SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyPending SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifyRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventClassifySuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "classify.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractError SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractPending SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventExtractSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "extract.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseError SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParsePending SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseRunning SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.running"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventParseSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "parse.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsError SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPartialSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsPending SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSheetsSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "sheets.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitCancelled SheetsJobParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitError SheetsJobParametersWebhookConfigurationWebhookEvent = "split.error"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitPending SheetsJobParametersWebhookConfigurationWebhookEvent = "split.pending"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitProcessing SheetsJobParametersWebhookConfigurationWebhookEvent = "split.processing"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventSplitSuccess SheetsJobParametersWebhookConfigurationWebhookEvent = "split.success"`

        - `const SheetsJobParametersWebhookConfigurationWebhookEventUnmappedEvent SheetsJobParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

      - `WebhookHeaders map[string, string]`

        Custom HTTP headers sent with each webhook request (e.g. auth tokens)

      - `WebhookOutputFormat string`

        Response format sent to the webhook: 'string' (default) or 'json'

      - `WebhookSigningSecret string`

        Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

      - `WebhookURL string`

        URL to receive webhook POST notifications

  - `Regions []SheetsJobRegion`

    All extracted regions (populated when job is complete)

    - `Location string`

      Location of the region in the spreadsheet

    - `RegionType string`

      Type of the extracted region

    - `SheetName string`

      Worksheet name where region was found

    - `Description string`

      Generated description for the region

    - `RegionID string`

      Unique identifier for this region within the file

    - `Title string`

      Generated title for the region

  - `Success bool`

    Whether the job completed successfully

  - `WorksheetMetadata []SheetsJobWorksheetMetadata`

    Metadata for each processed worksheet (populated when job is complete)

    - `SheetName string`

      Name of the worksheet

    - `Description string`

      Generated description of the worksheet

    - `Title string`

      Generated title for the worksheet

### Sheets Parsing Config

- `type SheetsParsingConfig struct{…}`

  Configuration for spreadsheet parsing and region extraction

  - `ExtractionRange string`

    A1 notation of the range to extract a single region from. If None, the entire sheet is used.

  - `FlattenHierarchicalTables bool`

    Return a flattened dataframe when a detected table is recognized as hierarchical.

  - `GenerateAdditionalMetadata bool`

    Deprecated: controlled by `tier`. Whether to generate additional metadata (title, description) for each extracted region. Honored only on `agentic`.

  - `IncludeHiddenCells bool`

    Whether to include hidden cells when extracting regions from the spreadsheet.

  - `SheetNames []string`

    The names of the sheets to extract regions from. If empty, all sheets will be processed.

  - `Specialization string`

    Deprecated: controlled by `tier`. Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline. Honored only on `agentic`.

  - `TableMergeSensitivity SheetsParsingConfigTableMergeSensitivity`

    Deprecated: controlled by `tier`. Influences how likely similar-looking regions are merged into a single table. Honored only on `agentic`.

    - `const SheetsParsingConfigTableMergeSensitivityStrong SheetsParsingConfigTableMergeSensitivity = "strong"`

    - `const SheetsParsingConfigTableMergeSensitivityWeak SheetsParsingConfigTableMergeSensitivity = "weak"`

  - `Tier SheetsParsingConfigTier`

    Spreadsheet extraction tier. `cost_effective` uses the rule-based/ML-only pipeline; `agentic` uses the full pipeline.

    - `const SheetsParsingConfigTierAgentic SheetsParsingConfigTier = "agentic"`

    - `const SheetsParsingConfigTierCostEffective SheetsParsingConfigTier = "cost_effective"`

  - `UseExperimentalProcessing bool`

    Deprecated: controlled by `tier`. Enables experimental processing. Honored only on `agentic`.

# Directories

## Create Directory

`client.Beta.Directories.New(ctx, params) (*BetaDirectoryNewResponse, error)`

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

Create a new directory within the specified project.

### Parameters

- `params BetaDirectoryNewParams`

  - `Name param.Field[string]`

    Body param: Human-readable name for the directory.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Description param.Field[string]`

    Body param: Optional description shown to users.

  - `SystemMetadata param.Field[map[string, any]]`

    Body param: Reserved system-managed metadata.

  - `Type param.Field[BetaDirectoryNewParamsType]`

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

    - `const BetaDirectoryNewParamsTypeEphemeral BetaDirectoryNewParamsType = "ephemeral"`

    - `const BetaDirectoryNewParamsTypeUser BetaDirectoryNewParamsType = "user"`

### Returns

- `type BetaDirectoryNewResponse struct{…}`

  API response schema for a directory.

  - `ID string`

    Unique identifier for the directory.

  - `Name string`

    Human-readable name for the directory.

  - `ProjectID string`

    Project the directory belongs to.

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `Description string`

    Optional description shown to users.

  - `ExpiresAt Time`

    When this directory expires and is eligible for cleanup.

  - `SystemMetadata map[string, any]`

    Reserved system-managed metadata.

  - `Type BetaDirectoryNewResponseType`

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

    - `const BetaDirectoryNewResponseTypeEphemeral BetaDirectoryNewResponseType = "ephemeral"`

    - `const BetaDirectoryNewResponseTypeIndex BetaDirectoryNewResponseType = "index"`

    - `const BetaDirectoryNewResponseTypeUser BetaDirectoryNewResponseType = "user"`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  directory, err := client.Beta.Directories.New(context.TODO(), llamacloud.BetaDirectoryNewParams{
    Name: "x",
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", directory.ID)
}
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "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

`client.Beta.Directories.List(ctx, query) (*PaginatedCursor[BetaDirectoryListResponse], error)`

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

List Directories

### Parameters

- `query BetaDirectoryListParams`

  - `IncludeDeleted param.Field[bool]`

    Include deleted directories.

  - `Name param.Field[string]`

    Directory name to match.

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Type param.Field[BetaDirectoryListParamsType]`

    Directory type to include.

    - `const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"`

    - `const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"`

    - `const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"`

  - `Types param.Field[[]string]`

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

    - `const BetaDirectoryListParamsTypeEphemeral BetaDirectoryListParamsType = "ephemeral"`

    - `const BetaDirectoryListParamsTypeIndex BetaDirectoryListParamsType = "index"`

    - `const BetaDirectoryListParamsTypeUser BetaDirectoryListParamsType = "user"`

### Returns

- `type BetaDirectoryListResponse struct{…}`

  API response schema for a directory.

  - `ID string`

    Unique identifier for the directory.

  - `Name string`

    Human-readable name for the directory.

  - `ProjectID string`

    Project the directory belongs to.

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `Description string`

    Optional description shown to users.

  - `ExpiresAt Time`

    When this directory expires and is eligible for cleanup.

  - `SystemMetadata map[string, any]`

    Reserved system-managed metadata.

  - `Type BetaDirectoryListResponseType`

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

    - `const BetaDirectoryListResponseTypeEphemeral BetaDirectoryListResponseType = "ephemeral"`

    - `const BetaDirectoryListResponseTypeIndex BetaDirectoryListResponseType = "index"`

    - `const BetaDirectoryListResponseTypeUser BetaDirectoryListResponseType = "user"`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Directories.List(context.TODO(), llamacloud.BetaDirectoryListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "id",
      "name": "x",
      "project_id": "project_id",
      "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

`client.Beta.Directories.Get(ctx, directoryID, query) (*BetaDirectoryGetResponse, error)`

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

Retrieve a directory by its identifier.

### Parameters

- `directoryID string`

- `query BetaDirectoryGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaDirectoryGetResponse struct{…}`

  API response schema for a directory.

  - `ID string`

    Unique identifier for the directory.

  - `Name string`

    Human-readable name for the directory.

  - `ProjectID string`

    Project the directory belongs to.

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `Description string`

    Optional description shown to users.

  - `ExpiresAt Time`

    When this directory expires and is eligible for cleanup.

  - `SystemMetadata map[string, any]`

    Reserved system-managed metadata.

  - `Type BetaDirectoryGetResponseType`

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

    - `const BetaDirectoryGetResponseTypeEphemeral BetaDirectoryGetResponseType = "ephemeral"`

    - `const BetaDirectoryGetResponseTypeIndex BetaDirectoryGetResponseType = "index"`

    - `const BetaDirectoryGetResponseTypeUser BetaDirectoryGetResponseType = "user"`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  directory, err := client.Beta.Directories.Get(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", directory.ID)
}
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "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

`client.Beta.Directories.Update(ctx, directoryID, params) (*BetaDirectoryUpdateResponse, error)`

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

Update directory metadata.

### Parameters

- `directoryID string`

- `params BetaDirectoryUpdateParams`

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Description param.Field[string]`

    Body param: Updated description for the directory.

  - `Name param.Field[string]`

    Body param: Updated name for the directory.

### Returns

- `type BetaDirectoryUpdateResponse struct{…}`

  API response schema for a directory.

  - `ID string`

    Unique identifier for the directory.

  - `Name string`

    Human-readable name for the directory.

  - `ProjectID string`

    Project the directory belongs to.

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `Description string`

    Optional description shown to users.

  - `ExpiresAt Time`

    When this directory expires and is eligible for cleanup.

  - `SystemMetadata map[string, any]`

    Reserved system-managed metadata.

  - `Type BetaDirectoryUpdateResponseType`

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

    - `const BetaDirectoryUpdateResponseTypeEphemeral BetaDirectoryUpdateResponseType = "ephemeral"`

    - `const BetaDirectoryUpdateResponseTypeIndex BetaDirectoryUpdateResponseType = "index"`

    - `const BetaDirectoryUpdateResponseTypeUser BetaDirectoryUpdateResponseType = "user"`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  directory, err := client.Beta.Directories.Update(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryUpdateParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", directory.ID)
}
```

#### Response

```json
{
  "id": "id",
  "name": "x",
  "project_id": "project_id",
  "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

`client.Beta.Directories.Delete(ctx, directoryID, body) error`

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

Permanently delete a directory.

### Parameters

- `directoryID string`

- `body BetaDirectoryDeleteParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Example

```go
package main

import (
  "context"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Beta.Directories.Delete(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryDeleteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

# Files

## Add Directory File

`client.Beta.Directories.Files.Add(ctx, directoryID, params) (*BetaDirectoryFileAddResponse, error)`

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

- `directoryID string`

- `params BetaDirectoryFileAddParams`

  - `FileID param.Field[string]`

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

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `DisplayName param.Field[string]`

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

  - `Metadata param.Field[map[string, BetaDirectoryFileAddParamsMetadataUnion]]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileAddParamsMetadataMetadataListValue []string`

  - `UniqueID param.Field[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

- `type BetaDirectoryFileAddResponse struct{…}`

  API response schema for a directory file.

  - `ID string`

    Unique identifier for the directory file.

  - `DirectoryID string`

    Directory the file belongs to.

  - `DisplayName string`

    Display name for the file.

  - `ProjectID string`

    Project the directory file belongs to.

  - `UniqueID string`

    Unique identifier for the file in the directory

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `DownloadURL PresignedURL`

    Schema for a presigned URL.

    - `ExpiresAt Time`

      The time at which the presigned URL expires

    - `URL string`

      A presigned URL for IO operations against a private file

    - `FormFields map[string, string]`

      Form fields for a presigned POST request

  - `FileID string`

    File ID for the storage location.

  - `Metadata map[string, BetaDirectoryFileAddResponseMetadataUnion]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileAddResponseMetadataMetadataListValue []string`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Directories.Files.Add(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryFileAddParams{
      FileID: "file_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.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

`client.Beta.Directories.Files.List(ctx, directoryID, query) (*PaginatedCursor[BetaDirectoryFileListResponse], error)`

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

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

### Parameters

- `directoryID string`

- `query BetaDirectoryFileListParams`

  - `DisplayName param.Field[string]`

  - `DisplayNameContains param.Field[string]`

  - `Expand param.Field[[]string]`

    Fields to expand on each directory file.

  - `FileID param.Field[string]`

  - `IncludeDeleted param.Field[bool]`

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `UniqueID param.Field[string]`

  - `UpdatedAtOnOrAfter param.Field[Time]`

    Include items updated at or after this timestamp (inclusive)

  - `UpdatedAtOnOrBefore param.Field[Time]`

    Include items updated at or before this timestamp (inclusive)

### Returns

- `type BetaDirectoryFileListResponse struct{…}`

  API response schema for a directory file.

  - `ID string`

    Unique identifier for the directory file.

  - `DirectoryID string`

    Directory the file belongs to.

  - `DisplayName string`

    Display name for the file.

  - `ProjectID string`

    Project the directory file belongs to.

  - `UniqueID string`

    Unique identifier for the file in the directory

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `DownloadURL PresignedURL`

    Schema for a presigned URL.

    - `ExpiresAt Time`

      The time at which the presigned URL expires

    - `URL string`

      A presigned URL for IO operations against a private file

    - `FormFields map[string, string]`

      Form fields for a presigned POST request

  - `FileID string`

    File ID for the storage location.

  - `Metadata map[string, BetaDirectoryFileListResponseMetadataUnion]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileListResponseMetadataMetadataListValue []string`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Directories.Files.List(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryFileListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.Directories.Files.Get(ctx, directoryFileID, params) (*BetaDirectoryFileGetResponse, error)`

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

- `directoryFileID string`

- `params BetaDirectoryFileGetParams`

  - `DirectoryID param.Field[string]`

    Path param

  - `Expand param.Field[[]string]`

    Query param: Fields to expand.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Returns

- `type BetaDirectoryFileGetResponse struct{…}`

  API response schema for a directory file.

  - `ID string`

    Unique identifier for the directory file.

  - `DirectoryID string`

    Directory the file belongs to.

  - `DisplayName string`

    Display name for the file.

  - `ProjectID string`

    Project the directory file belongs to.

  - `UniqueID string`

    Unique identifier for the file in the directory

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `DownloadURL PresignedURL`

    Schema for a presigned URL.

    - `ExpiresAt Time`

      The time at which the presigned URL expires

    - `URL string`

      A presigned URL for IO operations against a private file

    - `FormFields map[string, string]`

      Form fields for a presigned POST request

  - `FileID string`

    File ID for the storage location.

  - `Metadata map[string, BetaDirectoryFileGetResponseMetadataUnion]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileGetResponseMetadataMetadataListValue []string`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  file, err := client.Beta.Directories.Files.Get(
    context.TODO(),
    "directory_file_id",
    llamacloud.BetaDirectoryFileGetParams{
      DirectoryID: "directory_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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

`client.Beta.Directories.Files.Update(ctx, directoryFileID, params) (*BetaDirectoryFileUpdateResponse, error)`

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

- `directoryFileID string`

- `params BetaDirectoryFileUpdateParams`

  - `DirectoryID param.Field[string]`

    Path param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `DisplayName param.Field[string]`

    Body param: Updated display name.

  - `Metadata param.Field[map[string, BetaDirectoryFileUpdateParamsMetadataUnion]]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileUpdateParamsMetadataMetadataListValue []string`

  - `TargetDirectoryID param.Field[string]`

    Body param: Move file to a different directory.

  - `UniqueID param.Field[string]`

    Body param: Updated unique identifier.

### Returns

- `type BetaDirectoryFileUpdateResponse struct{…}`

  API response schema for a directory file.

  - `ID string`

    Unique identifier for the directory file.

  - `DirectoryID string`

    Directory the file belongs to.

  - `DisplayName string`

    Display name for the file.

  - `ProjectID string`

    Project the directory file belongs to.

  - `UniqueID string`

    Unique identifier for the file in the directory

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `DownloadURL PresignedURL`

    Schema for a presigned URL.

    - `ExpiresAt Time`

      The time at which the presigned URL expires

    - `URL string`

      A presigned URL for IO operations against a private file

    - `FormFields map[string, string]`

      Form fields for a presigned POST request

  - `FileID string`

    File ID for the storage location.

  - `Metadata map[string, BetaDirectoryFileUpdateResponseMetadataUnion]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileUpdateResponseMetadataMetadataListValue []string`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  file, err := client.Beta.Directories.Files.Update(
    context.TODO(),
    "directory_file_id",
    llamacloud.BetaDirectoryFileUpdateParams{
      DirectoryID: "directory_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", 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

`client.Beta.Directories.Files.Delete(ctx, directoryFileID, params) error`

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

- `directoryFileID string`

- `params BetaDirectoryFileDeleteParams`

  - `DirectoryID param.Field[string]`

    Path param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

### Example

```go
package main

import (
  "context"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  err := client.Beta.Directories.Files.Delete(
    context.TODO(),
    "directory_file_id",
    llamacloud.BetaDirectoryFileDeleteParams{
      DirectoryID: "directory_id",
    },
  )
  if err != nil {
    panic(err.Error())
  }
}
```

## Upload File To Directory

`client.Beta.Directories.Files.Upload(ctx, directoryID, params) (*BetaDirectoryFileUploadResponse, error)`

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

- `directoryID string`

- `params BetaDirectoryFileUploadParams`

  - `UploadFile param.Field[Reader]`

    Body param

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `DisplayName param.Field[string]`

    Body param

  - `ExternalFileID param.Field[string]`

    Body param

  - `Metadata param.Field[string]`

    Body param: User metadata as a JSON object string.

  - `UniqueID param.Field[string]`

    Body param

### Returns

- `type BetaDirectoryFileUploadResponse struct{…}`

  API response schema for a directory file.

  - `ID string`

    Unique identifier for the directory file.

  - `DirectoryID string`

    Directory the file belongs to.

  - `DisplayName string`

    Display name for the file.

  - `ProjectID string`

    Project the directory file belongs to.

  - `UniqueID string`

    Unique identifier for the file in the directory

  - `CreatedAt Time`

    Creation datetime

  - `DeletedAt Time`

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

  - `DownloadURL PresignedURL`

    Schema for a presigned URL.

    - `ExpiresAt Time`

      The time at which the presigned URL expires

    - `URL string`

      A presigned URL for IO operations against a private file

    - `FormFields map[string, string]`

      Form fields for a presigned POST request

  - `FileID string`

    File ID for the storage location.

  - `Metadata map[string, BetaDirectoryFileUploadResponseMetadataUnion]`

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

    - `string`

    - `int64`

    - `float64`

    - `bool`

    - `type BetaDirectoryFileUploadResponseMetadataMetadataListValue []string`

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "bytes"
  "context"
  "fmt"
  "io"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Directories.Files.Upload(
    context.TODO(),
    "directory_id",
    llamacloud.BetaDirectoryFileUploadParams{
      UploadFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),
    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.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"
}
```

# Batch

## Create Batch Job

`client.Beta.Batch.New(ctx, params) (*BetaBatchNewResponse, error)`

**post** `/api/v1/beta/batch-processing`

Create a batch processing job.

Processes files from a directory or a specific list of item IDs.
Supports batch parsing and classification operations.

Provide either `directory_id` to process all files in a directory,
or `item_ids` for specific items. The job runs asynchronously —
poll `GET /batch/{job_id}` for progress.

### Parameters

- `params BetaBatchNewParams`

  - `JobConfig param.Field[BetaBatchNewParamsJobConfigUnion]`

    Body param: Job configuration — either a parse or classify config

    - `type BetaBatchNewParamsJobConfigBatchParseJobRecordCreate struct{…}`

      Batch-specific parse job record for batch processing.

      This model contains the metadata and configuration for a batch parse job,
      but excludes file-specific information. It's used as input to the batch
      parent workflow and combined with DirectoryFile data to create full
      ParseJobRecordCreate instances for each file.

      Attributes:
      job_name: Must be PARSE_RAW_FILE
      partitions: Partitions for job output location
      parameters: Generic parse configuration (BatchParseJobConfig)
      session_id: Upstream request ID for tracking
      correlation_id: Correlation ID for cross-service tracking
      parent_job_execution_id: Parent job execution ID if nested
      user_id: User who created the job
      project_id: Project this job belongs to
      webhook_url: Optional webhook URL for job completion notifications

      - `CorrelationID string`

        The correlation ID for this job. Used for tracking the job across services.

      - `JobName string`

        - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateJobNameParseRawFileJob BetaBatchNewParamsJobConfigBatchParseJobRecordCreateJobName = "parse_raw_file_job"`

      - `Parameters BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParameters`

        Generic parse job configuration for batch processing.

        This model contains the parsing configuration that applies to all files
        in a batch, but excludes file-specific fields like file_name, file_id, etc.
        Those file-specific fields are populated from DirectoryFile data when
        creating individual ParseJobRecordCreate instances for each file.

        The fields in this model should be generic settings that apply uniformly
        to all files being processed in the batch.

        - `AdaptiveLongTable bool`

        - `AggressiveTableExtraction bool`

        - `AnnotateLinks bool`

        - `AutoMode bool`

        - `AutoModeConfigurationJson string`

        - `AutoModeTriggerOnImageInPage bool`

        - `AutoModeTriggerOnRegexpInPage string`

        - `AutoModeTriggerOnTableInPage bool`

        - `AutoModeTriggerOnTextInPage string`

        - `AzureOpenAIAPIVersion string`

        - `AzureOpenAIDeploymentName string`

        - `AzureOpenAIEndpoint string`

        - `AzureOpenAIKey string`

        - `BboxBottom float64`

        - `BboxLeft float64`

        - `BboxRight float64`

        - `BboxTop float64`

        - `BoundingBox string`

        - `CompactMarkdownTable bool`

        - `ComplementalFormattingInstruction string`

        - `ConfidenceScoreEffort string`

        - `ContentGuidelineInstruction string`

        - `ContinuousMode bool`

        - `CustomMetadata map[string, any]`

          The custom metadata to attach to the documents.

        - `DisableImageExtraction bool`

        - `DisableOcr bool`

        - `DisableReconstruction bool`

        - `DoNotCache bool`

        - `DoNotUnrollColumns bool`

        - `EnableCostOptimizer bool`

        - `ExtractCharts bool`

        - `ExtractLayout bool`

        - `ExtractPrintedPageNumber bool`

        - `FastMode bool`

        - `FormattingInstruction string`

        - `Gpt4oAPIKey string`

        - `Gpt4oMode bool`

        - `GuessXlsxSheetName bool`

        - `HideFooters bool`

        - `HideHeaders bool`

        - `HighResOcr bool`

        - `HTMLMakeAllElementsVisible bool`

        - `HTMLRemoveFixedElements bool`

        - `HTMLRemoveNavigationElements bool`

        - `HTTPProxy string`

        - `IgnoreDocumentElementsForLayoutDetection bool`

        - `ImagesToSave []string`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSaveEmbedded BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSave = "embedded"`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSaveLayout BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSave = "layout"`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSaveScreenshot BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersImagesToSave = "screenshot"`

        - `InlineImagesInMarkdown bool`

        - `InputS3Path string`

        - `InputS3Region string`

          The region for the input S3 bucket.

        - `InputURL string`

        - `InternalIsScreenshotJob bool`

        - `InvalidateCache bool`

        - `IsFormattingInstruction bool`

        - `JobTimeoutExtraTimePerPageInSeconds float64`

        - `JobTimeoutInSeconds float64`

        - `KeepPageSeparatorWhenMergingTables bool`

        - `Lang string`

          The language.

        - `Languages []ParsingLanguages`

          - `const ParsingLanguagesAbq ParsingLanguages = "abq"`

          - `const ParsingLanguagesAdy ParsingLanguages = "ady"`

          - `const ParsingLanguagesAf ParsingLanguages = "af"`

          - `const ParsingLanguagesAng ParsingLanguages = "ang"`

          - `const ParsingLanguagesAr ParsingLanguages = "ar"`

          - `const ParsingLanguagesAs ParsingLanguages = "as"`

          - `const ParsingLanguagesAva ParsingLanguages = "ava"`

          - `const ParsingLanguagesAz ParsingLanguages = "az"`

          - `const ParsingLanguagesBe ParsingLanguages = "be"`

          - `const ParsingLanguagesBg ParsingLanguages = "bg"`

          - `const ParsingLanguagesBgc ParsingLanguages = "bgc"`

          - `const ParsingLanguagesBh ParsingLanguages = "bh"`

          - `const ParsingLanguagesBho ParsingLanguages = "bho"`

          - `const ParsingLanguagesBn ParsingLanguages = "bn"`

          - `const ParsingLanguagesBs ParsingLanguages = "bs"`

          - `const ParsingLanguagesChSim ParsingLanguages = "ch_sim"`

          - `const ParsingLanguagesChTra ParsingLanguages = "ch_tra"`

          - `const ParsingLanguagesChe ParsingLanguages = "che"`

          - `const ParsingLanguagesCs ParsingLanguages = "cs"`

          - `const ParsingLanguagesCy ParsingLanguages = "cy"`

          - `const ParsingLanguagesDa ParsingLanguages = "da"`

          - `const ParsingLanguagesDar ParsingLanguages = "dar"`

          - `const ParsingLanguagesDe ParsingLanguages = "de"`

          - `const ParsingLanguagesEn ParsingLanguages = "en"`

          - `const ParsingLanguagesEs ParsingLanguages = "es"`

          - `const ParsingLanguagesEt ParsingLanguages = "et"`

          - `const ParsingLanguagesFa ParsingLanguages = "fa"`

          - `const ParsingLanguagesFr ParsingLanguages = "fr"`

          - `const ParsingLanguagesGa ParsingLanguages = "ga"`

          - `const ParsingLanguagesGom ParsingLanguages = "gom"`

          - `const ParsingLanguagesHi ParsingLanguages = "hi"`

          - `const ParsingLanguagesHr ParsingLanguages = "hr"`

          - `const ParsingLanguagesHu ParsingLanguages = "hu"`

          - `const ParsingLanguagesID ParsingLanguages = "id"`

          - `const ParsingLanguagesInh ParsingLanguages = "inh"`

          - `const ParsingLanguagesIs ParsingLanguages = "is"`

          - `const ParsingLanguagesIt ParsingLanguages = "it"`

          - `const ParsingLanguagesJa ParsingLanguages = "ja"`

          - `const ParsingLanguagesKbd ParsingLanguages = "kbd"`

          - `const ParsingLanguagesKn ParsingLanguages = "kn"`

          - `const ParsingLanguagesKo ParsingLanguages = "ko"`

          - `const ParsingLanguagesKu ParsingLanguages = "ku"`

          - `const ParsingLanguagesLa ParsingLanguages = "la"`

          - `const ParsingLanguagesLbe ParsingLanguages = "lbe"`

          - `const ParsingLanguagesLez ParsingLanguages = "lez"`

          - `const ParsingLanguagesLt ParsingLanguages = "lt"`

          - `const ParsingLanguagesLv ParsingLanguages = "lv"`

          - `const ParsingLanguagesMah ParsingLanguages = "mah"`

          - `const ParsingLanguagesMai ParsingLanguages = "mai"`

          - `const ParsingLanguagesMi ParsingLanguages = "mi"`

          - `const ParsingLanguagesMn ParsingLanguages = "mn"`

          - `const ParsingLanguagesMni ParsingLanguages = "mni"`

          - `const ParsingLanguagesMr ParsingLanguages = "mr"`

          - `const ParsingLanguagesMs ParsingLanguages = "ms"`

          - `const ParsingLanguagesMt ParsingLanguages = "mt"`

          - `const ParsingLanguagesNe ParsingLanguages = "ne"`

          - `const ParsingLanguagesNew ParsingLanguages = "new"`

          - `const ParsingLanguagesNl ParsingLanguages = "nl"`

          - `const ParsingLanguagesNo ParsingLanguages = "no"`

          - `const ParsingLanguagesOc ParsingLanguages = "oc"`

          - `const ParsingLanguagesPi ParsingLanguages = "pi"`

          - `const ParsingLanguagesPl ParsingLanguages = "pl"`

          - `const ParsingLanguagesPt ParsingLanguages = "pt"`

          - `const ParsingLanguagesRo ParsingLanguages = "ro"`

          - `const ParsingLanguagesRsCyrillic ParsingLanguages = "rs_cyrillic"`

          - `const ParsingLanguagesRsLatin ParsingLanguages = "rs_latin"`

          - `const ParsingLanguagesRu ParsingLanguages = "ru"`

          - `const ParsingLanguagesSa ParsingLanguages = "sa"`

          - `const ParsingLanguagesSck ParsingLanguages = "sck"`

          - `const ParsingLanguagesSk ParsingLanguages = "sk"`

          - `const ParsingLanguagesSl ParsingLanguages = "sl"`

          - `const ParsingLanguagesSq ParsingLanguages = "sq"`

          - `const ParsingLanguagesSv ParsingLanguages = "sv"`

          - `const ParsingLanguagesSw ParsingLanguages = "sw"`

          - `const ParsingLanguagesTa ParsingLanguages = "ta"`

          - `const ParsingLanguagesTab ParsingLanguages = "tab"`

          - `const ParsingLanguagesTe ParsingLanguages = "te"`

          - `const ParsingLanguagesTh ParsingLanguages = "th"`

          - `const ParsingLanguagesTjk ParsingLanguages = "tjk"`

          - `const ParsingLanguagesTl ParsingLanguages = "tl"`

          - `const ParsingLanguagesTr ParsingLanguages = "tr"`

          - `const ParsingLanguagesUg ParsingLanguages = "ug"`

          - `const ParsingLanguagesUk ParsingLanguages = "uk"`

          - `const ParsingLanguagesUr ParsingLanguages = "ur"`

          - `const ParsingLanguagesUz ParsingLanguages = "uz"`

          - `const ParsingLanguagesVi ParsingLanguages = "vi"`

        - `LayoutAware bool`

        - `LineLevelBoundingBox bool`

        - `MarkdownTableMultilineHeaderSeparator string`

        - `MaxPages int64`

        - `MaxPagesEnforced int64`

        - `MergeTablesAcrossPagesInMarkdown bool`

        - `Model string`

        - `OutlinedTableExtraction bool`

        - `OutputPdfOfDocument bool`

        - `OutputS3PathPrefix string`

          If specified, llamaParse will save the output to the specified path. All output file will use this 'prefix' should be a valid s3:// url

        - `OutputS3Region string`

          The region for the output S3 bucket.

        - `OutputTablesAsHTML bool`

        - `OutputBucket string`

          The output bucket.

        - `PageErrorTolerance float64`

        - `PageFooterPrefix string`

        - `PageFooterSuffix string`

        - `PageHeaderPrefix string`

        - `PageHeaderSuffix string`

        - `PagePrefix string`

        - `PageSeparator string`

        - `PageSuffix string`

        - `ParseMode ParsingMode`

          Enum for representing the mode of parsing to be used.

          - `const ParsingModeParseDocumentWithAgent ParsingMode = "parse_document_with_agent"`

          - `const ParsingModeParseDocumentWithLlm ParsingMode = "parse_document_with_llm"`

          - `const ParsingModeParseDocumentWithLvm ParsingMode = "parse_document_with_lvm"`

          - `const ParsingModeParsePageWithAgent ParsingMode = "parse_page_with_agent"`

          - `const ParsingModeParsePageWithLayoutAgent ParsingMode = "parse_page_with_layout_agent"`

          - `const ParsingModeParsePageWithLlm ParsingMode = "parse_page_with_llm"`

          - `const ParsingModeParsePageWithLvm ParsingMode = "parse_page_with_lvm"`

          - `const ParsingModeParsePageWithoutLlm ParsingMode = "parse_page_without_llm"`

        - `ParsingInstruction string`

        - `PipelineID string`

          The pipeline ID.

        - `PreciseBoundingBox bool`

        - `PremiumMode bool`

        - `PresentationOutOfBoundsContent bool`

        - `PresentationSkipEmbeddedData bool`

        - `PreserveLayoutAlignmentAcrossPages bool`

        - `PreserveVerySmallText bool`

        - `Preset string`

        - `Priority string`

          The priority for the request. This field may be ignored or overwritten depending on the organization tier.

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriorityCritical BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriority = "critical"`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriorityHigh BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriority = "high"`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriorityLow BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriority = "low"`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriorityMedium BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersPriority = "medium"`

        - `ProjectID string`

        - `RemoveHiddenText bool`

        - `ReplaceFailedPageMode FailPageMode`

          Enum for representing the different available page error handling modes.

          - `const FailPageModeBlankPage FailPageMode = "blank_page"`

          - `const FailPageModeErrorMessage FailPageMode = "error_message"`

          - `const FailPageModeRawText FailPageMode = "raw_text"`

        - `ReplaceFailedPageWithErrorMessagePrefix string`

        - `ReplaceFailedPageWithErrorMessageSuffix string`

        - `ResourceInfo map[string, any]`

          The resource info about the file

        - `SaveImages bool`

        - `SkipDiagonalText bool`

        - `SpecializedChartParsingAgentic bool`

        - `SpecializedChartParsingEfficient bool`

        - `SpecializedChartParsingPlus bool`

        - `SpecializedImageParsing bool`

        - `SpreadsheetExtractSubTables bool`

        - `SpreadsheetForceFormulaComputation bool`

        - `SpreadsheetIncludeHiddenSheets bool`

        - `StrictModeBuggyFont bool`

        - `StrictModeImageExtraction bool`

        - `StrictModeImageOcr bool`

        - `StrictModeReconstruction bool`

        - `StructuredOutput bool`

        - `StructuredOutputJsonSchema string`

        - `StructuredOutputJsonSchemaName string`

        - `SystemPrompt string`

        - `SystemPromptAppend string`

        - `TakeScreenshot bool`

        - `TargetPages string`

        - `Tier string`

        - `Type string`

          - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersTypeParse BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersType = "parse"`

        - `UseVendorMultimodalModel bool`

        - `UserPrompt string`

        - `VendorMultimodalAPIKey string`

        - `VendorMultimodalModelName string`

        - `Version string`

        - `WebhookConfigurations []BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration`

          Outbound webhook endpoints to notify on job status changes

          - `WebhookEvents []string`

            Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyCancelled BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyError BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.error"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyPartialSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyPending BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.pending"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyRunning BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.running"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifySuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractCancelled BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractError BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.error"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractPartialSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractPending BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.pending"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseCancelled BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseError BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.error"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParsePartialSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParsePending BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.pending"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseRunning BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.running"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsCancelled BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsError BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.error"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsPartialSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsPending BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitCancelled BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitError BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.error"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitPending BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.pending"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitProcessing BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.processing"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitSuccess BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.success"`

            - `const BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventUnmappedEvent BetaBatchNewParamsJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

          - `WebhookHeaders map[string, string]`

            Custom HTTP headers sent with each webhook request (e.g. auth tokens)

          - `WebhookOutputFormat string`

            Response format sent to the webhook: 'string' (default) or 'json'

          - `WebhookSigningSecret string`

            Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

          - `WebhookURL string`

            URL to receive webhook POST notifications

        - `WebhookURL string`

      - `ParentJobExecutionID string`

        The ID of the parent job execution.

      - `Partitions map[string, string]`

        The partitions for this execution. Used for determining where to save job output.

      - `ProjectID string`

        The ID of the project this job belongs to.

      - `SessionID string`

        The upstream request ID that created this job. Used for tracking the job across services.

      - `UserID string`

        The ID of the user that created this job

      - `WebhookURL string`

        The URL that needs to be called at the end of the parsing job.

    - `type ClassifyJob struct{…}`

      A classify job.

      - `ID string`

        Unique identifier

      - `ProjectID string`

        The ID of the project

      - `Rules []ClassifierRule`

        The rules to classify the files

        - `Description string`

          Natural language description of what to classify. Be specific about the content characteristics that identify this document type.

        - `Type string`

          The document type to assign when this rule matches (e.g., 'invoice', 'receipt', 'contract')

      - `Status StatusEnum`

        The status of the classify job

        - `const StatusEnumCancelled StatusEnum = "CANCELLED"`

        - `const StatusEnumError StatusEnum = "ERROR"`

        - `const StatusEnumPartialSuccess StatusEnum = "PARTIAL_SUCCESS"`

        - `const StatusEnumPending StatusEnum = "PENDING"`

        - `const StatusEnumSuccess StatusEnum = "SUCCESS"`

      - `UserID string`

        The ID of the user

      - `CreatedAt Time`

        Creation datetime

      - `EffectiveAt Time`

      - `ErrorMessage string`

        Error message for the latest job attempt, if any.

      - `JobRecordID string`

        The job record ID associated with this status, if any.

      - `Mode ClassifyJobMode`

        The classification mode to use

        - `const ClassifyJobModeFast ClassifyJobMode = "FAST"`

        - `const ClassifyJobModeMultimodal ClassifyJobMode = "MULTIMODAL"`

      - `ParsingConfiguration ClassifyParsingConfiguration`

        The configuration for the parsing job

        - `Lang ParsingLanguages`

          The language to parse the files in

          - `const ParsingLanguagesAbq ParsingLanguages = "abq"`

          - `const ParsingLanguagesAdy ParsingLanguages = "ady"`

          - `const ParsingLanguagesAf ParsingLanguages = "af"`

          - `const ParsingLanguagesAng ParsingLanguages = "ang"`

          - `const ParsingLanguagesAr ParsingLanguages = "ar"`

          - `const ParsingLanguagesAs ParsingLanguages = "as"`

          - `const ParsingLanguagesAva ParsingLanguages = "ava"`

          - `const ParsingLanguagesAz ParsingLanguages = "az"`

          - `const ParsingLanguagesBe ParsingLanguages = "be"`

          - `const ParsingLanguagesBg ParsingLanguages = "bg"`

          - `const ParsingLanguagesBgc ParsingLanguages = "bgc"`

          - `const ParsingLanguagesBh ParsingLanguages = "bh"`

          - `const ParsingLanguagesBho ParsingLanguages = "bho"`

          - `const ParsingLanguagesBn ParsingLanguages = "bn"`

          - `const ParsingLanguagesBs ParsingLanguages = "bs"`

          - `const ParsingLanguagesChSim ParsingLanguages = "ch_sim"`

          - `const ParsingLanguagesChTra ParsingLanguages = "ch_tra"`

          - `const ParsingLanguagesChe ParsingLanguages = "che"`

          - `const ParsingLanguagesCs ParsingLanguages = "cs"`

          - `const ParsingLanguagesCy ParsingLanguages = "cy"`

          - `const ParsingLanguagesDa ParsingLanguages = "da"`

          - `const ParsingLanguagesDar ParsingLanguages = "dar"`

          - `const ParsingLanguagesDe ParsingLanguages = "de"`

          - `const ParsingLanguagesEn ParsingLanguages = "en"`

          - `const ParsingLanguagesEs ParsingLanguages = "es"`

          - `const ParsingLanguagesEt ParsingLanguages = "et"`

          - `const ParsingLanguagesFa ParsingLanguages = "fa"`

          - `const ParsingLanguagesFr ParsingLanguages = "fr"`

          - `const ParsingLanguagesGa ParsingLanguages = "ga"`

          - `const ParsingLanguagesGom ParsingLanguages = "gom"`

          - `const ParsingLanguagesHi ParsingLanguages = "hi"`

          - `const ParsingLanguagesHr ParsingLanguages = "hr"`

          - `const ParsingLanguagesHu ParsingLanguages = "hu"`

          - `const ParsingLanguagesID ParsingLanguages = "id"`

          - `const ParsingLanguagesInh ParsingLanguages = "inh"`

          - `const ParsingLanguagesIs ParsingLanguages = "is"`

          - `const ParsingLanguagesIt ParsingLanguages = "it"`

          - `const ParsingLanguagesJa ParsingLanguages = "ja"`

          - `const ParsingLanguagesKbd ParsingLanguages = "kbd"`

          - `const ParsingLanguagesKn ParsingLanguages = "kn"`

          - `const ParsingLanguagesKo ParsingLanguages = "ko"`

          - `const ParsingLanguagesKu ParsingLanguages = "ku"`

          - `const ParsingLanguagesLa ParsingLanguages = "la"`

          - `const ParsingLanguagesLbe ParsingLanguages = "lbe"`

          - `const ParsingLanguagesLez ParsingLanguages = "lez"`

          - `const ParsingLanguagesLt ParsingLanguages = "lt"`

          - `const ParsingLanguagesLv ParsingLanguages = "lv"`

          - `const ParsingLanguagesMah ParsingLanguages = "mah"`

          - `const ParsingLanguagesMai ParsingLanguages = "mai"`

          - `const ParsingLanguagesMi ParsingLanguages = "mi"`

          - `const ParsingLanguagesMn ParsingLanguages = "mn"`

          - `const ParsingLanguagesMni ParsingLanguages = "mni"`

          - `const ParsingLanguagesMr ParsingLanguages = "mr"`

          - `const ParsingLanguagesMs ParsingLanguages = "ms"`

          - `const ParsingLanguagesMt ParsingLanguages = "mt"`

          - `const ParsingLanguagesNe ParsingLanguages = "ne"`

          - `const ParsingLanguagesNew ParsingLanguages = "new"`

          - `const ParsingLanguagesNl ParsingLanguages = "nl"`

          - `const ParsingLanguagesNo ParsingLanguages = "no"`

          - `const ParsingLanguagesOc ParsingLanguages = "oc"`

          - `const ParsingLanguagesPi ParsingLanguages = "pi"`

          - `const ParsingLanguagesPl ParsingLanguages = "pl"`

          - `const ParsingLanguagesPt ParsingLanguages = "pt"`

          - `const ParsingLanguagesRo ParsingLanguages = "ro"`

          - `const ParsingLanguagesRsCyrillic ParsingLanguages = "rs_cyrillic"`

          - `const ParsingLanguagesRsLatin ParsingLanguages = "rs_latin"`

          - `const ParsingLanguagesRu ParsingLanguages = "ru"`

          - `const ParsingLanguagesSa ParsingLanguages = "sa"`

          - `const ParsingLanguagesSck ParsingLanguages = "sck"`

          - `const ParsingLanguagesSk ParsingLanguages = "sk"`

          - `const ParsingLanguagesSl ParsingLanguages = "sl"`

          - `const ParsingLanguagesSq ParsingLanguages = "sq"`

          - `const ParsingLanguagesSv ParsingLanguages = "sv"`

          - `const ParsingLanguagesSw ParsingLanguages = "sw"`

          - `const ParsingLanguagesTa ParsingLanguages = "ta"`

          - `const ParsingLanguagesTab ParsingLanguages = "tab"`

          - `const ParsingLanguagesTe ParsingLanguages = "te"`

          - `const ParsingLanguagesTh ParsingLanguages = "th"`

          - `const ParsingLanguagesTjk ParsingLanguages = "tjk"`

          - `const ParsingLanguagesTl ParsingLanguages = "tl"`

          - `const ParsingLanguagesTr ParsingLanguages = "tr"`

          - `const ParsingLanguagesUg ParsingLanguages = "ug"`

          - `const ParsingLanguagesUk ParsingLanguages = "uk"`

          - `const ParsingLanguagesUr ParsingLanguages = "ur"`

          - `const ParsingLanguagesUz ParsingLanguages = "uz"`

          - `const ParsingLanguagesVi ParsingLanguages = "vi"`

        - `MaxPages int64`

          The maximum number of pages to parse

        - `TargetPages []int64`

          The pages to target for parsing (0-indexed, so first page is at 0)

      - `UpdatedAt Time`

        Update datetime

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `ContinueAsNewThreshold param.Field[int64]`

    Body param: Maximum files to process per execution cycle in directory mode. Defaults to page_size.

  - `DirectoryID param.Field[string]`

    Body param: ID of the directory containing files to process

  - `ItemIDs param.Field[[]string]`

    Body param: List of specific item IDs to process. Either this or directory_id must be provided.

  - `PageSize param.Field[int64]`

    Body param: Number of files to process per batch when using directory mode

  - `TemporalNamespace param.Field[string]`

    Header param

### Returns

- `type BetaBatchNewResponse struct{…}`

  Response schema for a batch processing job.

  - `ID string`

    Unique identifier for the batch job

  - `JobType BetaBatchNewResponseJobType`

    Type of processing operation (parse or classify)

    - `const BetaBatchNewResponseJobTypeClassify BetaBatchNewResponseJobType = "classify"`

    - `const BetaBatchNewResponseJobTypeExtract BetaBatchNewResponseJobType = "extract"`

    - `const BetaBatchNewResponseJobTypeParse BetaBatchNewResponseJobType = "parse"`

  - `ProjectID string`

    Project this job belongs to

  - `Status BetaBatchNewResponseStatus`

    Current job status

    - `const BetaBatchNewResponseStatusCancelled BetaBatchNewResponseStatus = "cancelled"`

    - `const BetaBatchNewResponseStatusCompleted BetaBatchNewResponseStatus = "completed"`

    - `const BetaBatchNewResponseStatusDispatched BetaBatchNewResponseStatus = "dispatched"`

    - `const BetaBatchNewResponseStatusFailed BetaBatchNewResponseStatus = "failed"`

    - `const BetaBatchNewResponseStatusPending BetaBatchNewResponseStatus = "pending"`

    - `const BetaBatchNewResponseStatusRunning BetaBatchNewResponseStatus = "running"`

  - `TotalItems int64`

    Total number of items in the job

  - `CompletedAt Time`

    Timestamp when job completed

  - `CreatedAt Time`

    Creation datetime

  - `DirectoryID string`

    Directory being processed

  - `EffectiveAt Time`

  - `ErrorMessage string`

    Error message for the latest job attempt, if any.

  - `FailedItems int64`

    Number of items that failed processing

  - `JobRecordID string`

    The job record ID associated with this status, if any.

  - `ProcessedItems int64`

    Number of items processed so far

  - `SkippedItems int64`

    Number of items skipped (already processed or size limit)

  - `StartedAt Time`

    Timestamp when job processing started

  - `UpdatedAt Time`

    Update datetime

  - `WorkflowID string`

    Async job tracking ID

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  batch, err := client.Beta.Batch.New(context.TODO(), llamacloud.BetaBatchNewParams{
    JobConfig: llamacloud.BetaBatchNewParamsJobConfigUnion{
      OfBatchParseJobRecordCreate: &llamacloud.BetaBatchNewParamsJobConfigBatchParseJobRecordCreate{

      },
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", batch.ID)
}
```

#### Response

```json
{
  "id": "bjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "job_type": "classify",
  "project_id": "proj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "status": "cancelled",
  "total_items": 0,
  "completed_at": "2019-12-27T18:11:19.117Z",
  "created_at": "2019-12-27T18:11:19.117Z",
  "directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "effective_at": "2019-12-27T18:11:19.117Z",
  "error_message": "error_message",
  "failed_items": 0,
  "job_record_id": "job_record_id",
  "processed_items": 0,
  "skipped_items": 0,
  "started_at": "2019-12-27T18:11:19.117Z",
  "updated_at": "2019-12-27T18:11:19.117Z",
  "workflow_id": "workflow_id"
}
```

## List Batch Jobs

`client.Beta.Batch.List(ctx, query) (*PaginatedBatchItems[BetaBatchListResponse], error)`

**get** `/api/v1/beta/batch-processing`

List batch processing jobs with optional filtering.

Filter by `directory_id`, `job_type`, or `status`. Results
are paginated with configurable `limit` and `offset`.

### Parameters

- `query BetaBatchListParams`

  - `DirectoryID param.Field[string]`

    Filter by directory ID

  - `JobType param.Field[BetaBatchListParamsJobType]`

    Filter by job type (PARSE, EXTRACT, CLASSIFY)

    - `const BetaBatchListParamsJobTypeClassify BetaBatchListParamsJobType = "classify"`

    - `const BetaBatchListParamsJobTypeExtract BetaBatchListParamsJobType = "extract"`

    - `const BetaBatchListParamsJobTypeParse BetaBatchListParamsJobType = "parse"`

  - `Limit param.Field[int64]`

    Maximum number of jobs to return

  - `Offset param.Field[int64]`

    Number of jobs to skip for pagination

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Status param.Field[BetaBatchListParamsStatus]`

    Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)

    - `const BetaBatchListParamsStatusCancelled BetaBatchListParamsStatus = "cancelled"`

    - `const BetaBatchListParamsStatusCompleted BetaBatchListParamsStatus = "completed"`

    - `const BetaBatchListParamsStatusDispatched BetaBatchListParamsStatus = "dispatched"`

    - `const BetaBatchListParamsStatusFailed BetaBatchListParamsStatus = "failed"`

    - `const BetaBatchListParamsStatusPending BetaBatchListParamsStatus = "pending"`

    - `const BetaBatchListParamsStatusRunning BetaBatchListParamsStatus = "running"`

### Returns

- `type BetaBatchListResponse struct{…}`

  Response schema for a batch processing job.

  - `ID string`

    Unique identifier for the batch job

  - `JobType BetaBatchListResponseJobType`

    Type of processing operation (parse or classify)

    - `const BetaBatchListResponseJobTypeClassify BetaBatchListResponseJobType = "classify"`

    - `const BetaBatchListResponseJobTypeExtract BetaBatchListResponseJobType = "extract"`

    - `const BetaBatchListResponseJobTypeParse BetaBatchListResponseJobType = "parse"`

  - `ProjectID string`

    Project this job belongs to

  - `Status BetaBatchListResponseStatus`

    Current job status

    - `const BetaBatchListResponseStatusCancelled BetaBatchListResponseStatus = "cancelled"`

    - `const BetaBatchListResponseStatusCompleted BetaBatchListResponseStatus = "completed"`

    - `const BetaBatchListResponseStatusDispatched BetaBatchListResponseStatus = "dispatched"`

    - `const BetaBatchListResponseStatusFailed BetaBatchListResponseStatus = "failed"`

    - `const BetaBatchListResponseStatusPending BetaBatchListResponseStatus = "pending"`

    - `const BetaBatchListResponseStatusRunning BetaBatchListResponseStatus = "running"`

  - `TotalItems int64`

    Total number of items in the job

  - `CompletedAt Time`

    Timestamp when job completed

  - `CreatedAt Time`

    Creation datetime

  - `DirectoryID string`

    Directory being processed

  - `EffectiveAt Time`

  - `ErrorMessage string`

    Error message for the latest job attempt, if any.

  - `FailedItems int64`

    Number of items that failed processing

  - `JobRecordID string`

    The job record ID associated with this status, if any.

  - `ProcessedItems int64`

    Number of items processed so far

  - `SkippedItems int64`

    Number of items skipped (already processed or size limit)

  - `StartedAt Time`

    Timestamp when job processing started

  - `UpdatedAt Time`

    Update datetime

  - `WorkflowID string`

    Async job tracking ID

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Batch.List(context.TODO(), llamacloud.BetaBatchListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "id": "bjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "job_type": "classify",
      "project_id": "proj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "status": "cancelled",
      "total_items": 0,
      "completed_at": "2019-12-27T18:11:19.117Z",
      "created_at": "2019-12-27T18:11:19.117Z",
      "directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
      "effective_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "failed_items": 0,
      "job_record_id": "job_record_id",
      "processed_items": 0,
      "skipped_items": 0,
      "started_at": "2019-12-27T18:11:19.117Z",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "workflow_id": "workflow_id"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Batch Job Status

`client.Beta.Batch.GetStatus(ctx, jobID, query) (*BetaBatchGetStatusResponse, error)`

**get** `/api/v1/beta/batch-processing/{job_id}`

Get detailed status of a batch processing job.

Returns current progress percentage, file counts (total,
processed, failed, skipped), and timestamps.

### Parameters

- `jobID string`

- `query BetaBatchGetStatusParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaBatchGetStatusResponse struct{…}`

  Detailed status response for a batch processing job.

  - `Job BetaBatchGetStatusResponseJob`

    Response schema for a batch processing job.

    - `ID string`

      Unique identifier for the batch job

    - `JobType string`

      Type of processing operation (parse or classify)

      - `const BetaBatchGetStatusResponseJobJobTypeClassify BetaBatchGetStatusResponseJobJobType = "classify"`

      - `const BetaBatchGetStatusResponseJobJobTypeExtract BetaBatchGetStatusResponseJobJobType = "extract"`

      - `const BetaBatchGetStatusResponseJobJobTypeParse BetaBatchGetStatusResponseJobJobType = "parse"`

    - `ProjectID string`

      Project this job belongs to

    - `Status string`

      Current job status

      - `const BetaBatchGetStatusResponseJobStatusCancelled BetaBatchGetStatusResponseJobStatus = "cancelled"`

      - `const BetaBatchGetStatusResponseJobStatusCompleted BetaBatchGetStatusResponseJobStatus = "completed"`

      - `const BetaBatchGetStatusResponseJobStatusDispatched BetaBatchGetStatusResponseJobStatus = "dispatched"`

      - `const BetaBatchGetStatusResponseJobStatusFailed BetaBatchGetStatusResponseJobStatus = "failed"`

      - `const BetaBatchGetStatusResponseJobStatusPending BetaBatchGetStatusResponseJobStatus = "pending"`

      - `const BetaBatchGetStatusResponseJobStatusRunning BetaBatchGetStatusResponseJobStatus = "running"`

    - `TotalItems int64`

      Total number of items in the job

    - `CompletedAt Time`

      Timestamp when job completed

    - `CreatedAt Time`

      Creation datetime

    - `DirectoryID string`

      Directory being processed

    - `EffectiveAt Time`

    - `ErrorMessage string`

      Error message for the latest job attempt, if any.

    - `FailedItems int64`

      Number of items that failed processing

    - `JobRecordID string`

      The job record ID associated with this status, if any.

    - `ProcessedItems int64`

      Number of items processed so far

    - `SkippedItems int64`

      Number of items skipped (already processed or size limit)

    - `StartedAt Time`

      Timestamp when job processing started

    - `UpdatedAt Time`

      Update datetime

    - `WorkflowID string`

      Async job tracking ID

  - `ProgressPercentage float64`

    Percentage of items processed (0-100)

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Batch.GetStatus(
    context.TODO(),
    "job_id",
    llamacloud.BetaBatchGetStatusParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Job)
}
```

#### Response

```json
{
  "job": {
    "id": "bjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "job_type": "classify",
    "project_id": "proj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "status": "cancelled",
    "total_items": 0,
    "completed_at": "2019-12-27T18:11:19.117Z",
    "created_at": "2019-12-27T18:11:19.117Z",
    "directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
    "effective_at": "2019-12-27T18:11:19.117Z",
    "error_message": "error_message",
    "failed_items": 0,
    "job_record_id": "job_record_id",
    "processed_items": 0,
    "skipped_items": 0,
    "started_at": "2019-12-27T18:11:19.117Z",
    "updated_at": "2019-12-27T18:11:19.117Z",
    "workflow_id": "workflow_id"
  },
  "progress_percentage": 0
}
```

## Cancel Batch Job

`client.Beta.Batch.Cancel(ctx, jobID, params) (*BetaBatchCancelResponse, error)`

**post** `/api/v1/beta/batch-processing/{job_id}/cancel`

Cancel a running batch processing job.

Stops processing and marks pending items as cancelled.
Items currently being processed may still complete.

### Parameters

- `jobID string`

- `params BetaBatchCancelParams`

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Reason param.Field[string]`

    Body param: Optional reason for cancelling the job

  - `TemporalNamespace param.Field[string]`

    Header param

### Returns

- `type BetaBatchCancelResponse struct{…}`

  Response after cancelling a batch job.

  - `JobID string`

    ID of the cancelled job

  - `Message string`

    Confirmation message

  - `ProcessedItems int64`

    Number of items processed before cancellation

  - `Status BetaBatchCancelResponseStatus`

    New status (should be 'cancelled')

    - `const BetaBatchCancelResponseStatusCancelled BetaBatchCancelResponseStatus = "cancelled"`

    - `const BetaBatchCancelResponseStatusCompleted BetaBatchCancelResponseStatus = "completed"`

    - `const BetaBatchCancelResponseStatusDispatched BetaBatchCancelResponseStatus = "dispatched"`

    - `const BetaBatchCancelResponseStatusFailed BetaBatchCancelResponseStatus = "failed"`

    - `const BetaBatchCancelResponseStatusPending BetaBatchCancelResponseStatus = "pending"`

    - `const BetaBatchCancelResponseStatusRunning BetaBatchCancelResponseStatus = "running"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Batch.Cancel(
    context.TODO(),
    "job_id",
    llamacloud.BetaBatchCancelParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.JobID)
}
```

#### Response

```json
{
  "job_id": "job_id",
  "message": "message",
  "processed_items": 0,
  "status": "cancelled"
}
```

# Job Items

## List Batch Job Items

`client.Beta.Batch.JobItems.List(ctx, jobID, query) (*PaginatedBatchItems[BetaBatchJobItemListResponse], error)`

**get** `/api/v1/beta/batch-processing/{job_id}/items`

List items in a batch job with optional status filtering.

Useful for finding failed items, viewing completed items,
or debugging processing issues.

### Parameters

- `jobID string`

- `query BetaBatchJobItemListParams`

  - `Limit param.Field[int64]`

    Maximum number of items to return

  - `Offset param.Field[int64]`

    Number of items to skip

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Status param.Field[BetaBatchJobItemListParamsStatus]`

    Filter items by status

    - `const BetaBatchJobItemListParamsStatusCancelled BetaBatchJobItemListParamsStatus = "cancelled"`

    - `const BetaBatchJobItemListParamsStatusCompleted BetaBatchJobItemListParamsStatus = "completed"`

    - `const BetaBatchJobItemListParamsStatusFailed BetaBatchJobItemListParamsStatus = "failed"`

    - `const BetaBatchJobItemListParamsStatusPending BetaBatchJobItemListParamsStatus = "pending"`

    - `const BetaBatchJobItemListParamsStatusProcessing BetaBatchJobItemListParamsStatus = "processing"`

    - `const BetaBatchJobItemListParamsStatusSkipped BetaBatchJobItemListParamsStatus = "skipped"`

### Returns

- `type BetaBatchJobItemListResponse struct{…}`

  Detailed information about an item in a batch job.

  - `ItemID string`

    ID of the item

  - `ItemName string`

    Name of the item

  - `Status BetaBatchJobItemListResponseStatus`

    Processing status of this item

    - `const BetaBatchJobItemListResponseStatusCancelled BetaBatchJobItemListResponseStatus = "cancelled"`

    - `const BetaBatchJobItemListResponseStatusCompleted BetaBatchJobItemListResponseStatus = "completed"`

    - `const BetaBatchJobItemListResponseStatusFailed BetaBatchJobItemListResponseStatus = "failed"`

    - `const BetaBatchJobItemListResponseStatusPending BetaBatchJobItemListResponseStatus = "pending"`

    - `const BetaBatchJobItemListResponseStatusProcessing BetaBatchJobItemListResponseStatus = "processing"`

    - `const BetaBatchJobItemListResponseStatusSkipped BetaBatchJobItemListResponseStatus = "skipped"`

  - `CompletedAt Time`

    When processing completed for this item

  - `EffectiveAt Time`

  - `ErrorMessage string`

    Error message for the latest job attempt, if any.

  - `JobID string`

    Job ID for the underlying processing job (links to parse/extract job results)

  - `JobRecordID string`

    The job record ID associated with this status, if any.

  - `SkipReason string`

    Reason item was skipped (e.g., 'already_processed', 'size_limit_exceeded')

  - `StartedAt Time`

    When processing started for this item

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Batch.JobItems.List(
    context.TODO(),
    "job_id",
    llamacloud.BetaBatchJobItemListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

#### Response

```json
{
  "items": [
    {
      "item_id": "item_id",
      "item_name": "item_name",
      "status": "cancelled",
      "completed_at": "2019-12-27T18:11:19.117Z",
      "effective_at": "2019-12-27T18:11:19.117Z",
      "error_message": "error_message",
      "job_id": "job_id",
      "job_record_id": "job_record_id",
      "skip_reason": "skip_reason",
      "started_at": "2019-12-27T18:11:19.117Z"
    }
  ],
  "next_page_token": "next_page_token",
  "total_size": 0
}
```

## Get Item Processing Results

`client.Beta.Batch.JobItems.GetProcessingResults(ctx, itemID, query) (*BetaBatchJobItemGetProcessingResultsResponse, error)`

**get** `/api/v1/beta/batch-processing/items/{item_id}/processing-results`

Get all processing results for a specific item.

Returns the complete processing history for an item including
what operations were performed, parameters used, and where
outputs are stored. Optionally filter by `job_type`.

### Parameters

- `itemID string`

- `query BetaBatchJobItemGetProcessingResultsParams`

  - `JobType param.Field[BetaBatchJobItemGetProcessingResultsParamsJobType]`

    Filter results by job type

    - `const BetaBatchJobItemGetProcessingResultsParamsJobTypeClassify BetaBatchJobItemGetProcessingResultsParamsJobType = "classify"`

    - `const BetaBatchJobItemGetProcessingResultsParamsJobTypeExtract BetaBatchJobItemGetProcessingResultsParamsJobType = "extract"`

    - `const BetaBatchJobItemGetProcessingResultsParamsJobTypeParse BetaBatchJobItemGetProcessingResultsParamsJobType = "parse"`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaBatchJobItemGetProcessingResultsResponse struct{…}`

  Response containing all processing results for an item.

  - `ItemID string`

    ID of the source item

  - `ItemName string`

    Name of the source item

  - `ProcessingResults []BetaBatchJobItemGetProcessingResultsResponseProcessingResult`

    List of all processing operations performed on this item

    - `ItemID string`

      Source item that was processed

    - `JobConfig BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigUnion`

      Job configuration used for processing

      - `type BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreate struct{…}`

        Batch-specific parse job record for batch processing.

        This model contains the metadata and configuration for a batch parse job,
        but excludes file-specific information. It's used as input to the batch
        parent workflow and combined with DirectoryFile data to create full
        ParseJobRecordCreate instances for each file.

        Attributes:
        job_name: Must be PARSE_RAW_FILE
        partitions: Partitions for job output location
        parameters: Generic parse configuration (BatchParseJobConfig)
        session_id: Upstream request ID for tracking
        correlation_id: Correlation ID for cross-service tracking
        parent_job_execution_id: Parent job execution ID if nested
        user_id: User who created the job
        project_id: Project this job belongs to
        webhook_url: Optional webhook URL for job completion notifications

        - `CorrelationID string`

          The correlation ID for this job. Used for tracking the job across services.

        - `JobName string`

          - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateJobNameParseRawFileJob BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateJobName = "parse_raw_file_job"`

        - `Parameters BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParameters`

          Generic parse job configuration for batch processing.

          This model contains the parsing configuration that applies to all files
          in a batch, but excludes file-specific fields like file_name, file_id, etc.
          Those file-specific fields are populated from DirectoryFile data when
          creating individual ParseJobRecordCreate instances for each file.

          The fields in this model should be generic settings that apply uniformly
          to all files being processed in the batch.

          - `AdaptiveLongTable bool`

          - `AggressiveTableExtraction bool`

          - `AnnotateLinks bool`

          - `AutoMode bool`

          - `AutoModeConfigurationJson string`

          - `AutoModeTriggerOnImageInPage bool`

          - `AutoModeTriggerOnRegexpInPage string`

          - `AutoModeTriggerOnTableInPage bool`

          - `AutoModeTriggerOnTextInPage string`

          - `AzureOpenAIAPIVersion string`

          - `AzureOpenAIDeploymentName string`

          - `AzureOpenAIEndpoint string`

          - `AzureOpenAIKey string`

          - `BboxBottom float64`

          - `BboxLeft float64`

          - `BboxRight float64`

          - `BboxTop float64`

          - `BoundingBox string`

          - `CompactMarkdownTable bool`

          - `ComplementalFormattingInstruction string`

          - `ConfidenceScoreEffort string`

          - `ContentGuidelineInstruction string`

          - `ContinuousMode bool`

          - `CustomMetadata map[string, any]`

            The custom metadata to attach to the documents.

          - `DisableImageExtraction bool`

          - `DisableOcr bool`

          - `DisableReconstruction bool`

          - `DoNotCache bool`

          - `DoNotUnrollColumns bool`

          - `EnableCostOptimizer bool`

          - `ExtractCharts bool`

          - `ExtractLayout bool`

          - `ExtractPrintedPageNumber bool`

          - `FastMode bool`

          - `FormattingInstruction string`

          - `Gpt4oAPIKey string`

          - `Gpt4oMode bool`

          - `GuessXlsxSheetName bool`

          - `HideFooters bool`

          - `HideHeaders bool`

          - `HighResOcr bool`

          - `HTMLMakeAllElementsVisible bool`

          - `HTMLRemoveFixedElements bool`

          - `HTMLRemoveNavigationElements bool`

          - `HTTPProxy string`

          - `IgnoreDocumentElementsForLayoutDetection bool`

          - `ImagesToSave []string`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSaveEmbedded BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSave = "embedded"`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSaveLayout BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSave = "layout"`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSaveScreenshot BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersImagesToSave = "screenshot"`

          - `InlineImagesInMarkdown bool`

          - `InputS3Path string`

          - `InputS3Region string`

            The region for the input S3 bucket.

          - `InputURL string`

          - `InternalIsScreenshotJob bool`

          - `InvalidateCache bool`

          - `IsFormattingInstruction bool`

          - `JobTimeoutExtraTimePerPageInSeconds float64`

          - `JobTimeoutInSeconds float64`

          - `KeepPageSeparatorWhenMergingTables bool`

          - `Lang string`

            The language.

          - `Languages []ParsingLanguages`

            - `const ParsingLanguagesAbq ParsingLanguages = "abq"`

            - `const ParsingLanguagesAdy ParsingLanguages = "ady"`

            - `const ParsingLanguagesAf ParsingLanguages = "af"`

            - `const ParsingLanguagesAng ParsingLanguages = "ang"`

            - `const ParsingLanguagesAr ParsingLanguages = "ar"`

            - `const ParsingLanguagesAs ParsingLanguages = "as"`

            - `const ParsingLanguagesAva ParsingLanguages = "ava"`

            - `const ParsingLanguagesAz ParsingLanguages = "az"`

            - `const ParsingLanguagesBe ParsingLanguages = "be"`

            - `const ParsingLanguagesBg ParsingLanguages = "bg"`

            - `const ParsingLanguagesBgc ParsingLanguages = "bgc"`

            - `const ParsingLanguagesBh ParsingLanguages = "bh"`

            - `const ParsingLanguagesBho ParsingLanguages = "bho"`

            - `const ParsingLanguagesBn ParsingLanguages = "bn"`

            - `const ParsingLanguagesBs ParsingLanguages = "bs"`

            - `const ParsingLanguagesChSim ParsingLanguages = "ch_sim"`

            - `const ParsingLanguagesChTra ParsingLanguages = "ch_tra"`

            - `const ParsingLanguagesChe ParsingLanguages = "che"`

            - `const ParsingLanguagesCs ParsingLanguages = "cs"`

            - `const ParsingLanguagesCy ParsingLanguages = "cy"`

            - `const ParsingLanguagesDa ParsingLanguages = "da"`

            - `const ParsingLanguagesDar ParsingLanguages = "dar"`

            - `const ParsingLanguagesDe ParsingLanguages = "de"`

            - `const ParsingLanguagesEn ParsingLanguages = "en"`

            - `const ParsingLanguagesEs ParsingLanguages = "es"`

            - `const ParsingLanguagesEt ParsingLanguages = "et"`

            - `const ParsingLanguagesFa ParsingLanguages = "fa"`

            - `const ParsingLanguagesFr ParsingLanguages = "fr"`

            - `const ParsingLanguagesGa ParsingLanguages = "ga"`

            - `const ParsingLanguagesGom ParsingLanguages = "gom"`

            - `const ParsingLanguagesHi ParsingLanguages = "hi"`

            - `const ParsingLanguagesHr ParsingLanguages = "hr"`

            - `const ParsingLanguagesHu ParsingLanguages = "hu"`

            - `const ParsingLanguagesID ParsingLanguages = "id"`

            - `const ParsingLanguagesInh ParsingLanguages = "inh"`

            - `const ParsingLanguagesIs ParsingLanguages = "is"`

            - `const ParsingLanguagesIt ParsingLanguages = "it"`

            - `const ParsingLanguagesJa ParsingLanguages = "ja"`

            - `const ParsingLanguagesKbd ParsingLanguages = "kbd"`

            - `const ParsingLanguagesKn ParsingLanguages = "kn"`

            - `const ParsingLanguagesKo ParsingLanguages = "ko"`

            - `const ParsingLanguagesKu ParsingLanguages = "ku"`

            - `const ParsingLanguagesLa ParsingLanguages = "la"`

            - `const ParsingLanguagesLbe ParsingLanguages = "lbe"`

            - `const ParsingLanguagesLez ParsingLanguages = "lez"`

            - `const ParsingLanguagesLt ParsingLanguages = "lt"`

            - `const ParsingLanguagesLv ParsingLanguages = "lv"`

            - `const ParsingLanguagesMah ParsingLanguages = "mah"`

            - `const ParsingLanguagesMai ParsingLanguages = "mai"`

            - `const ParsingLanguagesMi ParsingLanguages = "mi"`

            - `const ParsingLanguagesMn ParsingLanguages = "mn"`

            - `const ParsingLanguagesMni ParsingLanguages = "mni"`

            - `const ParsingLanguagesMr ParsingLanguages = "mr"`

            - `const ParsingLanguagesMs ParsingLanguages = "ms"`

            - `const ParsingLanguagesMt ParsingLanguages = "mt"`

            - `const ParsingLanguagesNe ParsingLanguages = "ne"`

            - `const ParsingLanguagesNew ParsingLanguages = "new"`

            - `const ParsingLanguagesNl ParsingLanguages = "nl"`

            - `const ParsingLanguagesNo ParsingLanguages = "no"`

            - `const ParsingLanguagesOc ParsingLanguages = "oc"`

            - `const ParsingLanguagesPi ParsingLanguages = "pi"`

            - `const ParsingLanguagesPl ParsingLanguages = "pl"`

            - `const ParsingLanguagesPt ParsingLanguages = "pt"`

            - `const ParsingLanguagesRo ParsingLanguages = "ro"`

            - `const ParsingLanguagesRsCyrillic ParsingLanguages = "rs_cyrillic"`

            - `const ParsingLanguagesRsLatin ParsingLanguages = "rs_latin"`

            - `const ParsingLanguagesRu ParsingLanguages = "ru"`

            - `const ParsingLanguagesSa ParsingLanguages = "sa"`

            - `const ParsingLanguagesSck ParsingLanguages = "sck"`

            - `const ParsingLanguagesSk ParsingLanguages = "sk"`

            - `const ParsingLanguagesSl ParsingLanguages = "sl"`

            - `const ParsingLanguagesSq ParsingLanguages = "sq"`

            - `const ParsingLanguagesSv ParsingLanguages = "sv"`

            - `const ParsingLanguagesSw ParsingLanguages = "sw"`

            - `const ParsingLanguagesTa ParsingLanguages = "ta"`

            - `const ParsingLanguagesTab ParsingLanguages = "tab"`

            - `const ParsingLanguagesTe ParsingLanguages = "te"`

            - `const ParsingLanguagesTh ParsingLanguages = "th"`

            - `const ParsingLanguagesTjk ParsingLanguages = "tjk"`

            - `const ParsingLanguagesTl ParsingLanguages = "tl"`

            - `const ParsingLanguagesTr ParsingLanguages = "tr"`

            - `const ParsingLanguagesUg ParsingLanguages = "ug"`

            - `const ParsingLanguagesUk ParsingLanguages = "uk"`

            - `const ParsingLanguagesUr ParsingLanguages = "ur"`

            - `const ParsingLanguagesUz ParsingLanguages = "uz"`

            - `const ParsingLanguagesVi ParsingLanguages = "vi"`

          - `LayoutAware bool`

          - `LineLevelBoundingBox bool`

          - `MarkdownTableMultilineHeaderSeparator string`

          - `MaxPages int64`

          - `MaxPagesEnforced int64`

          - `MergeTablesAcrossPagesInMarkdown bool`

          - `Model string`

          - `OutlinedTableExtraction bool`

          - `OutputPdfOfDocument bool`

          - `OutputS3PathPrefix string`

            If specified, llamaParse will save the output to the specified path. All output file will use this 'prefix' should be a valid s3:// url

          - `OutputS3Region string`

            The region for the output S3 bucket.

          - `OutputTablesAsHTML bool`

          - `OutputBucket string`

            The output bucket.

          - `PageErrorTolerance float64`

          - `PageFooterPrefix string`

          - `PageFooterSuffix string`

          - `PageHeaderPrefix string`

          - `PageHeaderSuffix string`

          - `PagePrefix string`

          - `PageSeparator string`

          - `PageSuffix string`

          - `ParseMode ParsingMode`

            Enum for representing the mode of parsing to be used.

            - `const ParsingModeParseDocumentWithAgent ParsingMode = "parse_document_with_agent"`

            - `const ParsingModeParseDocumentWithLlm ParsingMode = "parse_document_with_llm"`

            - `const ParsingModeParseDocumentWithLvm ParsingMode = "parse_document_with_lvm"`

            - `const ParsingModeParsePageWithAgent ParsingMode = "parse_page_with_agent"`

            - `const ParsingModeParsePageWithLayoutAgent ParsingMode = "parse_page_with_layout_agent"`

            - `const ParsingModeParsePageWithLlm ParsingMode = "parse_page_with_llm"`

            - `const ParsingModeParsePageWithLvm ParsingMode = "parse_page_with_lvm"`

            - `const ParsingModeParsePageWithoutLlm ParsingMode = "parse_page_without_llm"`

          - `ParsingInstruction string`

          - `PipelineID string`

            The pipeline ID.

          - `PreciseBoundingBox bool`

          - `PremiumMode bool`

          - `PresentationOutOfBoundsContent bool`

          - `PresentationSkipEmbeddedData bool`

          - `PreserveLayoutAlignmentAcrossPages bool`

          - `PreserveVerySmallText bool`

          - `Preset string`

          - `Priority string`

            The priority for the request. This field may be ignored or overwritten depending on the organization tier.

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriorityCritical BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriority = "critical"`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriorityHigh BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriority = "high"`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriorityLow BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriority = "low"`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriorityMedium BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersPriority = "medium"`

          - `ProjectID string`

          - `RemoveHiddenText bool`

          - `ReplaceFailedPageMode FailPageMode`

            Enum for representing the different available page error handling modes.

            - `const FailPageModeBlankPage FailPageMode = "blank_page"`

            - `const FailPageModeErrorMessage FailPageMode = "error_message"`

            - `const FailPageModeRawText FailPageMode = "raw_text"`

          - `ReplaceFailedPageWithErrorMessagePrefix string`

          - `ReplaceFailedPageWithErrorMessageSuffix string`

          - `ResourceInfo map[string, any]`

            The resource info about the file

          - `SaveImages bool`

          - `SkipDiagonalText bool`

          - `SpecializedChartParsingAgentic bool`

          - `SpecializedChartParsingEfficient bool`

          - `SpecializedChartParsingPlus bool`

          - `SpecializedImageParsing bool`

          - `SpreadsheetExtractSubTables bool`

          - `SpreadsheetForceFormulaComputation bool`

          - `SpreadsheetIncludeHiddenSheets bool`

          - `StrictModeBuggyFont bool`

          - `StrictModeImageExtraction bool`

          - `StrictModeImageOcr bool`

          - `StrictModeReconstruction bool`

          - `StructuredOutput bool`

          - `StructuredOutputJsonSchema string`

          - `StructuredOutputJsonSchemaName string`

          - `SystemPrompt string`

          - `SystemPromptAppend string`

          - `TakeScreenshot bool`

          - `TargetPages string`

          - `Tier string`

          - `Type string`

            - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersTypeParse BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersType = "parse"`

          - `UseVendorMultimodalModel bool`

          - `UserPrompt string`

          - `VendorMultimodalAPIKey string`

          - `VendorMultimodalModelName string`

          - `Version string`

          - `WebhookConfigurations []BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfiguration`

            Outbound webhook endpoints to notify on job status changes

            - `WebhookEvents []string`

              Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyCancelled BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.cancelled"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyError BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.error"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyPartialSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.partial_success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyPending BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.pending"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifyRunning BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.running"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventClassifySuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "classify.success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractCancelled BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.cancelled"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractError BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.error"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractPartialSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.partial_success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractPending BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.pending"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventExtractSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "extract.success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseCancelled BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.cancelled"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseError BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.error"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParsePartialSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.partial_success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParsePending BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.pending"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseRunning BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.running"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventParseSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "parse.success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsCancelled BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.cancelled"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsError BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.error"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsPartialSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.partial_success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsPending BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.pending"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSheetsSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "sheets.success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitCancelled BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.cancelled"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitError BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.error"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitPending BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.pending"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitProcessing BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.processing"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventSplitSuccess BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "split.success"`

              - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEventUnmappedEvent BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobConfigBatchParseJobRecordCreateParametersWebhookConfigurationWebhookEvent = "unmapped_event"`

            - `WebhookHeaders map[string, string]`

              Custom HTTP headers sent with each webhook request (e.g. auth tokens)

            - `WebhookOutputFormat string`

              Response format sent to the webhook: 'string' (default) or 'json'

            - `WebhookSigningSecret string`

              Shared signing secret used to sign webhook deliveries. When set, each request includes an HMAC-SHA256 signature of the request body in the 'LC-Signature' header (value 'sha256=<hex>'). Recompute the HMAC over the raw request body with this secret to verify the delivery is authentic.

            - `WebhookURL string`

              URL to receive webhook POST notifications

          - `WebhookURL string`

        - `ParentJobExecutionID string`

          The ID of the parent job execution.

        - `Partitions map[string, string]`

          The partitions for this execution. Used for determining where to save job output.

        - `ProjectID string`

          The ID of the project this job belongs to.

        - `SessionID string`

          The upstream request ID that created this job. Used for tracking the job across services.

        - `UserID string`

          The ID of the user that created this job

        - `WebhookURL string`

          The URL that needs to be called at the end of the parsing job.

      - `type ClassifyJob struct{…}`

        A classify job.

        - `ID string`

          Unique identifier

        - `ProjectID string`

          The ID of the project

        - `Rules []ClassifierRule`

          The rules to classify the files

          - `Description string`

            Natural language description of what to classify. Be specific about the content characteristics that identify this document type.

          - `Type string`

            The document type to assign when this rule matches (e.g., 'invoice', 'receipt', 'contract')

        - `Status StatusEnum`

          The status of the classify job

          - `const StatusEnumCancelled StatusEnum = "CANCELLED"`

          - `const StatusEnumError StatusEnum = "ERROR"`

          - `const StatusEnumPartialSuccess StatusEnum = "PARTIAL_SUCCESS"`

          - `const StatusEnumPending StatusEnum = "PENDING"`

          - `const StatusEnumSuccess StatusEnum = "SUCCESS"`

        - `UserID string`

          The ID of the user

        - `CreatedAt Time`

          Creation datetime

        - `EffectiveAt Time`

        - `ErrorMessage string`

          Error message for the latest job attempt, if any.

        - `JobRecordID string`

          The job record ID associated with this status, if any.

        - `Mode ClassifyJobMode`

          The classification mode to use

          - `const ClassifyJobModeFast ClassifyJobMode = "FAST"`

          - `const ClassifyJobModeMultimodal ClassifyJobMode = "MULTIMODAL"`

        - `ParsingConfiguration ClassifyParsingConfiguration`

          The configuration for the parsing job

          - `Lang ParsingLanguages`

            The language to parse the files in

            - `const ParsingLanguagesAbq ParsingLanguages = "abq"`

            - `const ParsingLanguagesAdy ParsingLanguages = "ady"`

            - `const ParsingLanguagesAf ParsingLanguages = "af"`

            - `const ParsingLanguagesAng ParsingLanguages = "ang"`

            - `const ParsingLanguagesAr ParsingLanguages = "ar"`

            - `const ParsingLanguagesAs ParsingLanguages = "as"`

            - `const ParsingLanguagesAva ParsingLanguages = "ava"`

            - `const ParsingLanguagesAz ParsingLanguages = "az"`

            - `const ParsingLanguagesBe ParsingLanguages = "be"`

            - `const ParsingLanguagesBg ParsingLanguages = "bg"`

            - `const ParsingLanguagesBgc ParsingLanguages = "bgc"`

            - `const ParsingLanguagesBh ParsingLanguages = "bh"`

            - `const ParsingLanguagesBho ParsingLanguages = "bho"`

            - `const ParsingLanguagesBn ParsingLanguages = "bn"`

            - `const ParsingLanguagesBs ParsingLanguages = "bs"`

            - `const ParsingLanguagesChSim ParsingLanguages = "ch_sim"`

            - `const ParsingLanguagesChTra ParsingLanguages = "ch_tra"`

            - `const ParsingLanguagesChe ParsingLanguages = "che"`

            - `const ParsingLanguagesCs ParsingLanguages = "cs"`

            - `const ParsingLanguagesCy ParsingLanguages = "cy"`

            - `const ParsingLanguagesDa ParsingLanguages = "da"`

            - `const ParsingLanguagesDar ParsingLanguages = "dar"`

            - `const ParsingLanguagesDe ParsingLanguages = "de"`

            - `const ParsingLanguagesEn ParsingLanguages = "en"`

            - `const ParsingLanguagesEs ParsingLanguages = "es"`

            - `const ParsingLanguagesEt ParsingLanguages = "et"`

            - `const ParsingLanguagesFa ParsingLanguages = "fa"`

            - `const ParsingLanguagesFr ParsingLanguages = "fr"`

            - `const ParsingLanguagesGa ParsingLanguages = "ga"`

            - `const ParsingLanguagesGom ParsingLanguages = "gom"`

            - `const ParsingLanguagesHi ParsingLanguages = "hi"`

            - `const ParsingLanguagesHr ParsingLanguages = "hr"`

            - `const ParsingLanguagesHu ParsingLanguages = "hu"`

            - `const ParsingLanguagesID ParsingLanguages = "id"`

            - `const ParsingLanguagesInh ParsingLanguages = "inh"`

            - `const ParsingLanguagesIs ParsingLanguages = "is"`

            - `const ParsingLanguagesIt ParsingLanguages = "it"`

            - `const ParsingLanguagesJa ParsingLanguages = "ja"`

            - `const ParsingLanguagesKbd ParsingLanguages = "kbd"`

            - `const ParsingLanguagesKn ParsingLanguages = "kn"`

            - `const ParsingLanguagesKo ParsingLanguages = "ko"`

            - `const ParsingLanguagesKu ParsingLanguages = "ku"`

            - `const ParsingLanguagesLa ParsingLanguages = "la"`

            - `const ParsingLanguagesLbe ParsingLanguages = "lbe"`

            - `const ParsingLanguagesLez ParsingLanguages = "lez"`

            - `const ParsingLanguagesLt ParsingLanguages = "lt"`

            - `const ParsingLanguagesLv ParsingLanguages = "lv"`

            - `const ParsingLanguagesMah ParsingLanguages = "mah"`

            - `const ParsingLanguagesMai ParsingLanguages = "mai"`

            - `const ParsingLanguagesMi ParsingLanguages = "mi"`

            - `const ParsingLanguagesMn ParsingLanguages = "mn"`

            - `const ParsingLanguagesMni ParsingLanguages = "mni"`

            - `const ParsingLanguagesMr ParsingLanguages = "mr"`

            - `const ParsingLanguagesMs ParsingLanguages = "ms"`

            - `const ParsingLanguagesMt ParsingLanguages = "mt"`

            - `const ParsingLanguagesNe ParsingLanguages = "ne"`

            - `const ParsingLanguagesNew ParsingLanguages = "new"`

            - `const ParsingLanguagesNl ParsingLanguages = "nl"`

            - `const ParsingLanguagesNo ParsingLanguages = "no"`

            - `const ParsingLanguagesOc ParsingLanguages = "oc"`

            - `const ParsingLanguagesPi ParsingLanguages = "pi"`

            - `const ParsingLanguagesPl ParsingLanguages = "pl"`

            - `const ParsingLanguagesPt ParsingLanguages = "pt"`

            - `const ParsingLanguagesRo ParsingLanguages = "ro"`

            - `const ParsingLanguagesRsCyrillic ParsingLanguages = "rs_cyrillic"`

            - `const ParsingLanguagesRsLatin ParsingLanguages = "rs_latin"`

            - `const ParsingLanguagesRu ParsingLanguages = "ru"`

            - `const ParsingLanguagesSa ParsingLanguages = "sa"`

            - `const ParsingLanguagesSck ParsingLanguages = "sck"`

            - `const ParsingLanguagesSk ParsingLanguages = "sk"`

            - `const ParsingLanguagesSl ParsingLanguages = "sl"`

            - `const ParsingLanguagesSq ParsingLanguages = "sq"`

            - `const ParsingLanguagesSv ParsingLanguages = "sv"`

            - `const ParsingLanguagesSw ParsingLanguages = "sw"`

            - `const ParsingLanguagesTa ParsingLanguages = "ta"`

            - `const ParsingLanguagesTab ParsingLanguages = "tab"`

            - `const ParsingLanguagesTe ParsingLanguages = "te"`

            - `const ParsingLanguagesTh ParsingLanguages = "th"`

            - `const ParsingLanguagesTjk ParsingLanguages = "tjk"`

            - `const ParsingLanguagesTl ParsingLanguages = "tl"`

            - `const ParsingLanguagesTr ParsingLanguages = "tr"`

            - `const ParsingLanguagesUg ParsingLanguages = "ug"`

            - `const ParsingLanguagesUk ParsingLanguages = "uk"`

            - `const ParsingLanguagesUr ParsingLanguages = "ur"`

            - `const ParsingLanguagesUz ParsingLanguages = "uz"`

            - `const ParsingLanguagesVi ParsingLanguages = "vi"`

          - `MaxPages int64`

            The maximum number of pages to parse

          - `TargetPages []int64`

            The pages to target for parsing (0-indexed, so first page is at 0)

        - `UpdatedAt Time`

          Update datetime

    - `JobType string`

      Type of processing performed

      - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobTypeClassify BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobType = "classify"`

      - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobTypeExtract BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobType = "extract"`

      - `const BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobTypeParse BetaBatchJobItemGetProcessingResultsResponseProcessingResultJobType = "parse"`

    - `OutputS3Path string`

      Location of the processing output

    - `ParametersHash string`

      Content hash of the job configuration for dedup

    - `ProcessedAt Time`

      When this processing occurred

    - `ResultID string`

      Unique identifier for this result

    - `OutputMetadata any`

      Metadata about processing output.

      Currently empty - will be populated with job-type-specific metadata fields in the future.

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Beta.Batch.JobItems.GetProcessingResults(
    context.TODO(),
    "item_id",
    llamacloud.BetaBatchJobItemGetProcessingResultsParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ItemID)
}
```

#### Response

```json
{
  "item_id": "item_id",
  "item_name": "item_name",
  "processing_results": [
    {
      "item_id": "item_id",
      "job_config": {
        "correlation_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "job_name": "parse_raw_file_job",
        "parameters": {
          "adaptive_long_table": true,
          "aggressive_table_extraction": true,
          "annotate_links": true,
          "auto_mode": true,
          "auto_mode_configuration_json": "auto_mode_configuration_json",
          "auto_mode_trigger_on_image_in_page": true,
          "auto_mode_trigger_on_regexp_in_page": "auto_mode_trigger_on_regexp_in_page",
          "auto_mode_trigger_on_table_in_page": true,
          "auto_mode_trigger_on_text_in_page": "auto_mode_trigger_on_text_in_page",
          "azure_openai_api_version": "azure_openai_api_version",
          "azure_openai_deployment_name": "azure_openai_deployment_name",
          "azure_openai_endpoint": "azure_openai_endpoint",
          "azure_openai_key": "azure_openai_key",
          "bbox_bottom": 0,
          "bbox_left": 0,
          "bbox_right": 0,
          "bbox_top": 0,
          "bounding_box": "bounding_box",
          "compact_markdown_table": true,
          "complemental_formatting_instruction": "complemental_formatting_instruction",
          "confidence_score_effort": "confidence_score_effort",
          "content_guideline_instruction": "content_guideline_instruction",
          "continuous_mode": true,
          "custom_metadata": {
            "foo": "bar"
          },
          "disable_image_extraction": true,
          "disable_ocr": true,
          "disable_reconstruction": true,
          "do_not_cache": true,
          "do_not_unroll_columns": true,
          "enable_cost_optimizer": true,
          "extract_charts": true,
          "extract_layout": true,
          "extract_printed_page_number": true,
          "fast_mode": true,
          "formatting_instruction": "formatting_instruction",
          "gpt4o_api_key": "gpt4o_api_key",
          "gpt4o_mode": true,
          "guess_xlsx_sheet_name": true,
          "hide_footers": true,
          "hide_headers": true,
          "high_res_ocr": true,
          "html_make_all_elements_visible": true,
          "html_remove_fixed_elements": true,
          "html_remove_navigation_elements": true,
          "http_proxy": "http_proxy",
          "ignore_document_elements_for_layout_detection": true,
          "images_to_save": [
            "embedded"
          ],
          "inline_images_in_markdown": true,
          "input_s3_path": "input_s3_path",
          "input_s3_region": "input_s3_region",
          "input_url": "input_url",
          "internal_is_screenshot_job": true,
          "invalidate_cache": true,
          "is_formatting_instruction": true,
          "job_timeout_extra_time_per_page_in_seconds": 0,
          "job_timeout_in_seconds": 0,
          "keep_page_separator_when_merging_tables": true,
          "lang": "lang",
          "languages": [
            "abq"
          ],
          "layout_aware": true,
          "line_level_bounding_box": true,
          "markdown_table_multiline_header_separator": "markdown_table_multiline_header_separator",
          "max_pages": 0,
          "max_pages_enforced": 0,
          "merge_tables_across_pages_in_markdown": true,
          "model": "model",
          "outlined_table_extraction": true,
          "output_pdf_of_document": true,
          "output_s3_path_prefix": "output_s3_path_prefix",
          "output_s3_region": "output_s3_region",
          "output_tables_as_HTML": true,
          "outputBucket": "outputBucket",
          "page_error_tolerance": 0,
          "page_footer_prefix": "page_footer_prefix",
          "page_footer_suffix": "page_footer_suffix",
          "page_header_prefix": "page_header_prefix",
          "page_header_suffix": "page_header_suffix",
          "page_prefix": "page_prefix",
          "page_separator": "page_separator",
          "page_suffix": "page_suffix",
          "parse_mode": "parse_document_with_agent",
          "parsing_instruction": "parsing_instruction",
          "pipeline_id": "pipeline_id",
          "precise_bounding_box": true,
          "premium_mode": true,
          "presentation_out_of_bounds_content": true,
          "presentation_skip_embedded_data": true,
          "preserve_layout_alignment_across_pages": true,
          "preserve_very_small_text": true,
          "preset": "preset",
          "priority": "critical",
          "project_id": "project_id",
          "remove_hidden_text": true,
          "replace_failed_page_mode": "blank_page",
          "replace_failed_page_with_error_message_prefix": "replace_failed_page_with_error_message_prefix",
          "replace_failed_page_with_error_message_suffix": "replace_failed_page_with_error_message_suffix",
          "resource_info": {
            "foo": "bar"
          },
          "save_images": true,
          "skip_diagonal_text": true,
          "specialized_chart_parsing_agentic": true,
          "specialized_chart_parsing_efficient": true,
          "specialized_chart_parsing_plus": true,
          "specialized_image_parsing": true,
          "spreadsheet_extract_sub_tables": true,
          "spreadsheet_force_formula_computation": true,
          "spreadsheet_include_hidden_sheets": true,
          "strict_mode_buggy_font": true,
          "strict_mode_image_extraction": true,
          "strict_mode_image_ocr": true,
          "strict_mode_reconstruction": true,
          "structured_output": true,
          "structured_output_json_schema": "structured_output_json_schema",
          "structured_output_json_schema_name": "structured_output_json_schema_name",
          "system_prompt": "system_prompt",
          "system_prompt_append": "system_prompt_append",
          "take_screenshot": true,
          "target_pages": "target_pages",
          "tier": "tier",
          "type": "parse",
          "use_vendor_multimodal_model": true,
          "user_prompt": "user_prompt",
          "vendor_multimodal_api_key": "vendor_multimodal_api_key",
          "vendor_multimodal_model_name": "vendor_multimodal_model_name",
          "version": "version",
          "webhook_configurations": [
            {
              "webhook_events": [
                "parse.success",
                "parse.error"
              ],
              "webhook_headers": {
                "Authorization": "Bearer sk-..."
              },
              "webhook_output_format": "json",
              "webhook_signing_secret": "whsec_...",
              "webhook_url": "https://example.com/webhooks/llamacloud"
            }
          ],
          "webhook_url": "webhook_url"
        },
        "parent_job_execution_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "partitions": {
          "foo": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
        },
        "project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "session_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
        "user_id": "user_id",
        "webhook_url": "webhook_url"
      },
      "job_type": "classify",
      "output_s3_path": "output_s3_path",
      "parameters_hash": "parameters_hash",
      "processed_at": "2019-12-27T18:11:19.117Z",
      "result_id": "result_id",
      "output_metadata": {}
    }
  ]
}
```

# Split

## Create Split Job

`client.Beta.Split.New(ctx, params) (*BetaSplitNewResponse, error)`

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

Create a document split job.

### Parameters

- `params BetaSplitNewParams`

  - `DocumentInput param.Field[SplitDocumentInput]`

    Body param: Document to be split.

  - `OrganizationID param.Field[string]`

    Query param

  - `ProjectID param.Field[string]`

    Query param

  - `Configuration param.Field[BetaSplitNewParamsConfiguration]`

    Body param: Split configuration with categories and splitting strategy.

    - `Categories []SplitCategory`

      Categories to split documents into.

      - `Name string`

        Name of the category.

      - `Description string`

        Optional description of what content belongs in this category.

    - `SplittingStrategy BetaSplitNewParamsConfigurationSplittingStrategy`

      Strategy for splitting documents.

      - `AllowUncategorized string`

        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.

        - `const BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorizedForbid BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorized = "forbid"`

        - `const BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorizedInclude BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorized = "include"`

        - `const BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorizedOmit BetaSplitNewParamsConfigurationSplittingStrategyAllowUncategorized = "omit"`

  - `ConfigurationID param.Field[string]`

    Body param: Saved split configuration ID.

### Returns

- `type BetaSplitNewResponse struct{…}`

  Beta response — uses nested document_input object.

  - `ID string`

    Unique identifier for the split job.

  - `Categories []SplitCategory`

    Categories used for splitting.

    - `Name string`

      Name of the category.

    - `Description string`

      Optional description of what content belongs in this category.

  - `DocumentInput SplitDocumentInput`

    Document that was split.

    - `Type string`

      Type of document input. Valid values are: file_id

    - `Value string`

      Document identifier.

  - `ProjectID string`

    Project ID this job belongs to.

  - `Status string`

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

  - `UserID string`

    User ID who created this job.

  - `ConfigurationID string`

    Split configuration ID used for this job.

  - `CreatedAt Time`

    Creation datetime

  - `ErrorMessage string`

    Error message if the job failed.

  - `Result SplitResultResponse`

    Result of a completed split job.

    - `Segments []SplitSegmentResponse`

      List of document segments.

      - `Category string`

        Category name this split belongs to.

      - `ConfidenceCategory string`

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

      - `Pages []int64`

        1-indexed page numbers in this split.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  split, err := client.Beta.Split.New(context.TODO(), llamacloud.BetaSplitNewParams{
    DocumentInput: llamacloud.SplitDocumentInputParam{
      Type: "type",
      Value: "value",
    },
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", split.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"
}
```

## List Split Jobs

`client.Beta.Split.List(ctx, query) (*PaginatedCursor[BetaSplitListResponse], error)`

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

List document split jobs.

### Parameters

- `query BetaSplitListParams`

  - `CreatedAtOnOrAfter param.Field[Time]`

    Include items created at or after this timestamp (inclusive)

  - `CreatedAtOnOrBefore param.Field[Time]`

    Include items created at or before this timestamp (inclusive)

  - `JobIDs param.Field[[]string]`

    Filter by specific job IDs

  - `OrganizationID param.Field[string]`

  - `PageSize param.Field[int64]`

  - `PageToken param.Field[string]`

  - `ProjectID param.Field[string]`

  - `Status param.Field[BetaSplitListParamsStatus]`

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

    - `const BetaSplitListParamsStatusCancelled BetaSplitListParamsStatus = "cancelled"`

    - `const BetaSplitListParamsStatusCompleted BetaSplitListParamsStatus = "completed"`

    - `const BetaSplitListParamsStatusFailed BetaSplitListParamsStatus = "failed"`

    - `const BetaSplitListParamsStatusPending BetaSplitListParamsStatus = "pending"`

    - `const BetaSplitListParamsStatusProcessing BetaSplitListParamsStatus = "processing"`

### Returns

- `type BetaSplitListResponse struct{…}`

  Beta response — uses nested document_input object.

  - `ID string`

    Unique identifier for the split job.

  - `Categories []SplitCategory`

    Categories used for splitting.

    - `Name string`

      Name of the category.

    - `Description string`

      Optional description of what content belongs in this category.

  - `DocumentInput SplitDocumentInput`

    Document that was split.

    - `Type string`

      Type of document input. Valid values are: file_id

    - `Value string`

      Document identifier.

  - `ProjectID string`

    Project ID this job belongs to.

  - `Status string`

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

  - `UserID string`

    User ID who created this job.

  - `ConfigurationID string`

    Split configuration ID used for this job.

  - `CreatedAt Time`

    Creation datetime

  - `ErrorMessage string`

    Error message if the job failed.

  - `Result SplitResultResponse`

    Result of a completed split job.

    - `Segments []SplitSegmentResponse`

      List of document segments.

      - `Category string`

        Category name this split belongs to.

      - `ConfidenceCategory string`

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

      - `Pages []int64`

        1-indexed page numbers in this split.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.Beta.Split.List(context.TODO(), llamacloud.BetaSplitListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
```

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

`client.Beta.Split.Get(ctx, splitJobID, query) (*BetaSplitGetResponse, error)`

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

Get a document split job.

### Parameters

- `splitJobID string`

- `query BetaSplitGetParams`

  - `OrganizationID param.Field[string]`

  - `ProjectID param.Field[string]`

### Returns

- `type BetaSplitGetResponse struct{…}`

  Beta response — uses nested document_input object.

  - `ID string`

    Unique identifier for the split job.

  - `Categories []SplitCategory`

    Categories used for splitting.

    - `Name string`

      Name of the category.

    - `Description string`

      Optional description of what content belongs in this category.

  - `DocumentInput SplitDocumentInput`

    Document that was split.

    - `Type string`

      Type of document input. Valid values are: file_id

    - `Value string`

      Document identifier.

  - `ProjectID string`

    Project ID this job belongs to.

  - `Status string`

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

  - `UserID string`

    User ID who created this job.

  - `ConfigurationID string`

    Split configuration ID used for this job.

  - `CreatedAt Time`

    Creation datetime

  - `ErrorMessage string`

    Error message if the job failed.

  - `Result SplitResultResponse`

    Result of a completed split job.

    - `Segments []SplitSegmentResponse`

      List of document segments.

      - `Category string`

        Category name this split belongs to.

      - `ConfidenceCategory string`

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

      - `Pages []int64`

        1-indexed page numbers in this split.

  - `UpdatedAt Time`

    Update datetime

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/run-llama/llama-parse-go"
  "github.com/run-llama/llama-parse-go/option"
)

func main() {
  client := llamacloud.NewClient(
    option.WithAPIKey("My API Key"),
  )
  split, err := client.Beta.Split.Get(
    context.TODO(),
    "split_job_id",
    llamacloud.BetaSplitGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", split.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

- `type SplitCategory struct{…}`

  Category definition for document splitting.

  - `Name string`

    Name of the category.

  - `Description string`

    Optional description of what content belongs in this category.

### Split Document Input

- `type SplitDocumentInput struct{…}`

  Document input specification for beta API.

  - `Type string`

    Type of document input. Valid values are: file_id

  - `Value string`

    Document identifier.

### Split Result Response

- `type SplitResultResponse struct{…}`

  Result of a completed split job.

  - `Segments []SplitSegmentResponse`

    List of document segments.

    - `Category string`

      Category name this split belongs to.

    - `ConfidenceCategory string`

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

    - `Pages []int64`

      1-indexed page numbers in this split.

### Split Segment Response

- `type SplitSegmentResponse struct{…}`

  A segment of the split document.

  - `Category string`

    Category name this split belongs to.

  - `ConfidenceCategory string`

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

  - `Pages []int64`

    1-indexed page numbers in this split.
