// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import MiniSearch from 'minisearch'; import * as fs from 'node:fs/promises'; import * as path from 'node:path'; import { getLogger } from './logger'; type PerLanguageData = { method?: string; example?: string; }; type MethodEntry = { name: string; endpoint: string; httpMethod: string; summary: string; description: string; stainlessPath: string; qualified: string; params?: string[]; response?: string; markdown?: string; perLanguage?: Record; }; type ProseChunk = { content: string; tag: string; sectionContext?: string; source?: string; }; type MiniSearchDocument = { id: string; kind: 'http_method' | 'prose'; name?: string; endpoint?: string; summary?: string; description?: string; qualified?: string; stainlessPath?: string; content?: string; sectionContext?: string; _original: Record; }; type SearchResult = { results: (string | Record)[]; }; const EMBEDDED_METHODS: MethodEntry[] = [ { name: 'create', endpoint: '/api/v1/beta/files', httpMethod: 'post', summary: 'Upload File', description: 'Upload a file using multipart/form-data.\n\nSet `purpose` to indicate how the file will be used:\n`user_data`, `parse`, `extract`, `classify`, `split`,\n`sheet`, or `agent_app`.\n\nReturns the created file metadata including its ID for use\nin subsequent parse, extract, or classify operations.', stainlessPath: '(resource) files > (method) create', qualified: 'client.files.create', params: [ 'file: string;', 'purpose: string;', 'organization_id?: string;', 'project_id?: string;', 'external_file_id?: string;', ], response: '{ id: string; name: string; project_id: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }', markdown: "## create\n\n`client.files.create(file: string, purpose: string, organization_id?: string, project_id?: string, external_file_id?: string): { id: string; name: string; project_id: string; download_url?: presigned_url; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }`\n\n**post** `/api/v1/beta/files`\n\nUpload a file using multipart/form-data.\n\nSet `purpose` to indicate how the file will be used:\n`user_data`, `parse`, `extract`, `classify`, `split`,\n`sheet`, or `agent_app`.\n\nReturns the created file metadata including its ID for use\nin subsequent parse, extract, or classify operations.\n\n### Parameters\n\n- `file: string`\n The file to upload\n\n- `purpose: string`\n The intended purpose of the file. Valid values: 'user_data', 'parse', 'extract', 'split', 'classify', 'sheet', 'agent_app'. This determines the storage and retention policy for the file.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `external_file_id?: string`\n The ID of the file in the external system\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }`\n An uploaded file.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `expires_at?: string`\n - `external_file_id?: string`\n - `file_type?: string`\n - `last_modified_at?: string`\n - `purpose?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst file = await client.files.create({ file: fs.createReadStream('path/to/file'), purpose: 'purpose' });\n\nconsole.log(file);\n```", perLanguage: { typescript: { method: 'client.files.create', example: "import fs from 'fs';\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.files.create({\n file: fs.createReadStream('path/to/file'),\n purpose: 'purpose',\n});\n\nconsole.log(file.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/files \\\n -H 'Content-Type: multipart/form-data' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -F 'file=@/path/to/file' \\\n -F purpose=purpose", }, python: { method: 'files.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nfile = client.files.create(\n file=b"Example data",\n purpose="purpose",\n)\nprint(file.id)', }, java: { method: 'files().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.files.FileCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileCreateParams params = FileCreateParams.builder()\n .file(new ByteArrayInputStream("Example data".getBytes()))\n .purpose("purpose")\n .build();\n FileCreateResponse file = client.files().create(params);\n }\n}', }, go: { method: 'client.Files.New', example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfile, err := client.Files.New(context.TODO(), llamacloudprod.FileNewParams{\n\t\tFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t\tPurpose: "purpose",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", file.ID)\n}\n', }, cli: { method: 'files create', example: "llamacloud-prod files create \\\n --api-key 'My API Key' \\\n --file 'Example data' \\\n --purpose purpose", }, }, }, { name: 'query', endpoint: '/api/v1/beta/files/query', httpMethod: 'post', summary: 'Query Files', description: 'Query files with filtering and pagination. Deprecated: use `GET /files`.', stainlessPath: '(resource) files > (method) query', qualified: 'client.files.query', params: [ 'organization_id?: string;', 'project_id?: string;', 'filter?: { data_source_id?: string; external_file_id?: string; file_ids?: string[]; file_name?: string; only_manually_uploaded?: boolean; project_id?: string; };', 'order_by?: string;', 'page_size?: number;', 'page_token?: string;', ], response: '{ items: { id: string; name: string; project_id: string; download_url?: object; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }[]; next_page_token?: string; total_size?: number; }', markdown: "## query\n\n`client.files.query(organization_id?: string, project_id?: string, filter?: { data_source_id?: string; external_file_id?: string; file_ids?: string[]; file_name?: string; only_manually_uploaded?: boolean; project_id?: string; }, order_by?: string, page_size?: number, page_token?: string): { items: object[]; next_page_token?: string; total_size?: number; }`\n\n**post** `/api/v1/beta/files/query`\n\nQuery files with filtering and pagination. Deprecated: use `GET /files`.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `filter?: { data_source_id?: string; external_file_id?: string; file_ids?: string[]; file_name?: string; only_manually_uploaded?: boolean; project_id?: string; }`\n Filter parameters for file queries.\n - `data_source_id?: string`\n Filter by data source ID\n - `external_file_id?: string`\n Filter by external file ID\n - `file_ids?: string[]`\n Filter by specific file IDs\n - `file_name?: string`\n Filter by file name\n - `only_manually_uploaded?: boolean`\n Filter only manually uploaded files (data_source_id is null)\n - `project_id?: string`\n Filter by project ID\n\n- `order_by?: string`\n A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.\n\n- `page_size?: number`\n 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.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ items: { id: string; name: string; project_id: string; download_url?: object; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }[]; next_page_token?: string; total_size?: number; }`\n Paginated list of files.\n\n - `items: { id: string; name: string; project_id: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }[]`\n - `next_page_token?: string`\n - `total_size?: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.files.query();\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.files.query', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.files.query();\n\nconsole.log(response.items);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/files/query \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'files.query', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.files.query()\nprint(response.items)', }, java: { method: 'files().query', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.FileQueryParams;\nimport com.llamacloud_prod.api.models.files.FileQueryResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileQueryResponse response = client.files().query();\n }\n}', }, go: { method: 'client.Files.Query', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Files.Query(context.TODO(), llamacloudprod.FileQueryParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Items)\n}\n', }, cli: { method: 'files query', example: "llamacloud-prod files query \\\n --api-key 'My API Key'", }, }, }, { name: 'list', endpoint: '/api/v1/beta/files', httpMethod: 'get', summary: 'List Files', description: 'List files with optional filtering and pagination.\n\nFilter by `file_name`, `file_ids`, or `external_file_id`.\nSupports cursor-based pagination and custom ordering.', stainlessPath: '(resource) files > (method) list', qualified: 'client.files.list', params: [ 'expand?: string[];', 'external_file_id?: string;', 'file_ids?: string[];', 'file_name?: string;', 'order_by?: string;', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', ], response: '{ id: string; name: string; project_id: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }', markdown: "## list\n\n`client.files.list(expand?: string[], external_file_id?: string, file_ids?: string[], file_name?: string, order_by?: string, organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { id: string; name: string; project_id: string; download_url?: presigned_url; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }`\n\n**get** `/api/v1/beta/files`\n\nList files with optional filtering and pagination.\n\nFilter by `file_name`, `file_ids`, or `external_file_id`.\nSupports cursor-based pagination and custom ordering.\n\n### Parameters\n\n- `expand?: string[]`\n Fields to expand on each file.\n\n- `external_file_id?: string`\n Filter by external file ID.\n\n- `file_ids?: string[]`\n Filter by specific file IDs.\n\n- `file_name?: string`\n Filter by file name (exact match).\n\n- `order_by?: string`\n A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.\n\n- `organization_id?: string`\n\n- `page_size?: number`\n The maximum number of items to return. Defaults to 50, maximum is 1000.\n\n- `page_token?: string`\n A page token received from a previous list call. Provide this to retrieve the subsequent page.\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; expires_at?: string; external_file_id?: string; file_type?: string; last_modified_at?: string; purpose?: string; }`\n An uploaded file.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `expires_at?: string`\n - `external_file_id?: string`\n - `file_type?: string`\n - `last_modified_at?: string`\n - `purpose?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.files.list()) {\n console.log(fileListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.files.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.files.list()) {\n console.log(fileListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/files \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'files.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.files.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'files().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.FileListPage;\nimport com.llamacloud_prod.api.models.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileListPage page = client.files().list();\n }\n}', }, go: { method: 'client.Files.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Files.List(context.TODO(), llamacloudprod.FileListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'files list', example: "llamacloud-prod files list \\\n --api-key 'My API Key'", }, }, }, { name: 'delete', endpoint: '/api/v1/beta/files/{file_id}', httpMethod: 'delete', summary: 'Delete File', description: 'Delete a file from the project.', stainlessPath: '(resource) files > (method) delete', qualified: 'client.files.delete', params: ['file_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.files.delete(file_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/beta/files/{file_id}`\n\nDelete a file from the project.\n\n### Parameters\n\n- `file_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.files.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.files.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.files.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/files/$FILE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'files.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.files.delete(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'files().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.FileDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.files().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Files.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Files.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.FileDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'files delete', example: "llamacloud-prod files delete \\\n --api-key 'My API Key' \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get', endpoint: '/api/v1/beta/files/{file_id}/content', httpMethod: 'get', summary: 'Read File Content', description: 'Get a presigned URL to download the file content.', stainlessPath: '(resource) files > (method) get', qualified: 'client.files.get', params: [ 'file_id: string;', 'expires_at_seconds?: number;', 'organization_id?: string;', 'project_id?: string;', ], response: '{ expires_at: string; url: string; form_fields?: object; }', markdown: "## get\n\n`client.files.get(file_id: string, expires_at_seconds?: number, organization_id?: string, project_id?: string): { expires_at: string; url: string; form_fields?: object; }`\n\n**get** `/api/v1/beta/files/{file_id}/content`\n\nGet a presigned URL to download the file content.\n\n### Parameters\n\n- `file_id: string`\n\n- `expires_at_seconds?: number`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ expires_at: string; url: string; form_fields?: object; }`\n Schema for a presigned URL.\n\n - `expires_at: string`\n - `url: string`\n - `form_fields?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst presignedURL = await client.files.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(presignedURL);\n```", perLanguage: { typescript: { method: 'client.files.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst presignedURL = await client.files.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(presignedURL.expires_at);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/files/$FILE_ID/content \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'files.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npresigned_url = client.files.get(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(presigned_url.expires_at)', }, java: { method: 'files().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.FileGetParams;\nimport com.llamacloud_prod.api.models.files.PresignedUrl;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n PresignedUrl presignedUrl = client.files().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Files.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpresignedURL, err := client.Files.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.FileGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", presignedURL.ExpiresAt)\n}\n', }, cli: { method: 'files get', example: "llamacloud-prod files get \\\n --api-key 'My API Key' \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'create', endpoint: '/api/v1/sheets/jobs', httpMethod: 'post', summary: 'Create Spreadsheet Job', description: 'Create a spreadsheet parsing job.\n\nProvide at most one of `configuration` (an inline parsing configuration) or\n`configuration_id` (a saved configuration preset). If neither is provided, a\ndefault configuration is used. Optionally include `webhook_configurations`\nto receive `sheets.*` status notifications.', stainlessPath: '(resource) sheets > (method) create', qualified: 'client.sheets.create', params: [ 'file_id: string;', 'organization_id?: string;', 'project_id?: string;', "config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; };", "configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; };", 'configuration_id?: string;', 'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[];', ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## create\n\n`client.sheets.create(file_id: string, organization_id?: string, project_id?: string, config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }, configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }, configuration_id?: string, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**post** `/api/v1/sheets/jobs`\n\nCreate a spreadsheet parsing job.\n\nProvide at most one of `configuration` (an inline parsing configuration) or\n`configuration_id` (a saved configuration preset). If neither is provided, a\ndefault configuration is used. Optionally include `webhook_configurations`\nto receive `sheets.*` status notifications.\n\n### Parameters\n\n- `file_id: string`\n The ID of the file to parse\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n Configuration for spreadsheet parsing and region extraction\n - `extraction_range?: string`\n A1 notation of the range to extract a single region from. If None, the entire sheet is used.\n - `flatten_hierarchical_tables?: boolean`\n Return a flattened dataframe when a detected table is recognized as hierarchical.\n - `generate_additional_metadata?: boolean`\n Whether to generate additional metadata (title, description) for each extracted region.\n - `include_hidden_cells?: boolean`\n Whether to include hidden cells when extracting regions from the spreadsheet.\n - `sheet_names?: string[]`\n The names of the sheets to extract regions from. If empty, all sheets will be processed.\n - `specialization?: string`\n Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline.\n - `table_merge_sensitivity?: 'strong' | 'weak'`\n Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).\n - `use_experimental_processing?: boolean`\n Enables experimental processing. Accuracy may be impacted.\n\n- `configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n Configuration for spreadsheet parsing and region extraction\n - `extraction_range?: string`\n A1 notation of the range to extract a single region from. If None, the entire sheet is used.\n - `flatten_hierarchical_tables?: boolean`\n Return a flattened dataframe when a detected table is recognized as hierarchical.\n - `generate_additional_metadata?: boolean`\n Whether to generate additional metadata (title, description) for each extracted region.\n - `include_hidden_cells?: boolean`\n Whether to include hidden cells when extracting regions from the spreadsheet.\n - `sheet_names?: string[]`\n The names of the sheets to extract regions from. If empty, all sheets will be processed.\n - `specialization?: string`\n Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline.\n - `table_merge_sensitivity?: 'strong' | 'weak'`\n Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).\n - `use_experimental_processing?: boolean`\n Enables experimental processing. Accuracy may be impacted.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst sheetsJob = await client.sheets.create({ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(sheetsJob);\n```", perLanguage: { typescript: { method: 'client.sheets.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst sheetsJob = await client.sheets.create({ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(sheetsJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/sheets/jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "configuration_id": "cfg-11111111-2222-3333-4444-555555555555"\n }\'', }, python: { method: 'sheets.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsheets_job = client.sheets.create(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(sheets_job.id)', }, java: { method: 'sheets().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetsJob;\nimport com.llamacloud_prod.api.models.sheets.SheetCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetCreateParams params = SheetCreateParams.builder()\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n SheetsJob sheetsJob = client.sheets().create(params);\n }\n}', }, go: { method: 'client.Sheets.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsheetsJob, err := client.Sheets.New(context.TODO(), llamacloudprod.SheetNewParams{\n\t\tFileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sheetsJob.ID)\n}\n', }, cli: { method: 'sheets create', example: "llamacloud-prod sheets create \\\n --api-key 'My API Key' \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/sheets/jobs', httpMethod: 'get', summary: 'List Spreadsheet Jobs', description: 'List spreadsheet parsing jobs.', stainlessPath: '(resource) sheets > (method) list', qualified: 'client.sheets.list', params: [ 'configuration_id?: string;', 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'include_results?: boolean;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS';", ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## list\n\n`client.sheets.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, include_results?: boolean, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**get** `/api/v1/sheets/jobs`\n\nList spreadsheet parsing jobs.\n\n### Parameters\n\n- `configuration_id?: string`\n Filter by saved configuration ID\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `include_results?: boolean`\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n Filter by job status\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const sheetsJob of client.sheets.list()) {\n console.log(sheetsJob);\n}\n```", perLanguage: { typescript: { method: 'client.sheets.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const sheetsJob of client.sheets.list()) {\n console.log(sheetsJob.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/sheets/jobs \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'sheets.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.sheets.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'sheets().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.sheets.SheetListPage;\nimport com.llamacloud_prod.api.models.sheets.SheetListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetListPage page = client.sheets().list();\n }\n}', }, go: { method: 'client.Sheets.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Sheets.List(context.TODO(), llamacloudprod.SheetListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'sheets list', example: "llamacloud-prod sheets list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/sheets/jobs/{spreadsheet_job_id}', httpMethod: 'get', summary: 'Get Spreadsheet Job', description: 'Get a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call.', stainlessPath: '(resource) sheets > (method) get', qualified: 'client.sheets.get', params: [ 'spreadsheet_job_id: string;', 'expand?: string[];', 'include_results?: boolean;', 'organization_id?: string;', 'project_id?: string;', ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## get\n\n`client.sheets.get(spreadsheet_job_id: string, expand?: string[], include_results?: boolean, organization_id?: string, project_id?: string): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**get** `/api/v1/sheets/jobs/{spreadsheet_job_id}`\n\nGet a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `expand?: string[]`\n Optional fields to populate on the response. Valid values: metadata_state_transitions.\n\n- `include_results?: boolean`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst sheetsJob = await client.sheets.get('spreadsheet_job_id');\n\nconsole.log(sheetsJob);\n```", perLanguage: { typescript: { method: 'client.sheets.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst sheetsJob = await client.sheets.get('spreadsheet_job_id');\n\nconsole.log(sheetsJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/sheets/jobs/$SPREADSHEET_JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'sheets.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsheets_job = client.sheets.get(\n spreadsheet_job_id="spreadsheet_job_id",\n)\nprint(sheets_job.id)', }, java: { method: 'sheets().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetsJob;\nimport com.llamacloud_prod.api.models.sheets.SheetGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetsJob sheetsJob = client.sheets().get("spreadsheet_job_id");\n }\n}', }, go: { method: 'client.Sheets.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsheetsJob, err := client.Sheets.Get(\n\t\tcontext.TODO(),\n\t\t"spreadsheet_job_id",\n\t\tllamacloudprod.SheetGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sheetsJob.ID)\n}\n', }, cli: { method: 'sheets get', example: "llamacloud-prod sheets get \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id", }, }, }, { name: 'get_result_table', endpoint: '/api/v1/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}', httpMethod: 'get', summary: 'Get Result Region', description: 'Generate a presigned URL to download a specific extracted region.', stainlessPath: '(resource) sheets > (method) get_result_table', qualified: 'client.sheets.getResultTable', params: [ 'spreadsheet_job_id: string;', 'region_id: string;', "region_type: 'cell_metadata' | 'extra' | 'table';", 'expires_at_seconds?: number;', 'organization_id?: string;', 'project_id?: string;', ], response: '{ expires_at: string; url: string; form_fields?: object; }', markdown: "## get_result_table\n\n`client.sheets.getResultTable(spreadsheet_job_id: string, region_id: string, region_type: 'cell_metadata' | 'extra' | 'table', expires_at_seconds?: number, organization_id?: string, project_id?: string): { expires_at: string; url: string; form_fields?: object; }`\n\n**get** `/api/v1/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}`\n\nGenerate a presigned URL to download a specific extracted region.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `region_id: string`\n\n- `region_type: 'cell_metadata' | 'extra' | 'table'`\n\n- `expires_at_seconds?: number`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ expires_at: string; url: string; form_fields?: object; }`\n Schema for a presigned URL.\n\n - `expires_at: string`\n - `url: string`\n - `form_fields?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst presignedURL = await client.sheets.getResultTable('cell_metadata', { spreadsheet_job_id: 'spreadsheet_job_id', region_id: 'region_id' });\n\nconsole.log(presignedURL);\n```", perLanguage: { typescript: { method: 'client.sheets.getResultTable', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst presignedURL = await client.sheets.getResultTable('cell_metadata', {\n spreadsheet_job_id: 'spreadsheet_job_id',\n region_id: 'region_id',\n});\n\nconsole.log(presignedURL.expires_at);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/sheets/jobs/$SPREADSHEET_JOB_ID/regions/$REGION_ID/result/$REGION_TYPE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'sheets.get_result_table', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npresigned_url = client.sheets.get_result_table(\n region_type="cell_metadata",\n spreadsheet_job_id="spreadsheet_job_id",\n region_id="region_id",\n)\nprint(presigned_url.expires_at)', }, java: { method: 'sheets().getResultTable', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.files.PresignedUrl;\nimport com.llamacloud_prod.api.models.sheets.SheetGetResultTableParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetGetResultTableParams params = SheetGetResultTableParams.builder()\n .spreadsheetJobId("spreadsheet_job_id")\n .regionId("region_id")\n .regionType(SheetGetResultTableParams.RegionType.CELL_METADATA)\n .build();\n PresignedUrl presignedUrl = client.sheets().getResultTable(params);\n }\n}', }, go: { method: 'client.Sheets.GetResultTable', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpresignedURL, err := client.Sheets.GetResultTable(\n\t\tcontext.TODO(),\n\t\tllamacloudprod.SheetGetResultTableParamsRegionTypeCellMetadata,\n\t\tllamacloudprod.SheetGetResultTableParams{\n\t\t\tSpreadsheetJobID: "spreadsheet_job_id",\n\t\t\tRegionID: "region_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", presignedURL.ExpiresAt)\n}\n', }, cli: { method: 'sheets get_result_table', example: "llamacloud-prod sheets get-result-table \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id \\\n --region-id region_id \\\n --region-type cell_metadata", }, }, }, { name: 'delete_job', endpoint: '/api/v1/sheets/jobs/{spreadsheet_job_id}', httpMethod: 'delete', summary: 'Delete Spreadsheet Job', description: 'Delete a spreadsheet parsing job and its associated data.', stainlessPath: '(resource) sheets > (method) delete_job', qualified: 'client.sheets.deleteJob', params: ['spreadsheet_job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## delete_job\n\n`client.sheets.deleteJob(spreadsheet_job_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v1/sheets/jobs/{spreadsheet_job_id}`\n\nDelete a spreadsheet parsing job and its associated data.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.sheets.deleteJob('spreadsheet_job_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.sheets.deleteJob', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.sheets.deleteJob('spreadsheet_job_id');\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/sheets/jobs/$SPREADSHEET_JOB_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'sheets.delete_job', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.sheets.delete_job(\n spreadsheet_job_id="spreadsheet_job_id",\n)\nprint(response)', }, java: { method: 'sheets().deleteJob', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.sheets.SheetDeleteJobParams;\nimport com.llamacloud_prod.api.models.sheets.SheetDeleteJobResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetDeleteJobResponse response = client.sheets().deleteJob("spreadsheet_job_id");\n }\n}', }, go: { method: 'client.Sheets.DeleteJob', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Sheets.DeleteJob(\n\t\tcontext.TODO(),\n\t\t"spreadsheet_job_id",\n\t\tllamacloudprod.SheetDeleteJobParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'sheets delete_job', example: "llamacloud-prod sheets delete-job \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id", }, }, }, { name: 'create', endpoint: '/api/v2/parse', httpMethod: 'post', summary: 'Parse File', description: 'Parse a file by file ID or URL.\n\nProvide either `file_id` (a previously uploaded file) or\n`source_url` (a publicly accessible URL). Configure parsing\nwith options like `tier`, `target_pages`, and `lang`.\n\n## Tiers\n\n- `fast` — rule-based, cheapest, no AI\n- `cost_effective` — balanced speed and quality\n- `agentic` — full AI-powered parsing\n- `agentic_plus` — premium AI with specialized features\n\nThe job runs asynchronously. Poll `GET /parse/{job_id}` with\n`expand=text` or `expand=markdown` to retrieve results.', stainlessPath: '(resource) parsing > (method) create', qualified: 'client.parsing.create', params: [ "tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string;", "version: 'latest' | '2026-06-18' | '2025-12-11' | string;", 'organization_id?: string;', 'project_id?: string;', 'agentic_options?: { custom_prompt?: string; };', 'client_name?: string;', 'configuration_id?: string;', 'crop_box?: { bottom?: number; left?: number; right?: number; top?: number; };', 'disable_cache?: boolean;', 'fast_options?: object;', 'file_id?: string;', 'http_proxy?: string;', 'input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; };', "output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; };", 'page_ranges?: { max_pages?: number; target_pages?: string; };', 'processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; };', "processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; custom_prompt?: string; extract_layout?: boolean; high_res_ocr?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; }; language?: string; outlined_table_extraction?: boolean; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version?: 'latest' | '2026-06-18' | '2025-12-11' | string; }; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: string[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; };", 'source_url?: string;', "webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[];", ], response: "{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }", markdown: "## create\n\n`client.parsing.create(tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string, version: 'latest' | '2026-06-18' | '2025-12-11' | string, organization_id?: string, project_id?: string, agentic_options?: { custom_prompt?: string; }, client_name?: string, configuration_id?: string, crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }, disable_cache?: boolean, fast_options?: object, file_id?: string, http_proxy?: string, input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }, output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }, page_ranges?: { max_pages?: number; target_pages?: string; }, processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }, processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }, source_url?: string, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]): { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }`\n\n**post** `/api/v2/parse`\n\nParse a file by file ID or URL.\n\nProvide either `file_id` (a previously uploaded file) or\n`source_url` (a publicly accessible URL). Configure parsing\nwith options like `tier`, `target_pages`, and `lang`.\n\n## Tiers\n\n- `fast` — rule-based, cheapest, no AI\n- `cost_effective` — balanced speed and quality\n- `agentic` — full AI-powered parsing\n- `agentic_plus` — premium AI with specialized features\n\nThe job runs asynchronously. Poll `GET /parse/{job_id}` with\n`expand=text` or `expand=markdown` to retrieve results.\n\n### Parameters\n\n- `tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string`\n Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced), 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with highest accuracy)\n\n- `version: 'latest' | '2026-06-18' | '2025-12-11' | string`\n Version for the selected tier. Use `latest`, or pin one of that tier's dated versions.\n\nCurrent `latest` by tier:\n- `fast`: `2025-12-11`\n- `cost_effective`: `2026-06-18`\n- `agentic`: `2026-06-18`\n- `agentic_plus`: `2026-06-18`\n\nFull list: `GET /api/v2/parse/versions`.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `agentic_options?: { custom_prompt?: string; }`\n Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).\n\nThese options customize how the AI processes and interprets document content.\nOnly applicable when using non-fast tiers.\n - `custom_prompt?: string`\n Custom instructions for the AI parser. Use to guide extraction behavior, specify output formatting, or provide domain-specific context. Example: 'Extract financial tables with currency symbols. Format dates as YYYY-MM-DD.'\n\n- `client_name?: string`\n Identifier for the client/application making the request. Used for analytics and debugging. Example: 'my-app-v2'\n\n- `configuration_id?: string`\n ID of a saved parse configuration. When set, `tier` and `version` default to the saved configuration's values — omit them or pass `'configured'`.\n\n- `crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }`\n Crop boundaries to process only a portion of each page. Values are ratios 0-1 from page edges\n - `bottom?: number`\n Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this line is excluded\n - `left?: number`\n Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this line is excluded\n - `right?: number`\n Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this line is excluded\n - `top?: number`\n Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line is excluded\n\n- `disable_cache?: boolean`\n Bypass result caching and force re-parsing. Use when document content may have changed or you need fresh results\n\n- `fast_options?: object`\n Options for fast tier parsing (rule-based, no AI).\n\nFast tier uses deterministic algorithms for text extraction without AI enhancement.\nIt's the fastest and most cost-effective option, best suited for simple documents\nwith standard layouts. Currently has no configurable options but reserved for\nfuture expansion.\n\n- `file_id?: string`\n ID of an existing file in the project to parse. Mutually exclusive with source_url\n\n- `http_proxy?: string`\n HTTP/HTTPS proxy for fetching source_url. Ignored if using file_id\n\n- `input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }`\n Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on detected input file type\n - `html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }`\n HTML/web page parsing options (applies to .html, .htm files)\n - `image?: { camera_photo_correction?: boolean; }`\n Image parsing options (applies to .jpg, .jpeg, .png, .webp files)\n - `pdf?: object`\n PDF-specific parsing options (applies to .pdf files)\n - `presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }`\n Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)\n - `spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }`\n Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)\n\n- `output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }`\n Output formatting options for markdown, text, and extracted images\n - `additional_outputs?: string[]`\n Optional additional output artifacts to save alongside the primary parse output. Each value opts in to generating and persisting one extra file; the empty list (default) saves none. The three accepted values are: 'stripped_md' — per-page markdown stripped of formatting (links, bold/italic, images, HTML), saved as JSON for full-text-search indexing; fetch via `expand=stripped_markdown_content_metadata`. 'concatenated_stripped_txt' — all stripped pages concatenated into a single plain-text file with `\\n\\n---\\n\\n` between pages, useful for feeding the document into search or embedding pipelines as one blob; fetch via `expand=concatenated_stripped_markdown_content_metadata`. 'word_bbox' — raw word-level bounding boxes (one JSON object per word, with page number and x/y/w/h coordinates) saved as JSONL, useful for highlighting or grounding extracted answers back to the source document; fetch via `expand=raw_words_content_metadata`.\n - `extract_printed_page_number?: boolean`\n Extract the printed page number as it appears in the document (e.g., 'Page 5 of 10', 'v', 'A-3'). Useful for referencing original page numbers\n - `granular_bboxes?: 'cell' | 'line' | 'word'[]`\n Bounding-box granularity levels to compute for the parse. 'word' computes one bounding box per detected word; 'line' computes one per text line; 'cell' computes one per table cell. Multiple levels can be requested. Empty list (default) disables granular bboxes — only item-level layout boxes are returned on the result. When set, the computed boxes are not inlined on the result items; they are written to a separate `grounded_items` sidecar (JSONL, one row per page) and exposed as `result_content_metadata.grounded_items` (a presigned download URL) on the parse result. Each row matches the `GroundedJsonItem` shape.\n - `images_to_save?: 'embedded' | 'layout' | 'screenshot'[]`\n Image categories to extract and save. Options: 'screenshot' (full page renders useful for visual QA), 'embedded' (images found within the document), 'layout' (cropped regions from layout detection like figures and diagrams). Empty list saves no images\n - `markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }`\n Markdown formatting options including table styles and link annotations\n - `spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }`\n Spatial text output options for preserving document layout structure\n - `tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }`\n Options for exporting tables as XLSX spreadsheets\n\n- `page_ranges?: { max_pages?: number; target_pages?: string; }`\n Page selection: limit total pages or specify exact pages to process\n - `max_pages?: number`\n Maximum number of pages to process. Pages are processed in order starting from page 1. If both max_pages and target_pages are set, target_pages takes precedence\n - `target_pages?: string`\n Comma-separated list of specific pages to process using 1-based indexing. Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5' (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are sorted and deduplicated automatically. Duplicate pages cause an error\n\n- `processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }`\n Job execution controls including timeouts and failure thresholds\n - `job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }`\n Quality thresholds that determine when a job should fail vs complete with partial results\n - `timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }`\n Timeout settings for job execution. Increase for large or complex documents\n\n- `processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; custom_prompt?: string; extract_layout?: boolean; high_res_ocr?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; }; language?: string; outlined_table_extraction?: boolean; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version?: 'latest' | '2026-06-18' | '2025-12-11' | string; }; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: string[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }`\n Document processing options including OCR, table extraction, and chart parsing\n - `aggressive_table_extraction?: boolean`\n Use aggressive heuristics to detect table boundaries, even without visible borders. Useful for documents with borderless or complex tables\n - `auto_mode_configuration?: { parsing_conf: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; custom_prompt?: string; extract_layout?: boolean; high_res_ocr?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; }; language?: string; outlined_table_extraction?: boolean; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version?: 'latest' | '2026-06-18' | '2025-12-11' | string; }; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]`\n Conditional processing rules that apply different parsing options based on page content, document structure, or filename patterns. Each entry defines trigger conditions and the parsing configuration to apply when triggered\n - `cost_optimizer?: { enable?: boolean; }`\n Cost optimizer configuration for reducing parsing costs on simpler pages.\n\nWhen enabled, the parser analyzes each page and routes simpler pages to faster,\ncheaper processing while preserving quality for complex pages. Only works with\n'agentic' or 'agentic_plus' tiers.\n - `disable_heuristics?: boolean`\n Disable automatic heuristics including outlined table extraction and adaptive long table handling. Use when heuristics produce incorrect results\n - `ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }`\n Options for ignoring specific text types (diagonal, hidden, text in images)\n - `ocr_parameters?: { languages?: string[]; }`\n OCR configuration including language detection settings\n - `specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'`\n Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost), 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables extract_layout and precise_bounding_box when set\n\n- `source_url?: string`\n Public URL of the document to parse. Mutually exclusive with file_id\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]`\n Webhook endpoints for job status notifications. Multiple webhooks can be configured for different events or services\n\n### Returns\n\n- `{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }`\n A parse job.\n\n - `id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `created_at?: string`\n - `error_message?: string`\n - `name?: string`\n - `tier?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst parsing = await client.parsing.create({ tier: 'fast', version: 'latest' });\n\nconsole.log(parsing);\n```", perLanguage: { typescript: { method: 'client.parsing.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst parsing = await client.parsing.create({ tier: 'fast', version: 'latest' });\n\nconsole.log(parsing.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/parse \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "tier": "fast",\n "version": "latest"\n }\'', }, python: { method: 'parsing.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nparsing = client.parsing.create(\n tier="fast",\n version="latest",\n)\nprint(parsing.id)', }, java: { method: 'parsing().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ParsingCreateParams params = ParsingCreateParams.builder()\n .tier(ParsingCreateParams.Tier.FAST)\n .version(ParsingCreateParams.Version.LATEST)\n .build();\n ParsingCreateResponse parsing = client.parsing().create(params);\n }\n}', }, go: { method: 'client.Parsing.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tparsing, err := client.Parsing.New(context.TODO(), llamacloudprod.ParsingNewParams{\n\t\tTier: llamacloudprod.ParsingNewParamsTierFast,\n\t\tVersion: llamacloudprod.ParsingNewParamsVersionLatest,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", parsing.ID)\n}\n', }, cli: { method: 'parsing create', example: "llamacloud-prod parsing create \\\n --api-key 'My API Key' \\\n --tier fast \\\n --version latest", }, }, }, { name: 'get', endpoint: '/api/v2/parse/{job_id}', httpMethod: 'get', summary: 'Get Parse Job', description: 'Retrieve a parse job with optional expanded content.\n\nBy default returns job metadata only. Use `expand` to include\nparsed content:\n\n- `text` — plain text output\n- `markdown` — markdown output\n- `items` — structured page-by-page output\n- `job_metadata` — usage and processing details\n\nContent metadata fields (e.g. `text_content_metadata`) return\npresigned URLs for downloading large results.', stainlessPath: '(resource) parsing > (method) get', qualified: 'client.parsing.get', params: [ 'job_id: string;', 'expand?: string[];', 'image_filenames?: string;', 'organization_id?: string;', 'project_id?: string;', ], response: "{ job: { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }; images_content_metadata?: { images: object[]; total_count: number; }; items?: { pages: object | object[]; }; job_metadata?: object; markdown?: { pages: object | object[]; }; markdown_full?: string; metadata?: { pages: object[]; }; raw_parameters?: object; result_content_metadata?: object; text?: { pages: object[]; }; text_full?: string; }", markdown: "## get\n\n`client.parsing.get(job_id: string, expand?: string[], image_filenames?: string, organization_id?: string, project_id?: string): { job: object; images_content_metadata?: object; items?: object; job_metadata?: object; markdown?: object; markdown_full?: string; metadata?: object; raw_parameters?: object; result_content_metadata?: object; text?: object; text_full?: string; }`\n\n**get** `/api/v2/parse/{job_id}`\n\nRetrieve a parse job with optional expanded content.\n\nBy default returns job metadata only. Use `expand` to include\nparsed content:\n\n- `text` — plain text output\n- `markdown` — markdown output\n- `items` — structured page-by-page output\n- `job_metadata` — usage and processing details\n\nContent metadata fields (e.g. `text_content_metadata`) return\npresigned URLs for downloading large results.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Fields to include: text, markdown, items, metadata, job_metadata, text_content_metadata, markdown_content_metadata, items_content_metadata, metadata_content_metadata, raw_words_content_metadata, xlsx_content_metadata, output_pdf_content_metadata, images_content_metadata. Metadata fields include presigned URLs.\n\n- `image_filenames?: string`\n Filter to specific image filenames (optional). Example: image_0.png,image_1.jpg\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ job: { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }; images_content_metadata?: { images: { filename: string; index: number; bbox?: object; category?: 'embedded' | 'layout' | 'screenshot'; content_type?: string; presigned_url?: string; size_bytes?: number; }[]; total_count: number; }; items?: { pages: { items: code_item | footer_item | header_item | heading_item | image_item | link_item | list_item | table_item | text_item[]; page_height: number; page_number: number; page_width: number; success: true; } | { error: string; page_number: number; success: false; }[]; }; job_metadata?: object; markdown?: { pages: { markdown: string; page_number: number; success: true; footer?: string; header?: string; } | { error: string; page_number: number; success: false; }[]; }; markdown_full?: string; metadata?: { pages: { page_number: number; confidence?: number; cost_optimized?: boolean; original_orientation_angle?: number; printed_page_number?: string; slide_section_name?: string; speaker_notes?: string; triggered_auto_mode?: boolean; }[]; }; raw_parameters?: object; result_content_metadata?: object; text?: { pages: { page_number: number; text: string; }[]; }; text_full?: string; }`\n Parse result response with job status and optional content or metadata.\n\nThe job field is always included. Other fields are included based on expand parameters.\n\n - `job: { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }`\n - `images_content_metadata?: { images: { filename: string; index: number; bbox?: { h: number; w: number; x: number; y: number; }; category?: 'embedded' | 'layout' | 'screenshot'; content_type?: string; presigned_url?: string; size_bytes?: number; }[]; total_count: number; }`\n - `items?: { pages: { items: { md: string; value: string; bbox?: b_box[]; language?: string; type?: 'code'; } | { items: code_item | heading_item | image_item | link_item | list_item | table_item | text_item[]; md: string; bbox?: b_box[]; type?: 'footer'; } | { items: code_item | heading_item | image_item | link_item | list_item | table_item | text_item[]; md: string; bbox?: b_box[]; type?: 'header'; } | { level: number; md: string; value: string; bbox?: b_box[]; type?: 'heading'; } | { caption: string; md: string; url: string; bbox?: b_box[]; type?: 'image'; } | { md: string; text: string; url: string; bbox?: b_box[]; type?: 'link'; } | { items: text_item | list_item[]; md: string; ordered: boolean; bbox?: b_box[]; type?: 'list'; } | { csv: string; html: string; md: string; rows: string | number[][]; bbox?: b_box[]; merged_from_pages?: number[]; merged_into_page?: number; parse_concerns?: object[]; type?: 'table'; } | { md: string; value: string; bbox?: b_box[]; type?: 'text'; }[]; page_height: number; page_number: number; page_width: number; success: true; } | { error: string; page_number: number; success: false; }[]; }`\n - `job_metadata?: object`\n - `markdown?: { pages: { markdown: string; page_number: number; success: true; footer?: string; header?: string; } | { error: string; page_number: number; success: false; }[]; }`\n - `markdown_full?: string`\n - `metadata?: { pages: { page_number: number; confidence?: number; cost_optimized?: boolean; original_orientation_angle?: number; printed_page_number?: string; slide_section_name?: string; speaker_notes?: string; triggered_auto_mode?: boolean; }[]; }`\n - `raw_parameters?: object`\n - `result_content_metadata?: object`\n - `text?: { pages: { page_number: number; text: string; }[]; }`\n - `text_full?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst parsing = await client.parsing.get('job_id');\n\nconsole.log(parsing);\n```", perLanguage: { typescript: { method: 'client.parsing.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst parsing = await client.parsing.get('job_id');\n\nconsole.log(parsing.job);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/parse/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'parsing.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nparsing = client.parsing.get(\n job_id="job_id",\n)\nprint(parsing.job)', }, java: { method: 'parsing().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.parsing.ParsingGetParams;\nimport com.llamacloud_prod.api.models.parsing.ParsingGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ParsingGetResponse parsing = client.parsing().get("job_id");\n }\n}', }, go: { method: 'client.Parsing.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tparsing, err := client.Parsing.Get(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.ParsingGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", parsing.Job)\n}\n', }, cli: { method: 'parsing get', example: "llamacloud-prod parsing get \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'list', endpoint: '/api/v2/parse', httpMethod: 'get', summary: 'List Parse Jobs', description: 'List parse jobs for the current project.\n\nFilter by `status` or creation date range. Results are\npaginated — use `page_token` from the response to fetch\nsubsequent pages.', stainlessPath: '(resource) parsing > (method) list', qualified: 'client.parsing.list', params: [ 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';", ], response: "{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }", markdown: "## list\n\n`client.parsing.list(created_at_on_or_after?: string, created_at_on_or_before?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'): { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }`\n\n**get** `/api/v2/parse`\n\nList parse jobs for the current project.\n\nFilter by `status` or creation date range. Results are\npaginated — use `page_token` from the response to fetch\nsubsequent pages.\n\n### Parameters\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page\n\n- `page_token?: string`\n Token for pagination\n\n- `project_id?: string`\n\n- `status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)\n\n### Returns\n\n- `{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; }`\n A parse job.\n\n - `id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `created_at?: string`\n - `error_message?: string`\n - `name?: string`\n - `tier?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const parsingListResponse of client.parsing.list()) {\n console.log(parsingListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.parsing.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const parsingListResponse of client.parsing.list()) {\n console.log(parsingListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/parse \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'parsing.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.parsing.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'parsing().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.parsing.ParsingListPage;\nimport com.llamacloud_prod.api.models.parsing.ParsingListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ParsingListPage page = client.parsing().list();\n }\n}', }, go: { method: 'client.Parsing.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Parsing.List(context.TODO(), llamacloudprod.ParsingListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'parsing list', example: "llamacloud-prod parsing list \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v2/extract', httpMethod: 'post', summary: 'Create Extract Job', description: 'Create an extraction job.\n\nExtracts structured data from a document using either a saved\nconfiguration or an inline JSON Schema.\n\n## Input\n\nProvide exactly one of:\n- `configuration_id` — reference a saved extraction config\n- `configuration` — inline configuration with a `data_schema`\n\n## Document input\n\nSet `file_input` to a file ID (`dfl-...`) or a\ncompleted parse job ID (`pjb-...`).\n\nThe job runs asynchronously. Poll `GET /extract/{job_id}` or\nregister a webhook to monitor completion.', stainlessPath: '(resource) extract > (method) create', qualified: 'client.extract.create', params: [ 'file_input: string;', 'organization_id?: string;', 'project_id?: string;', "configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; };", 'configuration_id?: string;', 'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[];', ], response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }", markdown: "## create\n\n`client.extract.create(file_input: string, organization_id?: string, project_id?: string, configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }, configuration_id?: string, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; }`\n\n**post** `/api/v2/extract`\n\nCreate an extraction job.\n\nExtracts structured data from a document using either a saved\nconfiguration or an inline JSON Schema.\n\n## Input\n\nProvide exactly one of:\n- `configuration_id` — reference a saved extraction config\n- `configuration` — inline configuration with a `data_schema`\n\n## Document input\n\nSet `file_input` to a file ID (`dfl-...`) or a\ncompleted parse job ID (`pjb-...`).\n\nThe job runs asynchronously. Poll `GET /extract/{job_id}` or\nregister a webhook to monitor completion.\n\n### Parameters\n\n- `file_input: string`\n File ID or parse job ID to extract from\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }`\n Extract configuration combining parse and extract settings.\n - `data_schema: object`\n JSON Schema defining the fields to extract. Validate with the /schema/validate endpoint first.\n - `cite_sources?: boolean`\n Include citations in results\n - `confidence_scores?: boolean`\n Include confidence scores in results\n - `extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'`\n Granularity of extraction: per_doc returns one object per document, per_page returns one object per page, per_table_row returns one object per table row\n - `max_pages?: number`\n Maximum number of pages to process. Omit for no limit.\n - `parse_config_id?: string`\n Saved parse configuration ID to control how the document is parsed before extraction\n - `parse_tier?: string`\n Parse tier to use before extraction. Defaults to the extract tier if not specified.\n - `system_prompt?: string`\n Custom system prompt to guide extraction behavior\n - `target_pages?: string`\n Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.\n - `tier?: 'agentic' | 'cost_effective'`\n Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)\n - `version?: string`\n Use 'latest' for the latest release for the selected tier or a date string (YYYY-MM-DD format) to pin to the nearest release at or before that date. Job responses always report the concrete resolved version the job runs, fixed at job creation; saved configurations keep the value as provided.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n\n### Returns\n\n- `{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }`\n An extraction job.\n\n - `id: string`\n - `created_at: string`\n - `file_input: string`\n - `project_id: string`\n - `status: string`\n - `updated_at: string`\n - `configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }`\n - `configuration_id?: string`\n - `error_message?: string`\n - `extract_metadata?: { field_metadata?: { document_metadata?: object; page_metadata?: object[]; row_metadata?: object[]; }; parse_job_id?: string; parse_tier?: string; }`\n - `extract_result?: object | object[]`\n - `metadata?: { usage?: { num_pages_extracted?: number; }; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extractV2Job = await client.extract.create({ file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' });\n\nconsole.log(extractV2Job);\n```", perLanguage: { typescript: { method: 'client.extract.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst extractV2Job = await client.extract.create({\n file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',\n});\n\nconsole.log(extractV2Job.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_input": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "configuration": {\n "data_schema": {\n "properties": {\n "total_amount": "bar",\n "vendor_name": "bar"\n },\n "required": [\n "total_amount",\n "vendor_name"\n ],\n "type": "object"\n },\n "target_pages": "1,3,5-7"\n },\n "configuration_id": "cfg-11111111-2222-3333-4444-555555555555"\n }\'', }, python: { method: 'extract.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nextract_v2_job = client.extract.create(\n file_input="dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n)\nprint(extract_v2_job.id)', }, java: { method: 'extract().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.extract.ExtractV2Job;\nimport com.llamacloud_prod.api.models.extract.ExtractV2JobCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractV2JobCreate params = ExtractV2JobCreate.builder()\n .fileInput("dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")\n .build();\n ExtractV2Job extractV2Job = client.extract().create(params);\n }\n}', }, go: { method: 'client.Extract.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\textractV2Job, err := client.Extract.New(context.TODO(), llamacloudprod.ExtractNewParams{\n\t\tExtractV2JobCreate: llamacloudprod.ExtractV2JobCreateParam{\n\t\t\tFileInput: "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", extractV2Job.ID)\n}\n', }, cli: { method: 'extract create', example: "llamacloud-prod extract create \\\n --api-key 'My API Key' \\\n --file-input dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", }, }, }, { name: 'list', endpoint: '/api/v2/extract', httpMethod: 'get', summary: 'List Extract Jobs', description: 'List extraction jobs with optional filtering and pagination.\n\nFilter by `configuration_id`, `status`, `file_input`,\nor creation date range. Results are returned newest-first.\nUse `expand=configuration` to include the full configuration used,\nand `expand=extract_metadata` for per-field metadata.', stainlessPath: '(resource) extract > (method) list', qualified: 'client.extract.list', params: [ 'configuration_id?: string;', 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'document_input_type?: string;', 'document_input_value?: string;', 'expand?: string[];', 'file_input?: string;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED';", ], response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }", markdown: "## list\n\n`client.extract.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, document_input_type?: string, document_input_value?: string, expand?: string[], file_input?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; }`\n\n**get** `/api/v2/extract`\n\nList extraction jobs with optional filtering and pagination.\n\nFilter by `configuration_id`, `status`, `file_input`,\nor creation date range. Results are returned newest-first.\nUse `expand=configuration` to include the full configuration used,\nand `expand=extract_metadata` for per-field metadata.\n\n### Parameters\n\n- `configuration_id?: string`\n Filter by configuration ID\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `document_input_type?: string`\n Filter by document input type (file_id or parse_job_id)\n\n- `document_input_value?: string`\n Deprecated: use file_input instead\n\n- `expand?: string[]`\n Additional fields to include: configuration, extract_metadata\n\n- `file_input?: string`\n Filter by file input value\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page\n\n- `page_token?: string`\n Token for pagination\n\n- `project_id?: string`\n\n- `status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'`\n Filter by status\n\n### Returns\n\n- `{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }`\n An extraction job.\n\n - `id: string`\n - `created_at: string`\n - `file_input: string`\n - `project_id: string`\n - `status: string`\n - `updated_at: string`\n - `configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }`\n - `configuration_id?: string`\n - `error_message?: string`\n - `extract_metadata?: { field_metadata?: { document_metadata?: object; page_metadata?: object[]; row_metadata?: object[]; }; parse_job_id?: string; parse_tier?: string; }`\n - `extract_result?: object | object[]`\n - `metadata?: { usage?: { num_pages_extracted?: number; }; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const extractV2Job of client.extract.list()) {\n console.log(extractV2Job);\n}\n```", perLanguage: { typescript: { method: 'client.extract.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const extractV2Job of client.extract.list()) {\n console.log(extractV2Job.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'extract.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.extract.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'extract().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.extract.ExtractListPage;\nimport com.llamacloud_prod.api.models.extract.ExtractListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractListPage page = client.extract().list();\n }\n}', }, go: { method: 'client.Extract.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Extract.List(context.TODO(), llamacloudprod.ExtractListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'extract list', example: "llamacloud-prod extract list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v2/extract/{job_id}', httpMethod: 'get', summary: 'Get Extract Job', description: 'Get a single extraction job by ID.\n\nReturns the job status and results when complete.\nUse `expand=configuration` to include the full configuration used,\nand `expand=extract_metadata` for per-field metadata.', stainlessPath: '(resource) extract > (method) get', qualified: 'client.extract.get', params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }", markdown: "## get\n\n`client.extract.get(job_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; }`\n\n**get** `/api/v2/extract/{job_id}`\n\nGet a single extraction job by ID.\n\nReturns the job status and results when complete.\nUse `expand=configuration` to include the full configuration used,\nand `expand=extract_metadata` for per-field metadata.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Additional fields to include: configuration, extract_metadata\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }; configuration_id?: string; error_message?: string; extract_metadata?: { field_metadata?: extracted_field_metadata; parse_job_id?: string; parse_tier?: string; }; extract_result?: object | object[]; metadata?: { usage?: object; }; }`\n An extraction job.\n\n - `id: string`\n - `created_at: string`\n - `file_input: string`\n - `project_id: string`\n - `status: string`\n - `updated_at: string`\n - `configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; }`\n - `configuration_id?: string`\n - `error_message?: string`\n - `extract_metadata?: { field_metadata?: { document_metadata?: object; page_metadata?: object[]; row_metadata?: object[]; }; parse_job_id?: string; parse_tier?: string; }`\n - `extract_result?: object | object[]`\n - `metadata?: { usage?: { num_pages_extracted?: number; }; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extractV2Job = await client.extract.get('job_id');\n\nconsole.log(extractV2Job);\n```", perLanguage: { typescript: { method: 'client.extract.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst extractV2Job = await client.extract.get('job_id');\n\nconsole.log(extractV2Job.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'extract.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nextract_v2_job = client.extract.get(\n job_id="job_id",\n)\nprint(extract_v2_job.id)', }, java: { method: 'extract().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.extract.ExtractGetParams;\nimport com.llamacloud_prod.api.models.extract.ExtractV2Job;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractV2Job extractV2Job = client.extract().get("job_id");\n }\n}', }, go: { method: 'client.Extract.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\textractV2Job, err := client.Extract.Get(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.ExtractGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", extractV2Job.ID)\n}\n', }, cli: { method: 'extract get', example: "llamacloud-prod extract get \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'delete', endpoint: '/api/v2/extract/{job_id}', httpMethod: 'delete', summary: 'Delete Extract Job', description: 'Delete an extraction job and its results.', stainlessPath: '(resource) extract > (method) delete', qualified: 'client.extract.delete', params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## delete\n\n`client.extract.delete(job_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v2/extract/{job_id}`\n\nDelete an extraction job and its results.\n\n### Parameters\n\n- `job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extract = await client.extract.delete('job_id');\n\nconsole.log(extract);\n```", perLanguage: { typescript: { method: 'client.extract.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst extract = await client.extract.delete('job_id');\n\nconsole.log(extract);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract/$JOB_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'extract.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nextract = client.extract.delete(\n job_id="job_id",\n)\nprint(extract)', }, java: { method: 'extract().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.extract.ExtractDeleteParams;\nimport com.llamacloud_prod.api.models.extract.ExtractDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractDeleteResponse extract = client.extract().delete("job_id");\n }\n}', }, go: { method: 'client.Extract.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\textract, err := client.Extract.Delete(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.ExtractDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", extract)\n}\n', }, cli: { method: 'extract delete', example: "llamacloud-prod extract delete \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'validate_schema', endpoint: '/api/v2/extract/schema/validation', httpMethod: 'post', summary: 'Validate Extraction Schema', description: 'Validate a JSON schema for extraction.', stainlessPath: '(resource) extract > (method) validate_schema', qualified: 'client.extract.validateSchema', params: ['data_schema: object;'], response: '{ data_schema: object; }', markdown: "## validate_schema\n\n`client.extract.validateSchema(data_schema: object): { data_schema: object; }`\n\n**post** `/api/v2/extract/schema/validation`\n\nValidate a JSON schema for extraction.\n\n### Parameters\n\n- `data_schema: object`\n JSON Schema to validate for use with extract jobs\n\n### Returns\n\n- `{ data_schema: object; }`\n Response schema for schema validation.\n\n - `data_schema: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extractV2SchemaValidateResponse = await client.extract.validateSchema({ data_schema: {\n properties: {\n invoice_number: 'bar',\n line_items: 'bar',\n total_amount: 'bar',\n vendor_name: 'bar',\n},\n required: ['invoice_number', 'total_amount', 'vendor_name'],\n type: 'object',\n} });\n\nconsole.log(extractV2SchemaValidateResponse);\n```", perLanguage: { typescript: { method: 'client.extract.validateSchema', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst extractV2SchemaValidateResponse = await client.extract.validateSchema({\n data_schema: {\n properties: {\n invoice_number: 'bar',\n line_items: 'bar',\n total_amount: 'bar',\n vendor_name: 'bar',\n },\n required: ['invoice_number', 'total_amount', 'vendor_name'],\n type: 'object',\n },\n});\n\nconsole.log(extractV2SchemaValidateResponse.data_schema);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract/schema/validation \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "data_schema": {\n "properties": {\n "invoice_number": "bar",\n "line_items": "bar",\n "total_amount": "bar",\n "vendor_name": "bar"\n },\n "required": [\n "invoice_number",\n "total_amount",\n "vendor_name"\n ],\n "type": "object"\n }\n }\'', }, python: { method: 'extract.validate_schema', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nextract_v2_schema_validate_response = client.extract.validate_schema(\n data_schema={\n "properties": {\n "invoice_number": "bar",\n "line_items": "bar",\n "total_amount": "bar",\n "vendor_name": "bar",\n },\n "required": ["invoice_number", "total_amount", "vendor_name"],\n "type": "object",\n },\n)\nprint(extract_v2_schema_validate_response.data_schema)', }, java: { method: 'extract().validateSchema', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.extract.ExtractV2SchemaValidateRequest;\nimport com.llamacloud_prod.api.models.extract.ExtractV2SchemaValidateResponse;\nimport java.util.List;\nimport java.util.Map;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractV2SchemaValidateRequest params = ExtractV2SchemaValidateRequest.builder()\n .dataSchema(ExtractV2SchemaValidateRequest.DataSchema.builder()\n .putAdditionalProperty("properties", JsonValue.from(Map.of(\n "invoice_number",\n "bar",\n "line_items",\n "bar",\n "total_amount",\n "bar",\n "vendor_name",\n "bar"\n )))\n .putAdditionalProperty("required", JsonValue.from(List.of(\n "invoice_number",\n "total_amount",\n "vendor_name"\n )))\n .putAdditionalProperty("type", JsonValue.from("object"))\n .build())\n .build();\n ExtractV2SchemaValidateResponse extractV2SchemaValidateResponse = client.extract().validateSchema(params);\n }\n}', }, go: { method: 'client.Extract.ValidateSchema', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\textractV2SchemaValidateResponse, err := client.Extract.ValidateSchema(context.TODO(), llamacloudprod.ExtractValidateSchemaParams{\n\t\tExtractV2SchemaValidateRequest: llamacloudprod.ExtractV2SchemaValidateRequestParam{\n\t\t\tDataSchema: map[string]*llamacloudprod.ExtractV2SchemaValidateRequestDataSchemaUnionParam{\n\t\t\t\t"properties": {\n\t\t\t\t\tOfAnyMap: map[string]any{\n\t\t\t\t\t\t"invoice_number": "bar",\n\t\t\t\t\t\t"line_items": "bar",\n\t\t\t\t\t\t"total_amount": "bar",\n\t\t\t\t\t\t"vendor_name": "bar",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\t"required": {\n\t\t\t\t\tOfAnyArray: []any{"invoice_number", "total_amount", "vendor_name"},\n\t\t\t\t},\n\t\t\t\t"type": {\n\t\t\t\t\tOfString: llamacloudprod.String("object"),\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", extractV2SchemaValidateResponse.DataSchema)\n}\n', }, cli: { method: 'extract validate_schema', example: "llamacloud-prod extract validate-schema \\\n --api-key 'My API Key' \\\n --data-schema '{properties: {invoice_number: bar, line_items: bar, total_amount: bar, vendor_name: bar}, required: [invoice_number, total_amount, vendor_name], type: object}'", }, }, }, { name: 'generate_schema', endpoint: '/api/v2/extract/schema/generate', httpMethod: 'post', summary: 'Generate Extraction Schema', description: 'Generate a JSON schema and return a product configuration request.', stainlessPath: '(resource) extract > (method) generate_schema', qualified: 'client.extract.generateSchema', params: [ 'organization_id?: string;', 'project_id?: string;', 'data_schema?: object;', 'file_id?: string;', 'name?: string;', 'prompt?: string;', ], response: "{ name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | object; }", markdown: "## generate_schema\n\n`client.extract.generateSchema(organization_id?: string, project_id?: string, data_schema?: object, file_id?: string, name?: string, prompt?: string): { name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; }`\n\n**post** `/api/v2/extract/schema/generate`\n\nGenerate a JSON schema and return a product configuration request.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `data_schema?: object`\n Optional schema to validate, refine, or extend\n\n- `file_id?: string`\n Optional file ID to analyze for schema generation\n\n- `name?: string`\n Name for the generated configuration (auto-generated if omitted)\n\n- `prompt?: string`\n Natural language description of the data structure to extract\n\n### Returns\n\n- `{ name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }; }`\n Request body for creating a product configuration.\n\n - `name: string`\n - `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst configurationCreate = await client.extract.generateSchema();\n\nconsole.log(configurationCreate);\n```", perLanguage: { typescript: { method: 'client.extract.generateSchema', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst configurationCreate = await client.extract.generateSchema();\n\nconsole.log(configurationCreate.name);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/extract/schema/generate \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "name": "invoice_extraction",\n "prompt": "Extract vendor name, invoice number, date, line items with descriptions and amounts, and total amount from invoices."\n }\'', }, python: { method: 'extract.generate_schema', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nconfiguration_create = client.extract.generate_schema()\nprint(configuration_create.name)', }, java: { method: 'extract().generateSchema', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationCreate;\nimport com.llamacloud_prod.api.models.extract.ExtractV2SchemaGenerateRequest;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ExtractV2SchemaGenerateRequest params = ExtractV2SchemaGenerateRequest.builder().build();\n ConfigurationCreate configurationCreate = client.extract().generateSchema(params);\n }\n}', }, go: { method: 'client.Extract.GenerateSchema', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconfigurationCreate, err := client.Extract.GenerateSchema(context.TODO(), llamacloudprod.ExtractGenerateSchemaParams{\n\t\tExtractV2SchemaGenerateRequest: llamacloudprod.ExtractV2SchemaGenerateRequestParam{},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", configurationCreate.Name)\n}\n', }, cli: { method: 'extract generate_schema', example: "llamacloud-prod extract generate-schema \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v1/classifier/jobs', httpMethod: 'post', summary: 'Create Classify Job', description: 'Create a classify job. Experimental: not production-ready and subject to change.', stainlessPath: '(resource) classifier.jobs > (method) create', qualified: 'client.classifier.jobs.create', params: [ 'file_ids: string[];', 'rules: { description: string; type: string; }[];', 'organization_id?: string;', 'project_id?: string;', "mode?: 'FAST' | 'MULTIMODAL';", 'parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: number[]; };', "webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[];", ], response: "{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }", markdown: "## create\n\n`client.classifier.jobs.create(file_ids: string[], rules: { description: string; type: string; }[], organization_id?: string, project_id?: string, mode?: 'FAST' | 'MULTIMODAL', parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]): { id: string; project_id: string; rules: classifier_rule[]; status: status_enum; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: classify_parsing_configuration; updated_at?: string; }`\n\n**post** `/api/v1/classifier/jobs`\n\nCreate a classify job. Experimental: not production-ready and subject to change.\n\n### Parameters\n\n- `file_ids: string[]`\n The IDs of the files to classify\n\n- `rules: { description: string; type: string; }[]`\n The rules to classify the files\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `mode?: 'FAST' | 'MULTIMODAL'`\n The classification mode to use\n\n- `parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: number[]; }`\n The configuration for the parsing job\n - `lang?: string`\n The language to parse the files in\n - `max_pages?: number`\n The maximum number of pages to parse\n - `target_pages?: number[]`\n The pages to target for parsing (0-indexed, so first page is at 0)\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]`\n List of webhook configurations for notifications\n\n### Returns\n\n- `{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }`\n A classify job.\n\n - `id: string`\n - `project_id: string`\n - `rules: { description: string; type: string; }[]`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `user_id: string`\n - `created_at?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `job_record_id?: string`\n - `mode?: 'FAST' | 'MULTIMODAL'`\n - `parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: number[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst classifyJob = await client.classifier.jobs.create({ file_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'], rules: [{ description: 'contains invoice number, line items, and total amount', type: 'invoice' }] });\n\nconsole.log(classifyJob);\n```", perLanguage: { typescript: { method: 'client.classifier.jobs.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst classifyJob = await client.classifier.jobs.create({\n file_ids: ['182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e'],\n rules: [\n { description: 'contains invoice number, line items, and total amount', type: 'invoice' },\n ],\n});\n\nconsole.log(classifyJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/classifier/jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_ids": [\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n ],\n "rules": [\n {\n "description": "contains invoice number, line items, and total amount",\n "type": "invoice"\n }\n ]\n }\'', }, python: { method: 'classifier.jobs.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclassify_job = client.classifier.jobs.create(\n file_ids=["182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"],\n rules=[{\n "description": "contains invoice number, line items, and total amount",\n "type": "invoice",\n }],\n)\nprint(classify_job.id)', }, java: { method: 'classifier().jobs().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classifier.jobs.ClassifierRule;\nimport com.llamacloud_prod.api.models.classifier.jobs.ClassifyJob;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n JobCreateParams params = JobCreateParams.builder()\n .addFileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addRule(ClassifierRule.builder()\n .description("contains invoice number, line items, and total amount")\n .type("invoice")\n .build())\n .build();\n ClassifyJob classifyJob = client.classifier().jobs().create(params);\n }\n}', }, go: { method: 'client.Classifier.Jobs.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tclassifyJob, err := client.Classifier.Jobs.New(context.TODO(), llamacloudprod.ClassifierJobNewParams{\n\t\tFileIDs: []string{"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"},\n\t\tRules: []llamacloudprod.ClassifierRuleParam{{\n\t\t\tDescription: "contains invoice number, line items, and total amount",\n\t\t\tType: "invoice",\n\t\t}},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", classifyJob.ID)\n}\n', }, cli: { method: 'jobs create', example: "llamacloud-prod classifier:jobs create \\\n --api-key 'My API Key' \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --rule \"{description: 'contains invoice number, line items, and total amount', type: invoice}\"", }, }, }, { name: 'list', endpoint: '/api/v1/classifier/jobs', httpMethod: 'get', summary: 'List Classify Jobs', description: 'List classify jobs. Experimental: not production-ready and subject to change.', stainlessPath: '(resource) classifier.jobs > (method) list', qualified: 'client.classifier.jobs.list', params: [ 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', ], response: "{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }", markdown: "## list\n\n`client.classifier.jobs.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { id: string; project_id: string; rules: classifier_rule[]; status: status_enum; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: classify_parsing_configuration; updated_at?: string; }`\n\n**get** `/api/v1/classifier/jobs`\n\nList classify jobs. Experimental: not production-ready and subject to change.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }`\n A classify job.\n\n - `id: string`\n - `project_id: string`\n - `rules: { description: string; type: string; }[]`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `user_id: string`\n - `created_at?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `job_record_id?: string`\n - `mode?: 'FAST' | 'MULTIMODAL'`\n - `parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: number[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const classifyJob of client.classifier.jobs.list()) {\n console.log(classifyJob);\n}\n```", perLanguage: { typescript: { method: 'client.classifier.jobs.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const classifyJob of client.classifier.jobs.list()) {\n console.log(classifyJob.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/classifier/jobs \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'classifier.jobs.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.classifier.jobs.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'classifier().jobs().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobListPage;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n JobListPage page = client.classifier().jobs().list();\n }\n}', }, go: { method: 'client.Classifier.Jobs.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Classifier.Jobs.List(context.TODO(), llamacloudprod.ClassifierJobListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'jobs list', example: "llamacloud-prod classifier:jobs list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/classifier/jobs/{classify_job_id}', httpMethod: 'get', summary: 'Get Classify Job', description: 'Get a classify job. Experimental: not production-ready and subject to change.', stainlessPath: '(resource) classifier.jobs > (method) get', qualified: 'client.classifier.jobs.get', params: ['classify_job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }", markdown: "## get\n\n`client.classifier.jobs.get(classify_job_id: string, organization_id?: string, project_id?: string): { id: string; project_id: string; rules: classifier_rule[]; status: status_enum; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: classify_parsing_configuration; updated_at?: string; }`\n\n**get** `/api/v1/classifier/jobs/{classify_job_id}`\n\nGet a classify job. Experimental: not production-ready and subject to change.\n\n### Parameters\n\n- `classify_job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }`\n A classify job.\n\n - `id: string`\n - `project_id: string`\n - `rules: { description: string; type: string; }[]`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `user_id: string`\n - `created_at?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `job_record_id?: string`\n - `mode?: 'FAST' | 'MULTIMODAL'`\n - `parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: number[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst classifyJob = await client.classifier.jobs.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(classifyJob);\n```", perLanguage: { typescript: { method: 'client.classifier.jobs.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst classifyJob = await client.classifier.jobs.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(classifyJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/classifier/jobs/$CLASSIFY_JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'classifier.jobs.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclassify_job = client.classifier.jobs.get(\n classify_job_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(classify_job.id)', }, java: { method: 'classifier().jobs().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classifier.jobs.ClassifyJob;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ClassifyJob classifyJob = client.classifier().jobs().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Classifier.Jobs.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tclassifyJob, err := client.Classifier.Jobs.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.ClassifierJobGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", classifyJob.ID)\n}\n', }, cli: { method: 'jobs get', example: "llamacloud-prod classifier:jobs get \\\n --api-key 'My API Key' \\\n --classify-job-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_results', endpoint: '/api/v1/classifier/jobs/{classify_job_id}/results', httpMethod: 'get', summary: 'Get Classification Job Results', description: 'Get the results of a classify job. Experimental: not production-ready and subject to change.', stainlessPath: '(resource) classifier.jobs > (method) get_results', qualified: 'client.classifier.jobs.getResults', params: ['classify_job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ items: { id: string; classify_job_id: string; created_at?: string; file_id?: string; result?: { confidence: number; reasoning: string; type: string; }; updated_at?: string; }[]; next_page_token?: string; total_size?: number; }', markdown: "## get_results\n\n`client.classifier.jobs.getResults(classify_job_id: string, organization_id?: string, project_id?: string): { items: object[]; next_page_token?: string; total_size?: number; }`\n\n**get** `/api/v1/classifier/jobs/{classify_job_id}/results`\n\nGet the results of a classify job. Experimental: not production-ready and subject to change.\n\n### Parameters\n\n- `classify_job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ items: { id: string; classify_job_id: string; created_at?: string; file_id?: string; result?: { confidence: number; reasoning: string; type: string; }; updated_at?: string; }[]; next_page_token?: string; total_size?: number; }`\n Response model for the classify endpoint following AIP-132 pagination standard.\n\n - `items: { id: string; classify_job_id: string; created_at?: string; file_id?: string; result?: { confidence: number; reasoning: string; type: string; }; updated_at?: string; }[]`\n - `next_page_token?: string`\n - `total_size?: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.classifier.jobs.getResults('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.classifier.jobs.getResults', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.classifier.jobs.getResults('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response.items);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/classifier/jobs/$CLASSIFY_JOB_ID/results \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'classifier.jobs.get_results', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.classifier.jobs.get_results(\n classify_job_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.items)', }, java: { method: 'classifier().jobs().getResults', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobGetResultsParams;\nimport com.llamacloud_prod.api.models.classifier.jobs.JobGetResultsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n JobGetResultsResponse response = client.classifier().jobs().getResults("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Classifier.Jobs.GetResults', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Classifier.Jobs.GetResults(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.ClassifierJobGetResultsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Items)\n}\n', }, cli: { method: 'jobs get_results', example: "llamacloud-prod classifier:jobs get-results \\\n --api-key 'My API Key' \\\n --classify-job-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'create', endpoint: '/api/v2/batches', httpMethod: 'post', summary: 'Create Batch', description: 'Create a batch over a source directory and start processing asynchronously.', stainlessPath: '(resource) batches > (method) create', qualified: 'client.batches.create', params: [ "config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; };", 'source_directory_id: string;', 'organization_id?: string;', 'project_id?: string;', ], response: "{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }", markdown: "## create\n\n`client.batches.create(config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }, source_directory_id: string, organization_id?: string, project_id?: string): { id: string; config: object; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: object[]; updated_at?: string; }`\n\n**post** `/api/v2/batches`\n\nCreate a batch over a source directory and start processing asynchronously.\n\n### Parameters\n\n- `config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }`\n Batch configuration snapshot to apply to this source directory.\n - `job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }`\n Job to create for each file in the source directory.\n\n- `source_directory_id: string`\n Directory whose files should be processed.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }`\n A top-level batch.\n\nExample:\n {\n \"id\": \"bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"project_id\": \"prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"source_directory_id\": \"dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"config\": {\n \"job\": {\n \"type\": \"parse_v2\",\n \"configuration_id\": \"cfg-PARSE_AGENTIC\"\n }\n },\n \"status\": \"COMPLETED\",\n \"results\": [\n {\n \"source_directory_file_id\": \"dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"job_reference\": {\n \"type\": \"parse_v2\",\n \"id\": \"pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n },\n \"error_message\": null\n }\n ]\n }\n\nBatch-level ``FAILED`` means the orchestration failed and cannot provide a\nreliable per-file result set. ``results`` is only populated when explicitly\nrequested with ``expand=results`` and may be ``null`` while a batch is still\nrunning.\n\n - `id: string`\n - `config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }`\n - `project_id: string`\n - `source_directory_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'`\n - `created_at?: string`\n - `results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst batch = await client.batches.create({\n config: { job: { configuration_id: 'cfg-PARSE_AGENTIC', type: 'parse_v2' } },\n source_directory_id: 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',\n});\n\nconsole.log(batch);\n```", perLanguage: { typescript: { method: 'client.batches.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.create({\n config: { job: { configuration_id: 'cfg-PARSE_AGENTIC', type: 'parse_v2' } },\n source_directory_id: 'dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',\n});\n\nconsole.log(batch.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/batches \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "config": {\n "job": {\n "configuration_id": "cfg-PARSE_AGENTIC",\n "type": "parse_v2"\n }\n },\n "source_directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"\n }\'', }, python: { method: 'batches.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nbatch = client.batches.create(\n config={\n "job": {\n "configuration_id": "cfg-PARSE_AGENTIC",\n "type": "parse_v2",\n }\n },\n source_directory_id="dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n)\nprint(batch.id)', }, java: { method: 'batches().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.batches.BatchCreateParams;\nimport com.llamacloud_prod.api.models.batches.BatchCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchCreateParams params = BatchCreateParams.builder()\n .config(BatchCreateParams.Config.builder()\n .job(BatchCreateParams.Config.Job.builder()\n .configurationId("cfg-PARSE_AGENTIC")\n .type(BatchCreateParams.Config.Job.Type.PARSE_V2)\n .build())\n .build())\n .sourceDirectoryId("dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")\n .build();\n BatchCreateResponse batch = client.batches().create(params);\n }\n}', }, go: { method: 'client.Batches.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tbatch, err := client.Batches.New(context.TODO(), llamacloudprod.BatchNewParams{\n\t\tConfig: llamacloudprod.BatchNewParamsConfig{\n\t\t\tJob: llamacloudprod.BatchNewParamsConfigJob{\n\t\t\t\tConfigurationID: "cfg-PARSE_AGENTIC",\n\t\t\t\tType: llamacloudprod.BatchNewParamsConfigJobTypeParseV2,\n\t\t\t},\n\t\t},\n\t\tSourceDirectoryID: "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", batch.ID)\n}\n', }, cli: { method: 'batches create', example: "llamacloud-prod batches create \\\n --api-key 'My API Key' \\\n --config '{job: {configuration_id: cfg-PARSE_AGENTIC, type: parse_v2}}' \\\n --source-directory-id dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", }, }, }, { name: 'list', endpoint: '/api/v2/batches', httpMethod: 'get', summary: 'List Batches', description: 'List batches for the current project.', stainlessPath: '(resource) batches > (method) list', qualified: 'client.batches.list', params: [ 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', 'source_directory_id?: string;', "status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED';", ], response: "{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }", markdown: "## list\n\n`client.batches.list(created_at_on_or_after?: string, created_at_on_or_before?: string, organization_id?: string, page_size?: number, page_token?: string, project_id?: string, source_directory_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'): { id: string; config: object; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: object[]; updated_at?: string; }`\n\n**get** `/api/v2/batches`\n\nList batches for the current project.\n\n### Parameters\n\n- `created_at_on_or_after?: string`\n\n- `created_at_on_or_before?: string`\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `source_directory_id?: string`\n\n- `status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'`\n\n### Returns\n\n- `{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }`\n A top-level batch.\n\nExample:\n {\n \"id\": \"bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"project_id\": \"prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"source_directory_id\": \"dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"config\": {\n \"job\": {\n \"type\": \"parse_v2\",\n \"configuration_id\": \"cfg-PARSE_AGENTIC\"\n }\n },\n \"status\": \"COMPLETED\",\n \"results\": [\n {\n \"source_directory_file_id\": \"dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"job_reference\": {\n \"type\": \"parse_v2\",\n \"id\": \"pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n },\n \"error_message\": null\n }\n ]\n }\n\nBatch-level ``FAILED`` means the orchestration failed and cannot provide a\nreliable per-file result set. ``results`` is only populated when explicitly\nrequested with ``expand=results`` and may be ``null`` while a batch is still\nrunning.\n\n - `id: string`\n - `config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }`\n - `project_id: string`\n - `source_directory_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'`\n - `created_at?: string`\n - `results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const batchListResponse of client.batches.list()) {\n console.log(batchListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.batches.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const batchListResponse of client.batches.list()) {\n console.log(batchListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/batches \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'batches.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.batches.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'batches().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.batches.BatchListPage;\nimport com.llamacloud_prod.api.models.batches.BatchListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchListPage page = client.batches().list();\n }\n}', }, go: { method: 'client.Batches.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Batches.List(context.TODO(), llamacloudprod.BatchListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'batches list', example: "llamacloud-prod batches list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v2/batches/{batch_id}', httpMethod: 'get', summary: 'Get Batch', description: 'Get a batch by ID.', stainlessPath: '(resource) batches > (method) get', qualified: 'client.batches.get', params: ['batch_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }", markdown: "## get\n\n`client.batches.get(batch_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; config: object; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: object[]; updated_at?: string; }`\n\n**get** `/api/v2/batches/{batch_id}`\n\nGet a batch by ID.\n\n### Parameters\n\n- `batch_id: string`\n\n- `expand?: string[]`\n Fields to expand. Supported value: results.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }; project_id: string; source_directory_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'; created_at?: string; results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]; updated_at?: string; }`\n A top-level batch.\n\nExample:\n {\n \"id\": \"bat-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"project_id\": \"prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"source_directory_id\": \"dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"config\": {\n \"job\": {\n \"type\": \"parse_v2\",\n \"configuration_id\": \"cfg-PARSE_AGENTIC\"\n }\n },\n \"status\": \"COMPLETED\",\n \"results\": [\n {\n \"source_directory_file_id\": \"dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\",\n \"job_reference\": {\n \"type\": \"parse_v2\",\n \"id\": \"pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee\"\n },\n \"error_message\": null\n }\n ]\n }\n\nBatch-level ``FAILED`` means the orchestration failed and cannot provide a\nreliable per-file result set. ``results`` is only populated when explicitly\nrequested with ``expand=results`` and may be ``null`` while a batch is still\nrunning.\n\n - `id: string`\n - `config: { job: { configuration_id: string; type: 'parse_v2' | 'extract_v2'; }; }`\n - `project_id: string`\n - `source_directory_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'`\n - `created_at?: string`\n - `results?: { source_directory_file_id: string; error_message?: string; job_reference?: { id: string; type: 'parse_v2' | 'extract_v2'; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst batch = await client.batches.get('batch_id');\n\nconsole.log(batch);\n```", perLanguage: { typescript: { method: 'client.batches.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.batches.get('batch_id');\n\nconsole.log(batch.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/batches/$BATCH_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'batches.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nbatch = client.batches.get(\n batch_id="batch_id",\n)\nprint(batch.id)', }, java: { method: 'batches().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.batches.BatchGetParams;\nimport com.llamacloud_prod.api.models.batches.BatchGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchGetResponse batch = client.batches().get("batch_id");\n }\n}', }, go: { method: 'client.Batches.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tbatch, err := client.Batches.Get(\n\t\tcontext.TODO(),\n\t\t"batch_id",\n\t\tllamacloudprod.BatchGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", batch.ID)\n}\n', }, cli: { method: 'batches get', example: "llamacloud-prod batches get \\\n --api-key 'My API Key' \\\n --batch-id batch_id", }, }, }, { name: 'create', endpoint: '/api/v2/classify', httpMethod: 'post', summary: 'Create Classify Job', description: 'Create a classify job.\n\nClassifies a document against a set of rules. Set `file_input`\nto a file ID (`dfl-...`) or parse job ID (`pjb-...`), and provide\neither inline `configuration` with rules or a `configuration_id`\nreferencing a saved preset.\n\nEach rule has a `type` (the label to assign) and a `description`\n(natural language criteria). The classifier returns the best\nmatching rule with a confidence score.\n\nThe job runs asynchronously. Poll `GET /classify/{job_id}` to\ncheck status and retrieve results.', stainlessPath: '(resource) classify > (method) create', qualified: 'client.classify.create', params: [ 'organization_id?: string;', 'project_id?: string;', "configuration?: { rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; };", 'configuration_id?: string;', 'file_id?: string;', 'file_input?: string;', 'parse_job_id?: string;', 'transaction_id?: string;', 'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[];', ], response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }", markdown: "## create\n\n`client.classify.create(organization_id?: string, project_id?: string, configuration?: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }, configuration_id?: string, file_id?: string, file_input?: string, parse_job_id?: string, transaction_id?: string, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]): { id: string; configuration: classify_configuration; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: classify_result; transaction_id?: string; updated_at?: string; }`\n\n**post** `/api/v2/classify`\n\nCreate a classify job.\n\nClassifies a document against a set of rules. Set `file_input`\nto a file ID (`dfl-...`) or parse job ID (`pjb-...`), and provide\neither inline `configuration` with rules or a `configuration_id`\nreferencing a saved preset.\n\nEach rule has a `type` (the label to assign) and a `description`\n(natural language criteria). The classifier returns the best\nmatching rule with a confidence score.\n\nThe job runs asynchronously. Poll `GET /classify/{job_id}` to\ncheck status and retrieve results.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `configuration?: { rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; }`\n Configuration for a classify job.\n - `rules: { description: string; type: string; }[]`\n Classify rules to evaluate against the document (at least one required)\n - `mode?: 'FAST'`\n Classify execution mode\n - `parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }`\n Parsing configuration for classify jobs.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `file_id?: string`\n Deprecated: use file_input instead\n\n- `file_input?: string`\n File ID or parse job ID to classify\n\n- `parse_job_id?: string`\n Deprecated: use file_input instead\n\n- `transaction_id?: string`\n Idempotency key scoped to the project. Reusing a key returns the original job; the new request body is ignored.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n\n### Returns\n\n- `{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }`\n Response for a classify job.\n\n - `id: string`\n - `configuration: { rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `parse_job_id?: string`\n - `result?: { confidence: number; reasoning: string; type: string; }`\n - `transaction_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst classify = await client.classify.create();\n\nconsole.log(classify);\n```", perLanguage: { typescript: { method: 'client.classify.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst classify = await client.classify.create();\n\nconsole.log(classify.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/classify \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "configuration_id": "cfg-11111111-2222-3333-4444-555555555555",\n "file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "file_input": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "parse_job_id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "transaction_id": "tx-unique-idempotency-key"\n }\'', }, python: { method: 'classify.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclassify = client.classify.create()\nprint(classify.id)', }, java: { method: 'classify().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classify.ClassifyCreateRequest;\nimport com.llamacloud_prod.api.models.classify.ClassifyCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ClassifyCreateRequest params = ClassifyCreateRequest.builder().build();\n ClassifyCreateResponse classify = client.classify().create(params);\n }\n}', }, go: { method: 'client.Classify.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tclassify, err := client.Classify.New(context.TODO(), llamacloudprod.ClassifyNewParams{\n\t\tClassifyCreateRequest: llamacloudprod.ClassifyCreateRequestParam{},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", classify.ID)\n}\n', }, cli: { method: 'classify create', example: "llamacloud-prod classify create \\\n --api-key 'My API Key'", }, }, }, { name: 'list', endpoint: '/api/v2/classify', httpMethod: 'get', summary: 'List Classify Jobs', description: 'List classify jobs with optional filtering and pagination.\n\nFilter by `status`, `configuration_id`, specific `job_ids`,\nor creation date range.', stainlessPath: '(resource) classify > (method) list', qualified: 'client.classify.list', params: [ 'configuration_id?: string;', 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';", ], response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }", markdown: "## list\n\n`client.classify.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'): { id: string; configuration: classify_configuration; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: classify_result; transaction_id?: string; updated_at?: string; }`\n\n**get** `/api/v2/classify`\n\nList classify jobs with optional filtering and pagination.\n\nFilter by `status`, `configuration_id`, specific `job_ids`,\nor creation date range.\n\n### Parameters\n\n- `configuration_id?: string`\n Filter by configuration ID\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page\n\n- `page_token?: string`\n Token for pagination\n\n- `project_id?: string`\n\n- `status?: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n Filter by job status\n\n### Returns\n\n- `{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }`\n Response for a classify job.\n\n - `id: string`\n - `configuration: { rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `parse_job_id?: string`\n - `result?: { confidence: number; reasoning: string; type: string; }`\n - `transaction_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const classifyListResponse of client.classify.list()) {\n console.log(classifyListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.classify.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const classifyListResponse of client.classify.list()) {\n console.log(classifyListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/classify \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'classify.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.classify.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'classify().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classify.ClassifyListPage;\nimport com.llamacloud_prod.api.models.classify.ClassifyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ClassifyListPage page = client.classify().list();\n }\n}', }, go: { method: 'client.Classify.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Classify.List(context.TODO(), llamacloudprod.ClassifyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'classify list', example: "llamacloud-prod classify list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v2/classify/{job_id}', httpMethod: 'get', summary: 'Get Classify Job', description: 'Get a classify job by ID.\n\nReturns the job status, configuration, and classify result\nwhen complete. The result includes the matched document type,\nconfidence score, and reasoning.', stainlessPath: '(resource) classify > (method) get', qualified: 'client.classify.get', params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }", markdown: "## get\n\n`client.classify.get(job_id: string, organization_id?: string, project_id?: string): { id: string; configuration: classify_configuration; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: classify_result; transaction_id?: string; updated_at?: string; }`\n\n**get** `/api/v2/classify/{job_id}`\n\nGet a classify job by ID.\n\nReturns the job status, configuration, and classify result\nwhen complete. The result includes the matched document type,\nconfidence score, and reasoning.\n\n### Parameters\n\n- `job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; parse_job_id?: string; result?: { confidence: number; reasoning: string; type: string; }; transaction_id?: string; updated_at?: string; }`\n Response for a classify job.\n\n - `id: string`\n - `configuration: { rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `parse_job_id?: string`\n - `result?: { confidence: number; reasoning: string; type: string; }`\n - `transaction_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst classify = await client.classify.get('job_id');\n\nconsole.log(classify);\n```", perLanguage: { typescript: { method: 'client.classify.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst classify = await client.classify.get('job_id');\n\nconsole.log(classify.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v2/classify/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'classify.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclassify = client.classify.get(\n job_id="job_id",\n)\nprint(classify.id)', }, java: { method: 'classify().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.classify.ClassifyGetParams;\nimport com.llamacloud_prod.api.models.classify.ClassifyGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ClassifyGetResponse classify = client.classify().get("job_id");\n }\n}', }, go: { method: 'client.Classify.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tclassify, err := client.Classify.Get(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.ClassifyGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", classify.ID)\n}\n', }, cli: { method: 'classify get', example: "llamacloud-prod classify get \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'create', endpoint: '/api/v1/beta/configurations', httpMethod: 'post', summary: 'Create Configuration', description: 'Upsert a product configuration; updates if one with the same name + product type + project exists, otherwise creates.', stainlessPath: '(resource) configurations > (method) create', qualified: 'client.configurations.create', params: [ 'name: string;', "parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; };", 'organization_id?: string;', 'project_id?: string;', ], response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | object; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }", markdown: "## create\n\n`client.configurations.create(name: string, parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }, organization_id?: string, project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**post** `/api/v1/beta/configurations`\n\nUpsert a product configuration; updates if one with the same name + product type + project exists, otherwise creates.\n\n### Parameters\n\n- `name: string`\n Human-readable name for this configuration.\n\n- `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n Product-specific configuration parameters.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n Response schema for a single product configuration.\n\n - `id: string`\n - `name: string`\n - `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n - `product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'`\n - `version: string`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst configurationResponse = await client.configurations.create({\n name: 'x',\n parameters: { product_type: 'classify_v2', rules: [{ description: 'contains invoice number, line items, and total amount', type: 'invoice' }] },\n});\n\nconsole.log(configurationResponse);\n```", perLanguage: { typescript: { method: 'client.configurations.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst configurationResponse = await client.configurations.create({\n name: 'x',\n parameters: {\n product_type: 'classify_v2',\n rules: [\n { description: 'contains invoice number, line items, and total amount', type: 'invoice' },\n ],\n },\n});\n\nconsole.log(configurationResponse.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/configurations \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x",\n "parameters": {\n "product_type": "classify_v2",\n "rules": [\n {\n "description": "contains invoice number, line items, and total amount",\n "type": "invoice"\n }\n ]\n }\n }\'', }, python: { method: 'configurations.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nconfiguration_response = client.configurations.create(\n name="x",\n parameters={\n "product_type": "classify_v2",\n "rules": [{\n "description": "contains invoice number, line items, and total amount",\n "type": "invoice",\n }],\n },\n)\nprint(configuration_response.id)', }, java: { method: 'configurations().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ClassifyV2Parameters;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationCreate;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationResponse;\nimport java.util.List;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ConfigurationCreate params = ConfigurationCreate.builder()\n .name("x")\n .classifyV2Parameters(List.of(ClassifyV2Parameters.Rule.builder()\n .description("contains invoice number, line items, and total amount")\n .type("invoice")\n .build()))\n .build();\n ConfigurationResponse configurationResponse = client.configurations().create(params);\n }\n}', }, go: { method: 'client.Configurations.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconfigurationResponse, err := client.Configurations.New(context.TODO(), llamacloudprod.ConfigurationNewParams{\n\t\tConfigurationCreate: llamacloudprod.ConfigurationCreateParam{\n\t\t\tName: "x",\n\t\t\tParameters: llamacloudprod.ConfigurationCreateParametersUnionParam{\n\t\t\t\tOfClassifyV2: &llamacloudprod.ClassifyV2Parameters{\n\t\t\t\t\tRules: []llamacloudprod.ClassifyV2ParametersRule{{\n\t\t\t\t\t\tDescription: "contains invoice number, line items, and total amount",\n\t\t\t\t\t\tType: "invoice",\n\t\t\t\t\t}},\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", configurationResponse.ID)\n}\n', }, cli: { method: 'configurations create', example: "llamacloud-prod configurations create \\\n --api-key 'My API Key' \\\n --name x \\\n --parameters \"{product_type: classify_v2, rules: [{description: 'contains invoice number, line items, and total amount', type: invoice}]}\"", }, }, }, { name: 'list', endpoint: '/api/v1/beta/configurations', httpMethod: 'get', summary: 'List Configurations', description: 'List product configurations for the current project.', stainlessPath: '(resource) configurations > (method) list', qualified: 'client.configurations.list', params: [ 'latest_only?: boolean;', 'name?: string;', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', "product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[];", 'project_id?: string;', ], response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | object; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }", markdown: "## list\n\n`client.configurations.list(latest_only?: boolean, name?: string, organization_id?: string, page_size?: number, page_token?: string, product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[], project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations`\n\nList product configurations for the current project.\n\n### Parameters\n\n- `latest_only?: boolean`\n Return only the latest version per configuration name.\n\n- `name?: string`\n Filter by configuration name.\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page.\n\n- `page_token?: string`\n Pagination token.\n\n- `product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[]`\n Filter by one or more product types. Repeat the parameter for multiple values.\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n Response schema for a single product configuration.\n\n - `id: string`\n - `name: string`\n - `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n - `product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'`\n - `version: string`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const configurationResponse of client.configurations.list()) {\n console.log(configurationResponse);\n}\n```", perLanguage: { typescript: { method: 'client.configurations.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const configurationResponse of client.configurations.list()) {\n console.log(configurationResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/configurations \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'configurations.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.configurations.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'configurations().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationListPage;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ConfigurationListPage page = client.configurations().list();\n }\n}', }, go: { method: 'client.Configurations.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Configurations.List(context.TODO(), llamacloudprod.ConfigurationListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'configurations list', example: "llamacloud-prod configurations list \\\n --api-key 'My API Key'", }, }, }, { name: 'retrieve', endpoint: '/api/v1/beta/configurations/{config_id}', httpMethod: 'get', summary: 'Get Configuration', description: 'Get a single product configuration by ID.', stainlessPath: '(resource) configurations > (method) retrieve', qualified: 'client.configurations.retrieve', params: ['config_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | object; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }", markdown: "## retrieve\n\n`client.configurations.retrieve(config_id: string, organization_id?: string, project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations/{config_id}`\n\nGet a single product configuration by ID.\n\n### Parameters\n\n- `config_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n Response schema for a single product configuration.\n\n - `id: string`\n - `name: string`\n - `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n - `product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'`\n - `version: string`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst configurationResponse = await client.configurations.retrieve('config_id');\n\nconsole.log(configurationResponse);\n```", perLanguage: { typescript: { method: 'client.configurations.retrieve', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst configurationResponse = await client.configurations.retrieve('config_id');\n\nconsole.log(configurationResponse.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/configurations/$CONFIG_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'configurations.retrieve', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nconfiguration_response = client.configurations.retrieve(\n config_id="config_id",\n)\nprint(configuration_response.id)', }, java: { method: 'configurations().retrieve', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationResponse;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationRetrieveParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ConfigurationResponse configurationResponse = client.configurations().retrieve("config_id");\n }\n}', }, go: { method: 'client.Configurations.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconfigurationResponse, err := client.Configurations.Get(\n\t\tcontext.TODO(),\n\t\t"config_id",\n\t\tllamacloudprod.ConfigurationGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", configurationResponse.ID)\n}\n', }, cli: { method: 'configurations retrieve', example: "llamacloud-prod configurations retrieve \\\n --api-key 'My API Key' \\\n --config-id config_id", }, }, }, { name: 'update', endpoint: '/api/v1/beta/configurations/{config_id}', httpMethod: 'put', summary: 'Update Configuration', description: 'Update an existing product configuration.', stainlessPath: '(resource) configurations > (method) update', qualified: 'client.configurations.update', params: [ 'config_id: string;', 'organization_id?: string;', 'project_id?: string;', 'name?: string;', "parameters?: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; };", ], response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | object; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }", markdown: "## update\n\n`client.configurations.update(config_id: string, organization_id?: string, project_id?: string, name?: string, parameters?: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**put** `/api/v1/beta/configurations/{config_id}`\n\nUpdate an existing product configuration.\n\n### Parameters\n\n- `config_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `name?: string`\n Updated name (omit to leave unchanged).\n\n- `parameters?: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n Updated parameters (omit to leave unchanged).\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: object; client_name?: string; crop_box?: object; disable_cache?: boolean; fast_options?: object; input_options?: object; output_options?: object; page_ranges?: object; processing_control?: object; processing_options?: object; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; splitting_strategy?: object; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n Response schema for a single product configuration.\n\n - `id: string`\n - `name: string`\n - `parameters: { product_type: 'classify_v2'; rules: { description: string; type: string; }[]; mode?: 'FAST'; parsing_configuration?: { lang?: string; max_pages?: number; target_pages?: string; }; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: string; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'cost_effective'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-06-18' | '2025-12-11' | string; agentic_options?: { custom_prompt?: string; }; client_name?: string; crop_box?: { bottom?: number; left?: number; right?: number; top?: number; }; disable_cache?: boolean; fast_options?: object; input_options?: { html?: { make_all_elements_visible?: boolean; remove_fixed_elements?: boolean; remove_navigation_elements?: boolean; }; image?: { camera_photo_correction?: boolean; }; pdf?: object; presentation?: { out_of_bounds_content?: boolean; skip_embedded_data?: boolean; }; spreadsheet?: { detect_sub_tables_in_sheets?: boolean; force_formula_computation_in_sheets?: boolean; include_hidden_sheets?: boolean; }; }; output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_links?: boolean; inline_images?: boolean; tables?: object; }; spatial_text?: { do_not_unroll_columns?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; }; tables_as_spreadsheet?: { enable?: boolean; guess_sheet_name?: boolean; }; }; page_ranges?: { max_pages?: number; target_pages?: string; }; processing_control?: { job_failure_conditions?: { allowed_page_failure_ratio?: number; fail_on_buggy_font?: boolean; fail_on_image_extraction_error?: boolean; fail_on_image_ocr_error?: boolean; fail_on_markdown_reconstruction_error?: boolean; }; timeouts?: { base_in_seconds?: number; extra_time_per_page_in_seconds?: number; }; }; processing_options?: { aggressive_table_extraction?: boolean; auto_mode_configuration?: { parsing_conf: object; filename_match_glob?: string; filename_match_glob_list?: string[]; filename_regexp?: string; filename_regexp_mode?: string; full_page_image_in_page?: boolean; full_page_image_in_page_threshold?: number | string; image_in_page?: boolean; layout_element_in_page?: string; layout_element_in_page_confidence_threshold?: number | string; page_contains_at_least_n_charts?: number | string; page_contains_at_least_n_images?: number | string; page_contains_at_least_n_layout_elements?: number | string; page_contains_at_least_n_lines?: number | string; page_contains_at_least_n_links?: number | string; page_contains_at_least_n_numbers?: number | string; page_contains_at_least_n_percent_numbers?: number | string; page_contains_at_least_n_tables?: number | string; page_contains_at_least_n_words?: number | string; page_contains_at_most_n_charts?: number | string; page_contains_at_most_n_images?: number | string; page_contains_at_most_n_layout_elements?: number | string; page_contains_at_most_n_lines?: number | string; page_contains_at_most_n_links?: number | string; page_contains_at_most_n_numbers?: number | string; page_contains_at_most_n_percent_numbers?: number | string; page_contains_at_most_n_tables?: number | string; page_contains_at_most_n_words?: number | string; page_longer_than_n_chars?: number | string; page_md_error?: boolean; page_shorter_than_n_chars?: number | string; regexp_in_page?: string; regexp_in_page_mode?: string; table_in_page?: boolean; text_in_page?: string; trigger_mode?: string; }[]; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; ignore?: { ignore_diagonal_text?: boolean; ignore_hidden_text?: boolean; ignore_text_in_image?: boolean; }; ocr_parameters?: { languages?: parsing_languages[]; }; specialized_chart_parsing?: 'agentic' | 'agentic_plus' | 'efficient'; }; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; } | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; }`\n - `product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'`\n - `version: string`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst configurationResponse = await client.configurations.update('config_id');\n\nconsole.log(configurationResponse);\n```", perLanguage: { typescript: { method: 'client.configurations.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst configurationResponse = await client.configurations.update('config_id');\n\nconsole.log(configurationResponse.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/configurations/$CONFIG_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'configurations.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nconfiguration_response = client.configurations.update(\n config_id="config_id",\n)\nprint(configuration_response.id)', }, java: { method: 'configurations().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationResponse;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ConfigurationResponse configurationResponse = client.configurations().update("config_id");\n }\n}', }, go: { method: 'client.Configurations.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tconfigurationResponse, err := client.Configurations.Update(\n\t\tcontext.TODO(),\n\t\t"config_id",\n\t\tllamacloudprod.ConfigurationUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", configurationResponse.ID)\n}\n', }, cli: { method: 'configurations update', example: "llamacloud-prod configurations update \\\n --api-key 'My API Key' \\\n --config-id config_id", }, }, }, { name: 'delete', endpoint: '/api/v1/beta/configurations/{config_id}', httpMethod: 'delete', summary: 'Delete Configuration', description: 'Delete a product configuration.', stainlessPath: '(resource) configurations > (method) delete', qualified: 'client.configurations.delete', params: ['config_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.configurations.delete(config_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/beta/configurations/{config_id}`\n\nDelete a product configuration.\n\n### Parameters\n\n- `config_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.configurations.delete('config_id')\n```", perLanguage: { typescript: { method: 'client.configurations.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.configurations.delete('config_id');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/configurations/$CONFIG_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'configurations.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.configurations.delete(\n config_id="config_id",\n)', }, java: { method: 'configurations().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.configurations.ConfigurationDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.configurations().delete("config_id");\n }\n}', }, go: { method: 'client.Configurations.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Configurations.Delete(\n\t\tcontext.TODO(),\n\t\t"config_id",\n\t\tllamacloudprod.ConfigurationDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'configurations delete', example: "llamacloud-prod configurations delete \\\n --api-key 'My API Key' \\\n --config-id config_id", }, }, }, { name: 'list', endpoint: '/api/v1/projects', httpMethod: 'get', summary: 'List Projects', description: 'List projects or get one by name', stainlessPath: '(resource) projects > (method) list', qualified: 'client.projects.list', params: ['organization_id?: string;', 'project_name?: string;'], response: '{ id: string; name: string; organization_id: string; created_at?: string; is_default?: boolean; updated_at?: string; }[]', markdown: "## list\n\n`client.projects.list(organization_id?: string, project_name?: string): object[]`\n\n**get** `/api/v1/projects`\n\nList projects or get one by name\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_name?: string`\n\n### Returns\n\n- `{ id: string; name: string; organization_id: string; created_at?: string; is_default?: boolean; updated_at?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst projects = await client.projects.list();\n\nconsole.log(projects);\n```", perLanguage: { typescript: { method: 'client.projects.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst projects = await client.projects.list();\n\nconsole.log(projects);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/projects \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'projects.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nprojects = client.projects.list()\nprint(projects)', }, java: { method: 'projects().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.projects.Project;\nimport com.llamacloud_prod.api.models.projects.ProjectListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List projects = client.projects().list();\n }\n}', }, go: { method: 'client.Projects.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tprojects, err := client.Projects.List(context.TODO(), llamacloudprod.ProjectListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", projects)\n}\n', }, cli: { method: 'projects list', example: "llamacloud-prod projects list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/projects/{project_id}', httpMethod: 'get', summary: 'Get Project', description: 'Get a project by ID.', stainlessPath: '(resource) projects > (method) get', qualified: 'client.projects.get', params: ['project_id: string;', 'organization_id?: string;'], response: '{ id: string; name: string; organization_id: string; created_at?: string; is_default?: boolean; updated_at?: string; }', markdown: "## get\n\n`client.projects.get(project_id: string, organization_id?: string): { id: string; name: string; organization_id: string; created_at?: string; is_default?: boolean; updated_at?: string; }`\n\n**get** `/api/v1/projects/{project_id}`\n\nGet a project by ID.\n\n### Parameters\n\n- `project_id: string`\n\n- `organization_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; organization_id: string; created_at?: string; is_default?: boolean; updated_at?: string; }`\n Schema for a project.\n\n - `id: string`\n - `name: string`\n - `organization_id: string`\n - `created_at?: string`\n - `is_default?: boolean`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst project = await client.projects.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(project);\n```", perLanguage: { typescript: { method: 'client.projects.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst project = await client.projects.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(project.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/projects/$PROJECT_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'projects.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nproject = client.projects.get(\n project_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(project.id)', }, java: { method: 'projects().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.projects.Project;\nimport com.llamacloud_prod.api.models.projects.ProjectGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Project project = client.projects().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Projects.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tproject, err := client.Projects.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.ProjectGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", project.ID)\n}\n', }, cli: { method: 'projects get', example: "llamacloud-prod projects get \\\n --api-key 'My API Key' \\\n --project-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/data-sinks', httpMethod: 'get', summary: 'List Data Sinks', description: 'List data sinks for a given project.', stainlessPath: '(resource) data_sinks > (method) list', qualified: 'client.dataSinks.list', params: ['organization_id?: string;', 'project_id?: string;'], response: "{ id: string; component: object | object | object | object | object | object | object | object; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }[]", markdown: "## list\n\n`client.dataSinks.list(organization_id?: string, project_id?: string): object[]`\n\n**get** `/api/v1/data-sinks`\n\nList data sinks for a given project.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; component: object | object | object | object | object | object | object | object; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSinks = await client.dataSinks.list();\n\nconsole.log(dataSinks);\n```", perLanguage: { typescript: { method: 'client.dataSinks.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSinks = await client.dataSinks.list();\n\nconsole.log(dataSinks);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sinks \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sinks.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_sinks = client.data_sinks.list()\nprint(data_sinks)', }, java: { method: 'dataSinks().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasinks.DataSink;\nimport com.llamacloud_prod.api.models.datasinks.DataSinkListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List dataSinks = client.dataSinks().list();\n }\n}', }, go: { method: 'client.DataSinks.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSinks, err := client.DataSinks.List(context.TODO(), llamacloudprod.DataSinkListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSinks)\n}\n', }, cli: { method: 'data_sinks list', example: "llamacloud-prod data-sinks list \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v1/data-sinks', httpMethod: 'post', summary: 'Create Data Sink', description: 'Create a new data sink.', stainlessPath: '(resource) data_sinks > (method) create', qualified: 'client.dataSinks.create', params: [ "component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; };", 'name: string;', "sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT';", 'organization_id?: string;', 'project_id?: string;', ], response: "{ id: string; component: object | object | object | object | object | object | object | object; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }", markdown: "## create\n\n`client.dataSinks.create(component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }, name: string, sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT', organization_id?: string, project_id?: string): { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n\n**post** `/api/v1/data-sinks`\n\nCreate a new data sink.\n\n### Parameters\n\n- `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n Component that implements the data sink\n\n- `name: string`\n The name of the data sink.\n\n- `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n Schema for a data sink.\n\n - `id: string`\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n - `name: string`\n - `project_id: string`\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSink = await client.dataSinks.create({\n component: { foo: 'bar' },\n name: 'name',\n sink_type: 'ASTRA_DB',\n});\n\nconsole.log(dataSink);\n```", perLanguage: { typescript: { method: 'client.dataSinks.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSink = await client.dataSinks.create({\n component: { foo: 'bar' },\n name: 'name',\n sink_type: 'ASTRA_DB',\n});\n\nconsole.log(dataSink.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sinks \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "component": {\n "foo": "bar"\n },\n "name": "name",\n "sink_type": "ASTRA_DB"\n }\'', }, python: { method: 'data_sinks.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_sink = client.data_sinks.create(\n component={\n "foo": "bar"\n },\n name="name",\n sink_type="ASTRA_DB",\n)\nprint(data_sink.id)', }, java: { method: 'dataSinks().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.datasinks.DataSink;\nimport com.llamacloud_prod.api.models.pipelines.DataSinkCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSinkCreate params = DataSinkCreate.builder()\n .component(DataSinkCreate.Component.UnionMember0.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .name("name")\n .sinkType(DataSinkCreate.SinkType.ASTRA_DB)\n .build();\n DataSink dataSink = client.dataSinks().create(params);\n }\n}', }, go: { method: 'client.DataSinks.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSink, err := client.DataSinks.New(context.TODO(), llamacloudprod.DataSinkNewParams{\n\t\tDataSinkCreate: llamacloudprod.DataSinkCreateParam{\n\t\t\tComponent: llamacloudprod.DataSinkCreateComponentUnionParam{\n\t\t\t\tOfAnyMap: map[string]any{\n\t\t\t\t\t"foo": "bar",\n\t\t\t\t},\n\t\t\t},\n\t\t\tName: "name",\n\t\t\tSinkType: llamacloudprod.DataSinkCreateSinkTypeAstraDB,\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSink.ID)\n}\n', }, cli: { method: 'data_sinks create', example: "llamacloud-prod data-sinks create \\\n --api-key 'My API Key' \\\n --component '{foo: bar}' \\\n --name name \\\n --sink-type ASTRA_DB", }, }, }, { name: 'get', endpoint: '/api/v1/data-sinks/{data_sink_id}', httpMethod: 'get', summary: 'Get Data Sink', description: 'Get a data sink by ID.', stainlessPath: '(resource) data_sinks > (method) get', qualified: 'client.dataSinks.get', params: ['data_sink_id: string;'], response: "{ id: string; component: object | object | object | object | object | object | object | object; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }", markdown: "## get\n\n`client.dataSinks.get(data_sink_id: string): { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/data-sinks/{data_sink_id}`\n\nGet a data sink by ID.\n\n### Parameters\n\n- `data_sink_id: string`\n\n### Returns\n\n- `{ id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n Schema for a data sink.\n\n - `id: string`\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n - `name: string`\n - `project_id: string`\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSink = await client.dataSinks.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dataSink);\n```", perLanguage: { typescript: { method: 'client.dataSinks.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSink = await client.dataSinks.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dataSink.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sinks/$DATA_SINK_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sinks.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_sink = client.data_sinks.get(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(data_sink.id)', }, java: { method: 'dataSinks().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasinks.DataSink;\nimport com.llamacloud_prod.api.models.datasinks.DataSinkGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSink dataSink = client.dataSinks().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.DataSinks.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSink, err := client.DataSinks.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSink.ID)\n}\n', }, cli: { method: 'data_sinks get', example: "llamacloud-prod data-sinks get \\\n --api-key 'My API Key' \\\n --data-sink-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'update', endpoint: '/api/v1/data-sinks/{data_sink_id}', httpMethod: 'put', summary: 'Update Data Sink', description: 'Update a data sink by ID.', stainlessPath: '(resource) data_sinks > (method) update', qualified: 'client.dataSinks.update', params: [ 'data_sink_id: string;', "sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT';", "component?: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; };", 'name?: string;', ], response: "{ id: string; component: object | object | object | object | object | object | object | object; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }", markdown: "## update\n\n`client.dataSinks.update(data_sink_id: string, sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT', component?: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }, name?: string): { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n\n**put** `/api/v1/data-sinks/{data_sink_id}`\n\nUpdate a data sink by ID.\n\n### Parameters\n\n- `data_sink_id: string`\n\n- `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n\n- `component?: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n Component that implements the data sink\n\n- `name?: string`\n The name of the data sink.\n\n### Returns\n\n- `{ id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n Schema for a data sink.\n\n - `id: string`\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n - `name: string`\n - `project_id: string`\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n - `created_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSink = await client.dataSinks.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { sink_type: 'ASTRA_DB' });\n\nconsole.log(dataSink);\n```", perLanguage: { typescript: { method: 'client.dataSinks.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSink = await client.dataSinks.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n sink_type: 'ASTRA_DB',\n});\n\nconsole.log(dataSink.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sinks/$DATA_SINK_ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "sink_type": "ASTRA_DB"\n }\'', }, python: { method: 'data_sinks.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_sink = client.data_sinks.update(\n data_sink_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n sink_type="ASTRA_DB",\n)\nprint(data_sink.id)', }, java: { method: 'dataSinks().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasinks.DataSink;\nimport com.llamacloud_prod.api.models.datasinks.DataSinkUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSinkUpdateParams params = DataSinkUpdateParams.builder()\n .dataSinkId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .sinkType(DataSinkUpdateParams.SinkType.ASTRA_DB)\n .build();\n DataSink dataSink = client.dataSinks().update(params);\n }\n}', }, go: { method: 'client.DataSinks.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSink, err := client.DataSinks.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.DataSinkUpdateParams{\n\t\t\tSinkType: llamacloudprod.DataSinkUpdateParamsSinkTypeAstraDB,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSink.ID)\n}\n', }, cli: { method: 'data_sinks update', example: "llamacloud-prod data-sinks update \\\n --api-key 'My API Key' \\\n --data-sink-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --sink-type ASTRA_DB", }, }, }, { name: 'delete', endpoint: '/api/v1/data-sinks/{data_sink_id}', httpMethod: 'delete', summary: 'Delete Data Sink', description: 'Delete a data sink by ID.', stainlessPath: '(resource) data_sinks > (method) delete', qualified: 'client.dataSinks.delete', params: ['data_sink_id: string;'], markdown: "## delete\n\n`client.dataSinks.delete(data_sink_id: string): void`\n\n**delete** `/api/v1/data-sinks/{data_sink_id}`\n\nDelete a data sink by ID.\n\n### Parameters\n\n- `data_sink_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.dataSinks.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.dataSinks.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.dataSinks.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sinks/$DATA_SINK_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sinks.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.data_sinks.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'dataSinks().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasinks.DataSinkDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.dataSinks().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.DataSinks.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.DataSinks.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'data_sinks delete', example: "llamacloud-prod data-sinks delete \\\n --api-key 'My API Key' \\\n --data-sink-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/data-sources', httpMethod: 'get', summary: 'List Data Sources', description: 'List data sources for a given project.\nIf project_id is not provided, uses the default project.', stainlessPath: '(resource) data_sources > (method) list', qualified: 'client.dataSources.list', params: ['organization_id?: string;', 'project_id?: string;'], response: '{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: object; }[]', markdown: "## list\n\n`client.dataSources.list(organization_id?: string, project_id?: string): object[]`\n\n**get** `/api/v1/data-sources`\n\nList data sources for a given project.\nIf project_id is not provided, uses the default project.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSources = await client.dataSources.list();\n\nconsole.log(dataSources);\n```", perLanguage: { typescript: { method: 'client.dataSources.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSources = await client.dataSources.list();\n\nconsole.log(dataSources);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sources \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sources.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_sources = client.data_sources.list()\nprint(data_sources)', }, java: { method: 'dataSources().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasources.DataSource;\nimport com.llamacloud_prod.api.models.datasources.DataSourceListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List dataSources = client.dataSources().list();\n }\n}', }, go: { method: 'client.DataSources.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSources, err := client.DataSources.List(context.TODO(), llamacloudprod.DataSourceListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSources)\n}\n', }, cli: { method: 'data_sources list', example: "llamacloud-prod data-sources list \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v1/data-sources', httpMethod: 'post', summary: 'Create Data Source', description: 'Create a new data source.', stainlessPath: '(resource) data_sources > (method) create', qualified: 'client.dataSources.create', params: [ "component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; };", 'name: string;', 'source_type: string;', 'organization_id?: string;', 'project_id?: string;', 'custom_metadata?: object;', ], response: '{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: object; }', markdown: "## create\n\n`client.dataSources.create(component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }, name: string, source_type: string, organization_id?: string, project_id?: string, custom_metadata?: object): { id: string; component: object | cloud_s3_data_source | cloud_az_storage_blob_data_source | cloud_google_drive_data_source | cloud_one_drive_data_source | cloud_sharepoint_data_source | cloud_slack_data_source | cloud_notion_page_data_source | cloud_confluence_data_source | cloud_jira_data_source | cloud_jira_data_source_v2 | cloud_box_data_source; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: data_source_reader_version_metadata; }`\n\n**post** `/api/v1/data-sources`\n\nCreate a new data source.\n\n### Parameters\n\n- `component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n Component that implements the data source\n\n- `name: string`\n The name of the data source.\n\n- `source_type: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `custom_metadata?: object`\n Custom metadata that will be present on all data loaded from the data source\n\n### Returns\n\n- `{ id: string; component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }; }`\n Schema for a data source.\n\n - `id: string`\n - `component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n - `name: string`\n - `project_id: string`\n - `source_type: string`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `updated_at?: string`\n - `version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSource = await client.dataSources.create({\n component: { foo: 'bar' },\n name: 'name',\n source_type: 'AZURE_STORAGE_BLOB',\n});\n\nconsole.log(dataSource);\n```", perLanguage: { typescript: { method: 'client.dataSources.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSource = await client.dataSources.create({\n component: { foo: 'bar' },\n name: 'name',\n source_type: 'AZURE_STORAGE_BLOB',\n});\n\nconsole.log(dataSource.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sources \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "component": {\n "foo": "bar"\n },\n "name": "name",\n "source_type": "AZURE_STORAGE_BLOB"\n }\'', }, python: { method: 'data_sources.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_source = client.data_sources.create(\n component={\n "foo": "bar"\n },\n name="name",\n source_type="AZURE_STORAGE_BLOB",\n)\nprint(data_source.id)', }, java: { method: 'dataSources().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.datasources.DataSource;\nimport com.llamacloud_prod.api.models.datasources.DataSourceCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceCreateParams params = DataSourceCreateParams.builder()\n .component(DataSourceCreateParams.Component.UnionMember0.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .name("name")\n .sourceType(DataSourceCreateParams.SourceType.AZURE_STORAGE_BLOB)\n .build();\n DataSource dataSource = client.dataSources().create(params);\n }\n}', }, go: { method: 'client.DataSources.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSource, err := client.DataSources.New(context.TODO(), llamacloudprod.DataSourceNewParams{\n\t\tComponent: llamacloudprod.DataSourceNewParamsComponentUnion{\n\t\t\tOfAnyMap: map[string]any{\n\t\t\t\t"foo": "bar",\n\t\t\t},\n\t\t},\n\t\tName: "name",\n\t\tSourceType: llamacloudprod.DataSourceNewParamsSourceTypeAzureStorageBlob,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSource.ID)\n}\n', }, cli: { method: 'data_sources create', example: "llamacloud-prod data-sources create \\\n --api-key 'My API Key' \\\n --component '{foo: bar}' \\\n --name name \\\n --source-type AZURE_STORAGE_BLOB", }, }, }, { name: 'get', endpoint: '/api/v1/data-sources/{data_source_id}', httpMethod: 'get', summary: 'Get Data Source', description: 'Get a data source by ID.', stainlessPath: '(resource) data_sources > (method) get', qualified: 'client.dataSources.get', params: ['data_source_id: string;'], response: '{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: object; }', markdown: "## get\n\n`client.dataSources.get(data_source_id: string): { id: string; component: object | cloud_s3_data_source | cloud_az_storage_blob_data_source | cloud_google_drive_data_source | cloud_one_drive_data_source | cloud_sharepoint_data_source | cloud_slack_data_source | cloud_notion_page_data_source | cloud_confluence_data_source | cloud_jira_data_source | cloud_jira_data_source_v2 | cloud_box_data_source; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: data_source_reader_version_metadata; }`\n\n**get** `/api/v1/data-sources/{data_source_id}`\n\nGet a data source by ID.\n\n### Parameters\n\n- `data_source_id: string`\n\n### Returns\n\n- `{ id: string; component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }; }`\n Schema for a data source.\n\n - `id: string`\n - `component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n - `name: string`\n - `project_id: string`\n - `source_type: string`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `updated_at?: string`\n - `version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSource = await client.dataSources.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dataSource);\n```", perLanguage: { typescript: { method: 'client.dataSources.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSource = await client.dataSources.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(dataSource.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sources/$DATA_SOURCE_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sources.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_source = client.data_sources.get(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(data_source.id)', }, java: { method: 'dataSources().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasources.DataSource;\nimport com.llamacloud_prod.api.models.datasources.DataSourceGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSource dataSource = client.dataSources().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.DataSources.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSource, err := client.DataSources.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSource.ID)\n}\n', }, cli: { method: 'data_sources get', example: "llamacloud-prod data-sources get \\\n --api-key 'My API Key' \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'update', endpoint: '/api/v1/data-sources/{data_source_id}', httpMethod: 'put', summary: 'Update Data Source', description: 'Update a data source by ID.', stainlessPath: '(resource) data_sources > (method) update', qualified: 'client.dataSources.update', params: [ 'data_source_id: string;', 'source_type: string;', "component?: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; };", 'custom_metadata?: object;', 'name?: string;', ], response: '{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: object; }', markdown: "## update\n\n`client.dataSources.update(data_source_id: string, source_type: string, component?: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }, custom_metadata?: object, name?: string): { id: string; component: object | cloud_s3_data_source | cloud_az_storage_blob_data_source | cloud_google_drive_data_source | cloud_one_drive_data_source | cloud_sharepoint_data_source | cloud_slack_data_source | cloud_notion_page_data_source | cloud_confluence_data_source | cloud_jira_data_source | cloud_jira_data_source_v2 | cloud_box_data_source; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: data_source_reader_version_metadata; }`\n\n**put** `/api/v1/data-sources/{data_source_id}`\n\nUpdate a data source by ID.\n\n### Parameters\n\n- `data_source_id: string`\n\n- `source_type: string`\n\n- `component?: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n Component that implements the data source\n\n- `custom_metadata?: object`\n Custom metadata that will be present on all data loaded from the data source\n\n- `name?: string`\n The name of the data source.\n\n### Returns\n\n- `{ id: string; component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }; name: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; updated_at?: string; version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }; }`\n Schema for a data source.\n\n - `id: string`\n - `component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n - `name: string`\n - `project_id: string`\n - `source_type: string`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `updated_at?: string`\n - `version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst dataSource = await client.dataSources.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { source_type: 'AZURE_STORAGE_BLOB' });\n\nconsole.log(dataSource);\n```", perLanguage: { typescript: { method: 'client.dataSources.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst dataSource = await client.dataSources.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n source_type: 'AZURE_STORAGE_BLOB',\n});\n\nconsole.log(dataSource.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sources/$DATA_SOURCE_ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "source_type": "AZURE_STORAGE_BLOB"\n }\'', }, python: { method: 'data_sources.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndata_source = client.data_sources.update(\n data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n source_type="AZURE_STORAGE_BLOB",\n)\nprint(data_source.id)', }, java: { method: 'dataSources().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasources.DataSource;\nimport com.llamacloud_prod.api.models.datasources.DataSourceUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceUpdateParams params = DataSourceUpdateParams.builder()\n .dataSourceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .sourceType(DataSourceUpdateParams.SourceType.AZURE_STORAGE_BLOB)\n .build();\n DataSource dataSource = client.dataSources().update(params);\n }\n}', }, go: { method: 'client.DataSources.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdataSource, err := client.DataSources.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.DataSourceUpdateParams{\n\t\t\tSourceType: llamacloudprod.DataSourceUpdateParamsSourceTypeAzureStorageBlob,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", dataSource.ID)\n}\n', }, cli: { method: 'data_sources update', example: "llamacloud-prod data-sources update \\\n --api-key 'My API Key' \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --source-type AZURE_STORAGE_BLOB", }, }, }, { name: 'delete', endpoint: '/api/v1/data-sources/{data_source_id}', httpMethod: 'delete', summary: 'Delete Data Source', description: 'Delete a data source by ID.', stainlessPath: '(resource) data_sources > (method) delete', qualified: 'client.dataSources.delete', params: ['data_source_id: string;'], markdown: "## delete\n\n`client.dataSources.delete(data_source_id: string): void`\n\n**delete** `/api/v1/data-sources/{data_source_id}`\n\nDelete a data source by ID.\n\n### Parameters\n\n- `data_source_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.dataSources.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.dataSources.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.dataSources.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/data-sources/$DATA_SOURCE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'data_sources.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.data_sources.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'dataSources().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.datasources.DataSourceDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.dataSources().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.DataSources.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.DataSources.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'data_sources delete', example: "llamacloud-prod data-sources delete \\\n --api-key 'My API Key' \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/pipelines', httpMethod: 'get', summary: 'Search Pipelines', description: 'Search for pipelines by name, type, or project.', stainlessPath: '(resource) pipelines > (method) list', qualified: 'client.pipelines.list', params: [ 'organization_id?: string;', 'pipeline_name?: string;', "pipeline_type?: 'MANAGED' | 'PLAYGROUND';", 'project_id?: string;', 'project_name?: string;', ], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }[]", markdown: "## list\n\n`client.pipelines.list(organization_id?: string, pipeline_name?: string, pipeline_type?: 'MANAGED' | 'PLAYGROUND', project_id?: string, project_name?: string): object[]`\n\n**get** `/api/v1/pipelines`\n\nSearch for pipelines by name, type, or project.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `pipeline_name?: string`\n\n- `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n Enum for representing the type of a pipeline\n\n- `project_id?: string`\n\n- `project_name?: string`\n\n### Returns\n\n- `{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelines = await client.pipelines.list();\n\nconsole.log(pipelines);\n```", perLanguage: { typescript: { method: 'client.pipelines.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelines = await client.pipelines.list();\n\nconsole.log(pipelines);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipelines = client.pipelines.list()\nprint(pipelines)', }, java: { method: 'pipelines().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.PipelineListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List pipelines = client.pipelines().list();\n }\n}', }, go: { method: 'client.Pipelines.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelines, err := client.Pipelines.List(context.TODO(), llamacloudprod.PipelineListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelines)\n}\n', }, cli: { method: 'pipelines list', example: "llamacloud-prod pipelines list \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v1/pipelines', httpMethod: 'post', summary: 'Create Pipeline', description: 'Create a new managed ingestion pipeline.\n\nA pipeline connects data sources to a vector store for RAG.\nAfter creation, call `POST /pipelines/{id}/sync` to start\ningesting documents.', stainlessPath: '(resource) pipelines > (method) create', qualified: 'client.pipelines.create', params: [ 'name: string;', 'organization_id?: string;', 'project_id?: string;', "data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; };", 'data_sink_id?: string;', "embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; };", 'embedding_model_config_id?: string;', "llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; };", 'managed_pipeline_id?: string;', 'metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; };', "pipeline_type?: 'MANAGED' | 'PLAYGROUND';", "preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; };", "sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; };", 'status?: string;', "transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; };", ], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## create\n\n`client.pipelines.create(name: string, organization_id?: string, project_id?: string, data_sink?: { component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }, data_sink_id?: string, embedding_config?: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }, embedding_model_config_id?: string, llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }, managed_pipeline_id?: string, metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }, pipeline_type?: 'MANAGED' | 'PLAYGROUND', preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }, sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }, status?: string, transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**post** `/api/v1/pipelines`\n\nCreate a new managed ingestion pipeline.\n\nA pipeline connects data sources to a vector store for RAG.\nAfter creation, call `POST /pipelines/{id}/sync` to start\ningesting documents.\n\n### Parameters\n\n- `name: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }`\n Schema for creating a data sink.\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n Component that implements the data sink\n - `name: string`\n The name of the data sink.\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n\n- `data_sink_id?: string`\n Data sink ID. When provided instead of data_sink, the data sink will be looked up by ID.\n\n- `embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n\n- `embedding_model_config_id?: string`\n Embedding model config ID. When provided instead of embedding_config, the embedding model config will be looked up by ID.\n\n- `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n Settings that can be configured for how to use LlamaParse to parse files within a LlamaCloud pipeline.\n - `adaptive_long_table?: boolean`\n - `aggressive_table_extraction?: boolean`\n - `annotate_links?: boolean`\n - `auto_mode?: boolean`\n - `auto_mode_configuration_json?: string`\n - `auto_mode_trigger_on_image_in_page?: boolean`\n - `auto_mode_trigger_on_regexp_in_page?: string`\n - `auto_mode_trigger_on_table_in_page?: boolean`\n - `auto_mode_trigger_on_text_in_page?: string`\n - `azure_openai_api_version?: string`\n - `azure_openai_deployment_name?: string`\n - `azure_openai_endpoint?: string`\n - `azure_openai_key?: string`\n - `bbox_bottom?: number`\n - `bbox_left?: number`\n - `bbox_right?: number`\n - `bbox_top?: number`\n - `bounding_box?: string`\n - `compact_markdown_table?: boolean`\n - `complemental_formatting_instruction?: string`\n - `content_guideline_instruction?: string`\n - `continuous_mode?: boolean`\n - `disable_image_extraction?: boolean`\n - `disable_ocr?: boolean`\n - `disable_reconstruction?: boolean`\n - `do_not_cache?: boolean`\n - `do_not_unroll_columns?: boolean`\n - `enable_cost_optimizer?: boolean`\n - `extract_charts?: boolean`\n - `extract_layout?: boolean`\n - `extract_printed_page_number?: boolean`\n - `fast_mode?: boolean`\n - `formatting_instruction?: string`\n - `gpt4o_api_key?: string`\n - `gpt4o_mode?: boolean`\n - `guess_xlsx_sheet_name?: boolean`\n - `hide_footers?: boolean`\n - `hide_headers?: boolean`\n - `high_res_ocr?: boolean`\n - `html_make_all_elements_visible?: boolean`\n - `html_remove_fixed_elements?: boolean`\n - `html_remove_navigation_elements?: boolean`\n - `http_proxy?: string`\n - `ignore_document_elements_for_layout_detection?: boolean`\n - `images_to_save?: 'embedded' | 'layout' | 'screenshot'[]`\n - `inline_images_in_markdown?: boolean`\n - `input_s3_path?: string`\n - `input_s3_region?: string`\n - `input_url?: string`\n - `internal_is_screenshot_job?: boolean`\n - `invalidate_cache?: boolean`\n - `is_formatting_instruction?: boolean`\n - `job_timeout_extra_time_per_page_in_seconds?: number`\n - `job_timeout_in_seconds?: number`\n - `keep_page_separator_when_merging_tables?: boolean`\n - `languages?: string[]`\n - `layout_aware?: boolean`\n - `line_level_bounding_box?: boolean`\n - `markdown_table_multiline_header_separator?: string`\n - `max_pages?: number`\n - `max_pages_enforced?: number`\n - `merge_tables_across_pages_in_markdown?: boolean`\n - `model?: string`\n - `outlined_table_extraction?: boolean`\n - `output_pdf_of_document?: boolean`\n - `output_s3_path_prefix?: string`\n - `output_s3_region?: string`\n - `output_tables_as_HTML?: boolean`\n - `page_error_tolerance?: number`\n - `page_footer_prefix?: string`\n - `page_footer_suffix?: string`\n - `page_header_prefix?: string`\n - `page_header_suffix?: string`\n - `page_prefix?: string`\n - `page_separator?: string`\n - `page_suffix?: string`\n - `parse_mode?: string`\n Enum for representing the mode of parsing to be used.\n - `parsing_instruction?: string`\n - `precise_bounding_box?: boolean`\n - `premium_mode?: boolean`\n - `presentation_out_of_bounds_content?: boolean`\n - `presentation_skip_embedded_data?: boolean`\n - `preserve_layout_alignment_across_pages?: boolean`\n - `preserve_very_small_text?: boolean`\n - `preset?: string`\n - `priority?: 'critical' | 'high' | 'low' | 'medium'`\n The priority for the request. This field may be ignored or overwritten depending on the organization tier.\n - `project_id?: string`\n - `remove_hidden_text?: boolean`\n - `replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'`\n Enum for representing the different available page error handling modes.\n - `replace_failed_page_with_error_message_prefix?: string`\n - `replace_failed_page_with_error_message_suffix?: string`\n - `save_images?: boolean`\n - `skip_diagonal_text?: boolean`\n - `specialized_chart_parsing_agentic?: boolean`\n - `specialized_chart_parsing_efficient?: boolean`\n - `specialized_chart_parsing_plus?: boolean`\n - `specialized_image_parsing?: boolean`\n - `spreadsheet_extract_sub_tables?: boolean`\n - `spreadsheet_force_formula_computation?: boolean`\n - `spreadsheet_include_hidden_sheets?: boolean`\n - `strict_mode_buggy_font?: boolean`\n - `strict_mode_image_extraction?: boolean`\n - `strict_mode_image_ocr?: boolean`\n - `strict_mode_reconstruction?: boolean`\n - `structured_output?: boolean`\n - `structured_output_json_schema?: string`\n - `structured_output_json_schema_name?: string`\n - `system_prompt?: string`\n - `system_prompt_append?: string`\n - `take_screenshot?: boolean`\n - `target_pages?: string`\n - `tier?: string`\n - `use_vendor_multimodal_model?: boolean`\n - `user_prompt?: string`\n - `vendor_multimodal_api_key?: string`\n - `vendor_multimodal_model_name?: string`\n - `version?: string`\n - `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n - `webhook_url?: string`\n\n- `managed_pipeline_id?: string`\n The ID of the ManagedPipeline this playground pipeline is linked to.\n\n- `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n Metadata configuration for the pipeline.\n - `excluded_embed_metadata_keys?: string[]`\n List of metadata keys to exclude from embeddings\n - `excluded_llm_metadata_keys?: string[]`\n List of metadata keys to exclude from LLM during retrieval\n\n- `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n Type of pipeline. Either PLAYGROUND or MANAGED.\n\n- `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n Preset retrieval parameters for the pipeline.\n - `alpha?: number`\n Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.\n - `class_name?: string`\n - `dense_similarity_cutoff?: number`\n Minimum similarity score wrt query for retrieval\n - `dense_similarity_top_k?: number`\n Number of nodes for dense retrieval.\n - `enable_reranking?: boolean`\n Enable reranking for retrieval\n - `files_top_k?: number`\n Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).\n - `rerank_top_n?: number`\n Number of reranked nodes for returning.\n - `retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'`\n The retrieval mode for the query.\n - `retrieve_image_nodes?: boolean`\n Whether to retrieve image nodes.\n - `retrieve_page_figure_nodes?: boolean`\n Whether to retrieve page figure nodes.\n - `retrieve_page_screenshot_nodes?: boolean`\n Whether to retrieve page screenshot nodes.\n - `search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }`\n Metadata filters for vector stores.\n - `search_filters_inference_schema?: object`\n JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.\n - `sparse_similarity_top_k?: number`\n Number of nodes for sparse retrieval.\n\n- `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n Configuration for sparse embedding models used in hybrid search.\n\nThis allows users to choose between Splade and BM25 models for\nsparse retrieval in managed data sinks.\n - `class_name?: string`\n - `model_type?: 'auto' | 'bm25' | 'splade'`\n The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based on deployment mode (BYOC uses term frequency, Cloud uses Splade).\n\n- `status?: string`\n Status of the pipeline deployment.\n\n- `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n Configuration for the transformation.\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.create({ name: 'x' });\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.create({ name: 'x' });\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'pipelines.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.create(\n name="x",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.PipelineCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n PipelineCreate params = PipelineCreate.builder()\n .name("x")\n .build();\n Pipeline pipeline = client.pipelines().create(params);\n }\n}', }, go: { method: 'client.Pipelines.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.New(context.TODO(), llamacloudprod.PipelineNewParams{\n\t\tPipelineCreate: llamacloudprod.PipelineCreateParam{\n\t\t\tName: "x",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'pipelines create', example: "llamacloud-prod pipelines create \\\n --api-key 'My API Key' \\\n --name x", }, }, }, { name: 'get', endpoint: '/api/v1/pipelines/{pipeline_id}', httpMethod: 'get', summary: 'Get Pipeline', description: 'Get a pipeline by ID.', stainlessPath: '(resource) pipelines > (method) get', qualified: 'client.pipelines.get', params: ['pipeline_id: string;'], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## get\n\n`client.pipelines.get(pipeline_id: string): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}`\n\nGet a pipeline by ID.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.get(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.PipelineGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Pipeline pipeline = client.pipelines().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.Get(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'pipelines get', example: "llamacloud-prod pipelines get \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'update', endpoint: '/api/v1/pipelines/{pipeline_id}', httpMethod: 'put', summary: 'Update Existing Pipeline', description: "Update an existing pipeline's configuration.", stainlessPath: '(resource) pipelines > (method) update', qualified: 'client.pipelines.update', params: [ 'pipeline_id: string;', "data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; };", 'data_sink_id?: string;', "embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; };", 'embedding_model_config_id?: string;', "llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; };", 'managed_pipeline_id?: string;', 'metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; };', 'name?: string;', "preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; };", "sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; };", 'status?: string;', "transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; };", ], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## update\n\n`client.pipelines.update(pipeline_id: string, data_sink?: { component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }, data_sink_id?: string, embedding_config?: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }, embedding_model_config_id?: string, llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }, managed_pipeline_id?: string, metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }, name?: string, preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }, sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }, status?: string, transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**put** `/api/v1/pipelines/{pipeline_id}`\n\nUpdate an existing pipeline's configuration.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }`\n Schema for creating a data sink.\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n Component that implements the data sink\n - `name: string`\n The name of the data sink.\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n\n- `data_sink_id?: string`\n Data sink ID. When provided instead of data_sink, the data sink will be looked up by ID.\n\n- `embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n\n- `embedding_model_config_id?: string`\n Embedding model config ID. When provided instead of embedding_config, the embedding model config will be looked up by ID.\n\n- `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n Settings that can be configured for how to use LlamaParse to parse files within a LlamaCloud pipeline.\n - `adaptive_long_table?: boolean`\n - `aggressive_table_extraction?: boolean`\n - `annotate_links?: boolean`\n - `auto_mode?: boolean`\n - `auto_mode_configuration_json?: string`\n - `auto_mode_trigger_on_image_in_page?: boolean`\n - `auto_mode_trigger_on_regexp_in_page?: string`\n - `auto_mode_trigger_on_table_in_page?: boolean`\n - `auto_mode_trigger_on_text_in_page?: string`\n - `azure_openai_api_version?: string`\n - `azure_openai_deployment_name?: string`\n - `azure_openai_endpoint?: string`\n - `azure_openai_key?: string`\n - `bbox_bottom?: number`\n - `bbox_left?: number`\n - `bbox_right?: number`\n - `bbox_top?: number`\n - `bounding_box?: string`\n - `compact_markdown_table?: boolean`\n - `complemental_formatting_instruction?: string`\n - `content_guideline_instruction?: string`\n - `continuous_mode?: boolean`\n - `disable_image_extraction?: boolean`\n - `disable_ocr?: boolean`\n - `disable_reconstruction?: boolean`\n - `do_not_cache?: boolean`\n - `do_not_unroll_columns?: boolean`\n - `enable_cost_optimizer?: boolean`\n - `extract_charts?: boolean`\n - `extract_layout?: boolean`\n - `extract_printed_page_number?: boolean`\n - `fast_mode?: boolean`\n - `formatting_instruction?: string`\n - `gpt4o_api_key?: string`\n - `gpt4o_mode?: boolean`\n - `guess_xlsx_sheet_name?: boolean`\n - `hide_footers?: boolean`\n - `hide_headers?: boolean`\n - `high_res_ocr?: boolean`\n - `html_make_all_elements_visible?: boolean`\n - `html_remove_fixed_elements?: boolean`\n - `html_remove_navigation_elements?: boolean`\n - `http_proxy?: string`\n - `ignore_document_elements_for_layout_detection?: boolean`\n - `images_to_save?: 'embedded' | 'layout' | 'screenshot'[]`\n - `inline_images_in_markdown?: boolean`\n - `input_s3_path?: string`\n - `input_s3_region?: string`\n - `input_url?: string`\n - `internal_is_screenshot_job?: boolean`\n - `invalidate_cache?: boolean`\n - `is_formatting_instruction?: boolean`\n - `job_timeout_extra_time_per_page_in_seconds?: number`\n - `job_timeout_in_seconds?: number`\n - `keep_page_separator_when_merging_tables?: boolean`\n - `languages?: string[]`\n - `layout_aware?: boolean`\n - `line_level_bounding_box?: boolean`\n - `markdown_table_multiline_header_separator?: string`\n - `max_pages?: number`\n - `max_pages_enforced?: number`\n - `merge_tables_across_pages_in_markdown?: boolean`\n - `model?: string`\n - `outlined_table_extraction?: boolean`\n - `output_pdf_of_document?: boolean`\n - `output_s3_path_prefix?: string`\n - `output_s3_region?: string`\n - `output_tables_as_HTML?: boolean`\n - `page_error_tolerance?: number`\n - `page_footer_prefix?: string`\n - `page_footer_suffix?: string`\n - `page_header_prefix?: string`\n - `page_header_suffix?: string`\n - `page_prefix?: string`\n - `page_separator?: string`\n - `page_suffix?: string`\n - `parse_mode?: string`\n Enum for representing the mode of parsing to be used.\n - `parsing_instruction?: string`\n - `precise_bounding_box?: boolean`\n - `premium_mode?: boolean`\n - `presentation_out_of_bounds_content?: boolean`\n - `presentation_skip_embedded_data?: boolean`\n - `preserve_layout_alignment_across_pages?: boolean`\n - `preserve_very_small_text?: boolean`\n - `preset?: string`\n - `priority?: 'critical' | 'high' | 'low' | 'medium'`\n The priority for the request. This field may be ignored or overwritten depending on the organization tier.\n - `project_id?: string`\n - `remove_hidden_text?: boolean`\n - `replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'`\n Enum for representing the different available page error handling modes.\n - `replace_failed_page_with_error_message_prefix?: string`\n - `replace_failed_page_with_error_message_suffix?: string`\n - `save_images?: boolean`\n - `skip_diagonal_text?: boolean`\n - `specialized_chart_parsing_agentic?: boolean`\n - `specialized_chart_parsing_efficient?: boolean`\n - `specialized_chart_parsing_plus?: boolean`\n - `specialized_image_parsing?: boolean`\n - `spreadsheet_extract_sub_tables?: boolean`\n - `spreadsheet_force_formula_computation?: boolean`\n - `spreadsheet_include_hidden_sheets?: boolean`\n - `strict_mode_buggy_font?: boolean`\n - `strict_mode_image_extraction?: boolean`\n - `strict_mode_image_ocr?: boolean`\n - `strict_mode_reconstruction?: boolean`\n - `structured_output?: boolean`\n - `structured_output_json_schema?: string`\n - `structured_output_json_schema_name?: string`\n - `system_prompt?: string`\n - `system_prompt_append?: string`\n - `take_screenshot?: boolean`\n - `target_pages?: string`\n - `tier?: string`\n - `use_vendor_multimodal_model?: boolean`\n - `user_prompt?: string`\n - `vendor_multimodal_api_key?: string`\n - `vendor_multimodal_model_name?: string`\n - `version?: string`\n - `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n - `webhook_url?: string`\n\n- `managed_pipeline_id?: string`\n The ID of the ManagedPipeline this playground pipeline is linked to.\n\n- `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n Metadata configuration for the pipeline.\n - `excluded_embed_metadata_keys?: string[]`\n List of metadata keys to exclude from embeddings\n - `excluded_llm_metadata_keys?: string[]`\n List of metadata keys to exclude from LLM during retrieval\n\n- `name?: string`\n\n- `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n Schema for the search params for an retrieval execution that can be preset for a pipeline.\n - `alpha?: number`\n Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.\n - `class_name?: string`\n - `dense_similarity_cutoff?: number`\n Minimum similarity score wrt query for retrieval\n - `dense_similarity_top_k?: number`\n Number of nodes for dense retrieval.\n - `enable_reranking?: boolean`\n Enable reranking for retrieval\n - `files_top_k?: number`\n Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).\n - `rerank_top_n?: number`\n Number of reranked nodes for returning.\n - `retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'`\n The retrieval mode for the query.\n - `retrieve_image_nodes?: boolean`\n Whether to retrieve image nodes.\n - `retrieve_page_figure_nodes?: boolean`\n Whether to retrieve page figure nodes.\n - `retrieve_page_screenshot_nodes?: boolean`\n Whether to retrieve page screenshot nodes.\n - `search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }`\n Metadata filters for vector stores.\n - `search_filters_inference_schema?: object`\n JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.\n - `sparse_similarity_top_k?: number`\n Number of nodes for sparse retrieval.\n\n- `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n Configuration for sparse embedding models used in hybrid search.\n\nThis allows users to choose between Splade and BM25 models for\nsparse retrieval in managed data sinks.\n - `class_name?: string`\n - `model_type?: 'auto' | 'bm25' | 'splade'`\n The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based on deployment mode (BYOC uses term frequency, Cloud uses Splade).\n\n- `status?: string`\n Status of the pipeline deployment.\n\n- `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n Configuration for the transformation.\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'pipelines.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.update(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.PipelineUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Pipeline pipeline = client.pipelines().update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'pipelines update', example: "llamacloud-prod pipelines update \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'delete', endpoint: '/api/v1/pipelines/{pipeline_id}', httpMethod: 'delete', summary: 'Delete Pipeline', description: 'Delete a pipeline and all associated resources.\n\nRemoves pipeline files, data sources, and vector store data.\nThis operation is irreversible.', stainlessPath: '(resource) pipelines > (method) delete', qualified: 'client.pipelines.delete', params: ['pipeline_id: string;'], markdown: "## delete\n\n`client.pipelines.delete(pipeline_id: string): void`\n\n**delete** `/api/v1/pipelines/{pipeline_id}`\n\nDelete a pipeline and all associated resources.\n\nRemoves pipeline files, data sources, and vector store data.\nThis operation is irreversible.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.pipelines.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.pipelines.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.pipelines.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.pipelines.delete(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'pipelines().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.PipelineDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.pipelines().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Pipelines.Delete(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'pipelines delete', example: "llamacloud-prod pipelines delete \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_status', endpoint: '/api/v1/pipelines/{pipeline_id}/status', httpMethod: 'get', summary: 'Get Pipeline Status', description: 'Get the ingestion status of a managed pipeline.\n\nReturns document counts, sync progress, and the last\neffective timestamp. Only available for managed pipelines.', stainlessPath: '(resource) pipelines > (method) get_status', qualified: 'client.pipelines.getStatus', params: ['pipeline_id: string;', 'full_details?: boolean;'], response: "{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }", markdown: "## get_status\n\n`client.pipelines.getStatus(pipeline_id: string, full_details?: boolean): { status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: object[]; job_id?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/status`\n\nGet the ingestion status of a managed pipeline.\n\nReturns document counts, sync progress, and the last\neffective timestamp. Only available for managed pipelines.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `full_details?: boolean`\n\n### Returns\n\n- `{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }`\n\n - `status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'`\n - `deployment_date?: string`\n - `effective_at?: string`\n - `error?: { job_id: string; message: string; step: string; }[]`\n - `job_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst managedIngestionStatusResponse = await client.pipelines.getStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(managedIngestionStatusResponse);\n```", perLanguage: { typescript: { method: 'client.pipelines.getStatus', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst managedIngestionStatusResponse = await client.pipelines.getStatus(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(managedIngestionStatusResponse.job_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/status \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.get_status', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nmanaged_ingestion_status_response = client.pipelines.get_status(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(managed_ingestion_status_response.job_id)', }, java: { method: 'pipelines().getStatus', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.ManagedIngestionStatusResponse;\nimport com.llamacloud_prod.api.models.pipelines.PipelineGetStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ManagedIngestionStatusResponse managedIngestionStatusResponse = client.pipelines().getStatus("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.GetStatus', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmanagedIngestionStatusResponse, err := client.Pipelines.GetStatus(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineGetStatusParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managedIngestionStatusResponse.JobID)\n}\n', }, cli: { method: 'pipelines get_status', example: "llamacloud-prod pipelines get-status \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'upsert', endpoint: '/api/v1/pipelines', httpMethod: 'put', summary: 'Upsert Pipeline', description: 'Upsert a pipeline.\n\nUpdates the pipeline if one with the same name and project\nalready exists, otherwise creates a new one.', stainlessPath: '(resource) pipelines > (method) upsert', qualified: 'client.pipelines.upsert', params: [ 'name: string;', 'organization_id?: string;', 'project_id?: string;', "data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; };", 'data_sink_id?: string;', "embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; };", 'embedding_model_config_id?: string;', "llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; };", 'managed_pipeline_id?: string;', 'metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; };', "pipeline_type?: 'MANAGED' | 'PLAYGROUND';", "preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; };", "sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; };", 'status?: string;', "transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; };", ], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## upsert\n\n`client.pipelines.upsert(name: string, organization_id?: string, project_id?: string, data_sink?: { component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }, data_sink_id?: string, embedding_config?: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }, embedding_model_config_id?: string, llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }, managed_pipeline_id?: string, metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }, pipeline_type?: 'MANAGED' | 'PLAYGROUND', preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }, sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }, status?: string, transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**put** `/api/v1/pipelines`\n\nUpsert a pipeline.\n\nUpdates the pipeline if one with the same name and project\nalready exists, otherwise creates a new one.\n\n### Parameters\n\n- `name: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `data_sink?: { component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; }`\n Schema for creating a data sink.\n - `component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: { distance_method?: 'cosine' | 'hamming' | 'ip' | 'jaccard' | 'l1' | 'l2'; ef_construction?: number; ef_search?: number; m?: number; vector_type?: 'bit' | 'half_vec' | 'sparse_vec' | 'vector'; }; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }`\n Component that implements the data sink\n - `name: string`\n The name of the data sink.\n - `sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'`\n\n- `data_sink_id?: string`\n Data sink ID. When provided instead of data_sink, the data sink will be looked up by ID.\n\n- `embedding_config?: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n\n- `embedding_model_config_id?: string`\n Embedding model config ID. When provided instead of embedding_config, the embedding model config will be looked up by ID.\n\n- `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n Settings that can be configured for how to use LlamaParse to parse files within a LlamaCloud pipeline.\n - `adaptive_long_table?: boolean`\n - `aggressive_table_extraction?: boolean`\n - `annotate_links?: boolean`\n - `auto_mode?: boolean`\n - `auto_mode_configuration_json?: string`\n - `auto_mode_trigger_on_image_in_page?: boolean`\n - `auto_mode_trigger_on_regexp_in_page?: string`\n - `auto_mode_trigger_on_table_in_page?: boolean`\n - `auto_mode_trigger_on_text_in_page?: string`\n - `azure_openai_api_version?: string`\n - `azure_openai_deployment_name?: string`\n - `azure_openai_endpoint?: string`\n - `azure_openai_key?: string`\n - `bbox_bottom?: number`\n - `bbox_left?: number`\n - `bbox_right?: number`\n - `bbox_top?: number`\n - `bounding_box?: string`\n - `compact_markdown_table?: boolean`\n - `complemental_formatting_instruction?: string`\n - `content_guideline_instruction?: string`\n - `continuous_mode?: boolean`\n - `disable_image_extraction?: boolean`\n - `disable_ocr?: boolean`\n - `disable_reconstruction?: boolean`\n - `do_not_cache?: boolean`\n - `do_not_unroll_columns?: boolean`\n - `enable_cost_optimizer?: boolean`\n - `extract_charts?: boolean`\n - `extract_layout?: boolean`\n - `extract_printed_page_number?: boolean`\n - `fast_mode?: boolean`\n - `formatting_instruction?: string`\n - `gpt4o_api_key?: string`\n - `gpt4o_mode?: boolean`\n - `guess_xlsx_sheet_name?: boolean`\n - `hide_footers?: boolean`\n - `hide_headers?: boolean`\n - `high_res_ocr?: boolean`\n - `html_make_all_elements_visible?: boolean`\n - `html_remove_fixed_elements?: boolean`\n - `html_remove_navigation_elements?: boolean`\n - `http_proxy?: string`\n - `ignore_document_elements_for_layout_detection?: boolean`\n - `images_to_save?: 'embedded' | 'layout' | 'screenshot'[]`\n - `inline_images_in_markdown?: boolean`\n - `input_s3_path?: string`\n - `input_s3_region?: string`\n - `input_url?: string`\n - `internal_is_screenshot_job?: boolean`\n - `invalidate_cache?: boolean`\n - `is_formatting_instruction?: boolean`\n - `job_timeout_extra_time_per_page_in_seconds?: number`\n - `job_timeout_in_seconds?: number`\n - `keep_page_separator_when_merging_tables?: boolean`\n - `languages?: string[]`\n - `layout_aware?: boolean`\n - `line_level_bounding_box?: boolean`\n - `markdown_table_multiline_header_separator?: string`\n - `max_pages?: number`\n - `max_pages_enforced?: number`\n - `merge_tables_across_pages_in_markdown?: boolean`\n - `model?: string`\n - `outlined_table_extraction?: boolean`\n - `output_pdf_of_document?: boolean`\n - `output_s3_path_prefix?: string`\n - `output_s3_region?: string`\n - `output_tables_as_HTML?: boolean`\n - `page_error_tolerance?: number`\n - `page_footer_prefix?: string`\n - `page_footer_suffix?: string`\n - `page_header_prefix?: string`\n - `page_header_suffix?: string`\n - `page_prefix?: string`\n - `page_separator?: string`\n - `page_suffix?: string`\n - `parse_mode?: string`\n Enum for representing the mode of parsing to be used.\n - `parsing_instruction?: string`\n - `precise_bounding_box?: boolean`\n - `premium_mode?: boolean`\n - `presentation_out_of_bounds_content?: boolean`\n - `presentation_skip_embedded_data?: boolean`\n - `preserve_layout_alignment_across_pages?: boolean`\n - `preserve_very_small_text?: boolean`\n - `preset?: string`\n - `priority?: 'critical' | 'high' | 'low' | 'medium'`\n The priority for the request. This field may be ignored or overwritten depending on the organization tier.\n - `project_id?: string`\n - `remove_hidden_text?: boolean`\n - `replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'`\n Enum for representing the different available page error handling modes.\n - `replace_failed_page_with_error_message_prefix?: string`\n - `replace_failed_page_with_error_message_suffix?: string`\n - `save_images?: boolean`\n - `skip_diagonal_text?: boolean`\n - `specialized_chart_parsing_agentic?: boolean`\n - `specialized_chart_parsing_efficient?: boolean`\n - `specialized_chart_parsing_plus?: boolean`\n - `specialized_image_parsing?: boolean`\n - `spreadsheet_extract_sub_tables?: boolean`\n - `spreadsheet_force_formula_computation?: boolean`\n - `spreadsheet_include_hidden_sheets?: boolean`\n - `strict_mode_buggy_font?: boolean`\n - `strict_mode_image_extraction?: boolean`\n - `strict_mode_image_ocr?: boolean`\n - `strict_mode_reconstruction?: boolean`\n - `structured_output?: boolean`\n - `structured_output_json_schema?: string`\n - `structured_output_json_schema_name?: string`\n - `system_prompt?: string`\n - `system_prompt_append?: string`\n - `take_screenshot?: boolean`\n - `target_pages?: string`\n - `tier?: string`\n - `use_vendor_multimodal_model?: boolean`\n - `user_prompt?: string`\n - `vendor_multimodal_api_key?: string`\n - `vendor_multimodal_model_name?: string`\n - `version?: string`\n - `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n - `webhook_url?: string`\n\n- `managed_pipeline_id?: string`\n The ID of the ManagedPipeline this playground pipeline is linked to.\n\n- `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n Metadata configuration for the pipeline.\n - `excluded_embed_metadata_keys?: string[]`\n List of metadata keys to exclude from embeddings\n - `excluded_llm_metadata_keys?: string[]`\n List of metadata keys to exclude from LLM during retrieval\n\n- `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n Type of pipeline. Either PLAYGROUND or MANAGED.\n\n- `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n Preset retrieval parameters for the pipeline.\n - `alpha?: number`\n Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.\n - `class_name?: string`\n - `dense_similarity_cutoff?: number`\n Minimum similarity score wrt query for retrieval\n - `dense_similarity_top_k?: number`\n Number of nodes for dense retrieval.\n - `enable_reranking?: boolean`\n Enable reranking for retrieval\n - `files_top_k?: number`\n Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).\n - `rerank_top_n?: number`\n Number of reranked nodes for returning.\n - `retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'`\n The retrieval mode for the query.\n - `retrieve_image_nodes?: boolean`\n Whether to retrieve image nodes.\n - `retrieve_page_figure_nodes?: boolean`\n Whether to retrieve page figure nodes.\n - `retrieve_page_screenshot_nodes?: boolean`\n Whether to retrieve page screenshot nodes.\n - `search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }`\n Metadata filters for vector stores.\n - `search_filters_inference_schema?: object`\n JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.\n - `sparse_similarity_top_k?: number`\n Number of nodes for sparse retrieval.\n\n- `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n Configuration for sparse embedding models used in hybrid search.\n\nThis allows users to choose between Splade and BM25 models for\nsparse retrieval in managed data sinks.\n - `class_name?: string`\n - `model_type?: 'auto' | 'bm25' | 'splade'`\n The sparse model type to use. 'bm25' uses Qdrant's FastEmbed BM25 model (default for new pipelines), 'splade' uses HuggingFace Splade model, 'auto' selects based on deployment mode (BYOC uses term frequency, Cloud uses Splade).\n\n- `status?: string`\n Status of the pipeline deployment.\n\n- `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n Configuration for the transformation.\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.upsert({ name: 'x' });\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.upsert', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.upsert({ name: 'x' });\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'pipelines.upsert', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.upsert(\n name="x",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().upsert', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.PipelineCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n PipelineCreate params = PipelineCreate.builder()\n .name("x")\n .build();\n Pipeline pipeline = client.pipelines().upsert(params);\n }\n}', }, go: { method: 'client.Pipelines.Upsert', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.Upsert(context.TODO(), llamacloudprod.PipelineUpsertParams{\n\t\tPipelineCreate: llamacloudprod.PipelineCreateParam{\n\t\t\tName: "x",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'pipelines upsert', example: "llamacloud-prod pipelines upsert \\\n --api-key 'My API Key' \\\n --name x", }, }, }, { name: 'retrieve', endpoint: '/api/v1/pipelines/{pipeline_id}/retrieve', httpMethod: 'post', summary: 'Run Search', description: "Run a retrieval query against a managed pipeline.\n\nSearches the pipeline's vector store using the provided query\nand retrieval parameters. Supports dense, sparse, and hybrid\nsearch modes with configurable top-k and reranking.", stainlessPath: '(resource) pipelines > (method) retrieve', qualified: 'client.pipelines.retrieve', params: [ 'pipeline_id: string;', 'query: string;', 'organization_id?: string;', 'project_id?: string;', 'alpha?: number;', 'class_name?: string;', 'dense_similarity_cutoff?: number;', 'dense_similarity_top_k?: number;', 'enable_reranking?: boolean;', 'files_top_k?: number;', 'rerank_top_n?: number;', "retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata';", 'retrieve_image_nodes?: boolean;', 'retrieve_page_figure_nodes?: boolean;', 'retrieve_page_screenshot_nodes?: boolean;', "search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; };", 'search_filters_inference_schema?: object;', 'sparse_similarity_top_k?: number;', ], response: "{ pipeline_id: string; retrieval_nodes: { node: object; class_name?: string; score?: number; }[]; class_name?: string; image_nodes?: { node: object; score: number; class_name?: string; }[]; inferred_search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; metadata?: object; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; retrieval_latency?: object; }", markdown: "## retrieve\n\n`client.pipelines.retrieve(pipeline_id: string, query: string, organization_id?: string, project_id?: string, alpha?: number, class_name?: string, dense_similarity_cutoff?: number, dense_similarity_top_k?: number, enable_reranking?: boolean, files_top_k?: number, rerank_top_n?: number, retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata', retrieve_image_nodes?: boolean, retrieve_page_figure_nodes?: boolean, retrieve_page_screenshot_nodes?: boolean, search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }, search_filters_inference_schema?: object, sparse_similarity_top_k?: number): { pipeline_id: string; retrieval_nodes: object[]; class_name?: string; image_nodes?: page_screenshot_node_with_score[]; inferred_search_filters?: metadata_filters; metadata?: object; page_figure_nodes?: page_figure_node_with_score[]; retrieval_latency?: object; }`\n\n**post** `/api/v1/pipelines/{pipeline_id}/retrieve`\n\nRun a retrieval query against a managed pipeline.\n\nSearches the pipeline's vector store using the provided query\nand retrieval parameters. Supports dense, sparse, and hybrid\nsearch modes with configurable top-k and reranking.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `query: string`\n The query to retrieve against.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `alpha?: number`\n Alpha value for hybrid retrieval to determine the weights between dense and sparse retrieval. 0 is sparse retrieval and 1 is dense retrieval.\n\n- `class_name?: string`\n\n- `dense_similarity_cutoff?: number`\n Minimum similarity score wrt query for retrieval\n\n- `dense_similarity_top_k?: number`\n Number of nodes for dense retrieval.\n\n- `enable_reranking?: boolean`\n Enable reranking for retrieval\n\n- `files_top_k?: number`\n Number of files to retrieve (only for retrieval mode files_via_metadata and files_via_content).\n\n- `rerank_top_n?: number`\n Number of reranked nodes for returning.\n\n- `retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'`\n The retrieval mode for the query.\n\n- `retrieve_image_nodes?: boolean`\n Whether to retrieve image nodes.\n\n- `retrieve_page_figure_nodes?: boolean`\n Whether to retrieve page figure nodes.\n\n- `retrieve_page_screenshot_nodes?: boolean`\n Whether to retrieve page screenshot nodes.\n\n- `search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }`\n Metadata filters for vector stores.\n - `filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }[]`\n - `condition?: 'and' | 'not' | 'or'`\n Vector store filter conditions to combine different filters.\n\n- `search_filters_inference_schema?: object`\n JSON Schema that will be used to infer search_filters. Omit or leave as null to skip inference.\n\n- `sparse_similarity_top_k?: number`\n Number of nodes for sparse retrieval.\n\n### Returns\n\n- `{ pipeline_id: string; retrieval_nodes: { node: object; class_name?: string; score?: number; }[]; class_name?: string; image_nodes?: { node: object; score: number; class_name?: string; }[]; inferred_search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; metadata?: object; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; retrieval_latency?: object; }`\n Schema for the result of an retrieval execution.\n\n - `pipeline_id: string`\n - `retrieval_nodes: { node: { class_name?: string; embedding?: number[]; end_char_idx?: number; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; extra_info?: object; id_?: string; metadata_seperator?: string; metadata_template?: string; mimetype?: string; relationships?: object; start_char_idx?: number; text?: string; text_template?: string; }; class_name?: string; score?: number; }[]`\n - `class_name?: string`\n - `image_nodes?: { node: { file_id: string; image_size: number; page_index: number; metadata?: object; }; score: number; class_name?: string; }[]`\n - `inferred_search_filters?: { filters: { key: string; value: number | string | string[] | number[] | number[]; operator?: string; } | { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }[]; condition?: 'and' | 'not' | 'or'; }`\n - `metadata?: object`\n - `page_figure_nodes?: { node: { confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }; score: number; class_name?: string; }[]`\n - `retrieval_latency?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { query: 'x' });\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.retrieve', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.retrieve('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n query: 'x',\n});\n\nconsole.log(pipeline.pipeline_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "query": "x"\n }\'', }, python: { method: 'pipelines.retrieve', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.retrieve(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n query="x",\n)\nprint(pipeline.pipeline_id)', }, java: { method: 'pipelines().retrieve', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.PipelineRetrieveParams;\nimport com.llamacloud_prod.api.models.pipelines.PipelineRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n PipelineRetrieveParams params = PipelineRetrieveParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .query("x")\n .build();\n PipelineRetrieveResponse pipeline = client.pipelines().retrieve(params);\n }\n}', }, }, }, { name: 'create', endpoint: '/api/v1/pipelines/{pipeline_id}/sync', httpMethod: 'post', summary: 'Sync Pipeline', description: 'Trigger an incremental sync for a managed pipeline.\n\nProcesses new and updated documents from data sources and\nfiles, then updates the index for retrieval.', stainlessPath: '(resource) pipelines.sync > (method) create', qualified: 'client.pipelines.sync.create', params: ['pipeline_id: string;'], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## create\n\n`client.pipelines.sync.create(pipeline_id: string): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**post** `/api/v1/pipelines/{pipeline_id}/sync`\n\nTrigger an incremental sync for a managed pipeline.\n\nProcesses new and updated documents from data sources and\nfiles, then updates the index for retrieval.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.sync.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.sync.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.sync.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.sync.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.sync.create(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().sync().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.sync.SyncCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Pipeline pipeline = client.pipelines().sync().create("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Sync.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.Sync.New(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'sync create', example: "llamacloud-prod pipelines:sync create \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'cancel', endpoint: '/api/v1/pipelines/{pipeline_id}/sync/cancel', httpMethod: 'post', summary: 'Cancel Pipeline Sync', description: 'Cancel all running sync jobs for a pipeline.', stainlessPath: '(resource) pipelines.sync > (method) cancel', qualified: 'client.pipelines.sync.cancel', params: ['pipeline_id: string;'], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## cancel\n\n`client.pipelines.sync.cancel(pipeline_id: string): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**post** `/api/v1/pipelines/{pipeline_id}/sync/cancel`\n\nCancel all running sync jobs for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.sync.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.sync.cancel', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.sync.cancel('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/sync/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.sync.cancel', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.sync.cancel(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().sync().cancel', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.sync.SyncCancelParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Pipeline pipeline = client.pipelines().sync().cancel("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Sync.Cancel', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.Sync.Cancel(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'sync cancel', example: "llamacloud-prod pipelines:sync cancel \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_data_sources', endpoint: '/api/v1/pipelines/{pipeline_id}/data-sources', httpMethod: 'get', summary: 'List Pipeline Data Sources', description: 'Get data sources for a pipeline.', stainlessPath: '(resource) pipelines.data_sources > (method) get_data_sources', qualified: 'client.pipelines.dataSources.getDataSources', params: ['pipeline_id: string;'], response: "{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: object; }[]", markdown: "## get_data_sources\n\n`client.pipelines.dataSources.getDataSources(pipeline_id: string): object[]`\n\n**get** `/api/v1/pipelines/{pipeline_id}/data-sources`\n\nGet data sources for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Returns\n\n- `{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelineDataSources = await client.pipelines.dataSources.getDataSources('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(pipelineDataSources);\n```", perLanguage: { typescript: { method: 'client.pipelines.dataSources.getDataSources', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelineDataSources = await client.pipelines.dataSources.getDataSources(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(pipelineDataSources);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/data-sources \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.data_sources.get_data_sources', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline_data_sources = client.pipelines.data_sources.get_data_sources(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline_data_sources)', }, java: { method: 'pipelines().dataSources().getDataSources', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.datasources.DataSourceGetDataSourcesParams;\nimport com.llamacloud_prod.api.models.pipelines.datasources.PipelineDataSource;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List pipelineDataSources = client.pipelines().dataSources().getDataSources("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.DataSources.GetDataSources', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelineDataSources, err := client.Pipelines.DataSources.GetDataSources(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelineDataSources)\n}\n', }, cli: { method: 'data_sources get_data_sources', example: "llamacloud-prod pipelines:data-sources get-data-sources \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'update_data_sources', endpoint: '/api/v1/pipelines/{pipeline_id}/data-sources', httpMethod: 'put', summary: 'Add Data Sources To Pipeline', description: 'Add data sources to a pipeline.', stainlessPath: '(resource) pipelines.data_sources > (method) update_data_sources', qualified: 'client.pipelines.dataSources.updateDataSources', params: ['pipeline_id: string;', 'body: { data_source_id: string; sync_interval?: number; }[];'], response: "{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: object; }[]", markdown: "## update_data_sources\n\n`client.pipelines.dataSources.updateDataSources(pipeline_id: string, body: { data_source_id: string; sync_interval?: number; }[]): object[]`\n\n**put** `/api/v1/pipelines/{pipeline_id}/data-sources`\n\nAdd data sources to a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `body: { data_source_id: string; sync_interval?: number; }[]`\n\n### Returns\n\n- `{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelineDataSources = await client.pipelines.dataSources.updateDataSources('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { body: [{ data_source_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] });\n\nconsole.log(pipelineDataSources);\n```", perLanguage: { typescript: { method: 'client.pipelines.dataSources.updateDataSources', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelineDataSources = await client.pipelines.dataSources.updateDataSources(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { body: [{ data_source_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] },\n);\n\nconsole.log(pipelineDataSources);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/data-sources \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'[\n {\n "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "sync_interval": 0\n }\n ]\'', }, python: { method: 'pipelines.data_sources.update_data_sources', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline_data_sources = client.pipelines.data_sources.update_data_sources(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n body=[{\n "data_source_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n)\nprint(pipeline_data_sources)', }, java: { method: 'pipelines().dataSources().updateDataSources', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.datasources.DataSourceUpdateDataSourcesParams;\nimport com.llamacloud_prod.api.models.pipelines.datasources.PipelineDataSource;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceUpdateDataSourcesParams params = DataSourceUpdateDataSourcesParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addBody(DataSourceUpdateDataSourcesParams.Body.builder()\n .dataSourceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build())\n .build();\n List pipelineDataSources = client.pipelines().dataSources().updateDataSources(params);\n }\n}', }, go: { method: 'client.Pipelines.DataSources.UpdateDataSources', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelineDataSources, err := client.Pipelines.DataSources.UpdateDataSources(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDataSourceUpdateDataSourcesParams{\n\t\t\tBody: []llamacloudprod.PipelineDataSourceUpdateDataSourcesParamsBody{{\n\t\t\t\tDataSourceID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelineDataSources)\n}\n', }, cli: { method: 'data_sources update_data_sources', example: "llamacloud-prod pipelines:data-sources update-data-sources \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --body '{data_source_id: 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e}'", }, }, }, { name: 'update', endpoint: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}', httpMethod: 'put', summary: 'Update Pipeline Data Source', description: 'Update the configuration of a data source in a pipeline.', stainlessPath: '(resource) pipelines.data_sources > (method) update', qualified: 'client.pipelines.dataSources.update', params: ['pipeline_id: string;', 'data_source_id: string;', 'sync_interval?: number;'], response: "{ id: string; component: object | object | object | object | object | object | object | object | object | object | object | object; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: object; }", markdown: "## update\n\n`client.pipelines.dataSources.update(pipeline_id: string, data_source_id: string, sync_interval?: number): { id: string; component: object | cloud_s3_data_source | cloud_az_storage_blob_data_source | cloud_google_drive_data_source | cloud_one_drive_data_source | cloud_sharepoint_data_source | cloud_slack_data_source | cloud_notion_page_data_source | cloud_confluence_data_source | cloud_jira_data_source | cloud_jira_data_source_v2 | cloud_box_data_source; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: data_source_reader_version_metadata; }`\n\n**put** `/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}`\n\nUpdate the configuration of a data source in a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_source_id: string`\n\n- `sync_interval?: number`\n The interval at which the data source should be synced.\n\n### Returns\n\n- `{ id: string; component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: failure_handling_config; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }; data_source_id: string; last_synced_at: string; name: string; pipeline_id: string; project_id: string; source_type: string; created_at?: string; custom_metadata?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; sync_interval?: number; sync_schedule_set_by?: string; updated_at?: string; version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }; }`\n Schema for a data source in a pipeline.\n\n - `id: string`\n - `component: object | { bucket: string; aws_access_id?: string; aws_access_secret?: string; class_name?: string; prefix?: string; regex_pattern?: string; s3_endpoint_url?: string; supports_access_control?: boolean; } | { account_url: string; container_name: string; account_key?: string; account_name?: string; blob?: string; class_name?: string; client_id?: string; client_secret?: string; prefix?: string; supports_access_control?: boolean; tenant_id?: string; } | { folder_id: string; class_name?: string; service_account_key?: object; supports_access_control?: boolean; } | { client_id: string; client_secret: string; tenant_id: string; user_principal_name: string; class_name?: string; folder_id?: string; folder_path?: string; required_exts?: string[]; supports_access_control?: true; } | { client_id: string; client_secret: string; tenant_id: string; class_name?: string; drive_name?: string; exclude_path_patterns?: string[]; folder_id?: string; folder_path?: string; get_permissions?: boolean; include_path_patterns?: string[]; required_exts?: string[]; site_id?: string; site_name?: string; supports_access_control?: true; } | { slack_token: string; channel_ids?: string; channel_patterns?: string; class_name?: string; earliest_date?: string; earliest_date_timestamp?: number; latest_date?: string; latest_date_timestamp?: number; supports_access_control?: boolean; } | { integration_token: string; class_name?: string; database_ids?: string; page_ids?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; server_url: string; api_token?: string; class_name?: string; cql?: string; failure_handling?: { skip_list_failures?: boolean; }; index_restricted_pages?: boolean; keep_markdown_format?: boolean; label?: string; page_ids?: string; space_key?: string; supports_access_control?: boolean; sync_permissions?: boolean; user_name?: string; } | { authentication_mechanism: string; query: string; api_token?: string; class_name?: string; cloud_id?: string; email?: string; server_url?: string; supports_access_control?: boolean; } | { authentication_mechanism: string; query: string; server_url: string; api_token?: string; api_version?: '2' | '3'; class_name?: string; cloud_id?: string; email?: string; expand?: string; fields?: string[]; get_permissions?: boolean; requests_per_minute?: number; supports_access_control?: boolean; } | { authentication_mechanism: 'ccg' | 'developer_token'; class_name?: string; client_id?: string; client_secret?: string; developer_token?: string; enterprise_id?: string; folder_id?: string; supports_access_control?: boolean; user_id?: string; }`\n - `data_source_id: string`\n - `last_synced_at: string`\n - `name: string`\n - `pipeline_id: string`\n - `project_id: string`\n - `source_type: string`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'`\n - `status_updated_at?: string`\n - `sync_interval?: number`\n - `sync_schedule_set_by?: string`\n - `updated_at?: string`\n - `version_metadata?: { reader_version?: '1.0' | '2.0' | '2.1'; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelineDataSource = await client.pipelines.dataSources.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(pipelineDataSource);\n```", perLanguage: { typescript: { method: 'client.pipelines.dataSources.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelineDataSource = await client.pipelines.dataSources.update(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(pipelineDataSource.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/data-sources/$DATA_SOURCE_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'pipelines.data_sources.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline_data_source = client.pipelines.data_sources.update(\n data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline_data_source.id)', }, java: { method: 'pipelines().dataSources().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.datasources.DataSourceUpdateParams;\nimport com.llamacloud_prod.api.models.pipelines.datasources.PipelineDataSource;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceUpdateParams params = DataSourceUpdateParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .dataSourceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n PipelineDataSource pipelineDataSource = client.pipelines().dataSources().update(params);\n }\n}', }, go: { method: 'client.Pipelines.DataSources.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelineDataSource, err := client.Pipelines.DataSources.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDataSourceUpdateParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelineDataSource.ID)\n}\n', }, cli: { method: 'data_sources update', example: "llamacloud-prod pipelines:data-sources update \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_status', endpoint: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/status', httpMethod: 'get', summary: 'Get Pipeline Data Source Status', description: 'Get the status of a data source for a pipeline.', stainlessPath: '(resource) pipelines.data_sources > (method) get_status', qualified: 'client.pipelines.dataSources.getStatus', params: ['pipeline_id: string;', 'data_source_id: string;'], response: "{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }", markdown: "## get_status\n\n`client.pipelines.dataSources.getStatus(pipeline_id: string, data_source_id: string): { status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: object[]; job_id?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/status`\n\nGet the status of a data source for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_source_id: string`\n\n### Returns\n\n- `{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }`\n\n - `status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'`\n - `deployment_date?: string`\n - `effective_at?: string`\n - `error?: { job_id: string; message: string; step: string; }[]`\n - `job_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst managedIngestionStatusResponse = await client.pipelines.dataSources.getStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(managedIngestionStatusResponse);\n```", perLanguage: { typescript: { method: 'client.pipelines.dataSources.getStatus', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst managedIngestionStatusResponse = await client.pipelines.dataSources.getStatus(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(managedIngestionStatusResponse.job_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/data-sources/$DATA_SOURCE_ID/status \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.data_sources.get_status', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nmanaged_ingestion_status_response = client.pipelines.data_sources.get_status(\n data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(managed_ingestion_status_response.job_id)', }, java: { method: 'pipelines().dataSources().getStatus', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.ManagedIngestionStatusResponse;\nimport com.llamacloud_prod.api.models.pipelines.datasources.DataSourceGetStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceGetStatusParams params = DataSourceGetStatusParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .dataSourceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n ManagedIngestionStatusResponse managedIngestionStatusResponse = client.pipelines().dataSources().getStatus(params);\n }\n}', }, go: { method: 'client.Pipelines.DataSources.GetStatus', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmanagedIngestionStatusResponse, err := client.Pipelines.DataSources.GetStatus(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDataSourceGetStatusParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managedIngestionStatusResponse.JobID)\n}\n', }, cli: { method: 'data_sources get_status', example: "llamacloud-prod pipelines:data-sources get-status \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'sync', endpoint: '/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/sync', httpMethod: 'post', summary: 'Sync Pipeline Data Source', description: 'Run incremental ingestion: pull upstream changes from the data source into the data sink.', stainlessPath: '(resource) pipelines.data_sources > (method) sync', qualified: 'client.pipelines.dataSources.sync', params: ['pipeline_id: string;', 'data_source_id: string;', 'pipeline_file_ids?: string[];'], response: "{ id: string; embedding_config: object | object | object | object | object | { component?: object; type?: 'MANAGED_OPENAI_EMBEDDING'; } | object | object; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: object; embedding_model_config?: { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: object; managed_pipeline_id?: string; metadata_config?: object; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: object; sparse_model_config?: object; status?: 'CREATED' | 'DELETING'; transform_config?: object | object; updated_at?: string; }", markdown: "## sync\n\n`client.pipelines.dataSources.sync(pipeline_id: string, data_source_id: string, pipeline_file_ids?: string[]): { id: string; embedding_config: azure_openai_embedding_config | bedrock_embedding_config | cohere_embedding_config | gemini_embedding_config | hugging_face_inference_api_embedding_config | object | openai_embedding_config | vertex_ai_embedding_config; name: string; project_id: string; config_hash?: object; created_at?: string; data_sink?: data_sink; embedding_model_config?: object; embedding_model_config_id?: string; llama_parse_parameters?: llama_parse_parameters; managed_pipeline_id?: string; metadata_config?: pipeline_metadata_config; pipeline_type?: pipeline_type; preset_retrieval_parameters?: preset_retrieval_params; sparse_model_config?: sparse_model_config; status?: 'CREATED' | 'DELETING'; transform_config?: auto_transform_config | advanced_mode_transform_config; updated_at?: string; }`\n\n**post** `/api/v1/pipelines/{pipeline_id}/data-sources/{data_source_id}/sync`\n\nRun incremental ingestion: pull upstream changes from the data source into the data sink.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_source_id: string`\n\n- `pipeline_file_ids?: string[]`\n\n### Returns\n\n- `{ id: string; embedding_config: { component?: azure_openai_embedding; type?: 'AZURE_EMBEDDING'; } | { component?: bedrock_embedding; type?: 'BEDROCK_EMBEDDING'; } | { component?: cohere_embedding; type?: 'COHERE_EMBEDDING'; } | { component?: gemini_embedding; type?: 'GEMINI_EMBEDDING'; } | { component?: hugging_face_inference_api_embedding; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: openai_embedding; type?: 'OPENAI_EMBEDDING'; } | { component?: vertex_text_embedding; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }; created_at?: string; data_sink?: { id: string; component: object | cloud_pinecone_vector_store | cloud_postgres_vector_store | cloud_qdrant_vector_store | cloud_azure_ai_search_vector_store | cloud_mongodb_atlas_vector_search | cloud_milvus_vector_store | cloud_astra_db_vector_store; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }; embedding_model_config?: { id: string; embedding_config: object | object | object | object | object | object | object; name: string; project_id: string; created_at?: string; updated_at?: string; }; embedding_model_config_id?: string; llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; managed_pipeline_id?: string; metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }; pipeline_type?: 'MANAGED' | 'PLAYGROUND'; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }; status?: 'CREATED' | 'DELETING'; transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: object | object | object | object | object; mode?: 'advanced'; segmentation_config?: object | object | object; }; updated_at?: string; }`\n Schema for a pipeline.\n\n - `id: string`\n - `embedding_config: { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; azure_deployment?: string; azure_endpoint?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'AZURE_EMBEDDING'; } | { component?: { additional_kwargs?: object; aws_access_key_id?: string; aws_secret_access_key?: string; aws_session_token?: string; class_name?: string; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; profile_name?: string; region_name?: string; timeout?: number; }; type?: 'BEDROCK_EMBEDDING'; } | { component?: { api_key: string; class_name?: string; embed_batch_size?: number; embedding_type?: string; input_type?: string; model_name?: string; num_workers?: number; truncate?: string; }; type?: 'COHERE_EMBEDDING'; } | { component?: { api_base?: string; api_key?: string; class_name?: string; embed_batch_size?: number; model_name?: string; num_workers?: number; output_dimensionality?: number; task_type?: string; title?: string; transport?: string; }; type?: 'GEMINI_EMBEDDING'; } | { component?: { token?: string | boolean; class_name?: string; cookies?: object; embed_batch_size?: number; headers?: object; model_name?: string; num_workers?: number; pooling?: 'cls' | 'last' | 'mean'; query_instruction?: string; task?: string; text_instruction?: string; timeout?: number; }; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: { class_name?: string; embed_batch_size?: number; model_name?: 'openai-text-embedding-3-small'; num_workers?: number; }; type?: 'MANAGED_OPENAI_EMBEDDING'; } | { component?: { additional_kwargs?: object; api_base?: string; api_key?: string; api_version?: string; class_name?: string; default_headers?: object; dimensions?: number; embed_batch_size?: number; max_retries?: number; model_name?: string; num_workers?: number; reuse_client?: boolean; timeout?: number; }; type?: 'OPENAI_EMBEDDING'; } | { component?: { client_email: string; location: string; private_key: string; private_key_id: string; project: string; token_uri: string; additional_kwargs?: object; class_name?: string; embed_batch_size?: number; embed_mode?: 'classification' | 'clustering' | 'default' | 'retrieval' | 'similarity'; model_name?: string; num_workers?: number; }; type?: 'VERTEXAI_EMBEDDING'; }`\n - `name: string`\n - `project_id: string`\n - `config_hash?: { embedding_config_hash?: string; parsing_config_hash?: string; transform_config_hash?: string; }`\n - `created_at?: string`\n - `data_sink?: { id: string; component: object | { api_key: string; index_name: string; class_name?: string; insert_kwargs?: object; namespace?: string; supports_nested_metadata_filters?: true; } | { database: string; embed_dim: number; host: string; password: string; port: number; schema_name: string; table_name: string; user: string; class_name?: string; hnsw_settings?: pg_vector_hnsw_settings; hybrid_search?: boolean; perform_setup?: boolean; supports_nested_metadata_filters?: boolean; } | { api_key: string; collection_name: string; url: string; class_name?: string; client_kwargs?: object; max_retries?: number; supports_nested_metadata_filters?: true; } | { search_service_api_key: string; search_service_endpoint: string; class_name?: string; client_id?: string; client_secret?: string; embedding_dimension?: number; filterable_metadata_field_keys?: object; index_name?: string; search_service_api_version?: string; supports_nested_metadata_filters?: true; tenant_id?: string; } | { collection_name: string; db_name: string; mongodb_uri: string; class_name?: string; embedding_dimension?: number; fulltext_index_name?: string; supports_nested_metadata_filters?: boolean; vector_index_name?: string; } | { uri: string; token?: string; class_name?: string; collection_name?: string; embedding_dimension?: number; supports_nested_metadata_filters?: boolean; } | { token: string; api_endpoint: string; collection_name: string; embedding_dimension: number; class_name?: string; keyspace?: string; supports_nested_metadata_filters?: true; }; name: string; project_id: string; sink_type: 'ASTRA_DB' | 'AZUREAI_SEARCH' | 'MILVUS' | 'MONGODB_ATLAS' | 'PINECONE' | 'POSTGRES' | 'QDRANT'; created_at?: string; updated_at?: string; }`\n - `embedding_model_config?: { id: string; embedding_config: { component?: object; type?: 'AZURE_EMBEDDING'; } | { component?: object; type?: 'BEDROCK_EMBEDDING'; } | { component?: object; type?: 'COHERE_EMBEDDING'; } | { component?: object; type?: 'GEMINI_EMBEDDING'; } | { component?: object; type?: 'HUGGINGFACE_API_EMBEDDING'; } | { component?: object; type?: 'OPENAI_EMBEDDING'; } | { component?: object; type?: 'VERTEXAI_EMBEDDING'; }; name: string; project_id: string; created_at?: string; updated_at?: string; }`\n - `embedding_model_config_id?: string`\n - `llama_parse_parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }`\n - `managed_pipeline_id?: string`\n - `metadata_config?: { excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; }`\n - `pipeline_type?: 'MANAGED' | 'PLAYGROUND'`\n - `preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: 'auto_routed' | 'chunks' | 'files_via_content' | 'files_via_metadata'; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: { filters: object | metadata_filters[]; condition?: 'and' | 'not' | 'or'; }; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }`\n - `sparse_model_config?: { class_name?: string; model_type?: 'auto' | 'bm25' | 'splade'; }`\n - `status?: 'CREATED' | 'DELETING'`\n - `transform_config?: { chunk_overlap?: number; chunk_size?: number; mode?: 'auto'; } | { chunking_config?: { mode?: 'none'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'character'; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'token'; separator?: string; } | { chunk_overlap?: number; chunk_size?: number; mode?: 'sentence'; paragraph_separator?: string; separator?: string; } | { breakpoint_percentile_threshold?: number; buffer_size?: number; mode?: 'semantic'; }; mode?: 'advanced'; segmentation_config?: { mode?: 'none'; } | { mode?: 'page'; page_separator?: string; } | { mode?: 'element'; }; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipeline = await client.pipelines.dataSources.sync('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(pipeline);\n```", perLanguage: { typescript: { method: 'client.pipelines.dataSources.sync', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipeline = await client.pipelines.dataSources.sync('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(pipeline.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/data-sources/$DATA_SOURCE_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.data_sources.sync', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline = client.pipelines.data_sources.sync(\n data_source_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline.id)', }, java: { method: 'pipelines().dataSources().sync', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.Pipeline;\nimport com.llamacloud_prod.api.models.pipelines.datasources.DataSourceSyncParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DataSourceSyncParams params = DataSourceSyncParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .dataSourceId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n Pipeline pipeline = client.pipelines().dataSources().sync(params);\n }\n}', }, go: { method: 'client.Pipelines.DataSources.Sync', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipeline, err := client.Pipelines.DataSources.Sync(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDataSourceSyncParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipeline.ID)\n}\n', }, cli: { method: 'data_sources sync', example: "llamacloud-prod pipelines:data-sources sync \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --data-source-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list_page_screenshots', endpoint: '/api/v1/files/{id}/page_screenshots', httpMethod: 'get', summary: 'List File Page Screenshots', description: 'List metadata for all screenshots of pages from a file.', stainlessPath: '(resource) pipelines.images > (method) list_page_screenshots', qualified: 'client.pipelines.images.listPageScreenshots', params: ['id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ file_id: string; image_size: number; page_index: number; metadata?: object; }[]', markdown: "## list_page_screenshots\n\n`client.pipelines.images.listPageScreenshots(id: string, organization_id?: string, project_id?: string): { file_id: string; image_size: number; page_index: number; metadata?: object; }[]`\n\n**get** `/api/v1/files/{id}/page_screenshots`\n\nList metadata for all screenshots of pages from a file.\n\n### Parameters\n\n- `id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ file_id: string; image_size: number; page_index: number; metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.images.listPageScreenshots('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.images.listPageScreenshots', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.images.listPageScreenshots(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/files/$ID/page_screenshots \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.images.list_page_screenshots', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.images.list_page_screenshots(\n id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', }, java: { method: 'pipelines().images().listPageScreenshots', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageListPageScreenshotsParams;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageListPageScreenshotsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List response = client.pipelines().images().listPageScreenshots("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Images.ListPageScreenshots', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Images.ListPageScreenshots(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineImageListPageScreenshotsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'images list_page_screenshots', example: "llamacloud-prod pipelines:images list-page-screenshots \\\n --api-key 'My API Key' \\\n --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_page_screenshot', endpoint: '/api/v1/files/{id}/page_screenshots/{page_index}', httpMethod: 'get', summary: 'Get File Page Screenshot', description: 'Get screenshot of a page from a file.', stainlessPath: '(resource) pipelines.images > (method) get_page_screenshot', qualified: 'client.pipelines.images.getPageScreenshot', params: ['id: string;', 'page_index: number;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## get_page_screenshot\n\n`client.pipelines.images.getPageScreenshot(id: string, page_index: number, organization_id?: string, project_id?: string): object`\n\n**get** `/api/v1/files/{id}/page_screenshots/{page_index}`\n\nGet screenshot of a page from a file.\n\n### Parameters\n\n- `id: string`\n\n- `page_index: number`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.images.getPageScreenshot(0, { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.images.getPageScreenshot', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.images.getPageScreenshot(0, {\n id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/files/$ID/page_screenshots/$PAGE_INDEX \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.images.get_page_screenshot', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.images.get_page_screenshot(\n page_index=0,\n id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', }, java: { method: 'pipelines().images().getPageScreenshot', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageGetPageScreenshotParams;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageGetPageScreenshotResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ImageGetPageScreenshotParams params = ImageGetPageScreenshotParams.builder()\n .id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .pageIndex(0L)\n .build();\n ImageGetPageScreenshotResponse response = client.pipelines().images().getPageScreenshot(params);\n }\n}', }, go: { method: 'client.Pipelines.Images.GetPageScreenshot', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Images.GetPageScreenshot(\n\t\tcontext.TODO(),\n\t\t0,\n\t\tllamacloudprod.PipelineImageGetPageScreenshotParams{\n\t\t\tID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'images get_page_screenshot', example: "llamacloud-prod pipelines:images get-page-screenshot \\\n --api-key 'My API Key' \\\n --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --page-index 0", }, }, }, { name: 'get_page_figure', endpoint: '/api/v1/files/{id}/page-figures/{page_index}/{figure_name}', httpMethod: 'get', summary: 'Get File Page Figure', description: 'Get a specific figure from a page of a file.', stainlessPath: '(resource) pipelines.images > (method) get_page_figure', qualified: 'client.pipelines.images.getPageFigure', params: [ 'id: string;', 'page_index: number;', 'figure_name: string;', 'organization_id?: string;', 'project_id?: string;', ], response: 'object', markdown: "## get_page_figure\n\n`client.pipelines.images.getPageFigure(id: string, page_index: number, figure_name: string, organization_id?: string, project_id?: string): object`\n\n**get** `/api/v1/files/{id}/page-figures/{page_index}/{figure_name}`\n\nGet a specific figure from a page of a file.\n\n### Parameters\n\n- `id: string`\n\n- `page_index: number`\n\n- `figure_name: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.images.getPageFigure('figure_name', { id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', page_index: 0 });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.images.getPageFigure', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.images.getPageFigure('figure_name', {\n id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n page_index: 0,\n});\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/files/$ID/page-figures/$PAGE_INDEX/$FIGURE_NAME \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.images.get_page_figure', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.images.get_page_figure(\n figure_name="figure_name",\n id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n page_index=0,\n)\nprint(response)', }, java: { method: 'pipelines().images().getPageFigure', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageGetPageFigureParams;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageGetPageFigureResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ImageGetPageFigureParams params = ImageGetPageFigureParams.builder()\n .id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .pageIndex(0L)\n .figureName("figure_name")\n .build();\n ImageGetPageFigureResponse response = client.pipelines().images().getPageFigure(params);\n }\n}', }, go: { method: 'client.Pipelines.Images.GetPageFigure', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Images.GetPageFigure(\n\t\tcontext.TODO(),\n\t\t"figure_name",\n\t\tllamacloudprod.PipelineImageGetPageFigureParams{\n\t\t\tID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t\tPageIndex: 0,\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'images get_page_figure', example: "llamacloud-prod pipelines:images get-page-figure \\\n --api-key 'My API Key' \\\n --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --page-index 0 \\\n --figure-name figure_name", }, }, }, { name: 'list_page_figures', endpoint: '/api/v1/files/{id}/page-figures', httpMethod: 'get', summary: 'List File Pages Figures', description: 'List metadata for all figures from all pages of a file.', stainlessPath: '(resource) pipelines.images > (method) list_page_figures', qualified: 'client.pipelines.images.listPageFigures', params: ['id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }[]', markdown: "## list_page_figures\n\n`client.pipelines.images.listPageFigures(id: string, organization_id?: string, project_id?: string): { confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }[]`\n\n**get** `/api/v1/files/{id}/page-figures`\n\nList metadata for all figures from all pages of a file.\n\n### Parameters\n\n- `id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.images.listPageFigures('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.images.listPageFigures', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.images.listPageFigures(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/files/$ID/page-figures \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.images.list_page_figures', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.images.list_page_figures(\n id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', }, java: { method: 'pipelines().images().listPageFigures', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageListPageFiguresParams;\nimport com.llamacloud_prod.api.models.pipelines.images.ImageListPageFiguresResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List response = client.pipelines().images().listPageFigures("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Images.ListPageFigures', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Images.ListPageFigures(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineImageListPageFiguresParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'images list_page_figures', example: "llamacloud-prod pipelines:images list-page-figures \\\n --api-key 'My API Key' \\\n --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_status_counts', endpoint: '/api/v1/pipelines/{pipeline_id}/files/status-counts', httpMethod: 'get', summary: 'Get Pipeline File Status Counts', description: 'Get files for a pipeline.', stainlessPath: '(resource) pipelines.files > (method) get_status_counts', qualified: 'client.pipelines.files.getStatusCounts', params: ['pipeline_id: string;', 'data_source_id?: string;', 'only_manually_uploaded?: boolean;'], response: '{ counts: object; total_count: number; data_source_id?: string; only_manually_uploaded?: boolean; pipeline_id?: string; }', markdown: "## get_status_counts\n\n`client.pipelines.files.getStatusCounts(pipeline_id: string, data_source_id?: string, only_manually_uploaded?: boolean): { counts: object; total_count: number; data_source_id?: string; only_manually_uploaded?: boolean; pipeline_id?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/files/status-counts`\n\nGet files for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_source_id?: string`\n\n- `only_manually_uploaded?: boolean`\n\n### Returns\n\n- `{ counts: object; total_count: number; data_source_id?: string; only_manually_uploaded?: boolean; pipeline_id?: string; }`\n\n - `counts: object`\n - `total_count: number`\n - `data_source_id?: string`\n - `only_manually_uploaded?: boolean`\n - `pipeline_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.files.getStatusCounts('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.files.getStatusCounts', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.files.getStatusCounts(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n);\n\nconsole.log(response.data_source_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files/status-counts \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.files.get_status_counts', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.files.get_status_counts(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response.data_source_id)', }, java: { method: 'pipelines().files().getStatusCounts', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.files.FileGetStatusCountsParams;\nimport com.llamacloud_prod.api.models.pipelines.files.FileGetStatusCountsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileGetStatusCountsResponse response = client.pipelines().files().getStatusCounts("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Files.GetStatusCounts', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Files.GetStatusCounts(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileGetStatusCountsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DataSourceID)\n}\n', }, cli: { method: 'files get_status_counts', example: "llamacloud-prod pipelines:files get-status-counts \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get_status', endpoint: '/api/v1/pipelines/{pipeline_id}/files/{file_id}/status', httpMethod: 'get', summary: 'Get Pipeline File Status', description: 'Get status of a file for a pipeline.', stainlessPath: '(resource) pipelines.files > (method) get_status', qualified: 'client.pipelines.files.getStatus', params: ['pipeline_id: string;', 'file_id: string;'], response: "{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }", markdown: "## get_status\n\n`client.pipelines.files.getStatus(pipeline_id: string, file_id: string): { status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: object[]; job_id?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/files/{file_id}/status`\n\nGet status of a file for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `file_id: string`\n\n### Returns\n\n- `{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }`\n\n - `status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'`\n - `deployment_date?: string`\n - `effective_at?: string`\n - `error?: { job_id: string; message: string; step: string; }[]`\n - `job_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst managedIngestionStatusResponse = await client.pipelines.files.getStatus('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(managedIngestionStatusResponse);\n```", perLanguage: { typescript: { method: 'client.pipelines.files.getStatus', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst managedIngestionStatusResponse = await client.pipelines.files.getStatus(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },\n);\n\nconsole.log(managedIngestionStatusResponse.job_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files/$FILE_ID/status \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.files.get_status', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nmanaged_ingestion_status_response = client.pipelines.files.get_status(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(managed_ingestion_status_response.job_id)', }, java: { method: 'pipelines().files().getStatus', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.ManagedIngestionStatusResponse;\nimport com.llamacloud_prod.api.models.pipelines.files.FileGetStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileGetStatusParams params = FileGetStatusParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n ManagedIngestionStatusResponse managedIngestionStatusResponse = client.pipelines().files().getStatus(params);\n }\n}', }, go: { method: 'client.Pipelines.Files.GetStatus', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmanagedIngestionStatusResponse, err := client.Pipelines.Files.GetStatus(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileGetStatusParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managedIngestionStatusResponse.JobID)\n}\n', }, cli: { method: 'files get_status', example: "llamacloud-prod pipelines:files get-status \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'create', endpoint: '/api/v1/pipelines/{pipeline_id}/files', httpMethod: 'put', summary: 'Add Files To Pipeline Api', description: 'Add files to a pipeline.', stainlessPath: '(resource) pipelines.files > (method) create', qualified: 'client.pipelines.files.create', params: ['pipeline_id: string;', 'body: { file_id: string; custom_metadata?: object; }[];'], response: "{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }[]", markdown: "## create\n\n`client.pipelines.files.create(pipeline_id: string, body: { file_id: string; custom_metadata?: object; }[]): object[]`\n\n**put** `/api/v1/pipelines/{pipeline_id}/files`\n\nAdd files to a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `body: { file_id: string; custom_metadata?: object; }[]`\n\n### Returns\n\n- `{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelineFiles = await client.pipelines.files.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { body: [{ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }] });\n\nconsole.log(pipelineFiles);\n```", perLanguage: { typescript: { method: 'client.pipelines.files.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelineFiles = await client.pipelines.files.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n body: [{ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' }],\n});\n\nconsole.log(pipelineFiles);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'[\n {\n "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "custom_metadata": {\n "foo": {\n "foo": "bar"\n }\n }\n }\n ]\'', }, python: { method: 'pipelines.files.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline_files = client.pipelines.files.create(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n body=[{\n "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }],\n)\nprint(pipeline_files)', }, java: { method: 'pipelines().files().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.pipelines.files.PipelineFile;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileCreateParams params = FileCreateParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addBody(FileCreateParams.Body.builder()\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build())\n .build();\n List pipelineFiles = client.pipelines().files().create(params);\n }\n}', }, go: { method: 'client.Pipelines.Files.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelineFiles, err := client.Pipelines.Files.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileNewParams{\n\t\t\tBody: []llamacloudprod.PipelineFileNewParamsBody{{\n\t\t\t\tFileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelineFiles)\n}\n', }, cli: { method: 'files create', example: "llamacloud-prod pipelines:files create \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --body '{file_id: 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e}'", }, }, }, { name: 'update', endpoint: '/api/v1/pipelines/{pipeline_id}/files/{file_id}', httpMethod: 'put', summary: 'Update Pipeline File', description: 'Update a file for a pipeline.', stainlessPath: '(resource) pipelines.files > (method) update', qualified: 'client.pipelines.files.update', params: ['pipeline_id: string;', 'file_id: string;', 'custom_metadata?: object;'], response: "{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }", markdown: "## update\n\n`client.pipelines.files.update(pipeline_id: string, file_id: string, custom_metadata?: object): { id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }`\n\n**put** `/api/v1/pipelines/{pipeline_id}/files/{file_id}`\n\nUpdate a file for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `file_id: string`\n\n- `custom_metadata?: object`\n Custom metadata for the file\n\n### Returns\n\n- `{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }`\n A file associated with a pipeline.\n\n - `id: string`\n - `pipeline_id: string`\n - `config_hash?: object`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `data_source_id?: string`\n - `external_file_id?: string`\n - `file_id?: string`\n - `file_size?: number`\n - `file_type?: string`\n - `indexed_page_count?: number`\n - `last_modified_at?: string`\n - `name?: string`\n - `permission_info?: object`\n - `project_id?: string`\n - `resource_info?: object`\n - `status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'`\n - `status_updated_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst pipelineFile = await client.pipelines.files.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(pipelineFile);\n```", perLanguage: { typescript: { method: 'client.pipelines.files.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst pipelineFile = await client.pipelines.files.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(pipelineFile.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files/$FILE_ID \\\n -X PUT \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'pipelines.files.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npipeline_file = client.pipelines.files.update(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(pipeline_file.id)', }, java: { method: 'pipelines().files().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.files.FileUpdateParams;\nimport com.llamacloud_prod.api.models.pipelines.files.PipelineFile;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileUpdateParams params = FileUpdateParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n PipelineFile pipelineFile = client.pipelines().files().update(params);\n }\n}', }, go: { method: 'client.Pipelines.Files.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpipelineFile, err := client.Pipelines.Files.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileUpdateParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", pipelineFile.ID)\n}\n', }, cli: { method: 'files update', example: "llamacloud-prod pipelines:files update \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'delete', endpoint: '/api/v1/pipelines/{pipeline_id}/files/{file_id}', httpMethod: 'delete', summary: 'Delete Pipeline File', description: 'Delete a file from a pipeline.', stainlessPath: '(resource) pipelines.files > (method) delete', qualified: 'client.pipelines.files.delete', params: ['pipeline_id: string;', 'file_id: string;'], markdown: "## delete\n\n`client.pipelines.files.delete(pipeline_id: string, file_id: string): void`\n\n**delete** `/api/v1/pipelines/{pipeline_id}/files/{file_id}`\n\nDelete a file from a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `file_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.pipelines.files.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })\n```", perLanguage: { typescript: { method: 'client.pipelines.files.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.pipelines.files.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files/$FILE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.files.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.pipelines.files.delete(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'pipelines().files().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.files.FileDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileDeleteParams params = FileDeleteParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n client.pipelines().files().delete(params);\n }\n}', }, go: { method: 'client.Pipelines.Files.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Pipelines.Files.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileDeleteParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'files delete', example: "llamacloud-prod pipelines:files delete \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/pipelines/{pipeline_id}/files2', httpMethod: 'get', summary: 'List Pipeline Files2', description: 'List files for a pipeline with optional filtering, sorting, and pagination.', stainlessPath: '(resource) pipelines.files > (method) list', qualified: 'client.pipelines.files.list', params: [ 'pipeline_id: string;', 'data_source_id?: string;', 'file_name_contains?: string;', 'limit?: number;', 'offset?: number;', 'only_manually_uploaded?: boolean;', 'order_by?: string;', "statuses?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'[];", ], response: "{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }", markdown: "## list\n\n`client.pipelines.files.list(pipeline_id: string, data_source_id?: string, file_name_contains?: string, limit?: number, offset?: number, only_manually_uploaded?: boolean, order_by?: string, statuses?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'[]): { id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/files2`\n\nList files for a pipeline with optional filtering, sorting, and pagination.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `data_source_id?: string`\n\n- `file_name_contains?: string`\n\n- `limit?: number`\n\n- `offset?: number`\n\n- `only_manually_uploaded?: boolean`\n\n- `order_by?: string`\n\n- `statuses?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'[]`\n Filter by file statuses\n\n### Returns\n\n- `{ id: string; pipeline_id: string; config_hash?: object; created_at?: string; custom_metadata?: object; data_source_id?: string; external_file_id?: string; file_id?: string; file_size?: number; file_type?: string; indexed_page_count?: number; last_modified_at?: string; name?: string; permission_info?: object; project_id?: string; resource_info?: object; status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'; status_updated_at?: string; updated_at?: string; }`\n A file associated with a pipeline.\n\n - `id: string`\n - `pipeline_id: string`\n - `config_hash?: object`\n - `created_at?: string`\n - `custom_metadata?: object`\n - `data_source_id?: string`\n - `external_file_id?: string`\n - `file_id?: string`\n - `file_size?: number`\n - `file_type?: string`\n - `indexed_page_count?: number`\n - `last_modified_at?: string`\n - `name?: string`\n - `permission_info?: object`\n - `project_id?: string`\n - `resource_info?: object`\n - `status?: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'SUCCESS'`\n - `status_updated_at?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const pipelineFile of client.pipelines.files.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(pipelineFile);\n}\n```", perLanguage: { typescript: { method: 'client.pipelines.files.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const pipelineFile of client.pipelines.files.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(pipelineFile.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/files2 \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.files.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.pipelines.files.list(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.files[0]\nprint(page.id)', }, java: { method: 'pipelines().files().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.files.FileListPage;\nimport com.llamacloud_prod.api.models.pipelines.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileListPage page = client.pipelines().files().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Files.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Pipelines.Files.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineFileListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'files list', example: "llamacloud-prod pipelines:files list \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'create', endpoint: '/api/v1/pipelines/{pipeline_id}/metadata', httpMethod: 'put', summary: 'Import Pipeline Metadata', description: 'Import metadata for a pipeline.', stainlessPath: '(resource) pipelines.metadata > (method) create', qualified: 'client.pipelines.metadata.create', params: ['pipeline_id: string;', 'upload_file: string;'], response: 'object', markdown: "## create\n\n`client.pipelines.metadata.create(pipeline_id: string, upload_file: string): object`\n\n**put** `/api/v1/pipelines/{pipeline_id}/metadata`\n\nImport metadata for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `upload_file: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst metadata = await client.pipelines.metadata.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { upload_file: fs.createReadStream('path/to/file') });\n\nconsole.log(metadata);\n```", perLanguage: { typescript: { method: 'client.pipelines.metadata.create', example: "import fs from 'fs';\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst metadata = await client.pipelines.metadata.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n upload_file: fs.createReadStream('path/to/file'),\n});\n\nconsole.log(metadata);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/metadata \\\n -X PUT \\\n -H 'Content-Type: multipart/form-data' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -F 'upload_file=@/path/to/upload_file'", }, python: { method: 'pipelines.metadata.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nmetadata = client.pipelines.metadata.create(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n upload_file=b"Example data",\n)\nprint(metadata)', }, java: { method: 'pipelines().metadata().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.metadata.MetadataCreateParams;\nimport com.llamacloud_prod.api.models.pipelines.metadata.MetadataCreateResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n MetadataCreateParams params = MetadataCreateParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .uploadFile(new ByteArrayInputStream("Example data".getBytes()))\n .build();\n MetadataCreateResponse metadata = client.pipelines().metadata().create(params);\n }\n}', }, go: { method: 'client.Pipelines.Metadata.New', example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmetadata, err := client.Pipelines.Metadata.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineMetadataNewParams{\n\t\t\tUploadFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", metadata)\n}\n', }, cli: { method: 'metadata create', example: "llamacloud-prod pipelines:metadata create \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --upload-file 'Example data'", }, }, }, { name: 'delete_all', endpoint: '/api/v1/pipelines/{pipeline_id}/metadata', httpMethod: 'delete', summary: 'Delete Pipeline Files Metadata', description: 'Delete metadata for all files in a pipeline.', stainlessPath: '(resource) pipelines.metadata > (method) delete_all', qualified: 'client.pipelines.metadata.deleteAll', params: ['pipeline_id: string;'], markdown: "## delete_all\n\n`client.pipelines.metadata.deleteAll(pipeline_id: string): void`\n\n**delete** `/api/v1/pipelines/{pipeline_id}/metadata`\n\nDelete metadata for all files in a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.pipelines.metadata.deleteAll('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.pipelines.metadata.deleteAll', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.pipelines.metadata.deleteAll('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/metadata \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.metadata.delete_all', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.pipelines.metadata.delete_all(\n "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'pipelines().metadata().deleteAll', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.metadata.MetadataDeleteAllParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.pipelines().metadata().deleteAll("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Metadata.DeleteAll', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Pipelines.Metadata.DeleteAll(context.TODO(), "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'metadata delete_all', example: "llamacloud-prod pipelines:metadata delete-all \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'create', endpoint: '/api/v1/pipelines/{pipeline_id}/documents', httpMethod: 'post', summary: 'Create Batch Pipeline Documents', description: 'Batch create documents for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) create', qualified: 'client.pipelines.documents.create', params: [ 'pipeline_id: string;', 'body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[];', ], response: '{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }[]', markdown: "## create\n\n`client.pipelines.documents.create(pipeline_id: string, body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[]): object[]`\n\n**post** `/api/v1/pipelines/{pipeline_id}/documents`\n\nBatch create documents for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[]`\n\n### Returns\n\n- `{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst cloudDocuments = await client.pipelines.documents.create('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { body: [{\n metadata: { foo: 'bar' },\n text: 'text',\n}] });\n\nconsole.log(cloudDocuments);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst cloudDocuments = await client.pipelines.documents.create(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n {\n body: [\n {\n metadata: { foo: 'bar' },\n text: 'text',\n },\n ],\n },\n);\n\nconsole.log(cloudDocuments);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'[\n {\n "metadata": {\n "foo": "bar"\n },\n "text": "text",\n "id": "id",\n "excluded_embed_metadata_keys": [\n "string"\n ],\n "excluded_llm_metadata_keys": [\n "string"\n ],\n "page_positions": [\n 0\n ]\n }\n ]\'', }, python: { method: 'pipelines.documents.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ncloud_documents = client.pipelines.documents.create(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n body=[{\n "metadata": {\n "foo": "bar"\n },\n "text": "text",\n }],\n)\nprint(cloud_documents)', }, java: { method: 'pipelines().documents().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.pipelines.documents.CloudDocument;\nimport com.llamacloud_prod.api.models.pipelines.documents.CloudDocumentCreate;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentCreateParams params = DocumentCreateParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addBody(CloudDocumentCreate.builder()\n .metadata(CloudDocumentCreate.Metadata.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .text("text")\n .build())\n .build();\n List cloudDocuments = client.pipelines().documents().create(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcloudDocuments, err := client.Pipelines.Documents.New(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDocumentNewParams{\n\t\t\tBody: []llamacloudprod.CloudDocumentCreateParam{{\n\t\t\t\tMetadata: map[string]any{\n\t\t\t\t\t"foo": "bar",\n\t\t\t\t},\n\t\t\t\tText: "text",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cloudDocuments)\n}\n', }, cli: { method: 'documents create', example: "llamacloud-prod pipelines:documents create \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --body '{metadata: {foo: bar}, text: text}'", }, }, }, { name: 'list', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/paginated', httpMethod: 'get', summary: 'Paginated List Pipeline Documents', description: 'Return a list of documents for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) list', qualified: 'client.pipelines.documents.list', params: [ 'pipeline_id: string;', 'file_id?: string;', 'limit?: number;', 'only_api_data_source_documents?: boolean;', 'only_direct_upload?: boolean;', 'skip?: number;', "status_refresh_policy?: 'cached' | 'ttl';", ], response: '{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }', markdown: "## list\n\n`client.pipelines.documents.list(pipeline_id: string, file_id?: string, limit?: number, only_api_data_source_documents?: boolean, only_direct_upload?: boolean, skip?: number, status_refresh_policy?: 'cached' | 'ttl'): { id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/documents/paginated`\n\nReturn a list of documents for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `file_id?: string`\n\n- `limit?: number`\n\n- `only_api_data_source_documents?: boolean`\n\n- `only_direct_upload?: boolean`\n\n- `skip?: number`\n\n- `status_refresh_policy?: 'cached' | 'ttl'`\n\n### Returns\n\n- `{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }`\n Cloud document stored in S3.\n\n - `id: string`\n - `metadata: object`\n - `text: string`\n - `excluded_embed_metadata_keys?: string[]`\n - `excluded_llm_metadata_keys?: string[]`\n - `page_positions?: number[]`\n - `status_metadata?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const cloudDocument of client.pipelines.documents.list('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')) {\n console.log(cloudDocument);\n}\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const cloudDocument of client.pipelines.documents.list(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n)) {\n console.log(cloudDocument.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/paginated \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.pipelines.documents.list(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\npage = page.documents[0]\nprint(page.id)', }, java: { method: 'pipelines().documents().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentListPage;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentListPage page = client.pipelines().documents().list("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Pipelines.Documents.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Pipelines.Documents.List(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDocumentListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'documents list', example: "llamacloud-prod pipelines:documents list \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'get', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}', httpMethod: 'get', summary: 'Get Pipeline Document', description: 'Return a single document for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) get', qualified: 'client.pipelines.documents.get', params: ['pipeline_id: string;', 'document_id: string;'], response: '{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }', markdown: "## get\n\n`client.pipelines.documents.get(pipeline_id: string, document_id: string): { id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/documents/{document_id}`\n\nReturn a single document for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `document_id: string`\n\n### Returns\n\n- `{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }`\n Cloud document stored in S3.\n\n - `id: string`\n - `metadata: object`\n - `text: string`\n - `excluded_embed_metadata_keys?: string[]`\n - `excluded_llm_metadata_keys?: string[]`\n - `page_positions?: number[]`\n - `status_metadata?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst cloudDocument = await client.pipelines.documents.get('document_id', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(cloudDocument);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst cloudDocument = await client.pipelines.documents.get('document_id', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(cloudDocument.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/$DOCUMENT_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ncloud_document = client.pipelines.documents.get(\n document_id="document_id",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(cloud_document.id)', }, java: { method: 'pipelines().documents().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.documents.CloudDocument;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentGetParams params = DocumentGetParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentId("document_id")\n .build();\n CloudDocument cloudDocument = client.pipelines().documents().get(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcloudDocument, err := client.Pipelines.Documents.Get(\n\t\tcontext.TODO(),\n\t\t"document_id",\n\t\tllamacloudprod.PipelineDocumentGetParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cloudDocument.ID)\n}\n', }, cli: { method: 'documents get', example: "llamacloud-prod pipelines:documents get \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --document-id document_id", }, }, }, { name: 'delete', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}', httpMethod: 'delete', summary: 'Delete Pipeline Document', description: 'Delete a document from a pipeline; runs async (vectors first, then MongoDB record).', stainlessPath: '(resource) pipelines.documents > (method) delete', qualified: 'client.pipelines.documents.delete', params: ['pipeline_id: string;', 'document_id: string;'], markdown: "## delete\n\n`client.pipelines.documents.delete(pipeline_id: string, document_id: string): void`\n\n**delete** `/api/v1/pipelines/{pipeline_id}/documents/{document_id}`\n\nDelete a document from a pipeline; runs async (vectors first, then MongoDB record).\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `document_id: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.pipelines.documents.delete('document_id', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' })\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.pipelines.documents.delete('document_id', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/$DOCUMENT_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.pipelines.documents.delete(\n document_id="document_id",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'pipelines().documents().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentDeleteParams params = DocumentDeleteParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentId("document_id")\n .build();\n client.pipelines().documents().delete(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Pipelines.Documents.Delete(\n\t\tcontext.TODO(),\n\t\t"document_id",\n\t\tllamacloudprod.PipelineDocumentDeleteParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'documents delete', example: "llamacloud-prod pipelines:documents delete \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --document-id document_id", }, }, }, { name: 'get_status', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status', httpMethod: 'get', summary: 'Get Pipeline Document Status', description: 'Return a single document for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) get_status', qualified: 'client.pipelines.documents.getStatus', params: ['pipeline_id: string;', 'document_id: string;'], response: "{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }", markdown: "## get_status\n\n`client.pipelines.documents.getStatus(pipeline_id: string, document_id: string): { status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: object[]; job_id?: string; }`\n\n**get** `/api/v1/pipelines/{pipeline_id}/documents/{document_id}/status`\n\nReturn a single document for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `document_id: string`\n\n### Returns\n\n- `{ status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'; deployment_date?: string; effective_at?: string; error?: { job_id: string; message: string; step: string; }[]; job_id?: string; }`\n\n - `status: 'CANCELLED' | 'ERROR' | 'IN_PROGRESS' | 'NOT_STARTED' | 'PARTIAL_SUCCESS' | 'SUCCESS'`\n - `deployment_date?: string`\n - `effective_at?: string`\n - `error?: { job_id: string; message: string; step: string; }[]`\n - `job_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst managedIngestionStatusResponse = await client.pipelines.documents.getStatus('document_id', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(managedIngestionStatusResponse);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.getStatus', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst managedIngestionStatusResponse = await client.pipelines.documents.getStatus('document_id', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(managedIngestionStatusResponse.job_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/$DOCUMENT_ID/status \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.get_status', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nmanaged_ingestion_status_response = client.pipelines.documents.get_status(\n document_id="document_id",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(managed_ingestion_status_response.job_id)', }, java: { method: 'pipelines().documents().getStatus', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.ManagedIngestionStatusResponse;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentGetStatusParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentGetStatusParams params = DocumentGetStatusParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentId("document_id")\n .build();\n ManagedIngestionStatusResponse managedIngestionStatusResponse = client.pipelines().documents().getStatus(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.GetStatus', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tmanagedIngestionStatusResponse, err := client.Pipelines.Documents.GetStatus(\n\t\tcontext.TODO(),\n\t\t"document_id",\n\t\tllamacloudprod.PipelineDocumentGetStatusParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", managedIngestionStatusResponse.JobID)\n}\n', }, cli: { method: 'documents get_status', example: "llamacloud-prod pipelines:documents get-status \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --document-id document_id", }, }, }, { name: 'sync', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync', httpMethod: 'post', summary: 'Sync Pipeline Document', description: 'Sync a specific document for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) sync', qualified: 'client.pipelines.documents.sync', params: ['pipeline_id: string;', 'document_id: string;'], response: 'object', markdown: "## sync\n\n`client.pipelines.documents.sync(pipeline_id: string, document_id: string): object`\n\n**post** `/api/v1/pipelines/{pipeline_id}/documents/{document_id}/sync`\n\nSync a specific document for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `document_id: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.pipelines.documents.sync('document_id', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.sync', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.pipelines.documents.sync('document_id', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/$DOCUMENT_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.sync', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.pipelines.documents.sync(\n document_id="document_id",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(response)', }, java: { method: 'pipelines().documents().sync', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentSyncParams;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentSyncResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentSyncParams params = DocumentSyncParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentId("document_id")\n .build();\n DocumentSyncResponse response = client.pipelines().documents().sync(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.Sync', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.Documents.Sync(\n\t\tcontext.TODO(),\n\t\t"document_id",\n\t\tllamacloudprod.PipelineDocumentSyncParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'documents sync', example: "llamacloud-prod pipelines:documents sync \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --document-id document_id", }, }, }, { name: 'get_chunks', endpoint: '/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks', httpMethod: 'get', summary: 'List Pipeline Document Chunks', description: 'Return a list of chunks for a pipeline document.', stainlessPath: '(resource) pipelines.documents > (method) get_chunks', qualified: 'client.pipelines.documents.getChunks', params: ['pipeline_id: string;', 'document_id: string;'], response: '{ class_name?: string; embedding?: number[]; end_char_idx?: number; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; extra_info?: object; id_?: string; metadata_seperator?: string; metadata_template?: string; mimetype?: string; relationships?: object; start_char_idx?: number; text?: string; text_template?: string; }[]', markdown: "## get_chunks\n\n`client.pipelines.documents.getChunks(pipeline_id: string, document_id: string): object[]`\n\n**get** `/api/v1/pipelines/{pipeline_id}/documents/{document_id}/chunks`\n\nReturn a list of chunks for a pipeline document.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `document_id: string`\n\n### Returns\n\n- `{ class_name?: string; embedding?: number[]; end_char_idx?: number; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; extra_info?: object; id_?: string; metadata_seperator?: string; metadata_template?: string; mimetype?: string; relationships?: object; start_char_idx?: number; text?: string; text_template?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst textNodes = await client.pipelines.documents.getChunks('document_id', { pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(textNodes);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.getChunks', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst textNodes = await client.pipelines.documents.getChunks('document_id', {\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(textNodes);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents/$DOCUMENT_ID/chunks \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'pipelines.documents.get_chunks', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ntext_nodes = client.pipelines.documents.get_chunks(\n document_id="document_id",\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(text_nodes)', }, java: { method: 'pipelines().documents().getChunks', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentGetChunksParams;\nimport com.llamacloud_prod.api.models.pipelines.documents.TextNode;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentGetChunksParams params = DocumentGetChunksParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .documentId("document_id")\n .build();\n List textNodes = client.pipelines().documents().getChunks(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.GetChunks', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\ttextNodes, err := client.Pipelines.Documents.GetChunks(\n\t\tcontext.TODO(),\n\t\t"document_id",\n\t\tllamacloudprod.PipelineDocumentGetChunksParams{\n\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", textNodes)\n}\n', }, cli: { method: 'documents get_chunks', example: "llamacloud-prod pipelines:documents get-chunks \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --document-id document_id", }, }, }, { name: 'upsert', endpoint: '/api/v1/pipelines/{pipeline_id}/documents', httpMethod: 'put', summary: 'Upsert Batch Pipeline Documents', description: 'Batch create or update a document for a pipeline.', stainlessPath: '(resource) pipelines.documents > (method) upsert', qualified: 'client.pipelines.documents.upsert', params: [ 'pipeline_id: string;', 'body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[];', ], response: '{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }[]', markdown: "## upsert\n\n`client.pipelines.documents.upsert(pipeline_id: string, body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[]): object[]`\n\n**put** `/api/v1/pipelines/{pipeline_id}/documents`\n\nBatch create or update a document for a pipeline.\n\n### Parameters\n\n- `pipeline_id: string`\n\n- `body: { metadata: object; text: string; id?: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; }[]`\n\n### Returns\n\n- `{ id: string; metadata: object; text: string; excluded_embed_metadata_keys?: string[]; excluded_llm_metadata_keys?: string[]; page_positions?: number[]; status_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst cloudDocuments = await client.pipelines.documents.upsert('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { body: [{\n metadata: { foo: 'bar' },\n text: 'text',\n}] });\n\nconsole.log(cloudDocuments);\n```", perLanguage: { typescript: { method: 'client.pipelines.documents.upsert', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst cloudDocuments = await client.pipelines.documents.upsert(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n {\n body: [\n {\n metadata: { foo: 'bar' },\n text: 'text',\n },\n ],\n },\n);\n\nconsole.log(cloudDocuments);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/pipelines/$PIPELINE_ID/documents \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'[\n {\n "metadata": {\n "foo": "bar"\n },\n "text": "text",\n "id": "id",\n "excluded_embed_metadata_keys": [\n "string"\n ],\n "excluded_llm_metadata_keys": [\n "string"\n ],\n "page_positions": [\n 0\n ]\n }\n ]\'', }, python: { method: 'pipelines.documents.upsert', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ncloud_documents = client.pipelines.documents.upsert(\n pipeline_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n body=[{\n "metadata": {\n "foo": "bar"\n },\n "text": "text",\n }],\n)\nprint(cloud_documents)', }, java: { method: 'pipelines().documents().upsert', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.pipelines.documents.CloudDocument;\nimport com.llamacloud_prod.api.models.pipelines.documents.CloudDocumentCreate;\nimport com.llamacloud_prod.api.models.pipelines.documents.DocumentUpsertParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DocumentUpsertParams params = DocumentUpsertParams.builder()\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addBody(CloudDocumentCreate.builder()\n .metadata(CloudDocumentCreate.Metadata.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .text("text")\n .build())\n .build();\n List cloudDocuments = client.pipelines().documents().upsert(params);\n }\n}', }, go: { method: 'client.Pipelines.Documents.Upsert', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcloudDocuments, err := client.Pipelines.Documents.Upsert(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineDocumentUpsertParams{\n\t\t\tBody: []llamacloudprod.CloudDocumentCreateParam{{\n\t\t\t\tMetadata: map[string]any{\n\t\t\t\t\t"foo": "bar",\n\t\t\t\t},\n\t\t\t\tText: "text",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", cloudDocuments)\n}\n', }, cli: { method: 'documents upsert', example: "llamacloud-prod pipelines:documents upsert \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --body '{metadata: {foo: bar}, text: text}'", }, }, }, { name: 'create', endpoint: '/api/v1/retrievers', httpMethod: 'post', summary: 'Create Retriever', description: 'Create a new Retriever.', stainlessPath: '(resource) retrievers > (method) create', qualified: 'client.retrievers.create', params: [ 'name: string;', 'organization_id?: string;', 'project_id?: string;', 'pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[];', ], response: '{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }', markdown: "## create\n\n`client.retrievers.create(name: string, organization_id?: string, project_id?: string, pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]): { id: string; name: string; project_id: string; created_at?: string; pipelines?: retriever_pipeline[]; updated_at?: string; }`\n\n**post** `/api/v1/retrievers`\n\nCreate a new Retriever.\n\n### Parameters\n\n- `name: string`\n A name for the retriever tool. Will default to the pipeline name if not provided.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n The pipelines this retriever uses.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }`\n An entity that retrieves context nodes from several sub RetrieverTools.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retriever = await client.retrievers.create({ name: 'x' });\n\nconsole.log(retriever);\n```", perLanguage: { typescript: { method: 'client.retrievers.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retriever = await client.retrievers.create({ name: 'x' });\n\nconsole.log(retriever.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'retrievers.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretriever = client.retrievers.create(\n name="x",\n)\nprint(retriever.id)', }, java: { method: 'retrievers().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.Retriever;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrieverCreate params = RetrieverCreate.builder()\n .name("x")\n .build();\n Retriever retriever = client.retrievers().create(params);\n }\n}', }, go: { method: 'client.Retrievers.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretriever, err := client.Retrievers.New(context.TODO(), llamacloudprod.RetrieverNewParams{\n\t\tRetrieverCreate: llamacloudprod.RetrieverCreateParam{\n\t\t\tName: "x",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retriever.ID)\n}\n', }, cli: { method: 'retrievers create', example: "llamacloud-prod retrievers create \\\n --api-key 'My API Key' \\\n --name x", }, }, }, { name: 'upsert', endpoint: '/api/v1/retrievers', httpMethod: 'put', summary: 'Upsert Retriever', description: 'Upsert a new Retriever.', stainlessPath: '(resource) retrievers > (method) upsert', qualified: 'client.retrievers.upsert', params: [ 'name: string;', 'organization_id?: string;', 'project_id?: string;', 'pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[];', ], response: '{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }', markdown: "## upsert\n\n`client.retrievers.upsert(name: string, organization_id?: string, project_id?: string, pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]): { id: string; name: string; project_id: string; created_at?: string; pipelines?: retriever_pipeline[]; updated_at?: string; }`\n\n**put** `/api/v1/retrievers`\n\nUpsert a new Retriever.\n\n### Parameters\n\n- `name: string`\n A name for the retriever tool. Will default to the pipeline name if not provided.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n The pipelines this retriever uses.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }`\n An entity that retrieves context nodes from several sub RetrieverTools.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retriever = await client.retrievers.upsert({ name: 'x' });\n\nconsole.log(retriever);\n```", perLanguage: { typescript: { method: 'client.retrievers.upsert', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retriever = await client.retrievers.upsert({ name: 'x' });\n\nconsole.log(retriever.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x"\n }\'', }, python: { method: 'retrievers.upsert', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretriever = client.retrievers.upsert(\n name="x",\n)\nprint(retriever.id)', }, java: { method: 'retrievers().upsert', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.Retriever;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverCreate;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrieverCreate params = RetrieverCreate.builder()\n .name("x")\n .build();\n Retriever retriever = client.retrievers().upsert(params);\n }\n}', }, go: { method: 'client.Retrievers.Upsert', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretriever, err := client.Retrievers.Upsert(context.TODO(), llamacloudprod.RetrieverUpsertParams{\n\t\tRetrieverCreate: llamacloudprod.RetrieverCreateParam{\n\t\t\tName: "x",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retriever.ID)\n}\n', }, cli: { method: 'retrievers upsert', example: "llamacloud-prod retrievers upsert \\\n --api-key 'My API Key' \\\n --name x", }, }, }, { name: 'list', endpoint: '/api/v1/retrievers', httpMethod: 'get', summary: 'List Retrievers', description: 'List Retrievers for a project.', stainlessPath: '(resource) retrievers > (method) list', qualified: 'client.retrievers.list', params: ['name?: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ id: string; name: string; project_id: string; created_at?: string; pipelines?: object[]; updated_at?: string; }[]', markdown: "## list\n\n`client.retrievers.list(name?: string, organization_id?: string, project_id?: string): object[]`\n\n**get** `/api/v1/retrievers`\n\nList Retrievers for a project.\n\n### Parameters\n\n- `name?: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; pipelines?: object[]; updated_at?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retrievers = await client.retrievers.list();\n\nconsole.log(retrievers);\n```", perLanguage: { typescript: { method: 'client.retrievers.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retrievers = await client.retrievers.list();\n\nconsole.log(retrievers);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'retrievers.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretrievers = client.retrievers.list()\nprint(retrievers)', }, java: { method: 'retrievers().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.Retriever;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n List retrievers = client.retrievers().list();\n }\n}', }, go: { method: 'client.Retrievers.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrievers, err := client.Retrievers.List(context.TODO(), llamacloudprod.RetrieverListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retrievers)\n}\n', }, cli: { method: 'retrievers list', example: "llamacloud-prod retrievers list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/retrievers/{retriever_id}', httpMethod: 'get', summary: 'Get Retriever', description: 'Get a Retriever by ID.', stainlessPath: '(resource) retrievers > (method) get', qualified: 'client.retrievers.get', params: ['retriever_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }', markdown: "## get\n\n`client.retrievers.get(retriever_id: string, organization_id?: string, project_id?: string): { id: string; name: string; project_id: string; created_at?: string; pipelines?: retriever_pipeline[]; updated_at?: string; }`\n\n**get** `/api/v1/retrievers/{retriever_id}`\n\nGet a Retriever by ID.\n\n### Parameters\n\n- `retriever_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }`\n An entity that retrieves context nodes from several sub RetrieverTools.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retriever = await client.retrievers.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(retriever);\n```", perLanguage: { typescript: { method: 'client.retrievers.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retriever = await client.retrievers.get('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');\n\nconsole.log(retriever.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers/$RETRIEVER_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'retrievers.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretriever = client.retrievers.get(\n retriever_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(retriever.id)', }, java: { method: 'retrievers().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.Retriever;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n Retriever retriever = client.retrievers().get("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Retrievers.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretriever, err := client.Retrievers.Get(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.RetrieverGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retriever.ID)\n}\n', }, cli: { method: 'retrievers get', example: "llamacloud-prod retrievers get \\\n --api-key 'My API Key' \\\n --retriever-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'update', endpoint: '/api/v1/retrievers/{retriever_id}', httpMethod: 'put', summary: 'Update Retriever', description: 'Update an existing Retriever.', stainlessPath: '(resource) retrievers > (method) update', qualified: 'client.retrievers.update', params: [ 'retriever_id: string;', 'pipelines: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[];', 'organization_id?: string;', 'project_id?: string;', 'name?: string;', ], response: '{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }', markdown: "## update\n\n`client.retrievers.update(retriever_id: string, pipelines: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[], organization_id?: string, project_id?: string, name?: string): { id: string; name: string; project_id: string; created_at?: string; pipelines?: retriever_pipeline[]; updated_at?: string; }`\n\n**put** `/api/v1/retrievers/{retriever_id}`\n\nUpdate an existing Retriever.\n\n### Parameters\n\n- `retriever_id: string`\n\n- `pipelines: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n The pipelines this retriever uses.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `name?: string`\n A name for the retriever.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[]; updated_at?: string; }`\n An entity that retrieves context nodes from several sub RetrieverTools.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retriever = await client.retrievers.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { pipelines: [{\n description: 'description',\n name: 'x',\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n}] });\n\nconsole.log(retriever);\n```", perLanguage: { typescript: { method: 'client.retrievers.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retriever = await client.retrievers.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {\n pipelines: [\n {\n description: 'description',\n name: 'x',\n pipeline_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n },\n ],\n});\n\nconsole.log(retriever.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers/$RETRIEVER_ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "pipelines": [\n {\n "description": "description",\n "name": "x",\n "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"\n }\n ]\n }\'', }, python: { method: 'retrievers.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretriever = client.retrievers.update(\n retriever_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n pipelines=[{\n "description": "description",\n "name": "x",\n "pipeline_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n }],\n)\nprint(retriever.id)', }, java: { method: 'retrievers().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.Retriever;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverPipeline;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrieverUpdateParams params = RetrieverUpdateParams.builder()\n .retrieverId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .addPipeline(RetrieverPipeline.builder()\n .description("description")\n .name("x")\n .pipelineId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build())\n .build();\n Retriever retriever = client.retrievers().update(params);\n }\n}', }, go: { method: 'client.Retrievers.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretriever, err := client.Retrievers.Update(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.RetrieverUpdateParams{\n\t\t\tPipelines: []llamacloudprod.RetrieverPipelineParam{{\n\t\t\t\tDescription: llamacloudprod.String("description"),\n\t\t\t\tName: llamacloudprod.String("x"),\n\t\t\t\tPipelineID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\t\t}},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retriever.ID)\n}\n', }, cli: { method: 'retrievers update', example: "llamacloud-prod retrievers update \\\n --api-key 'My API Key' \\\n --retriever-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --pipeline '{description: description, name: x, pipeline_id: 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e}'", }, }, }, { name: 'delete', endpoint: '/api/v1/retrievers/{retriever_id}', httpMethod: 'delete', summary: 'Delete Retriever', description: 'Delete a Retriever by ID.', stainlessPath: '(resource) retrievers > (method) delete', qualified: 'client.retrievers.delete', params: ['retriever_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.retrievers.delete(retriever_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/retrievers/{retriever_id}`\n\nDelete a Retriever by ID.\n\n### Parameters\n\n- `retriever_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.retrievers.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e')\n```", perLanguage: { typescript: { method: 'client.retrievers.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.retrievers.delete('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers/$RETRIEVER_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'retrievers.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.retrievers.delete(\n retriever_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)', }, java: { method: 'retrievers().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.retrievers().delete("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e");\n }\n}', }, go: { method: 'client.Retrievers.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Retrievers.Delete(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.RetrieverDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'retrievers delete', example: "llamacloud-prod retrievers delete \\\n --api-key 'My API Key' \\\n --retriever-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'search', endpoint: '/api/v1/retrievers/retrieve', httpMethod: 'post', summary: 'Direct Retrieve', description: 'Retrieve data using specified pipelines without creating a persistent retriever.', stainlessPath: '(resource) retrievers > (method) search', qualified: 'client.retrievers.search', params: [ 'query: string;', 'organization_id?: string;', 'project_id?: string;', "mode?: 'full' | 'routing';", 'pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[];', "rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; };", 'rerank_top_n?: number;', ], response: '{ image_nodes?: { node: object; score: number; class_name?: string; }[]; nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; }', markdown: "## search\n\n`client.retrievers.search(query: string, organization_id?: string, project_id?: string, mode?: 'full' | 'routing', pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: preset_retrieval_params; }[], rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; }, rerank_top_n?: number): { image_nodes?: page_screenshot_node_with_score[]; nodes?: object[]; page_figure_nodes?: page_figure_node_with_score[]; }`\n\n**post** `/api/v1/retrievers/retrieve`\n\nRetrieve data using specified pipelines without creating a persistent retriever.\n\n### Parameters\n\n- `query: string`\n The query to retrieve against.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `mode?: 'full' | 'routing'`\n The mode of composite retrieval.\n\n- `pipelines?: { description: string; name: string; pipeline_id: string; preset_retrieval_parameters?: { alpha?: number; class_name?: string; dense_similarity_cutoff?: number; dense_similarity_top_k?: number; enable_reranking?: boolean; files_top_k?: number; rerank_top_n?: number; retrieval_mode?: retrieval_mode; retrieve_image_nodes?: boolean; retrieve_page_figure_nodes?: boolean; retrieve_page_screenshot_nodes?: boolean; search_filters?: metadata_filters; search_filters_inference_schema?: object; sparse_similarity_top_k?: number; }; }[]`\n The pipelines to use for retrieval.\n\n- `rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; }`\n The rerank configuration for composite retrieval.\n - `top_n?: number`\n The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.\n - `type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'`\n The type of reranker to use.\n\n- `rerank_top_n?: number`\n (use rerank_config.top_n instead) The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.\n\n### Returns\n\n- `{ image_nodes?: { node: object; score: number; class_name?: string; }[]; nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; }`\n\n - `image_nodes?: { node: { file_id: string; image_size: number; page_index: number; metadata?: object; }; score: number; class_name?: string; }[]`\n - `nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]`\n - `page_figure_nodes?: { node: { confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }; score: number; class_name?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst compositeRetrievalResult = await client.retrievers.search({ query: 'x' });\n\nconsole.log(compositeRetrievalResult);\n```", perLanguage: { typescript: { method: 'client.retrievers.search', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst compositeRetrievalResult = await client.retrievers.search({ query: 'x' });\n\nconsole.log(compositeRetrievalResult.image_nodes);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "query": "x"\n }\'', }, python: { method: 'retrievers.search', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ncomposite_retrieval_result = client.retrievers.search(\n query="x",\n)\nprint(composite_retrieval_result.image_nodes)', }, java: { method: 'retrievers().search', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.CompositeRetrievalResult;\nimport com.llamacloud_prod.api.models.retrievers.RetrieverSearchParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrieverSearchParams params = RetrieverSearchParams.builder()\n .query("x")\n .build();\n CompositeRetrievalResult compositeRetrievalResult = client.retrievers().search(params);\n }\n}', }, go: { method: 'client.Retrievers.Search', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcompositeRetrievalResult, err := client.Retrievers.Search(context.TODO(), llamacloudprod.RetrieverSearchParams{\n\t\tQuery: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", compositeRetrievalResult.ImageNodes)\n}\n', }, cli: { method: 'retrievers search', example: "llamacloud-prod retrievers search \\\n --api-key 'My API Key' \\\n --query x", }, }, }, { name: 'search', endpoint: '/api/v1/retrievers/{retriever_id}/retrieve', httpMethod: 'post', summary: 'Retrieve', description: 'Retrieve data using a Retriever.', stainlessPath: '(resource) retrievers.retriever > (method) search', qualified: 'client.retrievers.retriever.search', params: [ 'retriever_id: string;', 'query: string;', 'organization_id?: string;', 'project_id?: string;', "mode?: 'full' | 'routing';", "rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; };", 'rerank_top_n?: number;', ], response: '{ image_nodes?: { node: object; score: number; class_name?: string; }[]; nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; }', markdown: "## search\n\n`client.retrievers.retriever.search(retriever_id: string, query: string, organization_id?: string, project_id?: string, mode?: 'full' | 'routing', rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; }, rerank_top_n?: number): { image_nodes?: page_screenshot_node_with_score[]; nodes?: object[]; page_figure_nodes?: page_figure_node_with_score[]; }`\n\n**post** `/api/v1/retrievers/{retriever_id}/retrieve`\n\nRetrieve data using a Retriever.\n\n### Parameters\n\n- `retriever_id: string`\n\n- `query: string`\n The query to retrieve against.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `mode?: 'full' | 'routing'`\n The mode of composite retrieval.\n\n- `rerank_config?: { top_n?: number; type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'; }`\n The rerank configuration for composite retrieval.\n - `top_n?: number`\n The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.\n - `type?: 'bedrock' | 'cohere' | 'disabled' | 'llm' | 'score' | 'system_default'`\n The type of reranker to use.\n\n- `rerank_top_n?: number`\n (use rerank_config.top_n instead) The number of nodes to retrieve after reranking over retrieved nodes from all retrieval tools.\n\n### Returns\n\n- `{ image_nodes?: { node: object; score: number; class_name?: string; }[]; nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]; page_figure_nodes?: { node: object; score: number; class_name?: string; }[]; }`\n\n - `image_nodes?: { node: { file_id: string; image_size: number; page_index: number; metadata?: object; }; score: number; class_name?: string; }[]`\n - `nodes?: { node: { id: string; end_char_idx: number; pipeline_id: string; retriever_id: string; retriever_pipeline_name: string; start_char_idx: number; text: string; metadata?: object; }; class_name?: string; score?: number; }[]`\n - `page_figure_nodes?: { node: { confidence: number; figure_name: string; figure_size: number; file_id: string; page_index: number; is_likely_noise?: boolean; metadata?: object; }; score: number; class_name?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst compositeRetrievalResult = await client.retrievers.retriever.search('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', { query: 'x' });\n\nconsole.log(compositeRetrievalResult);\n```", perLanguage: { typescript: { method: 'client.retrievers.retriever.search', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst compositeRetrievalResult = await client.retrievers.retriever.search(\n '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n { query: 'x' },\n);\n\nconsole.log(compositeRetrievalResult.image_nodes);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrievers/$RETRIEVER_ID/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "query": "x"\n }\'', }, python: { method: 'retrievers.retriever.search', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ncomposite_retrieval_result = client.retrievers.retriever.search(\n retriever_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n query="x",\n)\nprint(composite_retrieval_result.image_nodes)', }, go: { method: 'client.Retrievers.Retriever.Search', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tcompositeRetrievalResult, err := client.Retrievers.Retriever.Search(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.RetrieverRetrieverSearchParams{\n\t\t\tQuery: "x",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", compositeRetrievalResult.ImageNodes)\n}\n', }, cli: { method: 'retriever search', example: "llamacloud-prod retrievers:retriever search \\\n --api-key 'My API Key' \\\n --retriever-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --query x", }, }, }, { name: 'get', endpoint: '/api/v1/indexes/{index_id}', httpMethod: 'get', summary: 'Get Index', description: 'Get an index by ID.', stainlessPath: '(resource) beta.indexes > (method) get', qualified: 'client.beta.indexes.get', params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }', markdown: "## get\n\n`client.beta.indexes.get(index_id: string, organization_id?: string, project_id?: string): { id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n\n**get** `/api/v1/indexes/{index_id}`\n\nGet an index by ID.\n\n### Parameters\n\n- `index_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n A searchable index over a directory of documents.\n\n - `id: string`\n - `export_config_id: string`\n - `name: string`\n - `project_id: string`\n - `source_directory_id: string`\n - `sync_config_id: string`\n - `created_at?: string`\n - `description?: string`\n - `last_exported_at?: string`\n - `last_synced_at?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst index = await client.beta.indexes.get('index_id');\n\nconsole.log(index);\n```", perLanguage: { typescript: { method: 'client.beta.indexes.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.beta.indexes.get('index_id');\n\nconsole.log(index.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.indexes.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.beta.indexes.get(\n index_id="index_id",\n)\nprint(index.id)', }, java: { method: 'beta().indexes().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexGetParams;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n IndexGetResponse index = client.beta().indexes().get("index_id");\n }\n}', }, go: { method: 'client.Beta.Indexes.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.Beta.Indexes.Get(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloudprod.BetaIndexGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", index.ID)\n}\n', }, cli: { method: 'indexes get', example: "llamacloud-prod beta:indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id", }, }, }, { name: 'delete', endpoint: '/api/v1/indexes/{index_id}', httpMethod: 'delete', summary: 'Delete Index', description: 'Delete an index.', stainlessPath: '(resource) beta.indexes > (method) delete', qualified: 'client.beta.indexes.delete', params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.beta.indexes.delete(index_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/indexes/{index_id}`\n\nDelete an index.\n\n### Parameters\n\n- `index_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.indexes.delete('index_id')\n```", perLanguage: { typescript: { method: 'client.beta.indexes.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.indexes.delete('index_id');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.indexes.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.indexes.delete(\n index_id="index_id",\n)', }, java: { method: 'beta().indexes().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.beta().indexes().delete("index_id");\n }\n}', }, go: { method: 'client.Beta.Indexes.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Beta.Indexes.Delete(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloudprod.BetaIndexDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'indexes delete', example: "llamacloud-prod beta:indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id", }, }, }, { name: 'create', endpoint: '/api/v1/indexes', httpMethod: 'post', summary: 'Create Index', description: 'Create a searchable index over a source directory.', stainlessPath: '(resource) beta.indexes > (method) create', qualified: 'client.beta.indexes.create', params: [ 'source_directory_id: string;', 'organization_id?: string;', 'project_id?: string;', 'description?: string;', 'name?: string;', 'products?: { product_config_id: string; product_type: string; }[];', 'store_attachments?: string[];', 'sync_frequency?: string;', "vector_target?: 'DEFAULT' | 'DISABLED';", ], response: '{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }', markdown: "## create\n\n`client.beta.indexes.create(source_directory_id: string, organization_id?: string, project_id?: string, description?: string, name?: string, products?: { product_config_id: string; product_type: string; }[], store_attachments?: string[], sync_frequency?: string, vector_target?: 'DEFAULT' | 'DISABLED'): { id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n\n**post** `/api/v1/indexes`\n\nCreate a searchable index over a source directory.\n\n### Parameters\n\n- `source_directory_id: string`\n ID of the source directory containing your documents.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `description?: string`\n Optional description of the index.\n\n- `name?: string`\n Optional display name for the index. If omitted, the index is named after the source directory.\n\n- `products?: { product_config_id: string; product_type: string; }[]`\n 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.\n\n- `store_attachments?: string[]`\n 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.\n\n- `sync_frequency?: string`\n How often to re-run the sync. One of: manual, daily, on_source_change. Defaults to manual.\n\n- `vector_target?: 'DEFAULT' | 'DISABLED'`\n 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'.\n\n### Returns\n\n- `{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n A searchable index over a directory of documents.\n\n - `id: string`\n - `export_config_id: string`\n - `name: string`\n - `project_id: string`\n - `source_directory_id: string`\n - `sync_config_id: string`\n - `created_at?: string`\n - `description?: string`\n - `last_exported_at?: string`\n - `last_synced_at?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst index = await client.beta.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index);\n```", perLanguage: { typescript: { method: 'client.beta.indexes.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.beta.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "source_directory_id": "dir-abc123",\n "products": [\n {\n "product_config_id": "cfg-abc123",\n "product_type": "parse"\n }\n ],\n "store_attachments": [\n "screenshots"\n ],\n "sync_frequency": "manual",\n "vector_target": "DEFAULT"\n }\'', }, python: { method: 'beta.indexes.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.beta.indexes.create(\n source_directory_id="dir-abc123",\n)\nprint(index.id)', }, java: { method: 'beta().indexes().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexCreateParams;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n IndexCreateParams params = IndexCreateParams.builder()\n .sourceDirectoryId("dir-abc123")\n .build();\n IndexCreateResponse index = client.beta().indexes().create(params);\n }\n}', }, go: { method: 'client.Beta.Indexes.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.Beta.Indexes.New(context.TODO(), llamacloudprod.BetaIndexNewParams{\n\t\tSourceDirectoryID: "dir-abc123",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", index.ID)\n}\n', }, cli: { method: 'indexes create', example: "llamacloud-prod beta:indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123", }, }, }, { name: 'sync', endpoint: '/api/v1/indexes/{index_id}/sync', httpMethod: 'post', summary: 'Sync Index', description: 'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.', stainlessPath: '(resource) beta.indexes > (method) sync', qualified: 'client.beta.indexes.sync', params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## sync\n\n`client.beta.indexes.sync(index_id: string, organization_id?: string, project_id?: string): object`\n\n**post** `/api/v1/indexes/{index_id}/sync`\n\nTrigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.\n\n### Parameters\n\n- `index_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.indexes.sync('index_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.indexes.sync', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.indexes.sync('index_id');\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.indexes.sync', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.indexes.sync(\n index_id="index_id",\n)\nprint(response)', }, java: { method: 'beta().indexes().sync', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexSyncParams;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexSyncResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n IndexSyncResponse response = client.beta().indexes().sync("index_id");\n }\n}', }, go: { method: 'client.Beta.Indexes.Sync', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Indexes.Sync(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloudprod.BetaIndexSyncParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'indexes sync', example: "llamacloud-prod beta:indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id", }, }, }, { name: 'list', endpoint: '/api/v1/indexes', httpMethod: 'get', summary: 'List Indexes', description: 'List indexes for the current project.', stainlessPath: '(resource) beta.indexes > (method) list', qualified: 'client.beta.indexes.list', params: [ 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', 'source_directory_id?: string;', ], response: '{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }', markdown: "## list\n\n`client.beta.indexes.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string, source_directory_id?: string): { id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n\n**get** `/api/v1/indexes`\n\nList indexes for the current project.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `source_directory_id?: string`\n\n### Returns\n\n- `{ id: string; export_config_id: string; name: string; project_id: string; source_directory_id: string; sync_config_id: string; created_at?: string; description?: string; last_exported_at?: string; last_synced_at?: string; metadata?: object; updated_at?: string; }`\n A searchable index over a directory of documents.\n\n - `id: string`\n - `export_config_id: string`\n - `name: string`\n - `project_id: string`\n - `source_directory_id: string`\n - `sync_config_id: string`\n - `created_at?: string`\n - `description?: string`\n - `last_exported_at?: string`\n - `last_synced_at?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const indexListResponse of client.beta.indexes.list()) {\n console.log(indexListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.indexes.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const indexListResponse of client.beta.indexes.list()) {\n console.log(indexListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.indexes.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.indexes.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().indexes().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListPage;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n IndexListPage page = client.beta().indexes().list();\n }\n}', }, go: { method: 'client.Beta.Indexes.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Indexes.List(context.TODO(), llamacloudprod.BetaIndexListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'indexes list', example: "llamacloud-prod beta:indexes list \\\n --api-key 'My API Key'", }, }, }, { name: 'retrieve', endpoint: '/api/v1/retrieval/retrieve', httpMethod: 'post', summary: 'Retrieve', description: 'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.', stainlessPath: '(resource) beta.retrieval > (method) retrieve', qualified: 'client.beta.retrieval.retrieve', params: [ 'index_id: string;', 'query: string;', 'organization_id?: string;', 'project_id?: string;', 'custom_filters?: object;', 'full_text_pipeline_weight?: number;', 'num_candidates?: number;', 'rerank?: { enabled?: boolean; top_n?: number; };', 'score_threshold?: number;', "static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; };", 'top_k?: number;', 'vector_pipeline_weight?: number;', ], response: '{ results: { content: string; metadata?: object; rerank_score?: number; score?: number; static_fields?: { attachments?: object[]; chunk_end_char?: number; chunk_index?: number; chunk_start_char?: number; chunk_token_count?: number; page_range_end?: number; page_range_start?: number; parsed_directory_file_id?: string; }; }[]; }', markdown: "## retrieve\n\n`client.beta.retrieval.retrieve(index_id: string, query: string, organization_id?: string, project_id?: string, custom_filters?: object, full_text_pipeline_weight?: number, num_candidates?: number, rerank?: { enabled?: boolean; top_n?: number; }, score_threshold?: number, static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; }, top_k?: number, vector_pipeline_weight?: number): { results: object[]; }`\n\n**post** `/api/v1/retrieval/retrieve`\n\nRetrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.\n\n### Parameters\n\n- `index_id: string`\n ID of the index to retrieve against.\n\n- `query: string`\n Natural-language query to retrieve relevant chunks.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `custom_filters?: object`\n Filters on user-defined metadata fields.\n\n- `full_text_pipeline_weight?: number`\n Weight of the full-text search pipeline (0-1).\n\n- `num_candidates?: number`\n Number of candidates for approximate nearest neighbor search.\n\n- `rerank?: { enabled?: boolean; top_n?: number; }`\n Reranking configuration applied after hybrid search. Enabled by default.\n - `enabled?: boolean`\n Set to false to disable reranking.\n - `top_n?: number`\n Number of results to return after reranking.\n\n- `score_threshold?: number`\n Minimum score threshold for returned results.\n\n- `static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; }`\n Filters on built-in document fields (page range, chunk index, etc.).\n - `parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }`\n\n- `top_k?: number`\n Maximum number of results to return.\n\n- `vector_pipeline_weight?: number`\n Weight of the vector search pipeline (0-1).\n\n### Returns\n\n- `{ results: { content: string; metadata?: object; rerank_score?: number; score?: number; static_fields?: { attachments?: object[]; chunk_end_char?: number; chunk_index?: number; chunk_start_char?: number; chunk_token_count?: number; page_range_end?: number; page_range_start?: number; parsed_directory_file_id?: string; }; }[]; }`\n Response containing retrieval results.\n\n - `results: { content: string; metadata?: object; rerank_score?: number; score?: number; static_fields?: { attachments?: { attachment_name: string; source_id: string; type: string; }[]; chunk_end_char?: number; chunk_index?: number; chunk_start_char?: number; chunk_token_count?: number; page_range_end?: number; page_range_start?: number; parsed_directory_file_id?: string; }; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst retrieval = await client.beta.retrieval.retrieve({ index_id: 'idx-abc123', query: 'What are the key findings?' });\n\nconsole.log(retrieval);\n```", perLanguage: { typescript: { method: 'client.beta.retrieval.retrieve', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retrieval = await client.beta.retrieval.retrieve({\n index_id: 'idx-abc123',\n query: 'What are the key findings?',\n});\n\nconsole.log(retrieval.results);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123",\n "query": "What are the key findings?",\n "top_k": 10\n }\'', }, python: { method: 'beta.retrieval.retrieve', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretrieval = client.beta.retrieval.retrieve(\n index_id="idx-abc123",\n query="What are the key findings?",\n)\nprint(retrieval.results)', }, java: { method: 'beta().retrieval().retrieve', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalRetrieveParams;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrievalRetrieveParams params = RetrievalRetrieveParams.builder()\n .indexId("idx-abc123")\n .query("What are the key findings?")\n .build();\n RetrievalRetrieveResponse retrieval = client.beta().retrieval().retrieve(params);\n }\n}', }, go: { method: 'client.Beta.Retrieval.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrieval, err := client.Beta.Retrieval.Get(context.TODO(), llamacloudprod.BetaRetrievalGetParams{\n\t\tIndexID: "idx-abc123",\n\t\tQuery: "What are the key findings?",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", retrieval.Results)\n}\n', }, cli: { method: 'retrieval retrieve', example: "llamacloud-prod beta:retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'", }, }, }, { name: 'find', endpoint: '/api/v1/retrieval/files/find', httpMethod: 'post', summary: 'Find Files', description: 'Search for files by name.', stainlessPath: '(resource) beta.retrieval > (method) find', qualified: 'client.beta.retrieval.find', params: [ 'index_id: string;', 'organization_id?: string;', 'project_id?: string;', 'file_name?: string;', 'file_name_contains?: string;', 'page_size?: number;', 'page_token?: string;', ], response: '{ file_id: string; file_name: string; }', markdown: "## find\n\n`client.beta.retrieval.find(index_id: string, organization_id?: string, project_id?: string, file_name?: string, file_name_contains?: string, page_size?: number, page_token?: string): { file_id: string; file_name: string; }`\n\n**post** `/api/v1/retrieval/files/find`\n\nSearch for files by name.\n\n### Parameters\n\n- `index_id: string`\n ID of the index to search within.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `file_name?: string`\n Exact file name to match.\n\n- `file_name_contains?: string`\n Substring match on file name (case-insensitive).\n\n- `page_size?: number`\n 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.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ file_id: string; file_name: string; }`\n A file returned by find.\n\n - `file_id: string`\n - `file_name: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.beta.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.retrieval.find', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.beta.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse.file_id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/find \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123"\n }\'', }, python: { method: 'beta.retrieval.find', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.retrieval.find(\n index_id="idx-abc123",\n)\npage = page.items[0]\nprint(page.file_id)', }, java: { method: 'beta().retrieval().find', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalFindPage;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalFindParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrievalFindParams params = RetrievalFindParams.builder()\n .indexId("idx-abc123")\n .build();\n RetrievalFindPage page = client.beta().retrieval().find(params);\n }\n}', }, go: { method: 'client.Beta.Retrieval.Find', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Retrieval.Find(context.TODO(), llamacloudprod.BetaRetrievalFindParams{\n\t\tIndexID: "idx-abc123",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'retrieval find', example: "llamacloud-prod beta:retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123", }, }, }, { name: 'grep', endpoint: '/api/v1/retrieval/files/grep', httpMethod: 'post', summary: 'Grep File', description: "Grep within a file's parsed content using a regex pattern.", stainlessPath: '(resource) beta.retrieval > (method) grep', qualified: 'client.beta.retrieval.grep', params: [ 'file_id: string;', 'index_id: string;', 'pattern: string;', 'organization_id?: string;', 'project_id?: string;', 'context_chars?: number;', 'page_size?: number;', 'page_token?: string;', ], response: '{ content: string; end_char: number; start_char: number; }', markdown: "## grep\n\n`client.beta.retrieval.grep(file_id: string, index_id: string, pattern: string, organization_id?: string, project_id?: string, context_chars?: number, page_size?: number, page_token?: string): { content: string; end_char: number; start_char: number; }`\n\n**post** `/api/v1/retrieval/files/grep`\n\nGrep within a file's parsed content using a regex pattern.\n\n### Parameters\n\n- `file_id: string`\n ID of the file to grep.\n\n- `index_id: string`\n ID of the index the file belongs to.\n\n- `pattern: string`\n Regex pattern to search for.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `context_chars?: number`\n Number of characters of context to include before and after the matched pattern in the content field of the response\n\n- `page_size?: number`\n 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.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ content: string; end_char: number; start_char: number; }`\n A single grep match within a file.\n\n - `content: string`\n - `end_char: number`\n - `start_char: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.beta.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.retrieval.grep', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.beta.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse.content);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/grep \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123",\n "pattern": "revenue|profit"\n }\'', }, python: { method: 'beta.retrieval.grep', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.retrieval.grep(\n file_id="file_id",\n index_id="idx-abc123",\n pattern="revenue|profit",\n)\npage = page.items[0]\nprint(page.content)', }, java: { method: 'beta().retrieval().grep', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalGrepPage;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalGrepParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrievalGrepParams params = RetrievalGrepParams.builder()\n .fileId("file_id")\n .indexId("idx-abc123")\n .pattern("revenue|profit")\n .build();\n RetrievalGrepPage page = client.beta().retrieval().grep(params);\n }\n}', }, go: { method: 'client.Beta.Retrieval.Grep', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Retrieval.Grep(context.TODO(), llamacloudprod.BetaRetrievalGrepParams{\n\t\tFileID: "file_id",\n\t\tIndexID: "idx-abc123",\n\t\tPattern: "revenue|profit",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'retrieval grep', example: "llamacloud-prod beta:retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'", }, }, }, { name: 'read', endpoint: '/api/v1/retrieval/files/read', httpMethod: 'post', summary: 'Read File', description: 'Read the parsed text content of a specific file.', stainlessPath: '(resource) beta.retrieval > (method) read', qualified: 'client.beta.retrieval.read', params: [ 'file_id: string;', 'index_id: string;', 'organization_id?: string;', 'project_id?: string;', 'max_length?: number;', 'offset?: number;', ], response: '{ content: string; }', markdown: "## read\n\n`client.beta.retrieval.read(file_id: string, index_id: string, organization_id?: string, project_id?: string, max_length?: number, offset?: number): { content: string; }`\n\n**post** `/api/v1/retrieval/files/read`\n\nRead the parsed text content of a specific file.\n\n### Parameters\n\n- `file_id: string`\n ID of the file to read.\n\n- `index_id: string`\n ID of the index the file belongs to.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `max_length?: number`\n Maximum number of characters to read from the offset.\n\n- `offset?: number`\n Starting character offset.\n\n### Returns\n\n- `{ content: string; }`\n File read result.\n\n - `content: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.retrieval.read', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response.content);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/read \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123"\n }\'', }, python: { method: 'beta.retrieval.read', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.retrieval.read(\n file_id="file_id",\n index_id="idx-abc123",\n)\nprint(response.content)', }, java: { method: 'beta().retrieval().read', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalReadParams;\nimport com.llamacloud_prod.api.models.beta.retrieval.RetrievalReadResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n RetrievalReadParams params = RetrievalReadParams.builder()\n .fileId("file_id")\n .indexId("idx-abc123")\n .build();\n RetrievalReadResponse response = client.beta().retrieval().read(params);\n }\n}', }, go: { method: 'client.Beta.Retrieval.Read', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Retrieval.Read(context.TODO(), llamacloudprod.BetaRetrievalReadParams{\n\t\tFileID: "file_id",\n\t\tIndexID: "idx-abc123",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Content)\n}\n', }, cli: { method: 'retrieval read', example: "llamacloud-prod beta:retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123", }, }, }, { name: 'list', endpoint: '/api/v1/chat', httpMethod: 'get', summary: 'List Sessions', description: 'List all chat sessions for the current project.', stainlessPath: '(resource) beta.chat > (method) list', qualified: 'client.beta.chat.list', params: [ 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', ], response: '{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }', markdown: "## list\n\n`client.beta.chat.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: object; }`\n\n**get** `/api/v1/chat`\n\nList all chat sessions for the current project.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }`\n Summary of a chat session, including its title and last run metadata.\n\n - `last_updated_at: string`\n - `session_id: string`\n - `generated_title?: string`\n - `index_ids?: string[]`\n - `job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const chatListResponse of client.beta.chat.list()) {\n console.log(chatListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.chat.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatListResponse of client.beta.chat.list()) {\n console.log(chatListResponse.session_id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.chat.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.chat.list()\npage = page.items[0]\nprint(page.session_id)', }, java: { method: 'beta().chat().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatListPage;\nimport com.llamacloud_prod.api.models.beta.chat.ChatListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ChatListPage page = client.beta().chat().list();\n }\n}', }, go: { method: 'client.Beta.Chat.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Chat.List(context.TODO(), llamacloudprod.BetaChatListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'chat list', example: "llamacloud-prod beta:chat list \\\n --api-key 'My API Key'", }, }, }, { name: 'create', endpoint: '/api/v1/chat', httpMethod: 'post', summary: 'Create Session', description: 'Create a chat session, optionally bound to indexes (locked after the first message).', stainlessPath: '(resource) beta.chat > (method) create', qualified: 'client.beta.chat.create', params: ['organization_id?: string;', 'project_id?: string;', 'index_ids?: string[];'], response: '{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }', markdown: "## create\n\n`client.beta.chat.create(organization_id?: string, project_id?: string, index_ids?: string[]): { last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: object; }`\n\n**post** `/api/v1/chat`\n\nCreate a chat session, optionally bound to indexes (locked after the first message).\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `index_ids?: string[]`\n 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.\n\n### Returns\n\n- `{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }`\n Summary of a chat session, including its title and last run metadata.\n\n - `last_updated_at: string`\n - `session_id: string`\n - `generated_title?: string`\n - `index_ids?: string[]`\n - `job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst chat = await client.beta.chat.create();\n\nconsole.log(chat);\n```", perLanguage: { typescript: { method: 'client.beta.chat.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.beta.chat.create();\n\nconsole.log(chat.session_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.chat.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.beta.chat.create()\nprint(chat.session_id)', }, java: { method: 'beta().chat().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatCreateParams;\nimport com.llamacloud_prod.api.models.beta.chat.ChatCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ChatCreateResponse chat = client.beta().chat().create();\n }\n}', }, go: { method: 'client.Beta.Chat.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.Beta.Chat.New(context.TODO(), llamacloudprod.BetaChatNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n', }, cli: { method: 'chat create', example: "llamacloud-prod beta:chat create \\\n --api-key 'My API Key'", }, }, }, { name: 'retrieve', endpoint: '/api/v1/chat/{session_id}', httpMethod: 'get', summary: 'Get Full Session', description: 'Retrieve a full session by ID, including its event history.', stainlessPath: '(resource) beta.chat > (method) retrieve', qualified: 'client.beta.chat.retrieve', params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ events: { error: string; is_error: boolean; usage: { duration_ms?: number; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; type?: 'stop'; } | { content: string; type?: 'text_delta'; } | { content: string; type?: 'text'; } | { content: string; type?: 'thinking_delta'; } | { content: string; type?: 'thinking'; } | { arguments: object; call_id: string; name: string; type?: 'tool_call'; } | { call_id: string; name: string; result: object; image_attachment?: { attachment_name: string; source_id: string; }; type?: 'tool_result'; } | { content: string; type?: 'user_input'; }[]; last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }", markdown: "## retrieve\n\n`client.beta.chat.retrieve(session_id: string, organization_id?: string, project_id?: string): { events: object | object | object | object | object | object | object | object[]; last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: object; }`\n\n**get** `/api/v1/chat/{session_id}`\n\nRetrieve a full session by ID, including its event history.\n\n### Parameters\n\n- `session_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ events: { error: string; is_error: boolean; usage: { duration_ms?: number; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; type?: 'stop'; } | { content: string; type?: 'text_delta'; } | { content: string; type?: 'text'; } | { content: string; type?: 'thinking_delta'; } | { content: string; type?: 'thinking'; } | { arguments: object; call_id: string; name: string; type?: 'tool_call'; } | { call_id: string; name: string; result: object; image_attachment?: { attachment_name: string; source_id: string; }; type?: 'tool_result'; } | { content: string; type?: 'user_input'; }[]; last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }`\n Full chat session including its complete event history.\n\n - `events: { error: string; is_error: boolean; usage: { duration_ms?: number; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; type?: 'stop'; } | { content: string; type?: 'text_delta'; } | { content: string; type?: 'text'; } | { content: string; type?: 'thinking_delta'; } | { content: string; type?: 'thinking'; } | { arguments: object; call_id: string; name: string; type?: 'tool_call'; } | { call_id: string; name: string; result: object; image_attachment?: { attachment_name: string; source_id: string; }; type?: 'tool_result'; } | { content: string; type?: 'user_input'; }[]`\n - `last_updated_at: string`\n - `session_id: string`\n - `generated_title?: string`\n - `index_ids?: string[]`\n - `job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst chat = await client.beta.chat.retrieve('session_id');\n\nconsole.log(chat);\n```", perLanguage: { typescript: { method: 'client.beta.chat.retrieve', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.beta.chat.retrieve('session_id');\n\nconsole.log(chat.session_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.chat.retrieve', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.beta.chat.retrieve(\n session_id="session_id",\n)\nprint(chat.session_id)', }, java: { method: 'beta().chat().retrieve', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatRetrieveParams;\nimport com.llamacloud_prod.api.models.beta.chat.ChatRetrieveResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ChatRetrieveResponse chat = client.beta().chat().retrieve("session_id");\n }\n}', }, go: { method: 'client.Beta.Chat.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.Beta.Chat.Get(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloudprod.BetaChatGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n', }, cli: { method: 'chat retrieve', example: "llamacloud-prod beta:chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id", }, }, }, { name: 'delete', endpoint: '/api/v1/chat/{session_id}', httpMethod: 'delete', summary: 'Delete Session', description: 'Delete a session.', stainlessPath: '(resource) beta.chat > (method) delete', qualified: 'client.beta.chat.delete', params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.beta.chat.delete(session_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/chat/{session_id}`\n\nDelete a session.\n\n### Parameters\n\n- `session_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.chat.delete('session_id')\n```", perLanguage: { typescript: { method: 'client.beta.chat.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.chat.delete('session_id');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.chat.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.chat.delete(\n session_id="session_id",\n)', }, java: { method: 'beta().chat().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.beta().chat().delete("session_id");\n }\n}', }, go: { method: 'client.Beta.Chat.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Beta.Chat.Delete(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloudprod.BetaChatDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'chat delete', example: "llamacloud-prod beta:chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id", }, }, }, { name: 'get_summary', endpoint: '/api/v1/chat/{session_id}/summary', httpMethod: 'get', summary: 'Get Session Summary', description: 'Retrieve a session summary by ID.', stainlessPath: '(resource) beta.chat > (method) get_summary', qualified: 'client.beta.chat.getSummary', params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }', markdown: "## get_summary\n\n`client.beta.chat.getSummary(session_id: string, organization_id?: string, project_id?: string): { last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: object; }`\n\n**get** `/api/v1/chat/{session_id}/summary`\n\nRetrieve a session summary by ID.\n\n### Parameters\n\n- `session_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ last_updated_at: string; session_id: string; generated_title?: string; index_ids?: string[]; job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; }`\n Summary of a chat session, including its title and last run metadata.\n\n - `last_updated_at: string`\n - `session_id: string`\n - `generated_title?: string`\n - `index_ids?: string[]`\n - `job_metadata?: { duration_ms?: number; error?: string; export_config_ids?: string[]; is_error?: boolean; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.chat.getSummary('session_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.chat.getSummary', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.chat.getSummary('session_id');\n\nconsole.log(response.session_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.chat.get_summary', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.chat.get_summary(\n session_id="session_id",\n)\nprint(response.session_id)', }, java: { method: 'beta().chat().getSummary', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatGetSummaryParams;\nimport com.llamacloud_prod.api.models.beta.chat.ChatGetSummaryResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ChatGetSummaryResponse response = client.beta().chat().getSummary("session_id");\n }\n}', }, go: { method: 'client.Beta.Chat.GetSummary', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Chat.GetSummary(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloudprod.BetaChatGetSummaryParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.SessionID)\n}\n', }, cli: { method: 'chat get_summary', example: "llamacloud-prod beta:chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id", }, }, }, { name: 'stream', endpoint: '/api/v1/chat/{session_id}/messages/stream', httpMethod: 'post', summary: 'Stream Messages', description: 'Stream agent events for a chat turn as Server-Sent Events.', stainlessPath: '(resource) beta.chat > (method) stream', qualified: 'client.beta.chat.stream', params: [ 'session_id: string;', 'index_ids: string[];', 'prompt: string;', 'organization_id?: string;', 'project_id?: string;', ], response: 'object', markdown: "## stream\n\n`client.beta.chat.stream(session_id: string, index_ids: string[], prompt: string, organization_id?: string, project_id?: string): object`\n\n**post** `/api/v1/chat/{session_id}/messages/stream`\n\nStream agent events for a chat turn as Server-Sent Events.\n\n### Parameters\n\n- `session_id: string`\n\n- `index_ids: string[]`\n Indexes to retrieve data from.\n\n- `prompt: string`\n User message for this chat turn.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.chat.stream('session_id', { index_ids: ['idx-abc123', 'idx-def456'], prompt: 'What were the main findings in Q3?' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.chat.stream', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.chat.stream('session_id', {\n index_ids: ['idx-abc123', 'idx-def456'],\n prompt: 'What were the main findings in Q3?',\n});\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/messages/stream \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_ids": [\n "idx-abc123",\n "idx-def456"\n ],\n "prompt": "What were the main findings in Q3?"\n }\'', }, python: { method: 'beta.chat.stream', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.chat.stream(\n session_id="session_id",\n index_ids=["idx-abc123", "idx-def456"],\n prompt="What were the main findings in Q3?",\n)\nprint(response)', }, java: { method: 'beta().chat().stream', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.chat.ChatStreamParams;\nimport com.llamacloud_prod.api.models.beta.chat.ChatStreamResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n ChatStreamParams params = ChatStreamParams.builder()\n .sessionId("session_id")\n .addIndexId("idx-abc123")\n .addIndexId("idx-def456")\n .prompt("What were the main findings in Q3?")\n .build();\n ChatStreamResponse response = client.beta().chat().stream(params);\n }\n}', }, go: { method: 'client.Beta.Chat.Stream', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Chat.Stream(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloudprod.BetaChatStreamParams{\n\t\t\tIndexIDs: []string{"idx-abc123", "idx-def456"},\n\t\t\tPrompt: "What were the main findings in Q3?",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'chat stream', example: "llamacloud-prod beta:chat stream \\\n --api-key 'My API Key' \\\n --session-id session_id \\\n --index-id idx-abc123 \\\n --index-id idx-def456 \\\n --prompt 'What were the main findings in Q3?'", }, }, }, { name: 'get', endpoint: '/api/v1/beta/agent-data/{item_id}', httpMethod: 'get', summary: 'Get Agent Data', description: 'Get agent data by ID.', stainlessPath: '(resource) beta.agent_data > (method) get', qualified: 'client.beta.agentData.get', params: ['item_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }', markdown: "## get\n\n`client.beta.agentData.get(item_id: string, organization_id?: string, project_id?: string): { data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/agent-data/{item_id}`\n\nGet agent data by ID.\n\n### Parameters\n\n- `item_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n API Result for a single agent data item\n\n - `data: object`\n - `deployment_name: string`\n - `id?: string`\n - `collection?: string`\n - `created_at?: string`\n - `project_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst agentData = await client.beta.agentData.get('item_id');\n\nconsole.log(agentData);\n```", perLanguage: { typescript: { method: 'client.beta.agentData.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentData = await client.beta.agentData.get('item_id');\n\nconsole.log(agentData.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/$ITEM_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.agent_data.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nagent_data = client.beta.agent_data.get(\n item_id="item_id",\n)\nprint(agent_data.id)', }, java: { method: 'beta().agentData().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentData;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataGetParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentData agentData = client.beta().agentData().get("item_id");\n }\n}', }, go: { method: 'client.Beta.AgentData.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tagentData, err := client.Beta.AgentData.Get(\n\t\tcontext.TODO(),\n\t\t"item_id",\n\t\tllamacloudprod.BetaAgentDataGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentData.ID)\n}\n', }, cli: { method: 'agent_data get', example: "llamacloud-prod beta:agent-data get \\\n --api-key 'My API Key' \\\n --item-id item_id", }, }, }, { name: 'update', endpoint: '/api/v1/beta/agent-data/{item_id}', httpMethod: 'put', summary: 'Update Agent Data', description: 'Update agent data by ID (overwrites).', stainlessPath: '(resource) beta.agent_data > (method) update', qualified: 'client.beta.agentData.update', params: ['item_id: string;', 'data: object;', 'organization_id?: string;', 'project_id?: string;'], response: '{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }', markdown: "## update\n\n`client.beta.agentData.update(item_id: string, data: object, organization_id?: string, project_id?: string): { data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n\n**put** `/api/v1/beta/agent-data/{item_id}`\n\nUpdate agent data by ID (overwrites).\n\n### Parameters\n\n- `item_id: string`\n\n- `data: object`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n API Result for a single agent data item\n\n - `data: object`\n - `deployment_name: string`\n - `id?: string`\n - `collection?: string`\n - `created_at?: string`\n - `project_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst agentData = await client.beta.agentData.update('item_id', { data: { foo: 'bar' } });\n\nconsole.log(agentData);\n```", perLanguage: { typescript: { method: 'client.beta.agentData.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentData = await client.beta.agentData.update('item_id', { data: { foo: 'bar' } });\n\nconsole.log(agentData.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/$ITEM_ID \\\n -X PUT \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "data": {\n "foo": "bar"\n }\n }\'', }, python: { method: 'beta.agent_data.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nagent_data = client.beta.agent_data.update(\n item_id="item_id",\n data={\n "foo": "bar"\n },\n)\nprint(agent_data.id)', }, java: { method: 'beta().agentData().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentData;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataUpdateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataUpdateParams params = AgentDataUpdateParams.builder()\n .itemId("item_id")\n .data(AgentDataUpdateParams.Data.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .build();\n AgentData agentData = client.beta().agentData().update(params);\n }\n}', }, go: { method: 'client.Beta.AgentData.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tagentData, err := client.Beta.AgentData.Update(\n\t\tcontext.TODO(),\n\t\t"item_id",\n\t\tllamacloudprod.BetaAgentDataUpdateParams{\n\t\t\tData: map[string]any{\n\t\t\t\t"foo": "bar",\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentData.ID)\n}\n', }, cli: { method: 'agent_data update', example: "llamacloud-prod beta:agent-data update \\\n --api-key 'My API Key' \\\n --item-id item_id \\\n --data '{foo: bar}'", }, }, }, { name: 'delete', endpoint: '/api/v1/beta/agent-data/{item_id}', httpMethod: 'delete', summary: 'Delete Agent Data', description: 'Delete agent data by ID.', stainlessPath: '(resource) beta.agent_data > (method) delete', qualified: 'client.beta.agentData.delete', params: ['item_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## delete\n\n`client.beta.agentData.delete(item_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v1/beta/agent-data/{item_id}`\n\nDelete agent data by ID.\n\n### Parameters\n\n- `item_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst agentData = await client.beta.agentData.delete('item_id');\n\nconsole.log(agentData);\n```", perLanguage: { typescript: { method: 'client.beta.agentData.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentData = await client.beta.agentData.delete('item_id');\n\nconsole.log(agentData);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/$ITEM_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.agent_data.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nagent_data = client.beta.agent_data.delete(\n item_id="item_id",\n)\nprint(agent_data)', }, java: { method: 'beta().agentData().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataDeleteParams;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataDeleteResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataDeleteResponse agentData = client.beta().agentData().delete("item_id");\n }\n}', }, go: { method: 'client.Beta.AgentData.Delete', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tagentData, err := client.Beta.AgentData.Delete(\n\t\tcontext.TODO(),\n\t\t"item_id",\n\t\tllamacloudprod.BetaAgentDataDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentData)\n}\n', }, cli: { method: 'agent_data delete', example: "llamacloud-prod beta:agent-data delete \\\n --api-key 'My API Key' \\\n --item-id item_id", }, }, }, { name: 'create', endpoint: '/api/v1/beta/agent-data', httpMethod: 'post', summary: 'Create Agent Data', description: 'Create new agent data.', stainlessPath: '(resource) beta.agent_data > (method) create', qualified: 'client.beta.agentData.create', params: [ 'data: object;', 'deployment_name: string;', 'organization_id?: string;', 'project_id?: string;', 'collection?: string;', ], response: '{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }', markdown: "## create\n\n`client.beta.agentData.create(data: object, deployment_name: string, organization_id?: string, project_id?: string, collection?: string): { data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n\n**post** `/api/v1/beta/agent-data`\n\nCreate new agent data.\n\n### Parameters\n\n- `data: object`\n\n- `deployment_name: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `collection?: string`\n\n### Returns\n\n- `{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n API Result for a single agent data item\n\n - `data: object`\n - `deployment_name: string`\n - `id?: string`\n - `collection?: string`\n - `created_at?: string`\n - `project_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst agentData = await client.beta.agentData.create({\n data: { foo: 'bar' },\n deployment_name: 'deployment_name',\n});\n\nconsole.log(agentData);\n```", perLanguage: { typescript: { method: 'client.beta.agentData.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst agentData = await client.beta.agentData.create({\n data: { foo: 'bar' },\n deployment_name: 'deployment_name',\n});\n\nconsole.log(agentData.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "data": {\n "foo": "bar"\n },\n "deployment_name": "deployment_name"\n }\'', }, python: { method: 'beta.agent_data.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nagent_data = client.beta.agent_data.create(\n data={\n "foo": "bar"\n },\n deployment_name="deployment_name",\n)\nprint(agent_data.id)', }, java: { method: 'beta().agentData().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentData;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataCreateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataCreateParams params = AgentDataCreateParams.builder()\n .data(AgentDataCreateParams.Data.builder()\n .putAdditionalProperty("foo", JsonValue.from("bar"))\n .build())\n .deploymentName("deployment_name")\n .build();\n AgentData agentData = client.beta().agentData().create(params);\n }\n}', }, go: { method: 'client.Beta.AgentData.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tagentData, err := client.Beta.AgentData.New(context.TODO(), llamacloudprod.BetaAgentDataNewParams{\n\t\tData: map[string]any{\n\t\t\t"foo": "bar",\n\t\t},\n\t\tDeploymentName: "deployment_name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", agentData.ID)\n}\n', }, cli: { method: 'agent_data create', example: "llamacloud-prod beta:agent-data create \\\n --api-key 'My API Key' \\\n --data '{foo: bar}' \\\n --deployment-name deployment_name", }, }, }, { name: 'search', endpoint: '/api/v1/beta/agent-data/:search', httpMethod: 'post', summary: 'Search Agent Data', description: 'Search agent data with filtering, sorting, and pagination.', stainlessPath: '(resource) beta.agent_data > (method) search', qualified: 'client.beta.agentData.search', params: [ 'deployment_name: string;', 'organization_id?: string;', 'project_id?: string;', 'collection?: string;', 'filter?: object;', 'include_total?: boolean;', 'offset?: number;', 'order_by?: string;', 'page_size?: number;', 'page_token?: string;', ], response: '{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }', markdown: "## search\n\n`client.beta.agentData.search(deployment_name: string, organization_id?: string, project_id?: string, collection?: string, filter?: object, include_total?: boolean, offset?: number, order_by?: string, page_size?: number, page_token?: string): { data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n\n**post** `/api/v1/beta/agent-data/:search`\n\nSearch agent data with filtering, sorting, and pagination.\n\n### Parameters\n\n- `deployment_name: string`\n The agent deployment's name to search within\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `collection?: string`\n The logical agent data collection to search within\n\n- `filter?: object`\n A filter object or expression that filters resources listed in the response.\n\n- `include_total?: boolean`\n Whether to include the total number of items in the response\n\n- `offset?: number`\n The offset to start from. If not provided, the first page is returned\n\n- `order_by?: string`\n A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.\n\n- `page_size?: number`\n 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.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ data: object; deployment_name: string; id?: string; collection?: string; created_at?: string; project_id?: string; updated_at?: string; }`\n API Result for a single agent data item\n\n - `data: object`\n - `deployment_name: string`\n - `id?: string`\n - `collection?: string`\n - `created_at?: string`\n - `project_id?: string`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const agentData of client.beta.agentData.search({ deployment_name: 'deployment_name' })) {\n console.log(agentData);\n}\n```", perLanguage: { typescript: { method: 'client.beta.agentData.search', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const agentData of client.beta.agentData.search({\n deployment_name: 'deployment_name',\n})) {\n console.log(agentData.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/:search \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "deployment_name": "deployment_name"\n }\'', }, python: { method: 'beta.agent_data.search', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.agent_data.search(\n deployment_name="deployment_name",\n)\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().agentData().search', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataSearchPage;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataSearchParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataSearchParams params = AgentDataSearchParams.builder()\n .deploymentName("deployment_name")\n .build();\n AgentDataSearchPage page = client.beta().agentData().search(params);\n }\n}', }, go: { method: 'client.Beta.AgentData.Search', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.AgentData.Search(context.TODO(), llamacloudprod.BetaAgentDataSearchParams{\n\t\tDeploymentName: "deployment_name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'agent_data search', example: "llamacloud-prod beta:agent-data search \\\n --api-key 'My API Key' \\\n --deployment-name deployment_name", }, }, }, { name: 'aggregate', endpoint: '/api/v1/beta/agent-data/:aggregate', httpMethod: 'post', summary: 'Aggregate Agent Data', description: 'Aggregate agent data with grouping and optional counting/first item retrieval.', stainlessPath: '(resource) beta.agent_data > (method) aggregate', qualified: 'client.beta.agentData.aggregate', params: [ 'deployment_name: string;', 'organization_id?: string;', 'project_id?: string;', 'collection?: string;', 'count?: boolean;', 'filter?: object;', 'first?: boolean;', 'group_by?: string[];', 'offset?: number;', 'order_by?: string;', 'page_size?: number;', 'page_token?: string;', ], response: '{ group_key: object; count?: number; first_item?: object; }', markdown: "## aggregate\n\n`client.beta.agentData.aggregate(deployment_name: string, organization_id?: string, project_id?: string, collection?: string, count?: boolean, filter?: object, first?: boolean, group_by?: string[], offset?: number, order_by?: string, page_size?: number, page_token?: string): { group_key: object; count?: number; first_item?: object; }`\n\n**post** `/api/v1/beta/agent-data/:aggregate`\n\nAggregate agent data with grouping and optional counting/first item retrieval.\n\n### Parameters\n\n- `deployment_name: string`\n The agent deployment's name to aggregate data for\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `collection?: string`\n The logical agent data collection to aggregate data for\n\n- `count?: boolean`\n Whether to count the number of items in each group\n\n- `filter?: object`\n A filter object or expression that filters resources listed in the response.\n\n- `first?: boolean`\n Whether to return the first item in each group (Sorted by created_at)\n\n- `group_by?: string[]`\n 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\n\n- `offset?: number`\n The offset to start from. If not provided, the first page is returned\n\n- `order_by?: string`\n A comma-separated list of fields to order by, sorted in ascending order. Use 'field_name desc' to specify descending order.\n\n- `page_size?: number`\n 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.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ group_key: object; count?: number; first_item?: object; }`\n API Result for a single group in the aggregate response\n\n - `group_key: object`\n - `count?: number`\n - `first_item?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const agentDataAggregateResponse of client.beta.agentData.aggregate({ deployment_name: 'deployment_name' })) {\n console.log(agentDataAggregateResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.agentData.aggregate', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const agentDataAggregateResponse of client.beta.agentData.aggregate({\n deployment_name: 'deployment_name',\n})) {\n console.log(agentDataAggregateResponse.group_key);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/:aggregate \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "deployment_name": "deployment_name"\n }\'', }, python: { method: 'beta.agent_data.aggregate', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.agent_data.aggregate(\n deployment_name="deployment_name",\n)\npage = page.items[0]\nprint(page.group_key)', }, java: { method: 'beta().agentData().aggregate', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataAggregatePage;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataAggregateParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataAggregateParams params = AgentDataAggregateParams.builder()\n .deploymentName("deployment_name")\n .build();\n AgentDataAggregatePage page = client.beta().agentData().aggregate(params);\n }\n}', }, go: { method: 'client.Beta.AgentData.Aggregate', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.AgentData.Aggregate(context.TODO(), llamacloudprod.BetaAgentDataAggregateParams{\n\t\tDeploymentName: "deployment_name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'agent_data aggregate', example: "llamacloud-prod beta:agent-data aggregate \\\n --api-key 'My API Key' \\\n --deployment-name deployment_name", }, }, }, { name: 'delete_by_query', endpoint: '/api/v1/beta/agent-data/:delete', httpMethod: 'post', summary: 'Delete Agent Data By Query', description: 'Bulk delete agent data by query (deployment_name, collection, optional filters).', stainlessPath: '(resource) beta.agent_data > (method) delete_by_query', qualified: 'client.beta.agentData.deleteByQuery', params: [ 'deployment_name: string;', 'organization_id?: string;', 'project_id?: string;', 'collection?: string;', 'filter?: object;', ], response: '{ deleted_count: number; }', markdown: "## delete_by_query\n\n`client.beta.agentData.deleteByQuery(deployment_name: string, organization_id?: string, project_id?: string, collection?: string, filter?: object): { deleted_count: number; }`\n\n**post** `/api/v1/beta/agent-data/:delete`\n\nBulk delete agent data by query (deployment_name, collection, optional filters).\n\n### Parameters\n\n- `deployment_name: string`\n The agent deployment's name to delete data for\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `collection?: string`\n The logical agent data collection to delete from\n\n- `filter?: object`\n Optional filters to select which items to delete\n\n### Returns\n\n- `{ deleted_count: number; }`\n API response for bulk delete operation\n\n - `deleted_count: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.agentData.deleteByQuery({ deployment_name: 'deployment_name' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.agentData.deleteByQuery', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.agentData.deleteByQuery({ deployment_name: 'deployment_name' });\n\nconsole.log(response.deleted_count);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/agent-data/:delete \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "deployment_name": "deployment_name"\n }\'', }, python: { method: 'beta.agent_data.delete_by_query', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.agent_data.delete_by_query(\n deployment_name="deployment_name",\n)\nprint(response.deleted_count)', }, java: { method: 'beta().agentData().deleteByQuery', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataDeleteByQueryParams;\nimport com.llamacloud_prod.api.models.beta.agentdata.AgentDataDeleteByQueryResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n AgentDataDeleteByQueryParams params = AgentDataDeleteByQueryParams.builder()\n .deploymentName("deployment_name")\n .build();\n AgentDataDeleteByQueryResponse response = client.beta().agentData().deleteByQuery(params);\n }\n}', }, go: { method: 'client.Beta.AgentData.DeleteByQuery', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.AgentData.DeleteByQuery(context.TODO(), llamacloudprod.BetaAgentDataDeleteByQueryParams{\n\t\tDeploymentName: "deployment_name",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.DeletedCount)\n}\n', }, cli: { method: 'agent_data delete_by_query', example: "llamacloud-prod beta:agent-data delete-by-query \\\n --api-key 'My API Key' \\\n --deployment-name deployment_name", }, }, }, { name: 'create', endpoint: '/api/v1/beta/sheets/jobs', httpMethod: 'post', summary: 'Create Spreadsheet Job', description: 'Create a spreadsheet parsing job.\n\nProvide at most one of `configuration` (an inline parsing configuration) or\n`configuration_id` (a saved configuration preset). If neither is provided, a\ndefault configuration is used. Optionally include `webhook_configurations`\nto receive `sheets.*` status notifications.', stainlessPath: '(resource) beta.sheets > (method) create', qualified: 'client.beta.sheets.create', params: [ 'file_id: string;', 'organization_id?: string;', 'project_id?: string;', "config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; };", "configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; };", 'configuration_id?: string;', 'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[];', ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## create\n\n`client.beta.sheets.create(file_id: string, organization_id?: string, project_id?: string, config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }, configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }, configuration_id?: string, webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**post** `/api/v1/beta/sheets/jobs`\n\nCreate a spreadsheet parsing job.\n\nProvide at most one of `configuration` (an inline parsing configuration) or\n`configuration_id` (a saved configuration preset). If neither is provided, a\ndefault configuration is used. Optionally include `webhook_configurations`\nto receive `sheets.*` status notifications.\n\n### Parameters\n\n- `file_id: string`\n The ID of the file to parse\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n Configuration for spreadsheet parsing and region extraction\n - `extraction_range?: string`\n A1 notation of the range to extract a single region from. If None, the entire sheet is used.\n - `flatten_hierarchical_tables?: boolean`\n Return a flattened dataframe when a detected table is recognized as hierarchical.\n - `generate_additional_metadata?: boolean`\n Whether to generate additional metadata (title, description) for each extracted region.\n - `include_hidden_cells?: boolean`\n Whether to include hidden cells when extracting regions from the spreadsheet.\n - `sheet_names?: string[]`\n The names of the sheets to extract regions from. If empty, all sheets will be processed.\n - `specialization?: string`\n Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline.\n - `table_merge_sensitivity?: 'strong' | 'weak'`\n Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).\n - `use_experimental_processing?: boolean`\n Enables experimental processing. Accuracy may be impacted.\n\n- `configuration?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n Configuration for spreadsheet parsing and region extraction\n - `extraction_range?: string`\n A1 notation of the range to extract a single region from. If None, the entire sheet is used.\n - `flatten_hierarchical_tables?: boolean`\n Return a flattened dataframe when a detected table is recognized as hierarchical.\n - `generate_additional_metadata?: boolean`\n Whether to generate additional metadata (title, description) for each extracted region.\n - `include_hidden_cells?: boolean`\n Whether to include hidden cells when extracting regions from the spreadsheet.\n - `sheet_names?: string[]`\n The names of the sheets to extract regions from. If empty, all sheets will be processed.\n - `specialization?: string`\n Optional specialization mode for domain-specific extraction. Supported values: 'financial-standard', 'financial-enhanced', 'financial-precise'. Default None uses the general-purpose pipeline.\n - `table_merge_sensitivity?: 'strong' | 'weak'`\n Influences how likely similar-looking regions are merged into a single table. Useful for spreadsheets that either have sparse tables (strong merging) or many distinct tables close together (weak merging).\n - `use_experimental_processing?: boolean`\n Enables experimental processing. Accuracy may be impacted.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst sheetsJob = await client.beta.sheets.create({ file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' });\n\nconsole.log(sheetsJob);\n```", perLanguage: { typescript: { method: 'client.beta.sheets.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst sheetsJob = await client.beta.sheets.create({\n file_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',\n});\n\nconsole.log(sheetsJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/sheets/jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n "configuration_id": "cfg-11111111-2222-3333-4444-555555555555"\n }\'', }, python: { method: 'beta.sheets.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsheets_job = client.beta.sheets.create(\n file_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n)\nprint(sheets_job.id)', }, java: { method: 'beta().sheets().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetCreateParams;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetsJob;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetCreateParams params = SheetCreateParams.builder()\n .fileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .build();\n SheetsJob sheetsJob = client.beta().sheets().create(params);\n }\n}', }, go: { method: 'client.Beta.Sheets.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsheetsJob, err := client.Beta.Sheets.New(context.TODO(), llamacloudprod.BetaSheetNewParams{\n\t\tFileID: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sheetsJob.ID)\n}\n', }, cli: { method: 'sheets create', example: "llamacloud-prod beta:sheets create \\\n --api-key 'My API Key' \\\n --file-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", }, }, }, { name: 'list', endpoint: '/api/v1/beta/sheets/jobs', httpMethod: 'get', summary: 'List Spreadsheet Jobs', description: 'List spreadsheet parsing jobs.', stainlessPath: '(resource) beta.sheets > (method) list', qualified: 'client.beta.sheets.list', params: [ 'configuration_id?: string;', 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'include_results?: boolean;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS';", ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## list\n\n`client.beta.sheets.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, include_results?: boolean, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**get** `/api/v1/beta/sheets/jobs`\n\nList spreadsheet parsing jobs.\n\n### Parameters\n\n- `configuration_id?: string`\n Filter by saved configuration ID\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `include_results?: boolean`\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `status?: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n Filter by job status\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const sheetsJob of client.beta.sheets.list()) {\n console.log(sheetsJob);\n}\n```", perLanguage: { typescript: { method: 'client.beta.sheets.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const sheetsJob of client.beta.sheets.list()) {\n console.log(sheetsJob.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/sheets/jobs \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.sheets.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.sheets.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().sheets().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetListPage;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetListPage page = client.beta().sheets().list();\n }\n}', }, go: { method: 'client.Beta.Sheets.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Sheets.List(context.TODO(), llamacloudprod.BetaSheetListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'sheets list', example: "llamacloud-prod beta:sheets list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}', httpMethod: 'get', summary: 'Get Spreadsheet Job', description: 'Get a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call.', stainlessPath: '(resource) beta.sheets > (method) get', qualified: 'client.beta.sheets.get', params: [ 'spreadsheet_job_id: string;', 'expand?: string[];', 'include_results?: boolean;', 'organization_id?: string;', 'project_id?: string;', ], response: "{ id: string; configuration: object; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: object; configuration_id?: string; errors?: string[]; file?: object; metadata_state_transitions?: object; parameters?: { webhook_configurations?: object[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }", markdown: "## get\n\n`client.beta.sheets.get(spreadsheet_job_id: string, expand?: string[], include_results?: boolean, organization_id?: string, project_id?: string): { id: string; configuration: sheets_parsing_config; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: sheets_parsing_config; configuration_id?: string; errors?: string[]; file?: file; metadata_state_transitions?: object; parameters?: object; regions?: object[]; success?: boolean; worksheet_metadata?: object[]; }`\n\n**get** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}`\n\nGet a spreadsheet parsing job. When `include_results=True` (default), embeds extracted regions and results if complete, skipping the separate `/results` call.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `expand?: string[]`\n Optional fields to populate on the response. Valid values: metadata_state_transitions.\n\n- `include_results?: boolean`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; created_at: string; file_id: string; project_id: string; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; updated_at: string; user_id: string; config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }; configuration_id?: string; errors?: string[]; file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }; metadata_state_transitions?: object; parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }; regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]; success?: boolean; worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]; }`\n A spreadsheet parsing job.\n\n - `id: string`\n - `configuration: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `created_at: string`\n - `file_id: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'`\n - `updated_at: string`\n - `user_id: string`\n - `config?: { extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; use_experimental_processing?: boolean; }`\n - `configuration_id?: string`\n - `errors?: string[]`\n - `file?: { id: string; name: string; project_id: string; created_at?: string; data_source_id?: string; expires_at?: string; external_file_id?: string; file_size?: number; file_type?: string; last_modified_at?: string; permission_info?: object; purpose?: string; resource_info?: object; updated_at?: string; }`\n - `metadata_state_transitions?: object`\n - `parameters?: { webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; }`\n - `regions?: { location: string; region_type: string; sheet_name: string; description?: string; region_id?: string; title?: string; }[]`\n - `success?: boolean`\n - `worksheet_metadata?: { sheet_name: string; description?: string; title?: string; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst sheetsJob = await client.beta.sheets.get('spreadsheet_job_id');\n\nconsole.log(sheetsJob);\n```", perLanguage: { typescript: { method: 'client.beta.sheets.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst sheetsJob = await client.beta.sheets.get('spreadsheet_job_id');\n\nconsole.log(sheetsJob.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/sheets/jobs/$SPREADSHEET_JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.sheets.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsheets_job = client.beta.sheets.get(\n spreadsheet_job_id="spreadsheet_job_id",\n)\nprint(sheets_job.id)', }, java: { method: 'beta().sheets().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetGetParams;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetsJob;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetsJob sheetsJob = client.beta().sheets().get("spreadsheet_job_id");\n }\n}', }, go: { method: 'client.Beta.Sheets.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsheetsJob, err := client.Beta.Sheets.Get(\n\t\tcontext.TODO(),\n\t\t"spreadsheet_job_id",\n\t\tllamacloudprod.BetaSheetGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", sheetsJob.ID)\n}\n', }, cli: { method: 'sheets get', example: "llamacloud-prod beta:sheets get \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id", }, }, }, { name: 'get_result_table', endpoint: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}', httpMethod: 'get', summary: 'Get Result Region', description: 'Generate a presigned URL to download a specific extracted region.', stainlessPath: '(resource) beta.sheets > (method) get_result_table', qualified: 'client.beta.sheets.getResultTable', params: [ 'spreadsheet_job_id: string;', 'region_id: string;', "region_type: 'cell_metadata' | 'extra' | 'table';", 'expires_at_seconds?: number;', 'organization_id?: string;', 'project_id?: string;', ], response: '{ expires_at: string; url: string; form_fields?: object; }', markdown: "## get_result_table\n\n`client.beta.sheets.getResultTable(spreadsheet_job_id: string, region_id: string, region_type: 'cell_metadata' | 'extra' | 'table', expires_at_seconds?: number, organization_id?: string, project_id?: string): { expires_at: string; url: string; form_fields?: object; }`\n\n**get** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}/regions/{region_id}/result/{region_type}`\n\nGenerate a presigned URL to download a specific extracted region.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `region_id: string`\n\n- `region_type: 'cell_metadata' | 'extra' | 'table'`\n\n- `expires_at_seconds?: number`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ expires_at: string; url: string; form_fields?: object; }`\n Schema for a presigned URL.\n\n - `expires_at: string`\n - `url: string`\n - `form_fields?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst presignedURL = await client.beta.sheets.getResultTable('cell_metadata', { spreadsheet_job_id: 'spreadsheet_job_id', region_id: 'region_id' });\n\nconsole.log(presignedURL);\n```", perLanguage: { typescript: { method: 'client.beta.sheets.getResultTable', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst presignedURL = await client.beta.sheets.getResultTable('cell_metadata', {\n spreadsheet_job_id: 'spreadsheet_job_id',\n region_id: 'region_id',\n});\n\nconsole.log(presignedURL.expires_at);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/sheets/jobs/$SPREADSHEET_JOB_ID/regions/$REGION_ID/result/$REGION_TYPE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.sheets.get_result_table', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npresigned_url = client.beta.sheets.get_result_table(\n region_type="cell_metadata",\n spreadsheet_job_id="spreadsheet_job_id",\n region_id="region_id",\n)\nprint(presigned_url.expires_at)', }, java: { method: 'beta().sheets().getResultTable', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetGetResultTableParams;\nimport com.llamacloud_prod.api.models.files.PresignedUrl;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetGetResultTableParams params = SheetGetResultTableParams.builder()\n .spreadsheetJobId("spreadsheet_job_id")\n .regionId("region_id")\n .regionType(SheetGetResultTableParams.RegionType.CELL_METADATA)\n .build();\n PresignedUrl presignedUrl = client.beta().sheets().getResultTable(params);\n }\n}', }, go: { method: 'client.Beta.Sheets.GetResultTable', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpresignedURL, err := client.Beta.Sheets.GetResultTable(\n\t\tcontext.TODO(),\n\t\tllamacloudprod.BetaSheetGetResultTableParamsRegionTypeCellMetadata,\n\t\tllamacloudprod.BetaSheetGetResultTableParams{\n\t\t\tSpreadsheetJobID: "spreadsheet_job_id",\n\t\t\tRegionID: "region_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", presignedURL.ExpiresAt)\n}\n', }, cli: { method: 'sheets get_result_table', example: "llamacloud-prod beta:sheets get-result-table \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id \\\n --region-id region_id \\\n --region-type cell_metadata", }, }, }, { name: 'delete_job', endpoint: '/api/v1/beta/sheets/jobs/{spreadsheet_job_id}', httpMethod: 'delete', summary: 'Delete Spreadsheet Job', description: 'Delete a spreadsheet parsing job and its associated data.', stainlessPath: '(resource) beta.sheets > (method) delete_job', qualified: 'client.beta.sheets.deleteJob', params: ['spreadsheet_job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: 'object', markdown: "## delete_job\n\n`client.beta.sheets.deleteJob(spreadsheet_job_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v1/beta/sheets/jobs/{spreadsheet_job_id}`\n\nDelete a spreadsheet parsing job and its associated data.\n\n### Parameters\n\n- `spreadsheet_job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.sheets.deleteJob('spreadsheet_job_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.sheets.deleteJob', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.sheets.deleteJob('spreadsheet_job_id');\n\nconsole.log(response);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/sheets/jobs/$SPREADSHEET_JOB_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.sheets.delete_job', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.sheets.delete_job(\n spreadsheet_job_id="spreadsheet_job_id",\n)\nprint(response)', }, java: { method: 'beta().sheets().deleteJob', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetDeleteJobParams;\nimport com.llamacloud_prod.api.models.beta.sheets.SheetDeleteJobResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SheetDeleteJobResponse response = client.beta().sheets().deleteJob("spreadsheet_job_id");\n }\n}', }, go: { method: 'client.Beta.Sheets.DeleteJob', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Sheets.DeleteJob(\n\t\tcontext.TODO(),\n\t\t"spreadsheet_job_id",\n\t\tllamacloudprod.BetaSheetDeleteJobParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n', }, cli: { method: 'sheets delete_job', example: "llamacloud-prod beta:sheets delete-job \\\n --api-key 'My API Key' \\\n --spreadsheet-job-id spreadsheet_job_id", }, }, }, { name: 'create', endpoint: '/api/v1/beta/directories', httpMethod: 'post', summary: 'Create Directory', description: 'Create a new directory within the specified project.', stainlessPath: '(resource) beta.directories > (method) create', qualified: 'client.beta.directories.create', params: [ 'name: string;', 'organization_id?: string;', 'project_id?: string;', 'description?: string;', 'expires_at?: string;', 'system_metadata?: object;', "type?: 'ephemeral' | 'user';", ], response: "{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }", markdown: "## create\n\n`client.beta.directories.create(name: string, organization_id?: string, project_id?: string, description?: string, expires_at?: string, system_metadata?: object, type?: 'ephemeral' | 'user'): { id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n\n**post** `/api/v1/beta/directories`\n\nCreate a new directory within the specified project.\n\n### Parameters\n\n- `name: string`\n Human-readable name for the directory.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `description?: string`\n Optional description shown to users.\n\n- `expires_at?: string`\n When this directory expires. Required for ephemeral directories.\n\n- `system_metadata?: object`\n Reserved system-managed metadata.\n\n- `type?: 'ephemeral' | 'user'`\n Directory type. Use 'ephemeral' for batch processing with automatic cleanup.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n API response schema for a directory.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `description?: string`\n - `expires_at?: string`\n - `system_metadata?: object`\n - `type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst directory = await client.beta.directories.create({ name: 'x' });\n\nconsole.log(directory);\n```", perLanguage: { typescript: { method: 'client.beta.directories.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst directory = await client.beta.directories.create({ name: 'x' });\n\nconsole.log(directory.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "name": "x",\n "expires_at": "2026-05-10T00:00:00Z",\n "type": "user"\n }\'', }, python: { method: 'beta.directories.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndirectory = client.beta.directories.create(\n name="x",\n)\nprint(directory.id)', }, java: { method: 'beta().directories().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryCreateParams;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DirectoryCreateParams params = DirectoryCreateParams.builder()\n .name("x")\n .build();\n DirectoryCreateResponse directory = client.beta().directories().create(params);\n }\n}', }, go: { method: 'client.Beta.Directories.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdirectory, err := client.Beta.Directories.New(context.TODO(), llamacloudprod.BetaDirectoryNewParams{\n\t\tName: "x",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", directory.ID)\n}\n', }, cli: { method: 'directories create', example: "llamacloud-prod beta:directories create \\\n --api-key 'My API Key' \\\n --name x", }, }, }, { name: 'list', endpoint: '/api/v1/beta/directories', httpMethod: 'get', summary: 'List Directories', description: 'List Directories', stainlessPath: '(resource) beta.directories > (method) list', qualified: 'client.beta.directories.list', params: [ 'include_deleted?: boolean;', 'name?: string;', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "type?: 'ephemeral' | 'index' | 'user';", "types?: 'ephemeral' | 'index' | 'user'[];", ], response: "{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }", markdown: "## list\n\n`client.beta.directories.list(include_deleted?: boolean, name?: string, organization_id?: string, page_size?: number, page_token?: string, project_id?: string, type?: 'ephemeral' | 'index' | 'user', types?: 'ephemeral' | 'index' | 'user'[]): { id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n\n**get** `/api/v1/beta/directories`\n\nList Directories\n\n### Parameters\n\n- `include_deleted?: boolean`\n Include deleted directories.\n\n- `name?: string`\n Directory name to match.\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `type?: 'ephemeral' | 'index' | 'user'`\n Directory type to include.\n\n- `types?: 'ephemeral' | 'index' | 'user'[]`\n Filter by one or more directory types. Repeat the parameter for multiple values.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n API response schema for a directory.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `description?: string`\n - `expires_at?: string`\n - `system_metadata?: object`\n - `type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const directoryListResponse of client.beta.directories.list()) {\n console.log(directoryListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.directories.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const directoryListResponse of client.beta.directories.list()) {\n console.log(directoryListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.directories.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().directories().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryListPage;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DirectoryListPage page = client.beta().directories().list();\n }\n}', }, go: { method: 'client.Beta.Directories.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Directories.List(context.TODO(), llamacloudprod.BetaDirectoryListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'directories list', example: "llamacloud-prod beta:directories list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/beta/directories/{directory_id}', httpMethod: 'get', summary: 'Get Directory', description: 'Retrieve a directory by its identifier.', stainlessPath: '(resource) beta.directories > (method) get', qualified: 'client.beta.directories.get', params: ['directory_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }", markdown: "## get\n\n`client.beta.directories.get(directory_id: string, organization_id?: string, project_id?: string): { id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n\n**get** `/api/v1/beta/directories/{directory_id}`\n\nRetrieve a directory by its identifier.\n\n### Parameters\n\n- `directory_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n API response schema for a directory.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `description?: string`\n - `expires_at?: string`\n - `system_metadata?: object`\n - `type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst directory = await client.beta.directories.get('directory_id');\n\nconsole.log(directory);\n```", perLanguage: { typescript: { method: 'client.beta.directories.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst directory = await client.beta.directories.get('directory_id');\n\nconsole.log(directory.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndirectory = client.beta.directories.get(\n directory_id="directory_id",\n)\nprint(directory.id)', }, java: { method: 'beta().directories().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryGetParams;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DirectoryGetResponse directory = client.beta().directories().get("directory_id");\n }\n}', }, go: { method: 'client.Beta.Directories.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdirectory, err := client.Beta.Directories.Get(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", directory.ID)\n}\n', }, cli: { method: 'directories get', example: "llamacloud-prod beta:directories get \\\n --api-key 'My API Key' \\\n --directory-id directory_id", }, }, }, { name: 'update', endpoint: '/api/v1/beta/directories/{directory_id}', httpMethod: 'patch', summary: 'Update Directory', description: 'Update directory metadata.', stainlessPath: '(resource) beta.directories > (method) update', qualified: 'client.beta.directories.update', params: [ 'directory_id: string;', 'organization_id?: string;', 'project_id?: string;', 'description?: string;', 'name?: string;', ], response: "{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }", markdown: "## update\n\n`client.beta.directories.update(directory_id: string, organization_id?: string, project_id?: string, description?: string, name?: string): { id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n\n**patch** `/api/v1/beta/directories/{directory_id}`\n\nUpdate directory metadata.\n\n### Parameters\n\n- `directory_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `description?: string`\n Updated description for the directory.\n\n- `name?: string`\n Updated name for the directory.\n\n### Returns\n\n- `{ id: string; name: string; project_id: string; created_at?: string; deleted_at?: string; description?: string; expires_at?: string; system_metadata?: object; type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'; updated_at?: string; }`\n API response schema for a directory.\n\n - `id: string`\n - `name: string`\n - `project_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `description?: string`\n - `expires_at?: string`\n - `system_metadata?: object`\n - `type?: 'ephemeral' | 'index' | 'system_ephemeral' | 'user'`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst directory = await client.beta.directories.update('directory_id');\n\nconsole.log(directory);\n```", perLanguage: { typescript: { method: 'client.beta.directories.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst directory = await client.beta.directories.update('directory_id');\n\nconsole.log(directory.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'beta.directories.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\ndirectory = client.beta.directories.update(\n directory_id="directory_id",\n)\nprint(directory.id)', }, java: { method: 'beta().directories().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryUpdateParams;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n DirectoryUpdateResponse directory = client.beta().directories().update("directory_id");\n }\n}', }, go: { method: 'client.Beta.Directories.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tdirectory, err := client.Beta.Directories.Update(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryUpdateParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", directory.ID)\n}\n', }, cli: { method: 'directories update', example: "llamacloud-prod beta:directories update \\\n --api-key 'My API Key' \\\n --directory-id directory_id", }, }, }, { name: 'delete', endpoint: '/api/v1/beta/directories/{directory_id}', httpMethod: 'delete', summary: 'Delete Directory', description: 'Permanently delete a directory.', stainlessPath: '(resource) beta.directories > (method) delete', qualified: 'client.beta.directories.delete', params: ['directory_id: string;', 'organization_id?: string;', 'project_id?: string;'], markdown: "## delete\n\n`client.beta.directories.delete(directory_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/beta/directories/{directory_id}`\n\nPermanently delete a directory.\n\n### Parameters\n\n- `directory_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.directories.delete('directory_id')\n```", perLanguage: { typescript: { method: 'client.beta.directories.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.directories.delete('directory_id');", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.directories.delete(\n directory_id="directory_id",\n)', }, java: { method: 'beta().directories().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.DirectoryDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n client.beta().directories().delete("directory_id");\n }\n}', }, go: { method: 'client.Beta.Directories.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Beta.Directories.Delete(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'directories delete', example: "llamacloud-prod beta:directories delete \\\n --api-key 'My API Key' \\\n --directory-id directory_id", }, }, }, { name: 'add', endpoint: '/api/v1/beta/directories/{directory_id}/files', httpMethod: 'post', summary: 'Add Directory File', description: 'Create a new file within the specified directory; the directory must exist in the project and `file_id` must reference an existing file.', stainlessPath: '(resource) beta.directories.files > (method) add', qualified: 'client.beta.directories.files.add', params: [ 'directory_id: string;', 'file_id: string;', 'organization_id?: string;', 'project_id?: string;', 'display_name?: string;', 'metadata?: object;', 'unique_id?: string;', ], response: '{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }', markdown: "## add\n\n`client.beta.directories.files.add(directory_id: string, file_id: string, organization_id?: string, project_id?: string, display_name?: string, metadata?: object, unique_id?: string): { id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: presigned_url; file_id?: string; metadata?: object; updated_at?: string; }`\n\n**post** `/api/v1/beta/directories/{directory_id}/files`\n\nCreate a new file within the specified directory; the directory must exist in the project and `file_id` must reference an existing file.\n\n### Parameters\n\n- `directory_id: string`\n\n- `file_id: string`\n File ID for the storage location (required).\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `display_name?: string`\n Display name for the file. If not provided, will use the file's name.\n\n- `metadata?: object`\n User-defined metadata key-value pairs to associate with the file.\n\n- `unique_id?: string`\n Unique identifier for the file in the directory. If not provided, will use the file's external_file_id or name.\n\n### Returns\n\n- `{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }`\n API response schema for a directory file.\n\n - `id: string`\n - `directory_id: string`\n - `display_name: string`\n - `project_id: string`\n - `unique_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `file_id?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.directories.files.add('directory_id', { file_id: 'file_id' });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.add', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.directories.files.add('directory_id', { file_id: 'file_id' });\n\nconsole.log(response.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id"\n }\'', }, python: { method: 'beta.directories.files.add', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.directories.files.add(\n directory_id="directory_id",\n file_id="file_id",\n)\nprint(response.id)', }, java: { method: 'beta().directories().files().add', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileAddParams;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileAddResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileAddParams params = FileAddParams.builder()\n .directoryId("directory_id")\n .fileId("file_id")\n .build();\n FileAddResponse response = client.beta().directories().files().add(params);\n }\n}', }, go: { method: 'client.Beta.Directories.Files.Add', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Directories.Files.Add(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryFileAddParams{\n\t\t\tFileID: "file_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n', }, cli: { method: 'files add', example: "llamacloud-prod beta:directories:files add \\\n --api-key 'My API Key' \\\n --directory-id directory_id \\\n --file-id file_id", }, }, }, { name: 'list', endpoint: '/api/v1/beta/directories/{directory_id}/files', httpMethod: 'get', summary: 'List Directory Files', description: 'List all files within the specified directory with optional filtering and pagination.', stainlessPath: '(resource) beta.directories.files > (method) list', qualified: 'client.beta.directories.files.list', params: [ 'directory_id: string;', 'display_name?: string;', 'display_name_contains?: string;', 'expand?: string[];', 'file_id?: string;', 'include_deleted?: boolean;', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', 'unique_id?: string;', 'updated_at_on_or_after?: string;', 'updated_at_on_or_before?: string;', ], response: '{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }', markdown: "## list\n\n`client.beta.directories.files.list(directory_id: string, display_name?: string, display_name_contains?: string, expand?: string[], file_id?: string, include_deleted?: boolean, organization_id?: string, page_size?: number, page_token?: string, project_id?: string, unique_id?: string, updated_at_on_or_after?: string, updated_at_on_or_before?: string): { id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: presigned_url; file_id?: string; metadata?: object; updated_at?: string; }`\n\n**get** `/api/v1/beta/directories/{directory_id}/files`\n\nList all files within the specified directory with optional filtering and pagination.\n\n### Parameters\n\n- `directory_id: string`\n\n- `display_name?: string`\n\n- `display_name_contains?: string`\n\n- `expand?: string[]`\n Fields to expand on each directory file.\n\n- `file_id?: string`\n\n- `include_deleted?: boolean`\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `unique_id?: string`\n\n- `updated_at_on_or_after?: string`\n Include items updated at or after this timestamp (inclusive)\n\n- `updated_at_on_or_before?: string`\n Include items updated at or before this timestamp (inclusive)\n\n### Returns\n\n- `{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }`\n API response schema for a directory file.\n\n - `id: string`\n - `directory_id: string`\n - `display_name: string`\n - `project_id: string`\n - `unique_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `file_id?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.beta.directories.files.list('directory_id')) {\n console.log(fileListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const fileListResponse of client.beta.directories.files.list('directory_id')) {\n console.log(fileListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.files.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.directories.files.list(\n directory_id="directory_id",\n)\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().directories().files().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileListPage;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileListPage page = client.beta().directories().files().list("directory_id");\n }\n}', }, go: { method: 'client.Beta.Directories.Files.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Directories.Files.List(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryFileListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'files list', example: "llamacloud-prod beta:directories:files list \\\n --api-key 'My API Key' \\\n --directory-id directory_id", }, }, }, { name: 'get', endpoint: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}', httpMethod: 'get', summary: 'Get Directory File', description: 'Get a directory file by `directory_file_id`; to look up by `unique_id`, use the list endpoint with a filter.', stainlessPath: '(resource) beta.directories.files > (method) get', qualified: 'client.beta.directories.files.get', params: [ 'directory_id: string;', 'directory_file_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;', ], response: '{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }', markdown: "## get\n\n`client.beta.directories.files.get(directory_id: string, directory_file_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: presigned_url; file_id?: string; metadata?: object; updated_at?: string; }`\n\n**get** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`\n\nGet a directory file by `directory_file_id`; to look up by `unique_id`, use the list endpoint with a filter.\n\n### Parameters\n\n- `directory_id: string`\n\n- `directory_file_id: string`\n\n- `expand?: string[]`\n Fields to expand.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }`\n API response schema for a directory file.\n\n - `id: string`\n - `directory_id: string`\n - `display_name: string`\n - `project_id: string`\n - `unique_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `file_id?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst file = await client.beta.directories.files.get('directory_file_id', { directory_id: 'directory_id' });\n\nconsole.log(file);\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.beta.directories.files.get('directory_file_id', {\n directory_id: 'directory_id',\n});\n\nconsole.log(file.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files/$DIRECTORY_FILE_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.files.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nfile = client.beta.directories.files.get(\n directory_file_id="directory_file_id",\n directory_id="directory_id",\n)\nprint(file.id)', }, java: { method: 'beta().directories().files().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileGetParams;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileGetParams params = FileGetParams.builder()\n .directoryId("directory_id")\n .directoryFileId("directory_file_id")\n .build();\n FileGetResponse file = client.beta().directories().files().get(params);\n }\n}', }, go: { method: 'client.Beta.Directories.Files.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfile, err := client.Beta.Directories.Files.Get(\n\t\tcontext.TODO(),\n\t\t"directory_file_id",\n\t\tllamacloudprod.BetaDirectoryFileGetParams{\n\t\t\tDirectoryID: "directory_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", file.ID)\n}\n', }, cli: { method: 'files get', example: "llamacloud-prod beta:directories:files get \\\n --api-key 'My API Key' \\\n --directory-id directory_id \\\n --directory-file-id directory_file_id", }, }, }, { name: 'update', endpoint: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}', httpMethod: 'patch', summary: 'Update Directory File', description: '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.', stainlessPath: '(resource) beta.directories.files > (method) update', qualified: 'client.beta.directories.files.update', params: [ 'directory_id: string;', 'directory_file_id: string;', 'organization_id?: string;', 'project_id?: string;', 'display_name?: string;', 'metadata?: object;', 'target_directory_id?: string;', 'unique_id?: string;', ], response: '{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }', markdown: "## update\n\n`client.beta.directories.files.update(directory_id: string, directory_file_id: string, organization_id?: string, project_id?: string, display_name?: string, metadata?: object, target_directory_id?: string, unique_id?: string): { id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: presigned_url; file_id?: string; metadata?: object; updated_at?: string; }`\n\n**patch** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`\n\nUpdate 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.\n\n### Parameters\n\n- `directory_id: string`\n\n- `directory_file_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `display_name?: string`\n Updated display name.\n\n- `metadata?: object`\n User-defined metadata key-value pairs. Replaces the user metadata layer.\n\n- `target_directory_id?: string`\n Move file to a different directory.\n\n- `unique_id?: string`\n Updated unique identifier.\n\n### Returns\n\n- `{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }`\n API response schema for a directory file.\n\n - `id: string`\n - `directory_id: string`\n - `display_name: string`\n - `project_id: string`\n - `unique_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `file_id?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst file = await client.beta.directories.files.update('directory_file_id', { directory_id: 'directory_id' });\n\nconsole.log(file);\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.update', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst file = await client.beta.directories.files.update('directory_file_id', {\n directory_id: 'directory_id',\n});\n\nconsole.log(file.id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files/$DIRECTORY_FILE_ID \\\n -X PATCH \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'beta.directories.files.update', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nfile = client.beta.directories.files.update(\n directory_file_id="directory_file_id",\n directory_id="directory_id",\n)\nprint(file.id)', }, java: { method: 'beta().directories().files().update', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileUpdateParams;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileUpdateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileUpdateParams params = FileUpdateParams.builder()\n .directoryId("directory_id")\n .directoryFileId("directory_file_id")\n .build();\n FileUpdateResponse file = client.beta().directories().files().update(params);\n }\n}', }, go: { method: 'client.Beta.Directories.Files.Update', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tfile, err := client.Beta.Directories.Files.Update(\n\t\tcontext.TODO(),\n\t\t"directory_file_id",\n\t\tllamacloudprod.BetaDirectoryFileUpdateParams{\n\t\t\tDirectoryID: "directory_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", file.ID)\n}\n', }, cli: { method: 'files update', example: "llamacloud-prod beta:directories:files update \\\n --api-key 'My API Key' \\\n --directory-id directory_id \\\n --directory-file-id directory_file_id", }, }, }, { name: 'delete', endpoint: '/api/v1/beta/directories/{directory_id}/files/{directory_file_id}', httpMethod: 'delete', summary: 'Delete Directory File', description: 'Delete a directory file by `directory_file_id`; to resolve from `unique_id`, list with a filter first.', stainlessPath: '(resource) beta.directories.files > (method) delete', qualified: 'client.beta.directories.files.delete', params: [ 'directory_id: string;', 'directory_file_id: string;', 'organization_id?: string;', 'project_id?: string;', ], markdown: "## delete\n\n`client.beta.directories.files.delete(directory_id: string, directory_file_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/beta/directories/{directory_id}/files/{directory_file_id}`\n\nDelete a directory file by `directory_file_id`; to resolve from `unique_id`, list with a filter first.\n\n### Parameters\n\n- `directory_id: string`\n\n- `directory_file_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.directories.files.delete('directory_file_id', { directory_id: 'directory_id' })\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.delete', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.directories.files.delete('directory_file_id', { directory_id: 'directory_id' });", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files/$DIRECTORY_FILE_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.directories.files.delete', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.directories.files.delete(\n directory_file_id="directory_file_id",\n directory_id="directory_id",\n)', }, java: { method: 'beta().directories().files().delete', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileDeleteParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileDeleteParams params = FileDeleteParams.builder()\n .directoryId("directory_id")\n .directoryFileId("directory_file_id")\n .build();\n client.beta().directories().files().delete(params);\n }\n}', }, go: { method: 'client.Beta.Directories.Files.Delete', example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Beta.Directories.Files.Delete(\n\t\tcontext.TODO(),\n\t\t"directory_file_id",\n\t\tllamacloudprod.BetaDirectoryFileDeleteParams{\n\t\t\tDirectoryID: "directory_id",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n', }, cli: { method: 'files delete', example: "llamacloud-prod beta:directories:files delete \\\n --api-key 'My API Key' \\\n --directory-id directory_id \\\n --directory-file-id directory_file_id", }, }, }, { name: 'upload', endpoint: '/api/v1/beta/directories/{directory_id}/files/upload', httpMethod: 'post', summary: 'Upload File To Directory', description: 'Upload a file and create its directory entry in one call; `unique_id` / `display_name` default to values derived from file metadata.', stainlessPath: '(resource) beta.directories.files > (method) upload', qualified: 'client.beta.directories.files.upload', params: [ 'directory_id: string;', 'upload_file: string;', 'organization_id?: string;', 'project_id?: string;', 'display_name?: string;', 'external_file_id?: string;', 'metadata?: string;', 'unique_id?: string;', ], response: '{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }', markdown: "## upload\n\n`client.beta.directories.files.upload(directory_id: string, upload_file: string, organization_id?: string, project_id?: string, display_name?: string, external_file_id?: string, metadata?: string, unique_id?: string): { id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: presigned_url; file_id?: string; metadata?: object; updated_at?: string; }`\n\n**post** `/api/v1/beta/directories/{directory_id}/files/upload`\n\nUpload a file and create its directory entry in one call; `unique_id` / `display_name` default to values derived from file metadata.\n\n### Parameters\n\n- `directory_id: string`\n\n- `upload_file: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `display_name?: string`\n\n- `external_file_id?: string`\n\n- `metadata?: string`\n User metadata as a JSON object string.\n\n- `unique_id?: string`\n\n### Returns\n\n- `{ id: string; directory_id: string; display_name: string; project_id: string; unique_id: string; created_at?: string; deleted_at?: string; download_url?: { expires_at: string; url: string; form_fields?: object; }; file_id?: string; metadata?: object; updated_at?: string; }`\n API response schema for a directory file.\n\n - `id: string`\n - `directory_id: string`\n - `display_name: string`\n - `project_id: string`\n - `unique_id: string`\n - `created_at?: string`\n - `deleted_at?: string`\n - `download_url?: { expires_at: string; url: string; form_fields?: object; }`\n - `file_id?: string`\n - `metadata?: object`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.directories.files.upload('directory_id', { upload_file: fs.createReadStream('path/to/file') });\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.directories.files.upload', example: "import fs from 'fs';\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.directories.files.upload('directory_id', {\n upload_file: fs.createReadStream('path/to/file'),\n});\n\nconsole.log(response.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/directories/$DIRECTORY_ID/files/upload \\\n -H \'Content-Type: multipart/form-data\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -F \'upload_file=@/path/to/upload_file\' \\\n -F metadata=\'{"source": "web", "priority": 1}\'', }, python: { method: 'beta.directories.files.upload', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.directories.files.upload(\n directory_id="directory_id",\n upload_file=b"Example data",\n)\nprint(response.id)', }, java: { method: 'beta().directories().files().upload', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileUploadParams;\nimport com.llamacloud_prod.api.models.beta.directories.files.FileUploadResponse;\nimport java.io.ByteArrayInputStream;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n FileUploadParams params = FileUploadParams.builder()\n .directoryId("directory_id")\n .uploadFile(new ByteArrayInputStream("Example data".getBytes()))\n .build();\n FileUploadResponse response = client.beta().directories().files().upload(params);\n }\n}', }, go: { method: 'client.Beta.Directories.Files.Upload', example: 'package main\n\nimport (\n\t"bytes"\n\t"context"\n\t"fmt"\n\t"io"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Directories.Files.Upload(\n\t\tcontext.TODO(),\n\t\t"directory_id",\n\t\tllamacloudprod.BetaDirectoryFileUploadParams{\n\t\t\tUploadFile: io.Reader(bytes.NewBuffer([]byte("Example data"))),\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n', }, cli: { method: 'files upload', example: "llamacloud-prod beta:directories:files upload \\\n --api-key 'My API Key' \\\n --directory-id directory_id \\\n --upload-file 'Example data'", }, }, }, { name: 'create', endpoint: '/api/v1/beta/batch-processing', httpMethod: 'post', summary: 'Create Batch Job', description: 'Create a batch processing job.\n\nProcesses files from a directory or a specific list of item IDs.\nSupports batch parsing and classification operations.\n\nProvide either `directory_id` to process all files in a directory,\nor `item_ids` for specific items. The job runs asynchronously —\npoll `GET /batch/{job_id}` for progress.', stainlessPath: '(resource) beta.batch > (method) create', qualified: 'client.beta.batch.create', params: [ "job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; custom_metadata?: object; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; lang?: string; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; outputBucket?: string; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; pipeline_id?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; resource_info?: object; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; type?: 'parse'; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | { id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; };", 'organization_id?: string;', 'project_id?: string;', 'continue_as_new_threshold?: number;', 'directory_id?: string;', 'item_ids?: string[];', 'page_size?: number;', 'temporal-namespace?: string;', ], response: "{ id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }", markdown: "## create\n\n`client.beta.batch.create(job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; custom_metadata?: object; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; lang?: string; languages?: parsing_languages[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; outputBucket?: string; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: parsing_mode; parsing_instruction?: string; pipeline_id?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: fail_page_mode; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; resource_info?: object; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; type?: 'parse'; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: object[]; webhook_url?: string; }; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | { id: string; project_id: string; rules: classifier_rule[]; status: status_enum; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: classify_parsing_configuration; updated_at?: string; }, organization_id?: string, project_id?: string, continue_as_new_threshold?: number, directory_id?: string, item_ids?: string[], page_size?: number, temporal-namespace?: string): { id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }`\n\n**post** `/api/v1/beta/batch-processing`\n\nCreate a batch processing job.\n\nProcesses files from a directory or a specific list of item IDs.\nSupports batch parsing and classification operations.\n\nProvide either `directory_id` to process all files in a directory,\nor `item_ids` for specific items. The job runs asynchronously —\npoll `GET /batch/{job_id}` for progress.\n\n### Parameters\n\n- `job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; custom_metadata?: object; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; lang?: string; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; outputBucket?: string; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; pipeline_id?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; resource_info?: object; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; type?: 'parse'; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | { id: string; project_id: string; rules: { description: string; type: string; }[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: { lang?: parsing_languages; max_pages?: number; target_pages?: number[]; }; updated_at?: string; }`\n Job configuration — either a parse or classify config\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `continue_as_new_threshold?: number`\n Maximum files to process per execution cycle in directory mode. Defaults to page_size.\n\n- `directory_id?: string`\n ID of the directory containing files to process\n\n- `item_ids?: string[]`\n List of specific item IDs to process. Either this or directory_id must be provided.\n\n- `page_size?: number`\n Number of files to process per batch when using directory mode\n\n- `temporal-namespace?: string`\n\n### Returns\n\n- `{ id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }`\n Response schema for a batch processing job.\n\n - `id: string`\n - `job_type: 'classify' | 'extract' | 'parse'`\n - `project_id: string`\n - `status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'`\n - `total_items: number`\n - `completed_at?: string`\n - `created_at?: string`\n - `directory_id?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `failed_items?: number`\n - `job_record_id?: string`\n - `processed_items?: number`\n - `skipped_items?: number`\n - `started_at?: string`\n - `updated_at?: string`\n - `workflow_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst batch = await client.beta.batch.create({ job_config: {} });\n\nconsole.log(batch);\n```", perLanguage: { typescript: { method: 'client.beta.batch.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst batch = await client.beta.batch.create({ job_config: {} });\n\nconsole.log(batch.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "job_config": {},\n "directory_id": "dir-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "item_ids": [\n "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n "dfl-11111111-2222-3333-4444-555555555555"\n ]\n }\'', }, python: { method: 'beta.batch.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nbatch = client.beta.batch.create(\n job_config={},\n)\nprint(batch.id)', }, java: { method: 'beta().batch().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.BatchCreateParams;\nimport com.llamacloud_prod.api.models.beta.batch.BatchCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchCreateParams params = BatchCreateParams.builder()\n .jobConfig(BatchCreateParams.JobConfig.BatchParseJobRecordCreate.builder().build())\n .build();\n BatchCreateResponse batch = client.beta().batch().create(params);\n }\n}', }, go: { method: 'client.Beta.Batch.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tbatch, err := client.Beta.Batch.New(context.TODO(), llamacloudprod.BetaBatchNewParams{\n\t\tJobConfig: llamacloudprod.BetaBatchNewParamsJobConfigUnion{\n\t\t\tOfBatchParseJobRecordCreate: &llamacloudprod.BetaBatchNewParamsJobConfigBatchParseJobRecordCreate{},\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", batch.ID)\n}\n', }, cli: { method: 'batch create', example: "llamacloud-prod beta:batch create \\\n --api-key 'My API Key' \\\n --job-config '{}'", }, }, }, { name: 'list', endpoint: '/api/v1/beta/batch-processing', httpMethod: 'get', summary: 'List Batch Jobs', description: 'List batch processing jobs with optional filtering.\n\nFilter by `directory_id`, `job_type`, or `status`. Results\nare paginated with configurable `limit` and `offset`.', stainlessPath: '(resource) beta.batch > (method) list', qualified: 'client.beta.batch.list', params: [ 'directory_id?: string;', "job_type?: 'classify' | 'extract' | 'parse';", 'limit?: number;', 'offset?: number;', 'organization_id?: string;', 'project_id?: string;', "status?: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running';", ], response: "{ id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }", markdown: "## list\n\n`client.beta.batch.list(directory_id?: string, job_type?: 'classify' | 'extract' | 'parse', limit?: number, offset?: number, organization_id?: string, project_id?: string, status?: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'): { id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }`\n\n**get** `/api/v1/beta/batch-processing`\n\nList batch processing jobs with optional filtering.\n\nFilter by `directory_id`, `job_type`, or `status`. Results\nare paginated with configurable `limit` and `offset`.\n\n### Parameters\n\n- `directory_id?: string`\n Filter by directory ID\n\n- `job_type?: 'classify' | 'extract' | 'parse'`\n Filter by job type (PARSE, EXTRACT, CLASSIFY)\n\n- `limit?: number`\n Maximum number of jobs to return\n\n- `offset?: number`\n Number of jobs to skip for pagination\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `status?: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'`\n Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)\n\n### Returns\n\n- `{ id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }`\n Response schema for a batch processing job.\n\n - `id: string`\n - `job_type: 'classify' | 'extract' | 'parse'`\n - `project_id: string`\n - `status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'`\n - `total_items: number`\n - `completed_at?: string`\n - `created_at?: string`\n - `directory_id?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `failed_items?: number`\n - `job_record_id?: string`\n - `processed_items?: number`\n - `skipped_items?: number`\n - `started_at?: string`\n - `updated_at?: string`\n - `workflow_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const batchListResponse of client.beta.batch.list()) {\n console.log(batchListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.batch.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const batchListResponse of client.beta.batch.list()) {\n console.log(batchListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.batch.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.batch.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().batch().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.BatchListPage;\nimport com.llamacloud_prod.api.models.beta.batch.BatchListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchListPage page = client.beta().batch().list();\n }\n}', }, go: { method: 'client.Beta.Batch.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Batch.List(context.TODO(), llamacloudprod.BetaBatchListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'batch list', example: "llamacloud-prod beta:batch list \\\n --api-key 'My API Key'", }, }, }, { name: 'get_status', endpoint: '/api/v1/beta/batch-processing/{job_id}', httpMethod: 'get', summary: 'Get Batch Job Status', description: 'Get detailed status of a batch processing job.\n\nReturns current progress percentage, file counts (total,\nprocessed, failed, skipped), and timestamps.', stainlessPath: '(resource) beta.batch > (method) get_status', qualified: 'client.beta.batch.getStatus', params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: "{ job: { id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }; progress_percentage: number; }", markdown: "## get_status\n\n`client.beta.batch.getStatus(job_id: string, organization_id?: string, project_id?: string): { job: object; progress_percentage: number; }`\n\n**get** `/api/v1/beta/batch-processing/{job_id}`\n\nGet detailed status of a batch processing job.\n\nReturns current progress percentage, file counts (total,\nprocessed, failed, skipped), and timestamps.\n\n### Parameters\n\n- `job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ job: { id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }; progress_percentage: number; }`\n Detailed status response for a batch processing job.\n\n - `job: { id: string; job_type: 'classify' | 'extract' | 'parse'; project_id: string; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; total_items: number; completed_at?: string; created_at?: string; directory_id?: string; effective_at?: string; error_message?: string; failed_items?: number; job_record_id?: string; processed_items?: number; skipped_items?: number; started_at?: string; updated_at?: string; workflow_id?: string; }`\n - `progress_percentage: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.batch.getStatus('job_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.batch.getStatus', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.batch.getStatus('job_id');\n\nconsole.log(response.job);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.batch.get_status', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.batch.get_status(\n job_id="job_id",\n)\nprint(response.job)', }, java: { method: 'beta().batch().getStatus', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.BatchGetStatusParams;\nimport com.llamacloud_prod.api.models.beta.batch.BatchGetStatusResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchGetStatusResponse response = client.beta().batch().getStatus("job_id");\n }\n}', }, go: { method: 'client.Beta.Batch.GetStatus', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Batch.GetStatus(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.BetaBatchGetStatusParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.Job)\n}\n', }, cli: { method: 'batch get_status', example: "llamacloud-prod beta:batch get-status \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'cancel', endpoint: '/api/v1/beta/batch-processing/{job_id}/cancel', httpMethod: 'post', summary: 'Cancel Batch Job', description: 'Cancel a running batch processing job.\n\nStops processing and marks pending items as cancelled.\nItems currently being processed may still complete.', stainlessPath: '(resource) beta.batch > (method) cancel', qualified: 'client.beta.batch.cancel', params: [ 'job_id: string;', 'organization_id?: string;', 'project_id?: string;', 'reason?: string;', 'temporal-namespace?: string;', ], response: "{ job_id: string; message: string; processed_items: number; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; }", markdown: "## cancel\n\n`client.beta.batch.cancel(job_id: string, organization_id?: string, project_id?: string, reason?: string, temporal-namespace?: string): { job_id: string; message: string; processed_items: number; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; }`\n\n**post** `/api/v1/beta/batch-processing/{job_id}/cancel`\n\nCancel a running batch processing job.\n\nStops processing and marks pending items as cancelled.\nItems currently being processed may still complete.\n\n### Parameters\n\n- `job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `reason?: string`\n Optional reason for cancelling the job\n\n- `temporal-namespace?: string`\n\n### Returns\n\n- `{ job_id: string; message: string; processed_items: number; status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'; }`\n Response after cancelling a batch job.\n\n - `job_id: string`\n - `message: string`\n - `processed_items: number`\n - `status: 'cancelled' | 'completed' | 'dispatched' | 'failed' | 'pending' | 'running'`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.batch.cancel('job_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.batch.cancel', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.batch.cancel('job_id');\n\nconsole.log(response.job_id);", }, http: { example: "curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing/$JOB_ID/cancel \\\n -H 'Content-Type: application/json' \\\n -H \"Authorization: Bearer $LLAMA_CLOUD_API_KEY\" \\\n -d '{}'", }, python: { method: 'beta.batch.cancel', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.batch.cancel(\n job_id="job_id",\n)\nprint(response.job_id)', }, java: { method: 'beta().batch().cancel', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.BatchCancelParams;\nimport com.llamacloud_prod.api.models.beta.batch.BatchCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n BatchCancelResponse response = client.beta().batch().cancel("job_id");\n }\n}', }, go: { method: 'client.Beta.Batch.Cancel', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Batch.Cancel(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.BetaBatchCancelParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.JobID)\n}\n', }, cli: { method: 'batch cancel', example: "llamacloud-prod beta:batch cancel \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'list', endpoint: '/api/v1/beta/batch-processing/{job_id}/items', httpMethod: 'get', summary: 'List Batch Job Items', description: 'List items in a batch job with optional status filtering.\n\nUseful for finding failed items, viewing completed items,\nor debugging processing issues.', stainlessPath: '(resource) beta.batch.job_items > (method) list', qualified: 'client.beta.batch.jobItems.list', params: [ 'job_id: string;', 'limit?: number;', 'offset?: number;', 'organization_id?: string;', 'project_id?: string;', "status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped';", ], response: "{ item_id: string; item_name: string; status: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'; completed_at?: string; effective_at?: string; error_message?: string; job_id?: string; job_record_id?: string; skip_reason?: string; started_at?: string; }", markdown: "## list\n\n`client.beta.batch.jobItems.list(job_id: string, limit?: number, offset?: number, organization_id?: string, project_id?: string, status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'): { item_id: string; item_name: string; status: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'; completed_at?: string; effective_at?: string; error_message?: string; job_id?: string; job_record_id?: string; skip_reason?: string; started_at?: string; }`\n\n**get** `/api/v1/beta/batch-processing/{job_id}/items`\n\nList items in a batch job with optional status filtering.\n\nUseful for finding failed items, viewing completed items,\nor debugging processing issues.\n\n### Parameters\n\n- `job_id: string`\n\n- `limit?: number`\n Maximum number of items to return\n\n- `offset?: number`\n Number of items to skip\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'`\n Filter items by status\n\n### Returns\n\n- `{ item_id: string; item_name: string; status: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'; completed_at?: string; effective_at?: string; error_message?: string; job_id?: string; job_record_id?: string; skip_reason?: string; started_at?: string; }`\n Detailed information about an item in a batch job.\n\n - `item_id: string`\n - `item_name: string`\n - `status: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing' | 'skipped'`\n - `completed_at?: string`\n - `effective_at?: string`\n - `error_message?: string`\n - `job_id?: string`\n - `job_record_id?: string`\n - `skip_reason?: string`\n - `started_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const jobItemListResponse of client.beta.batch.jobItems.list('job_id')) {\n console.log(jobItemListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.batch.jobItems.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const jobItemListResponse of client.beta.batch.jobItems.list('job_id')) {\n console.log(jobItemListResponse.item_id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing/$JOB_ID/items \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.batch.job_items.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.batch.job_items.list(\n job_id="job_id",\n)\npage = page.items[0]\nprint(page.item_id)', }, java: { method: 'beta().batch().jobItems().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.jobitems.JobItemListPage;\nimport com.llamacloud_prod.api.models.beta.batch.jobitems.JobItemListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n JobItemListPage page = client.beta().batch().jobItems().list("job_id");\n }\n}', }, go: { method: 'client.Beta.Batch.JobItems.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Batch.JobItems.List(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloudprod.BetaBatchJobItemListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'job_items list', example: "llamacloud-prod beta:batch:job-items list \\\n --api-key 'My API Key' \\\n --job-id job_id", }, }, }, { name: 'get_processing_results', endpoint: '/api/v1/beta/batch-processing/items/{item_id}/processing-results', httpMethod: 'get', summary: 'Get Item Processing Results', description: 'Get all processing results for a specific item.\n\nReturns the complete processing history for an item including\nwhat operations were performed, parameters used, and where\noutputs are stored. Optionally filter by `job_type`.', stainlessPath: '(resource) beta.batch.job_items > (method) get_processing_results', qualified: 'client.beta.batch.jobItems.getProcessingResults', params: [ 'item_id: string;', "job_type?: 'classify' | 'extract' | 'parse';", 'organization_id?: string;', 'project_id?: string;', ], response: "{ item_id: string; item_name: string; processing_results?: { item_id: string; job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: object; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | object; job_type: 'classify' | 'extract' | 'parse'; output_s3_path: string; parameters_hash: string; processed_at: string; result_id: string; output_metadata?: object; }[]; }", markdown: "## get_processing_results\n\n`client.beta.batch.jobItems.getProcessingResults(item_id: string, job_type?: 'classify' | 'extract' | 'parse', organization_id?: string, project_id?: string): { item_id: string; item_name: string; processing_results?: object[]; }`\n\n**get** `/api/v1/beta/batch-processing/items/{item_id}/processing-results`\n\nGet all processing results for a specific item.\n\nReturns the complete processing history for an item including\nwhat operations were performed, parameters used, and where\noutputs are stored. Optionally filter by `job_type`.\n\n### Parameters\n\n- `item_id: string`\n\n- `job_type?: 'classify' | 'extract' | 'parse'`\n Filter results by job type\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ item_id: string; item_name: string; processing_results?: { item_id: string; job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: object; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | object; job_type: 'classify' | 'extract' | 'parse'; output_s3_path: string; parameters_hash: string; processed_at: string; result_id: string; output_metadata?: object; }[]; }`\n Response containing all processing results for an item.\n\n - `item_id: string`\n - `item_name: string`\n - `processing_results?: { item_id: string; job_config: { correlation_id?: string; job_name?: 'parse_raw_file_job'; parameters?: { adaptive_long_table?: boolean; aggressive_table_extraction?: boolean; annotate_links?: boolean; auto_mode?: boolean; auto_mode_configuration_json?: string; auto_mode_trigger_on_image_in_page?: boolean; auto_mode_trigger_on_regexp_in_page?: string; auto_mode_trigger_on_table_in_page?: boolean; auto_mode_trigger_on_text_in_page?: string; azure_openai_api_version?: string; azure_openai_deployment_name?: string; azure_openai_endpoint?: string; azure_openai_key?: string; bbox_bottom?: number; bbox_left?: number; bbox_right?: number; bbox_top?: number; bounding_box?: string; compact_markdown_table?: boolean; complemental_formatting_instruction?: string; content_guideline_instruction?: string; continuous_mode?: boolean; custom_metadata?: object; disable_image_extraction?: boolean; disable_ocr?: boolean; disable_reconstruction?: boolean; do_not_cache?: boolean; do_not_unroll_columns?: boolean; enable_cost_optimizer?: boolean; extract_charts?: boolean; extract_layout?: boolean; extract_printed_page_number?: boolean; fast_mode?: boolean; formatting_instruction?: string; gpt4o_api_key?: string; gpt4o_mode?: boolean; guess_xlsx_sheet_name?: boolean; hide_footers?: boolean; hide_headers?: boolean; high_res_ocr?: boolean; html_make_all_elements_visible?: boolean; html_remove_fixed_elements?: boolean; html_remove_navigation_elements?: boolean; http_proxy?: string; ignore_document_elements_for_layout_detection?: boolean; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; inline_images_in_markdown?: boolean; input_s3_path?: string; input_s3_region?: string; input_url?: string; internal_is_screenshot_job?: boolean; invalidate_cache?: boolean; is_formatting_instruction?: boolean; job_timeout_extra_time_per_page_in_seconds?: number; job_timeout_in_seconds?: number; keep_page_separator_when_merging_tables?: boolean; lang?: string; languages?: string[]; layout_aware?: boolean; line_level_bounding_box?: boolean; markdown_table_multiline_header_separator?: string; max_pages?: number; max_pages_enforced?: number; merge_tables_across_pages_in_markdown?: boolean; model?: string; outlined_table_extraction?: boolean; output_pdf_of_document?: boolean; output_s3_path_prefix?: string; output_s3_region?: string; output_tables_as_HTML?: boolean; outputBucket?: string; page_error_tolerance?: number; page_footer_prefix?: string; page_footer_suffix?: string; page_header_prefix?: string; page_header_suffix?: string; page_prefix?: string; page_separator?: string; page_suffix?: string; parse_mode?: string; parsing_instruction?: string; pipeline_id?: string; precise_bounding_box?: boolean; premium_mode?: boolean; presentation_out_of_bounds_content?: boolean; presentation_skip_embedded_data?: boolean; preserve_layout_alignment_across_pages?: boolean; preserve_very_small_text?: boolean; preset?: string; priority?: 'critical' | 'high' | 'low' | 'medium'; project_id?: string; remove_hidden_text?: boolean; replace_failed_page_mode?: 'blank_page' | 'error_message' | 'raw_text'; replace_failed_page_with_error_message_prefix?: string; replace_failed_page_with_error_message_suffix?: string; resource_info?: object; save_images?: boolean; skip_diagonal_text?: boolean; specialized_chart_parsing_agentic?: boolean; specialized_chart_parsing_efficient?: boolean; specialized_chart_parsing_plus?: boolean; specialized_image_parsing?: boolean; spreadsheet_extract_sub_tables?: boolean; spreadsheet_force_formula_computation?: boolean; spreadsheet_include_hidden_sheets?: boolean; strict_mode_buggy_font?: boolean; strict_mode_image_extraction?: boolean; strict_mode_image_ocr?: boolean; strict_mode_reconstruction?: boolean; structured_output?: boolean; structured_output_json_schema?: string; structured_output_json_schema_name?: string; system_prompt?: string; system_prompt_append?: string; take_screenshot?: boolean; target_pages?: string; tier?: string; type?: 'parse'; use_vendor_multimodal_model?: boolean; user_prompt?: string; vendor_multimodal_api_key?: string; vendor_multimodal_model_name?: string; version?: string; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_url?: string; }[]; webhook_url?: string; }; parent_job_execution_id?: string; partitions?: object; project_id?: string; session_id?: string; user_id?: string; webhook_url?: string; } | { id: string; project_id: string; rules: object[]; status: 'CANCELLED' | 'ERROR' | 'PARTIAL_SUCCESS' | 'PENDING' | 'SUCCESS'; user_id: string; created_at?: string; effective_at?: string; error_message?: string; job_record_id?: string; mode?: 'FAST' | 'MULTIMODAL'; parsing_configuration?: object; updated_at?: string; }; job_type: 'classify' | 'extract' | 'parse'; output_s3_path: string; parameters_hash: string; processed_at: string; result_id: string; output_metadata?: object; }[]`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.batch.jobItems.getProcessingResults('item_id');\n\nconsole.log(response);\n```", perLanguage: { typescript: { method: 'client.beta.batch.jobItems.getProcessingResults', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.batch.jobItems.getProcessingResults('item_id');\n\nconsole.log(response.item_id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/batch-processing/items/$ITEM_ID/processing-results \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.batch.job_items.get_processing_results', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.batch.job_items.get_processing_results(\n item_id="item_id",\n)\nprint(response.item_id)', }, java: { method: 'beta().batch().jobItems().getProcessingResults', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.batch.jobitems.JobItemGetProcessingResultsParams;\nimport com.llamacloud_prod.api.models.beta.batch.jobitems.JobItemGetProcessingResultsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n JobItemGetProcessingResultsResponse response = client.beta().batch().jobItems().getProcessingResults("item_id");\n }\n}', }, go: { method: 'client.Beta.Batch.JobItems.GetProcessingResults', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Batch.JobItems.GetProcessingResults(\n\t\tcontext.TODO(),\n\t\t"item_id",\n\t\tllamacloudprod.BetaBatchJobItemGetProcessingResultsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ItemID)\n}\n', }, cli: { method: 'job_items get_processing_results', example: "llamacloud-prod beta:batch:job-items get-processing-results \\\n --api-key 'My API Key' \\\n --item-id item_id", }, }, }, { name: 'create', endpoint: '/api/v1/beta/split/jobs', httpMethod: 'post', summary: 'Create Split Job', description: 'Create a document split job.', stainlessPath: '(resource) beta.split > (method) create', qualified: 'client.beta.split.create', params: [ 'document_input: { type: string; value: string; };', 'organization_id?: string;', 'project_id?: string;', "configuration?: { categories: { name: string; description?: string; }[]; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; };", 'configuration_id?: string;', ], response: '{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }', markdown: "## create\n\n`client.beta.split.create(document_input: { type: string; value: string; }, organization_id?: string, project_id?: string, configuration?: { categories: object[]; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; }, configuration_id?: string): { id: string; categories: split_category[]; document_input: split_document_input; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: split_result_response; updated_at?: string; }`\n\n**post** `/api/v1/beta/split/jobs`\n\nCreate a document split job.\n\n### Parameters\n\n- `document_input: { type: string; value: string; }`\n Document to be split.\n - `type: string`\n Type of document input. Valid values are: file_id\n - `value: string`\n Document identifier.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `configuration?: { categories: { name: string; description?: string; }[]; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }; }`\n Split configuration with categories and splitting strategy.\n - `categories: { name: string; description?: string; }[]`\n Categories to split documents into.\n - `splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; }`\n Strategy for splitting documents.\n\n- `configuration_id?: string`\n Saved split configuration ID.\n\n### Returns\n\n- `{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }`\n Beta response — uses nested document_input object.\n\n - `id: string`\n - `categories: { name: string; description?: string; }[]`\n - `document_input: { type: string; value: string; }`\n - `project_id: string`\n - `status: string`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { segments: { category: string; confidence_category: string; pages: number[]; }[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst split = await client.beta.split.create({ document_input: { type: 'type', value: 'value' } });\n\nconsole.log(split);\n```", perLanguage: { typescript: { method: 'client.beta.split.create', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst split = await client.beta.split.create({ document_input: { type: 'type', value: 'value' } });\n\nconsole.log(split.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/split/jobs \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "document_input": {\n "type": "type",\n "value": "value"\n }\n }\'', }, python: { method: 'beta.split.create', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsplit = client.beta.split.create(\n document_input={\n "type": "type",\n "value": "value",\n },\n)\nprint(split.id)', }, java: { method: 'beta().split().create', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.split.SplitCreateParams;\nimport com.llamacloud_prod.api.models.beta.split.SplitCreateResponse;\nimport com.llamacloud_prod.api.models.beta.split.SplitDocumentInput;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SplitCreateParams params = SplitCreateParams.builder()\n .documentInput(SplitDocumentInput.builder()\n .type("type")\n .value("value")\n .build())\n .build();\n SplitCreateResponse split = client.beta().split().create(params);\n }\n}', }, go: { method: 'client.Beta.Split.New', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsplit, err := client.Beta.Split.New(context.TODO(), llamacloudprod.BetaSplitNewParams{\n\t\tDocumentInput: llamacloudprod.SplitDocumentInputParam{\n\t\t\tType: "type",\n\t\t\tValue: "value",\n\t\t},\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", split.ID)\n}\n', }, cli: { method: 'split create', example: "llamacloud-prod beta:split create \\\n --api-key 'My API Key' \\\n --document-input '{type: type, value: value}'", }, }, }, { name: 'list', endpoint: '/api/v1/beta/split/jobs', httpMethod: 'get', summary: 'List Split Jobs', description: 'List document split jobs.', stainlessPath: '(resource) beta.split > (method) list', qualified: 'client.beta.split.list', params: [ 'created_at_on_or_after?: string;', 'created_at_on_or_before?: string;', 'job_ids?: string[];', 'organization_id?: string;', 'page_size?: number;', 'page_token?: string;', 'project_id?: string;', "status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing';", ], response: '{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }', markdown: "## list\n\n`client.beta.split.list(created_at_on_or_after?: string, created_at_on_or_before?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing'): { id: string; categories: split_category[]; document_input: split_document_input; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: split_result_response; updated_at?: string; }`\n\n**get** `/api/v1/beta/split/jobs`\n\nList document split jobs.\n\n### Parameters\n\n- `created_at_on_or_after?: string`\n Include items created at or after this timestamp (inclusive)\n\n- `created_at_on_or_before?: string`\n Include items created at or before this timestamp (inclusive)\n\n- `job_ids?: string[]`\n Filter by specific job IDs\n\n- `organization_id?: string`\n\n- `page_size?: number`\n\n- `page_token?: string`\n\n- `project_id?: string`\n\n- `status?: 'cancelled' | 'completed' | 'failed' | 'pending' | 'processing'`\n Filter by job status (pending, processing, completed, failed, cancelled)\n\n### Returns\n\n- `{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }`\n Beta response — uses nested document_input object.\n\n - `id: string`\n - `categories: { name: string; description?: string; }[]`\n - `document_input: { type: string; value: string; }`\n - `project_id: string`\n - `status: string`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { segments: { category: string; confidence_category: string; pages: number[]; }[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const splitListResponse of client.beta.split.list()) {\n console.log(splitListResponse);\n}\n```", perLanguage: { typescript: { method: 'client.beta.split.list', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const splitListResponse of client.beta.split.list()) {\n console.log(splitListResponse.id);\n}", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/split/jobs \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.split.list', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.split.list()\npage = page.items[0]\nprint(page.id)', }, java: { method: 'beta().split().list', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.split.SplitListPage;\nimport com.llamacloud_prod.api.models.beta.split.SplitListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SplitListPage page = client.beta().split().list();\n }\n}', }, go: { method: 'client.Beta.Split.List', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Split.List(context.TODO(), llamacloudprod.BetaSplitListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n', }, cli: { method: 'split list', example: "llamacloud-prod beta:split list \\\n --api-key 'My API Key'", }, }, }, { name: 'get', endpoint: '/api/v1/beta/split/jobs/{split_job_id}', httpMethod: 'get', summary: 'Get Split Job', description: 'Get a document split job.', stainlessPath: '(resource) beta.split > (method) get', qualified: 'client.beta.split.get', params: ['split_job_id: string;', 'organization_id?: string;', 'project_id?: string;'], response: '{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }', markdown: "## get\n\n`client.beta.split.get(split_job_id: string, organization_id?: string, project_id?: string): { id: string; categories: split_category[]; document_input: split_document_input; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: split_result_response; updated_at?: string; }`\n\n**get** `/api/v1/beta/split/jobs/{split_job_id}`\n\nGet a document split job.\n\n### Parameters\n\n- `split_job_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; categories: { name: string; description?: string; }[]; document_input: { type: string; value: string; }; project_id: string; status: string; user_id: string; configuration_id?: string; created_at?: string; error_message?: string; result?: { segments: split_segment_response[]; }; updated_at?: string; }`\n Beta response — uses nested document_input object.\n\n - `id: string`\n - `categories: { name: string; description?: string; }[]`\n - `document_input: { type: string; value: string; }`\n - `project_id: string`\n - `status: string`\n - `user_id: string`\n - `configuration_id?: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { segments: { category: string; confidence_category: string; pages: number[]; }[]; }`\n - `updated_at?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst split = await client.beta.split.get('split_job_id');\n\nconsole.log(split);\n```", perLanguage: { typescript: { method: 'client.beta.split.get', example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst split = await client.beta.split.get('split_job_id');\n\nconsole.log(split.id);", }, http: { example: 'curl https://api.cloud.llamaindex.ai/api/v1/beta/split/jobs/$SPLIT_JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"', }, python: { method: 'beta.split.get', example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nsplit = client.beta.split.get(\n split_job_id="split_job_id",\n)\nprint(split.id)', }, java: { method: 'beta().split().get', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.beta.split.SplitGetParams;\nimport com.llamacloud_prod.api.models.beta.split.SplitGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n SplitGetResponse split = client.beta().split().get("split_job_id");\n }\n}', }, go: { method: 'client.Beta.Split.Get', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tsplit, err := client.Beta.Split.Get(\n\t\tcontext.TODO(),\n\t\t"split_job_id",\n\t\tllamacloudprod.BetaSplitGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", split.ID)\n}\n', }, cli: { method: 'split get', example: "llamacloud-prod beta:split get \\\n --api-key 'My API Key' \\\n --split-job-id split_job_id", }, }, }, { name: 'search', endpoint: '/api/v1/retrievers/{retriever_id}/retrieve', httpMethod: 'post', summary: 'Retrieve', description: 'Retrieve data using a Retriever.', stainlessPath: '(resource) retrievers.query > (method) search', qualified: 'search', perLanguage: { java: { method: 'retrievers().query().search', example: 'package com.llamacloud_prod.api.example;\n\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.retrievers.CompositeRetrievalResult;\nimport com.llamacloud_prod.api.models.retrievers.query.QuerySearchParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n QuerySearchParams params = QuerySearchParams.builder()\n .retrieverId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")\n .query("x")\n .build();\n CompositeRetrievalResult compositeRetrievalResult = client.retrievers().query().search(params);\n }\n}', }, }, }, { name: 'run_search', endpoint: '/api/v1/pipelines/{pipeline_id}/retrieve', httpMethod: 'post', summary: 'Run Search', description: "Run a retrieval query against a managed pipeline.\n\nSearches the pipeline's vector store using the provided query\nand retrieval parameters. Supports dense, sparse, and hybrid\nsearch modes with configurable top-k and reranking.", stainlessPath: '(resource) pipelines > (method) run_search', qualified: 'run_search', perLanguage: { go: { method: 'client.Pipelines.RunSearch', example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Pipelines.RunSearch(\n\t\tcontext.TODO(),\n\t\t"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",\n\t\tllamacloudprod.PipelineRunSearchParams{\n\t\t\tQuery: "x",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.PipelineID)\n}\n', }, cli: { method: 'pipelines run_search', example: "llamacloud-prod pipelines run-search \\\n --api-key 'My API Key' \\\n --pipeline-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \\\n --query x", }, }, }, ]; const EMBEDDED_READMES: { language: string; content: string }[] = [ { language: 'typescript', content: "# Llama Cloud TypeScript API Library\n\n[![NPM version](https://img.shields.io/npm/v/@llamaindex/llama-cloud.svg?label=npm%20(stable))](https://npmjs.org/package/@llamaindex/llama-cloud) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/@llamaindex/llama-cloud)\n\nThis library provides convenient access to the Llama Cloud REST API from server-side TypeScript or JavaScript.\n\n\n\nThe REST API documentation can be found on [developers.llamaindex.ai](https://developers.llamaindex.ai/). The full API of this library can be found in [api.md](api.md).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Llama Cloud MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40llamaindex%2Fllama-cloud-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40llamaindex%2Fllama-cloud-mcp%22%5D%2C%22env%22%3A%7B%22LLAMA_CLOUD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n```sh\nnpm install @llamaindex/llama-cloud\n```\n\n\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n\n```js\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst parsing = await client.parsing.create({\n tier: 'agentic',\n version: 'latest',\n file_id: 'abc1234',\n});\n\nconsole.log(parsing.id);\n```\n\n\n\n### Request & Response types\n\nThis library includes TypeScript definitions for all request params and response fields. You may import and use them like so:\n\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst params: LlamaCloud.Beta.IndexListParams = { project_id: 'my-project-id' };\nconst [indexListResponse]: [LlamaCloud.Beta.IndexListResponse] = await client.beta.indexes.list(\n params,\n);\n```\n\nDocumentation for each method, request param, and response field are available in docstrings and will appear on hover in most modern editors.\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed in many different forms:\n- `File` (or an object with the same structure)\n- a `fetch` `Response` (or an object with the same structure)\n- an `fs.ReadStream`\n- the return value of our `toFile` helper\n\n```ts\nimport fs from 'fs';\nimport LlamaCloud, { toFile } from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// If you have access to Node `fs` we recommend using `fs.createReadStream()`:\nawait client.files.create({ file: fs.createReadStream('/path/to/file'), purpose: 'purpose' });\n\n// Or if you have the web `File` API you can pass a `File` instance:\nawait client.files.create({ file: new File(['my bytes'], 'file'), purpose: 'purpose' });\n\n// You can also pass a `fetch` `Response`:\nawait client.files.create({ file: await fetch('https://somesite/file'), purpose: 'purpose' });\n\n// Finally, if none of the above are convenient, you can use our `toFile` helper:\nawait client.files.create({\n file: await toFile(Buffer.from('my bytes'), 'file'),\n purpose: 'purpose',\n});\nawait client.files.create({\n file: await toFile(new Uint8Array([0, 1, 2]), 'file'),\n purpose: 'purpose',\n});\n```\n\n\n\n## Handling errors\n\nWhen the library is unable to connect to the API,\nor if the API returns a non-success status code (i.e., 4xx or 5xx response),\na subclass of `APIError` will be thrown:\n\n\n```ts\nconst page = await client.beta.indexes.list({ project_id: 'my-project-id' }).catch(async (err) => {\n if (err instanceof LlamaCloud.APIError) {\n console.log(err.status); // 400\n console.log(err.name); // BadRequestError\n console.log(err.headers); // {server: 'nginx', ...}\n } else {\n throw err;\n }\n});\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors will all be retried by default.\n\nYou can use the `maxRetries` option to configure or disable this:\n\n\n```js\n// Configure the default for all requests:\nconst client = new LlamaCloud({\n maxRetries: 0, // default is 2\n});\n\n// Or, configure per-request:\nawait client.beta.indexes.list({ project_id: 'my-project-id' }, {\n maxRetries: 5,\n});\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default. You can configure this with a `timeout` option:\n\n\n```ts\n// Configure the default for all requests:\nconst client = new LlamaCloud({\n timeout: 20 * 1000, // 20 seconds (default is 1 minute)\n});\n\n// Override per-request:\nawait client.beta.indexes.list({ project_id: 'my-project-id' }, {\n timeout: 5 * 1000,\n});\n```\n\nOn timeout, an `APIConnectionTimeoutError` is thrown.\n\nNote that requests which time out will be [retried twice by default](#retries).\n\n## Auto-pagination\n\nList methods in the LlamaCloud API are paginated.\nYou can use the `for await … of` syntax to iterate through items across all pages:\n\n```ts\nasync function fetchAllExtractV2Jobs(params) {\n const allExtractV2Jobs = [];\n // Automatically fetches more pages as needed.\n for await (const extractV2Job of client.extract.list({ page_size: 20 })) {\n allExtractV2Jobs.push(extractV2Job);\n }\n return allExtractV2Jobs;\n}\n```\n\nAlternatively, you can request a single page at a time:\n\n```ts\nlet page = await client.extract.list({ page_size: 20 });\nfor (const extractV2Job of page.items) {\n console.log(extractV2Job);\n}\n\n// Convenience methods are provided for manually paginating:\nwhile (page.hasNextPage()) {\n page = await page.getNextPage();\n // ...\n}\n```\n\n\n\n## Advanced Usage\n\n### Accessing raw Response data (e.g., headers)\n\nThe \"raw\" `Response` returned by `fetch()` can be accessed through the `.asResponse()` method on the `APIPromise` type that all methods return.\nThis method returns as soon as the headers for a successful response are received and does not consume the response body, so you are free to write custom parsing or streaming logic.\n\nYou can also use the `.withResponse()` method to get the raw `Response` along with the parsed data.\nUnlike `.asResponse()` this method consumes the body, returning once it is parsed.\n\n\n```ts\nconst client = new LlamaCloud();\n\nconst response = await client.beta.indexes.list({ project_id: 'my-project-id' }).asResponse();\nconsole.log(response.headers.get('X-My-Header'));\nconsole.log(response.statusText); // access the underlying Response object\n\nconst { data: page, response: raw } = await client.beta.indexes\n .list({ project_id: 'my-project-id' })\n .withResponse();\nconsole.log(raw.headers.get('X-My-Header'));\nfor await (const indexListResponse of page) {\n console.log(indexListResponse.id);\n}\n```\n\n### Logging\n\n> [!IMPORTANT]\n> All log messages are intended for debugging only. The format and content of log messages\n> may change between releases.\n\n#### Log levels\n\nThe log level can be configured in two ways:\n\n1. Via the `LLAMA_CLOUD_LOG` environment variable\n2. Using the `logLevel` client option (overrides the environment variable if set)\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n logLevel: 'debug', // Show all log messages\n});\n```\n\nAvailable log levels, from most to least verbose:\n\n- `'debug'` - Show debug messages, info, warnings, and errors\n- `'info'` - Show info messages, warnings, and errors\n- `'warn'` - Show warnings and errors (default)\n- `'error'` - Show only errors\n- `'off'` - Disable all logging\n\nAt the `'debug'` level, all HTTP requests and responses are logged, including headers and bodies.\nSome authentication-related headers are redacted, but sensitive data in request and response bodies\nmay still be visible.\n\n#### Custom logger\n\nBy default, this library logs to `globalThis.console`. You can also provide a custom logger.\nMost logging libraries are supported, including [pino](https://www.npmjs.com/package/pino), [winston](https://www.npmjs.com/package/winston), [bunyan](https://www.npmjs.com/package/bunyan), [consola](https://www.npmjs.com/package/consola), [signale](https://www.npmjs.com/package/signale), and [@std/log](https://jsr.io/@std/log). If your logger doesn't work, please open an issue.\n\nWhen providing a custom logger, the `logLevel` option still controls which messages are emitted, messages\nbelow the configured level will not be sent to your logger.\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\nimport pino from 'pino';\n\nconst logger = pino();\n\nconst client = new LlamaCloud({\n logger: logger.child({ name: 'LlamaCloud' }),\n logLevel: 'debug', // Send all messages to pino, allowing it to filter\n});\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.get`, `client.post`, and other HTTP verbs.\nOptions on the client, such as retries, will be respected when making these requests.\n\n```ts\nawait client.post('/some/path', {\n body: { some_prop: 'foo' },\n query: { some_query_arg: 'bar' },\n});\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use `// @ts-expect-error` on the undocumented\nparameter. This library doesn't validate at runtime that the request matches the type, so any extra values you\nsend will be sent as-is.\n\n```ts\nclient.parsing.create({\n // ...\n // @ts-expect-error baz is not yet public\n baz: 'undocumented option',\n});\n```\n\nFor requests with the `GET` verb, any extra params will be in the query, all other requests will send the\nextra param in the body.\n\nIf you want to explicitly send an extra argument, you can do so with the `query`, `body`, and `headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may access the response object with `// @ts-expect-error` on\nthe response object, or cast the response object to the requisite type. Like the request params, we do not\nvalidate or strip extra properties from the response from the API.\n\n### Customizing the fetch client\n\nBy default, this library expects a global `fetch` function is defined.\n\nIf you want to use a different `fetch` function, you can either polyfill the global:\n\n```ts\nimport fetch from 'my-fetch';\n\nglobalThis.fetch = fetch;\n```\n\nOr pass it to the client:\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\nimport fetch from 'my-fetch';\n\nconst client = new LlamaCloud({ fetch });\n```\n\n### Fetch options\n\nIf you want to set custom `fetch` options without overriding the `fetch` function, you can provide a `fetchOptions` object when instantiating the client or making a request. (Request-specific options override client options.)\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n fetchOptions: {\n // `RequestInit` options\n },\n});\n```\n\n#### Configuring proxies\n\nTo modify proxy behavior, you can provide custom `fetchOptions` that add runtime-specific proxy\noptions to requests:\n\n **Node** [[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\nimport * as undici from 'undici';\n\nconst proxyAgent = new undici.ProxyAgent('http://localhost:8888');\nconst client = new LlamaCloud({\n fetchOptions: {\n dispatcher: proxyAgent,\n },\n});\n```\n\n **Bun** [[docs](https://bun.sh/guides/http/proxy)]\n\n```ts\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n fetchOptions: {\n proxy: 'http://localhost:8888',\n },\n});\n```\n\n **Deno** [[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]\n\n```ts\nimport LlamaCloud from 'npm:@llamaindex/llama-cloud';\n\nconst httpClient = Deno.createHttpClient({ proxy: { url: 'http://localhost:8888' } });\nconst client = new LlamaCloud({\n fetchOptions: {\n client: httpClient,\n },\n});\n```\n\n## Frequently Asked Questions\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/run-llama/llama-parse-ts/issues) with questions, bugs, or suggestions.\n\n## Requirements\n\nTypeScript >= 4.9 is supported.\n\nThe following runtimes are supported:\n\n- Web browsers (Up-to-date Chrome, Firefox, Safari, Edge, and more)\n- Node.js 20 LTS or later ([non-EOL](https://endoflife.date/nodejs)) versions.\n- Deno v1.28.0 or higher.\n- Bun 1.0 or later.\n- Cloudflare Workers.\n- Vercel Edge Runtime.\n- Jest 28 or greater with the `\"node\"` environment (`\"jsdom\"` is not supported at this time).\n- Nitro v2.6 or greater.\n\nNote that React Native is not supported at this time.\n\nIf you are interested in other runtime environments, please open or upvote an issue on GitHub.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n", }, { language: 'python', content: '# Llama Cloud Python API library\n\n\n[![PyPI version](https://img.shields.io/pypi/v/llama_cloud.svg?label=pypi%20(stable))](https://pypi.org/project/llama_cloud/)\n\nThe Llama Cloud Python library provides convenient access to the Llama Cloud REST API from any Python 3.9+\napplication. The library includes type definitions for all request params and response fields,\nand offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Llama Cloud MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40llamaindex%2Fllama-cloud-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40llamaindex%2Fllama-cloud-mcp%22%5D%2C%22env%22%3A%7B%22LLAMA_CLOUD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Documentation\n\nThe REST API documentation can be found on [developers.llamaindex.ai](https://developers.llamaindex.ai/). The full API of this library can be found in [api.md](api.md).\n\n## Installation\n\n```sh\n# install from PyPI\npip install llama_cloud\n```\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```python\nimport os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\n\nparsing = client.parsing.create(\n tier="agentic",\n version="latest",\n file_id="abc1234",\n)\nprint(parsing.id)\n```\n\nWhile you can provide an `api_key` keyword argument,\nwe recommend using [python-dotenv](https://pypi.org/project/python-dotenv/)\nto add `LLAMA_CLOUD_API_KEY="My API Key"` to your `.env` file\nso that your API Key is not stored in source control.\n\n## Async usage\n\nSimply import `AsyncLlamaCloud` instead of `LlamaCloud` and use `await` with each API call:\n\n```python\nimport os\nimport asyncio\nfrom llama_cloud import AsyncLlamaCloud\n\nclient = AsyncLlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\n\nasync def main() -> None:\n parsing = await client.parsing.create(\n tier="agentic",\n version="latest",\n file_id="abc1234",\n )\n print(parsing.id)\n\nasyncio.run(main())\n```\n\nFunctionality between the synchronous and asynchronous clients is otherwise identical.\n\n### With aiohttp\n\nBy default, the async client uses `httpx` for HTTP requests. However, for improved concurrency performance you may also use `aiohttp` as the HTTP backend.\n\nYou can enable this by installing `aiohttp`:\n\n```sh\n# install from PyPI\npip install llama_cloud[aiohttp]\n```\n\nThen you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:\n\n```python\nimport os\nimport asyncio\nfrom llama_cloud import DefaultAioHttpClient\nfrom llama_cloud import AsyncLlamaCloud\n\nasync def main() -> None:\n async with AsyncLlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n http_client=DefaultAioHttpClient(),\n) as client:\n parsing = await client.parsing.create(\n tier="agentic",\n version="latest",\n file_id="abc1234",\n )\n print(parsing.id)\n\nasyncio.run(main())\n```\n\n\n\n## Using types\n\nNested request parameters are [TypedDicts](https://docs.python.org/3/library/typing.html#typing.TypedDict). Responses are [Pydantic models](https://docs.pydantic.dev) which also provide helper methods for things like:\n\n- Serializing back into JSON, `model.to_json()`\n- Converting to a dictionary, `model.to_dict()`\n\nTyped requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`.\n\n## Pagination\n\nList methods in the Llama Cloud API are paginated.\n\nThis library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually:\n\n```python\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud()\n\nall_extracts = []\n# Automatically fetches more pages as needed.\nfor extract in client.extract.list(\n page_size=20,\n):\n # Do something with extract here\n all_extracts.append(extract)\nprint(all_extracts)\n```\n\nOr, asynchronously:\n\n```python\nimport asyncio\nfrom llama_cloud import AsyncLlamaCloud\n\nclient = AsyncLlamaCloud()\n\nasync def main() -> None:\n all_extracts = []\n # Iterate through items across all pages, issuing requests as needed.\n async for extract in client.extract.list(\n page_size=20,\n):\n all_extracts.append(extract)\n print(all_extracts)\n\nasyncio.run(main())\n```\n\nAlternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages:\n\n```python\nfirst_page = await client.extract.list(\n page_size=20,\n)\nif first_page.has_next_page():\n print(f"will fetch next page using these details: {first_page.next_page_info()}")\n next_page = await first_page.get_next_page()\n print(f"number of items we just fetched: {len(next_page.items)}")\n\n# Remove `await` for non-async usage.\n```\n\nOr just work directly with the returned data:\n\n```python\nfirst_page = await client.extract.list(\n page_size=20,\n)\n\nprint(f"next page cursor: {first_page.next_page_token}") # => "next page cursor: ..."\nfor extract in first_page.items:\n print(extract.id)\n\n# Remove `await` for non-async usage.\n```\n\n## Nested params\n\nNested parameters are dictionaries, typed using `TypedDict`, for example:\n\n```python\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud()\n\nparsing = client.parsing.create(\n tier="fast",\n version="latest",\n agentic_options={},\n)\nprint(parsing.agentic_options)\n```\n\n## File uploads\n\nRequest parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`.\n\n```python\nfrom pathlib import Path\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud()\n\nclient.files.create(\n file=Path("/path/to/file"),\n purpose="purpose",\n)\n```\n\nThe async client uses the exact same interface. If you pass a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance, the file contents will be read asynchronously automatically.\n\n## Handling errors\n\nWhen the library is unable to connect to the API (for example, due to network connection problems or a timeout), a subclass of `llama_cloud.APIConnectionError` is raised.\n\nWhen the API returns a non-success status code (that is, 4xx or 5xx\nresponse), a subclass of `llama_cloud.APIStatusError` is raised, containing `status_code` and `response` properties.\n\nAll errors inherit from `llama_cloud.APIError`.\n\n```python\nimport llama_cloud\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud()\n\ntry:\n client.beta.indexes.list(\n project_id="my-project-id",\n )\nexcept llama_cloud.APIConnectionError as e:\n print("The server could not be reached")\n print(e.__cause__) # an underlying Exception, likely raised within httpx.\nexcept llama_cloud.RateLimitError as e:\n print("A 429 status code was received; we should back off a bit.")\nexcept llama_cloud.APIStatusError as e:\n print("Another non-200-range status code was received")\n print(e.status_code)\n print(e.response)\n```\n\nError codes are as follows:\n\n| Status Code | Error Type |\n| ----------- | -------------------------- |\n| 400 | `BadRequestError` |\n| 401 | `AuthenticationError` |\n| 403 | `PermissionDeniedError` |\n| 404 | `NotFoundError` |\n| 422 | `UnprocessableEntityError` |\n| 429 | `RateLimitError` |\n| >=500 | `InternalServerError` |\n| N/A | `APIConnectionError` |\n\n### Retries\n\nCertain errors are automatically retried 2 times by default, with a short exponential backoff.\nConnection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict,\n429 Rate Limit, and >=500 Internal errors are all retried by default.\n\nYou can use the `max_retries` option to configure or disable retry settings:\n\n```python\nfrom llama_cloud import LlamaCloud\n\n# Configure the default for all requests:\nclient = LlamaCloud(\n # default is 2\n max_retries=0,\n)\n\n# Or, configure per-request:\nclient.with_options(max_retries = 5).beta.indexes.list(\n project_id="my-project-id",\n)\n```\n\n### Timeouts\n\nBy default requests time out after 1 minute. You can configure this with a `timeout` option,\nwhich accepts a float or an [`httpx.Timeout`](https://www.python-httpx.org/advanced/timeouts/#fine-tuning-the-configuration) object:\n\n```python\nfrom llama_cloud import LlamaCloud\n\n# Configure the default for all requests:\nclient = LlamaCloud(\n # 20 seconds (default is 1 minute)\n timeout=20.0,\n)\n\n# More granular control:\nclient = LlamaCloud(\n timeout=httpx.Timeout(60.0, read=5.0, write=10.0, connect=2.0),\n)\n\n# Override per-request:\nclient.with_options(timeout = 5.0).beta.indexes.list(\n project_id="my-project-id",\n)\n```\n\nOn timeout, an `APITimeoutError` is thrown.\n\nNote that requests that time out are [retried twice by default](#retries).\n\n\n\n## Advanced\n\n### Logging\n\nWe use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module.\n\nYou can enable logging by setting the environment variable `LLAMA_CLOUD_LOG` to `info`.\n\n```shell\n$ export LLAMA_CLOUD_LOG=info\n```\n\nOr to `debug` for more verbose logging.\n\n### How to tell whether `None` means `null` or missing\n\nIn an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`:\n\n```py\nif response.my_field is None:\n if \'my_field\' not in response.model_fields_set:\n print(\'Got json like {}, without a "my_field" key present at all.\')\n else:\n print(\'Got json like {"my_field": null}.\')\n```\n\n### Accessing raw response data (e.g. headers)\n\nThe "raw" Response object can be accessed by prefixing `.with_raw_response.` to any HTTP method call, e.g.,\n\n```py\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud()\nresponse = client.beta.indexes.with_raw_response.list(\n project_id="my-project-id",\n)\nprint(response.headers.get(\'X-My-Header\'))\n\nindex = response.parse() # get the object that `beta.indexes.list()` would have returned\nprint(index.id)\n```\n\nThese methods return an [`APIResponse`](https://github.com/run-llama/llama-parse-py/tree/main/src/llama_cloud/_response.py) object.\n\nThe async client returns an [`AsyncAPIResponse`](https://github.com/run-llama/llama-parse-py/tree/main/src/llama_cloud/_response.py) with the same structure, the only difference being `await`able methods for reading the response content.\n\n#### `.with_streaming_response`\n\nThe above interface eagerly reads the full response body when you make the request, which may not always be what you want.\n\nTo stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods.\n\n```python\nwith client.beta.indexes.with_streaming_response.list(\n project_id="my-project-id",\n) as response :\n print(response.headers.get(\'X-My-Header\'))\n\n for line in response.iter_lines():\n print(line)\n```\n\nThe context manager is required so that the response will reliably be closed.\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API.\n\nIf you need to access undocumented endpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other\nhttp verbs. Options on the client will be respected (such as retries) when making this request.\n\n```py\nimport httpx\n\nresponse = client.post(\n "/foo",\n cast_to=httpx.Response,\n body={"my_param": True},\n)\n\nprint(response.headers.get("x-foo"))\n```\n\n#### Undocumented request params\n\nIf you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request\noptions.\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You\ncan also get all the extra fields on the Pydantic model as a dict with\n[`response.model_extra`](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).\n\n### Configuring the HTTP client\n\nYou can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including:\n\n- Support for [proxies](https://www.python-httpx.org/advanced/proxies/)\n- Custom [transports](https://www.python-httpx.org/advanced/transports/)\n- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality\n\n```python\nimport httpx\nfrom llama_cloud import LlamaCloud, DefaultHttpxClient\n\nclient = LlamaCloud(\n # Or use the `LLAMA_CLOUD_BASE_URL` env var\n base_url="http://my.test.server.example.com:8083",\n http_client=DefaultHttpxClient(proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")),\n)\n```\n\nYou can also customize the client on a per-request basis by using `with_options()`:\n\n```python\nclient.with_options(http_client=DefaultHttpxClient(...))\n```\n\n### Managing HTTP resources\n\nBy default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting.\n\n```py\nfrom llama_cloud import LlamaCloud\n\nwith LlamaCloud() as client:\n # make requests here\n ...\n\n# HTTP client is now closed\n```\n\n## Versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes that only affect static types, without breaking runtime behavior.\n2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n3. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/run-llama/llama-parse-py/issues) with questions, bugs, or suggestions.\n\n### Determining the installed version\n\nIf you\'ve upgraded to the latest version but aren\'t seeing any new features you were expecting then your python environment is likely still using an older version.\n\nYou can determine the version that is being used at runtime with:\n\n```py\nimport llama_cloud\nprint(llama_cloud.__version__)\n```\n\n## Requirements\n\nPython 3.9 or higher.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { language: 'java', content: '# Llama Cloud Java API Library\n\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.llamacloud_prod.api/llama-cloud-java)](https://central.sonatype.com/artifact/com.llamacloud_prod.api/llama-cloud-java/0.0.1)\n[![javadoc](https://javadoc.io/badge2/com.llamacloud_prod.api/llama-cloud-java/0.0.1/javadoc.svg)](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud-java/0.0.1)\n\n\nThe Llama Cloud Java SDK provides convenient access to the [Llama Cloud REST API](https://developers.llamaindex.ai/) from applications written in Java.\n\n\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Llama Cloud MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40llamaindex%2Fllama-cloud-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40llamaindex%2Fllama-cloud-mcp%22%5D%2C%22env%22%3A%7B%22LLAMA_CLOUD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n\n\nThe REST API documentation can be found on [developers.llamaindex.ai](https://developers.llamaindex.ai/). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.llamacloud_prod.api/llama-cloud-java/0.0.1).\n\n\n\n## Installation\n\n\n\n### Gradle\n\n~~~kotlin\nimplementation("com.llamacloud_prod.api:llama-cloud-java:0.0.1")\n~~~\n\n### Maven\n\n~~~xml\n\n com.llamacloud_prod.api\n llama-cloud-java\n 0.0.1\n\n~~~\n\n\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\n\n// Configures using the `llamacloud.apiKey` and `llamacloud.baseUrl` system properties\n// Or configures using the `LLAMA_CLOUD_API_KEY` and `LLAMA_CLOUD_BASE_URL` environment variables\nLlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .tier(ParsingCreateParams.Tier.AGENTIC)\n .version(ParsingCreateParams.Version.LATEST)\n .fileId("abc1234")\n .build();\nParsingCreateResponse parsing = client.parsing().create(params);\n```\n\n## Client configuration\n\nConfigure the client using system properties or environment variables:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\n// Configures using the `llamacloud.apiKey` and `llamacloud.baseUrl` system properties\n// Or configures using the `LLAMA_CLOUD_API_KEY` and `LLAMA_CLOUD_BASE_URL` environment variables\nLlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n```\n\nOr manually:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .apiKey("My API Key")\n .build();\n```\n\nOr using a combination of the two approaches:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n // Configures using the `llamacloud.apiKey` and `llamacloud.baseUrl` system properties\n // Or configures using the `LLAMA_CLOUD_API_KEY` and `LLAMA_CLOUD_BASE_URL` environment variables\n .fromEnv()\n .apiKey("My API Key")\n .build();\n```\n\nSee this table for the available options:\n\n| Setter | System property | Environment variable | Required | Default value |\n| --------- | -------------------- | ---------------------- | -------- | ----------------------------------- |\n| `apiKey` | `llamacloud.apiKey` | `LLAMA_CLOUD_API_KEY` | true | - |\n| `baseUrl` | `llamacloud.baseUrl` | `LLAMA_CLOUD_BASE_URL` | true | `"https://api.cloud.llamaindex.ai"` |\n\nSystem properties take precedence over environment variables.\n\n> [!TIP]\n> Don\'t create more than one client in the same application. Each client has a connection pool and\n> thread pools, which are more efficient to share between requests.\n\n### Modifying configuration\n\nTo temporarily use a modified client configuration, while reusing the same connection and thread pools, call `withOptions()` on any client or service:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\n\nLlamaCloudClient clientWithOptions = client.withOptions(optionsBuilder -> {\n optionsBuilder.baseUrl("https://example.com");\n optionsBuilder.maxRetries(42);\n});\n```\n\nThe `withOptions()` method does not affect the original client or service.\n\n## Requests and responses\n\nTo send a request to the Llama Cloud API, build an instance of some `Params` class and pass it to the corresponding client method. When the response is received, it will be deserialized into an instance of a Java class.\n\nFor example, `client.parsing().create(...)` should be called with an instance of `ParsingCreateParams`, and it will return an instance of `ParsingCreateResponse`.\n\n## Immutability\n\nEach class in the SDK has an associated [builder](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java) or factory method for constructing it.\n\nEach class is [immutable](https://docs.oracle.com/javase/tutorial/essential/concurrency/immutable.html) once constructed. If the class has an associated builder, then it has a `toBuilder()` method, which can be used to convert it back to a builder for making a modified copy.\n\nBecause each class is immutable, builder modification will _never_ affect already built class instances.\n\n## Asynchronous execution\n\nThe default client is synchronous. To switch to asynchronous execution, call the `async()` method:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `llamacloud.apiKey` and `llamacloud.baseUrl` system properties\n// Or configures using the `LLAMA_CLOUD_API_KEY` and `LLAMA_CLOUD_BASE_URL` environment variables\nLlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .tier(ParsingCreateParams.Tier.AGENTIC)\n .version(ParsingCreateParams.Version.LATEST)\n .fileId("abc1234")\n .build();\nCompletableFuture parsing = client.async().parsing().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClientAsync;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClientAsync;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\nimport java.util.concurrent.CompletableFuture;\n\n// Configures using the `llamacloud.apiKey` and `llamacloud.baseUrl` system properties\n// Or configures using the `LLAMA_CLOUD_API_KEY` and `LLAMA_CLOUD_BASE_URL` environment variables\nLlamaCloudClientAsync client = LlamaCloudOkHttpClientAsync.fromEnv();\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .tier(ParsingCreateParams.Tier.AGENTIC)\n .version(ParsingCreateParams.Version.LATEST)\n .fileId("abc1234")\n .build();\nCompletableFuture parsing = client.parsing().create(params);\n```\n\nThe asynchronous client supports the same options as the synchronous one, except most methods return `CompletableFuture`s.\n\n\n\n## File uploads\n\nThe SDK defines methods that accept files.\n\nTo upload a file, pass a [`Path`](https://docs.oracle.com/javase/8/docs/api/java/nio/file/Path.html):\n\n```java\nimport com.llamacloud_prod.api.models.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.files.FileCreateResponse;\nimport java.nio.file.Paths;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file(Paths.get("/path/to/file"))\n .build();\nFileCreateResponse file = client.files().create(params);\n```\n\nOr an arbitrary [`InputStream`](https://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html):\n\n```java\nimport com.llamacloud_prod.api.models.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.files.FileCreateResponse;\nimport java.net.URL;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file(new URL("https://example.com//path/to/file").openStream())\n .build();\nFileCreateResponse file = client.files().create(params);\n```\n\nOr a `byte[]` array:\n\n```java\nimport com.llamacloud_prod.api.models.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.files.FileCreateResponse;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file("content".getBytes())\n .build();\nFileCreateResponse file = client.files().create(params);\n```\n\nNote that when passing a non-`Path` its filename is unknown so it will not be included in the request. To manually set a filename, pass a [`MultipartField`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/Values.kt):\n\n```java\nimport com.llamacloud_prod.api.core.MultipartField;\nimport com.llamacloud_prod.api.models.files.FileCreateParams;\nimport com.llamacloud_prod.api.models.files.FileCreateResponse;\nimport java.io.InputStream;\nimport java.net.URL;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file(MultipartField.builder()\n .value(new URL("https://example.com//path/to/file").openStream())\n .filename("/path/to/file")\n .build())\n .build();\nFileCreateResponse file = client.files().create(params);\n```\n\n\n\n## Raw responses\n\nThe SDK defines methods that deserialize responses into instances of Java classes. However, these methods don\'t provide access to the response headers, status code, or the raw response body.\n\nTo access this data, prefix any HTTP method call on a client or service with `withRawResponse()`:\n\n```java\nimport com.llamacloud_prod.api.core.http.Headers;\nimport com.llamacloud_prod.api.core.http.HttpResponseFor;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListPage;\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListParams;\n\nIndexListParams params = IndexListParams.builder()\n .projectId("my-project-id")\n .build();\nHttpResponseFor page = client.beta().indexes().withRawResponse().list(params);\n\nint statusCode = page.statusCode();\nHeaders headers = page.headers();\n```\n\nYou can still deserialize the response into an instance of a Java class if needed:\n\n```java\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListPage;\n\nIndexListPage parsedPage = page.parse();\n```\n\n## Error handling\n\nThe SDK throws custom unchecked exception types:\n\n- [`LlamaCloudServiceException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudServiceException.kt): Base class for HTTP errors. See this table for which exception subclass is thrown for each HTTP status code:\n\n | Status | Exception |\n | ------ | -------------------------------------------------- |\n | 400 | [`BadRequestException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/UnexpectedStatusCodeException.kt) |\n\n- [`LlamaCloudIoException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudIoException.kt): I/O networking errors.\n\n- [`LlamaCloudRetryableException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`LlamaCloudInvalidDataException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudInvalidDataException.kt): Failure to interpret successfully parsed data. For example, when accessing a property that\'s supposed to be required, but the API unexpectedly omitted it from the response.\n\n- [`LlamaCloudException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudException.kt): Base class for all exceptions. Most errors will result in one of the previously mentioned ones, but completely generic errors may be thrown using the base class.\n\n## Pagination\n\nThe SDK defines methods that return a paginated lists of results. It provides convenient ways to access the results either one page at a time or item-by-item across all pages.\n\n### Auto-pagination\n\nTo iterate through all results across all pages, use the `autoPager()` method, which automatically fetches more pages as needed.\n\nWhen using the synchronous client, the method returns an [`Iterable`](https://docs.oracle.com/javase/8/docs/api/java/lang/Iterable.html)\n\n```java\nimport com.llamacloud_prod.api.models.extract.ExtractListPage;\nimport com.llamacloud_prod.api.models.extract.ExtractV2Job;\n\nExtractListPage page = client.extract().list();\n\n// Process as an Iterable\nfor (ExtractV2Job extract : page.autoPager()) {\n System.out.println(extract);\n}\n\n// Process as a Stream\npage.autoPager()\n .stream()\n .limit(50)\n .forEach(extract -> System.out.println(extract));\n```\n\nWhen using the asynchronous client, the method returns an [`AsyncStreamResponse`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/http/AsyncStreamResponse.kt):\n\n```java\nimport com.llamacloud_prod.api.core.http.AsyncStreamResponse;\nimport com.llamacloud_prod.api.models.extract.ExtractListPageAsync;\nimport com.llamacloud_prod.api.models.extract.ExtractV2Job;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture pageFuture = client.async().extract().list();\n\npageFuture.thenRun(page -> page.autoPager().subscribe(extract -> {\n System.out.println(extract);\n}));\n\n// If you need to handle errors or completion of the stream\npageFuture.thenRun(page -> page.autoPager().subscribe(new AsyncStreamResponse.Handler<>() {\n @Override\n public void onNext(ExtractV2Job extract) {\n System.out.println(extract);\n }\n\n @Override\n public void onComplete(Optional error) {\n if (error.isPresent()) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error.get());\n } else {\n System.out.println("No more!");\n }\n }\n}));\n\n// Or use futures\npageFuture.thenRun(page -> page.autoPager()\n .subscribe(extract -> {\n System.out.println(extract);\n })\n .onCompleteFuture()\n .whenComplete((unused, error) -> {\n if (error != null) {\n System.out.println("Something went wrong!");\n throw new RuntimeException(error);\n } else {\n System.out.println("No more!");\n }\n }));\n```\n\n### Manual pagination\n\nTo access individual page items and manually request the next page, use the `items()`,\n`hasNextPage()`, and `nextPage()` methods:\n\n```java\nimport com.llamacloud_prod.api.models.extract.ExtractListPage;\nimport com.llamacloud_prod.api.models.extract.ExtractV2Job;\n\nExtractListPage page = client.extract().list();\nwhile (true) {\n for (ExtractV2Job extract : page.items()) {\n System.out.println(extract);\n }\n\n if (!page.hasNextPage()) {\n break;\n }\n\n page = page.nextPage();\n}\n```\n\n## Logging\n\nEnable logging by setting the `LLAMA_CLOUD_LOG` environment variable to `info`:\n\n```sh\nexport LLAMA_CLOUD_LOG=info\n```\n\nOr to `debug` for more verbose logging:\n\n```sh\nexport LLAMA_CLOUD_LOG=debug\n```\n\nOr configure the client manually using the `logLevel` method:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.LogLevel;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .logLevel(LogLevel.INFO)\n .build();\n```\n\n## ProGuard and R8\n\nAlthough the SDK uses reflection, it is still usable with [ProGuard](https://github.com/Guardsquare/proguard) and [R8](https://developer.android.com/topic/performance/app-optimization/enable-app-optimization) because `llama-cloud-java-core` is published with a [configuration file](llama-cloud-java-core/src/main/resources/META-INF/proguard/llama-cloud-java-core.pro) containing [keep rules](https://www.guardsquare.com/manual/configuration/usage).\n\nProGuard and R8 should automatically detect and use the published rules, but you can also manually copy the keep rules if necessary.\n\n\n\n\n\n## Jackson\n\nThe SDK depends on [Jackson](https://github.com/FasterXML/jackson) for JSON serialization/deserialization. It is compatible with version 2.13.4 or higher, but depends on version 2.18.2 by default.\n\nThe SDK throws an exception if it detects an incompatible Jackson version at runtime (e.g. if the default version was overridden in your Maven or Gradle config).\n\nIf the SDK threw an exception, but you\'re _certain_ the version is compatible, then disable the version check using the `checkJacksonVersionCompatibility` on [`LlamaCloudOkHttpClient`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClientAsync.kt).\n\n> [!CAUTION]\n> We make no guarantee that the SDK works correctly when the Jackson version check is disabled.\n\nAlso note that there are bugs in older Jackson versions that can affect the SDK. We don\'t work around all Jackson bugs ([example](https://github.com/FasterXML/jackson-databind/issues/3240)) and expect users to upgrade Jackson for those instead.\n\n## Network options\n\n### Retries\n\nThe SDK automatically retries 2 times by default, with a short exponential backoff between requests.\n\nOnly the following error types are retried:\n- Connection errors (for example, due to a network connectivity problem)\n- 408 Request Timeout\n- 409 Conflict\n- 429 Rate Limit\n- 5xx Internal\n\nThe API may also explicitly instruct the SDK to retry or not retry a request.\n\nTo set a custom number of retries, configure the client using the `maxRetries` method:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .maxRetries(4)\n .build();\n```\n\n### Timeouts\n\nRequests time out after 1 minute by default.\n\nTo set a custom timeout, configure the method call using the `timeout` method:\n\n```java\nimport com.llamacloud_prod.api.models.beta.indexes.IndexListPage;\n\nIndexListPage page = client.beta().indexes().list(RequestOptions.builder().timeout(Duration.ofSeconds(30)).build());\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport java.time.Duration;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .timeout(Duration.ofSeconds(30))\n .build();\n```\n\n### Proxies\n\nTo route requests through a proxy, configure the client using the `proxy` method:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport java.net.InetSocketAddress;\nimport java.net.Proxy;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .proxy(new Proxy(\n Proxy.Type.HTTP, new InetSocketAddress(\n "https://example.com", 8080\n )\n ))\n .build();\n```\n\nIf the proxy responds with `407 Proxy Authentication Required`, supply credentials by also configuring `proxyAuthenticator`:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport com.llamacloud_prod.api.core.http.ProxyAuthenticator;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .proxy(...)\n // Or a custom implementation of `ProxyAuthenticator`.\n .proxyAuthenticator(ProxyAuthenticator.basic("username", "password"))\n .build();\n```\n\n### Connection pooling\n\nTo customize the underlying OkHttp connection pool, configure the client using the `maxIdleConnections` and `keepAliveDuration` methods:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\nimport java.time.Duration;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n // If `maxIdleConnections` is set, then `keepAliveDuration` must be set, and vice versa.\n .maxIdleConnections(10)\n .keepAliveDuration(Duration.ofMinutes(2))\n .build();\n```\n\nIf both options are unset, OkHttp\'s default connection pool settings are used.\n\n### HTTPS\n\n> [!NOTE]\n> Most applications should not call these methods, and instead use the system defaults. The defaults include\n> special optimizations that can be lost if the implementations are modified.\n\nTo configure how HTTPS connections are secured, configure the client using the `sslSocketFactory`, `trustManager`, and `hostnameVerifier` methods:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n // If `sslSocketFactory` is set, then `trustManager` must be set, and vice versa.\n .sslSocketFactory(yourSSLSocketFactory)\n .trustManager(yourTrustManager)\n .hostnameVerifier(yourHostnameVerifier)\n .build();\n```\n\n\n\n### Custom HTTP client\n\nThe SDK consists of three artifacts:\n- `llama-cloud-java-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudClient`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClient.kt), [`LlamaCloudClientAsync`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsync.kt), [`LlamaCloudClientImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientImpl.kt), and [`LlamaCloudClientAsyncImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsyncImpl.kt), all of which can work with any HTTP client\n- `llama-cloud-java-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudOkHttpClient`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClient.kt) and [`LlamaCloudOkHttpClientAsync`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClientAsync.kt), which provide a way to construct [`LlamaCloudClientImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientImpl.kt) and [`LlamaCloudClientAsyncImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsyncImpl.kt), respectively, using OkHttp\n- `llama-cloud-java`\n - Depends on and exposes the APIs of both `llama-cloud-java-core` and `llama-cloud-java-client-okhttp`\n - Does not have its own logic\n\nThis structure allows replacing the SDK\'s default HTTP client without pulling in unnecessary dependencies.\n\n#### Customized [`OkHttpClient`](https://square.github.io/okhttp/3.x/okhttp/okhttp3/OkHttpClient.html)\n\n> [!TIP]\n> Try the available [network options](#network-options) before replacing the default client.\n\nTo use a customized `OkHttpClient`:\n\n1. Replace your [`llama-cloud-java` dependency](#installation) with `llama-cloud-java-core`\n2. Copy `llama-cloud-java-client-okhttp`\'s [`OkHttpClient`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClientAsync.kt), using your customized client\n\n### Completely custom HTTP client\n\nTo use a completely custom HTTP client:\n\n1. Replace your [`llama-cloud-java` dependency](#installation) with `llama-cloud-java-core`\n2. Write a class that implements the [`HttpClient`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/http/HttpClient.kt) interface\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-java-client-okhttp/src/main/kotlin/com/llamacloud_prod/api/client/okhttp/LlamaCloudOkHttpClientAsync.kt), using your new client class\n\n## Undocumented API functionality\n\nThe SDK is typed for convenient usage of the documented API. However, it also supports working with undocumented or not yet supported parts of the API.\n\n### Parameters\n\nTo set undocumented parameters, call the `putAdditionalHeader`, `putAdditionalQueryParam`, or `putAdditionalBodyProperty` methods on any `Params` class:\n\n```java\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .putAdditionalHeader("Secret-Header", "42")\n .putAdditionalQueryParam("secret_query_param", "42")\n .putAdditionalBodyProperty("secretProperty", JsonValue.from("42"))\n .build();\n```\n\nThese can be accessed on the built object later using the `_additionalHeaders()`, `_additionalQueryParams()`, and `_additionalBodyProperties()` methods.\n\nTo set undocumented parameters on _nested_ headers, query params, or body classes, call the `putAdditionalProperty` method on the nested class:\n\n```java\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .agenticOptions(ParsingCreateParams.AgenticOptions.builder()\n .putAdditionalProperty("secretProperty", JsonValue.from("42"))\n .build())\n .build();\n```\n\nThese properties can be accessed on the nested built object later using the `_additionalProperties()` method.\n\nTo set a documented parameter or property to an undocumented or not yet supported _value_, pass a [`JsonValue`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/Values.kt) object to its setter:\n\n```java\nimport com.llamacloud_prod.api.core.JsonValue;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .tier(JsonValue.from(42))\n .version(ParsingCreateParams.Version.LATEST)\n .fileId("abc1234")\n .build();\n```\n\nThe most straightforward way to create a [`JsonValue`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport com.llamacloud_prod.api.core.JsonValue;\nimport java.util.List;\nimport java.util.Map;\n\n// Create primitive JSON values\nJsonValue nullValue = JsonValue.from(null);\nJsonValue booleanValue = JsonValue.from(true);\nJsonValue numberValue = JsonValue.from(42);\nJsonValue stringValue = JsonValue.from("Hello World!");\n\n// Create a JSON array value equivalent to `["Hello", "World"]`\nJsonValue arrayValue = JsonValue.from(List.of(\n "Hello", "World"\n));\n\n// Create a JSON object value equivalent to `{ "a": 1, "b": 2 }`\nJsonValue objectValue = JsonValue.from(Map.of(\n "a", 1,\n "b", 2\n));\n\n// Create an arbitrarily nested JSON equivalent to:\n// {\n// "a": [1, 2],\n// "b": [3, 4]\n// }\nJsonValue complexValue = JsonValue.from(Map.of(\n "a", List.of(\n 1, 2\n ),\n "b", List.of(\n 3, 4\n )\n));\n```\n\nNormally a `Builder` class\'s `build` method will throw [`IllegalStateException`](https://docs.oracle.com/javase/8/docs/api/java/lang/IllegalStateException.html) if any required parameter or property is unset.\n\nTo forcibly omit a required parameter or property, pass [`JsonMissing`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/core/Values.kt):\n\n```java\nimport com.llamacloud_prod.api.core.JsonMissing;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\n\nParsingCreateParams params = ParsingCreateParams.builder()\n .version(ParsingCreateParams.Version.LATEST)\n .tier(JsonMissing.of())\n .build();\n```\n\n### Response properties\n\nTo access undocumented response properties, call the `_additionalProperties()` method:\n\n```java\nimport com.llamacloud_prod.api.core.JsonValue;\nimport java.util.Map;\n\nMap additionalProperties = client.parsing().create(params)._additionalProperties();\nJsonValue secretPropertyValue = additionalProperties.get("secretProperty");\n\nString result = secretPropertyValue.accept(new JsonValue.Visitor<>() {\n @Override\n public String visitNull() {\n return "It\'s null!";\n }\n\n @Override\n public String visitBoolean(boolean value) {\n return "It\'s a boolean!";\n }\n\n @Override\n public String visitNumber(Number value) {\n return "It\'s a number!";\n }\n\n // Other methods include `visitMissing`, `visitString`, `visitArray`, and `visitObject`\n // The default implementation of each unimplemented method delegates to `visitDefault`, which throws by default, but can also be overridden\n});\n```\n\nTo access a property\'s raw JSON value, which may be undocumented, call its `_` prefixed method:\n\n```java\nimport com.llamacloud_prod.api.core.JsonField;\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateParams;\nimport java.util.Optional;\n\nJsonField tier = client.parsing().create(params)._tier();\n\nif (tier.isMissing()) {\n // The property is absent from the JSON response\n} else if (tier.isNull()) {\n // The property was set to literal null\n} else {\n // Check if value was provided as a string\n // Other methods include `asNumber()`, `asBoolean()`, etc.\n Optional jsonString = tier.asString();\n\n // Try to deserialize into a custom type\n MyClass myObject = tier.asUnknown().orElseThrow().convert(MyClass.class);\n}\n```\n\n### Response validation\n\nIn rare cases, the API may return a response that doesn\'t match the expected type. For example, the SDK may expect a property to contain a `String`, but the API could return something else.\n\nBy default, the SDK will not throw an exception in this case. It will throw [`LlamaCloudInvalidDataException`](llama-cloud-java-core/src/main/kotlin/com/llamacloud_prod/api/errors/LlamaCloudInvalidDataException.kt) only if you directly access the property.\n\nValidating the response is _not_ forwards compatible with new types from the API for existing fields.\n\nIf you would still prefer to check that the response is completely well-typed upfront, then either call `validate()`:\n\n```java\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\n\nParsingCreateResponse parsing = client.parsing().create(params).validate();\n```\n\nOr configure the method call to validate the response using the `responseValidation` method:\n\n```java\nimport com.llamacloud_prod.api.models.parsing.ParsingCreateResponse;\n\nParsingCreateResponse parsing = client.parsing().create(\n params, RequestOptions.builder().responseValidation(true).build()\n);\n```\n\nOr configure the default for all method calls at the client level:\n\n```java\nimport com.llamacloud_prod.api.client.LlamaCloudClient;\nimport com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient;\n\nLlamaCloudClient client = LlamaCloudOkHttpClient.builder()\n .fromEnv()\n .responseValidation(true)\n .build();\n```\n\n## FAQ\n\n### Why don\'t you use plain `enum` classes?\n\nJava `enum` classes are not trivially [forwards compatible](https://www.stainless.com/blog/making-java-enums-forwards-compatible). Using them in the SDK could cause runtime exceptions if the API is updated to respond with a new enum value.\n\n### Why do you represent fields using `JsonField` instead of just plain `T`?\n\nUsing `JsonField` enables a few features:\n\n- Allowing usage of [undocumented API functionality](#undocumented-api-functionality)\n- Lazily [validating the API response against the expected shape](#response-validation)\n- Representing absent vs explicitly null values\n\n### Why don\'t you use [`data` classes](https://kotlinlang.org/docs/data-classes.html)?\n\nIt is not [backwards compatible to add new fields to a data class](https://kotlinlang.org/docs/api-guidelines-backward-compatibility.html#avoid-using-data-classes-in-your-api) and we don\'t want to introduce a breaking change every time we add a field to a class.\n\n### Why don\'t you use checked exceptions?\n\nChecked exceptions are widely considered a mistake in the Java programming language. In fact, they were omitted from Kotlin for this reason.\n\nChecked exceptions:\n\n- Are verbose to handle\n- Encourage error handling at the wrong level of abstraction, where nothing can be done about the error\n- Are tedious to propagate due to the [function coloring problem](https://journal.stuffwithstuff.com/2015/02/01/what-color-is-your-function)\n- Don\'t play well with lambdas (also due to the function coloring problem)\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/run-llama/llama-parse-java/issues) with questions, bugs, or suggestions.\n', }, { language: 'go', content: '# Llama Cloud Go API Library\n\nGo Reference\n\nThe Llama Cloud Go library provides convenient access to the [Llama Cloud REST API](https://developers.llamaindex.ai/)\nfrom applications written in Go.\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n## MCP Server\n\nUse the Llama Cloud MCP Server to enable AI assistants to interact with this API, allowing them to explore endpoints, make test requests, and use documentation to help integrate this SDK into your application.\n\n[![Add to Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[![Install in VS Code](https://img.shields.io/badge/_-Add_to_VS_Code-blue?style=for-the-badge&logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGZpbGw9Im5vbmUiIHZpZXdCb3g9IjAgMCA0MCA0MCI+PHBhdGggZmlsbD0iI0VFRSIgZmlsbC1ydWxlPSJldmVub2RkIiBkPSJNMzAuMjM1IDM5Ljg4NGEyLjQ5MSAyLjQ5MSAwIDAgMS0xLjc4MS0uNzNMMTIuNyAyNC43OGwtMy40NiAyLjYyNC0zLjQwNiAyLjU4MmExLjY2NSAxLjY2NSAwIDAgMS0xLjA4Mi4zMzggMS42NjQgMS42NjQgMCAwIDEtMS4wNDYtLjQzMWwtMi4yLTJhMS42NjYgMS42NjYgMCAwIDEgMC0yLjQ2M0w3LjQ1OCAyMCA0LjY3IDE3LjQ1MyAxLjUwNyAxNC41N2ExLjY2NSAxLjY2NSAwIDAgMSAwLTIuNDYzbDIuMi0yYTEuNjY1IDEuNjY1IDAgMCAxIDIuMTMtLjA5N2w2Ljg2MyA1LjIwOUwyOC40NTIuODQ0YTIuNDg4IDIuNDg4IDAgMCAxIDEuODQxLS43MjljLjM1MS4wMDkuNjk5LjA5MSAxLjAxOS4yNDVsOC4yMzYgMy45NjFhMi41IDIuNSAwIDAgMSAxLjQxNSAyLjI1M3YuMDk5LS4wNDVWMzMuMzd2LS4wNDUuMDk1YTIuNTAxIDIuNTAxIDAgMCAxLTEuNDE2IDIuMjU3bC04LjIzNSAzLjk2MWEyLjQ5MiAyLjQ5MiAwIDAgMS0xLjA3Ny4yNDZabS43MTYtMjguOTQ3LTExLjk0OCA5LjA2MiAxMS45NTIgOS4wNjUtLjAwNC0xOC4xMjdaIi8+PC9zdmc+)](https://vscode.stainless.com/mcp/%7B%22name%22%3A%22%40llamaindex%2Fllama-cloud-mcp%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40llamaindex%2Fllama-cloud-mcp%22%5D%2C%22env%22%3A%7B%22LLAMA_CLOUD_API_KEY%22%3A%22My%20API%20Key%22%7D%7D)\n\n> Note: You may need to set environment variables in your MCP client.\n\n## Installation\n\n\n\n```go\nimport (\n\t"github.com/run-llama/llama-parse-go" // imported as SDK_PackageName\n)\n```\n\n\n\nOr to pin the version:\n\n\n\n```sh\ngo get -u \'github.com/run-llama/llama-parse-go@v0.0.1\'\n```\n\n\n\n## Requirements\n\nThis library requires Go 1.22+.\n\n## Usage\n\nThe full API of this library can be found in [api.md](api.md).\n\n```go\npackage main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloudprod.NewClient(\n\t\toption.WithAPIKey("My API Key"), // defaults to os.LookupEnv("LLAMA_CLOUD_API_KEY")\n\t)\n\tparsing, err := client.Parsing.New(context.TODO(), llamacloudprod.ParsingNewParams{\n\t\tTier: llamacloudprod.ParsingNewParamsTierAgentic,\n\t\tVersion: llamacloudprod.ParsingNewParamsVersionLatest,\n\t\tFileID: llamacloudprod.String("abc1234"),\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", parsing.ID)\n}\n\n```\n\n### Request fields\n\nAll request parameters are wrapped in a generic `Field` type,\nwhich we use to distinguish zero values from null or omitted fields.\n\nThis prevents accidentally sending a zero value if you forget a required parameter,\nand enables explicitly sending `null`, `false`, `\'\'`, or `0` on optional parameters.\nAny field not specified is not sent.\n\nTo construct fields with values, use the helpers `String()`, `Int()`, `Float()`, or most commonly, the generic `F[T]()`.\nTo send a null, use `Null[T]()`, and to send a nonconforming value, use `Raw[T](any)`. For example:\n\n```go\nparams := FooParams{\n\tName: SDK_PackageName.F("hello"),\n\n\t// Explicitly send `"description": null`\n\tDescription: SDK_PackageName.Null[string](),\n\n\tPoint: SDK_PackageName.F(SDK_PackageName.Point{\n\t\tX: SDK_PackageName.Int(0),\n\t\tY: SDK_PackageName.Int(1),\n\n\t\t// In cases where the API specifies a given type,\n\t\t// but you want to send something else, use `Raw`:\n\t\tZ: SDK_PackageName.Raw[int64](0.01), // sends a float\n\t}),\n}\n```\n\n### Response objects\n\nAll fields in response structs are value types (not pointers or wrappers).\n\nIf a given field is `null`, not present, or invalid, the corresponding field\nwill simply be its zero value.\n\nAll response structs also include a special `JSON` field, containing more detailed\ninformation about each property, which you can use like so:\n\n```go\nif res.Name == "" {\n\t// true if `"name"` is either not present or explicitly null\n\tres.JSON.Name.IsNull()\n\n\t// true if the `"name"` key was not present in the response JSON at all\n\tres.JSON.Name.IsMissing()\n\n\t// When the API returns data that cannot be coerced to the expected type:\n\tif res.JSON.Name.IsInvalid() {\n\t\traw := res.JSON.Name.Raw()\n\n\t\tlegacyName := struct{\n\t\t\tFirst string `json:"first"`\n\t\t\tLast string `json:"last"`\n\t\t}{}\n\t\tjson.Unmarshal([]byte(raw), &legacyName)\n\t\tname = legacyName.First + " " + legacyName.Last\n\t}\n}\n```\n\nThese `.JSON` structs also include an `Extras` map containing\nany properties in the json response that were not specified\nin the struct. This can be useful for API features not yet\npresent in the SDK.\n\n```go\nbody := res.JSON.ExtraFields["my_unexpected_field"].Raw()\n```\n\n### RequestOptions\n\nThis library uses the functional options pattern. Functions defined in the\n`SDK_PackageOptionName` package return a `RequestOption`, which is a closure that mutates a\n`RequestConfig`. These options can be supplied to the client or at individual\nrequests. For example:\n\n```go\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\t// Adds a header to every request made by the client\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "custom_header_info"),\n)\n\nclient.Beta.Indexes.List(context.TODO(), ...,\n\t// Override the header\n\tSDK_PackageOptionName.WithHeader("X-Some-Header", "some_other_custom_header_info"),\n\t// Add an undocumented field to the request body, using sjson syntax\n\tSDK_PackageOptionName.WithJSONSet("some.json.path", map[string]string{"my": "object"}),\n)\n```\n\nSee the [full list of request options](https://pkg.go.dev/github.com/run-llama/llama-parse-go/SDK_PackageOptionName).\n\n### Pagination\n\nThis library provides some conveniences for working with paginated list endpoints.\n\nYou can use `.ListAutoPaging()` methods to iterate through items across all pages:\n\n```go\niter := client.Extract.ListAutoPaging(context.TODO(), llamacloudprod.ExtractListParams{\n\tPageSize: llamacloudprod.Int(20),\n})\n// Automatically fetches more pages as needed.\nfor iter.Next() {\n\textractV2Job := iter.Current()\n\tfmt.Printf("%+v\\n", extractV2Job)\n}\nif err := iter.Err(); err != nil {\n\tpanic(err.Error())\n}\n```\n\nOr you can use simple `.List()` methods to fetch a single page and receive a standard response object\nwith additional helper methods like `.GetNextPage()`, e.g.:\n\n```go\npage, err := client.Extract.List(context.TODO(), llamacloudprod.ExtractListParams{\n\tPageSize: llamacloudprod.Int(20),\n})\nfor page != nil {\n\tfor _, extract := range page.Items {\n\t\tfmt.Printf("%+v\\n", extract)\n\t}\n\tpage, err = page.GetNextPage()\n}\nif err != nil {\n\tpanic(err.Error())\n}\n```\n\n### Errors\n\nWhen the API returns a non-success status code, we return an error with type\n`*SDK_PackageName.Error`. This contains the `StatusCode`, `*http.Request`, and\n`*http.Response` values of the request, as well as the JSON of the error body\n(much like other response objects in the SDK).\n\nTo handle errors, we recommend that you use the `errors.As` pattern:\n\n```go\n_, err := client.Beta.Indexes.List(context.TODO(), llamacloudprod.BetaIndexListParams{\n\tProjectID: llamacloudprod.String("my-project-id"),\n})\nif err != nil {\n\tvar apierr *llamacloudprod.Error\n\tif errors.As(err, &apierr) {\n\t\tprintln(string(apierr.DumpRequest(true))) // Prints the serialized HTTP request\n\t\tprintln(string(apierr.DumpResponse(true))) // Prints the serialized HTTP response\n\t}\n\tpanic(err.Error()) // GET "/api/v1/indexes": 400 Bad Request { ... }\n}\n```\n\nWhen other errors occur, they are returned unwrapped; for example,\nif HTTP transport fails, you might receive `*url.Error` wrapping `*net.OpError`.\n\n### Timeouts\n\nRequests do not time out by default; use context to configure a timeout for a request lifecycle.\n\nNote that if a request is [retried](#retries), the context timeout does not start over.\nTo set a per-retry timeout, use `SDK_PackageOptionName.WithRequestTimeout()`.\n\n```go\n// This sets the timeout for the request, including all the retries.\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Minute)\ndefer cancel()\nclient.Beta.Indexes.List(\n\tctx,\n\tllamacloudprod.BetaIndexListParams{\n\t\tProjectID: llamacloudprod.String("my-project-id"),\n\t},\n\t// This sets the per-retry timeout\n\toption.WithRequestTimeout(20*time.Second),\n)\n```\n\n### File uploads\n\nRequest parameters that correspond to file uploads in multipart requests are typed as\n`param.Field[io.Reader]`. The contents of the `io.Reader` will by default be sent as a multipart form\npart with the file name of "anonymous_file" and content-type of "application/octet-stream".\n\nThe file name and content-type can be customized by implementing `Name() string` or `ContentType()\nstring` on the run-time type of `io.Reader`. Note that `os.File` implements `Name() string`, so a\nfile returned by `os.Open` will be sent with the file name on disk.\n\nWe also provide a helper `SDK_PackageName.FileParam(reader io.Reader, filename string, contentType string)`\nwhich can be used to wrap any `io.Reader` with the appropriate file name and content type.\n\n```go\n// A file from the file system\nfile, err := os.Open("/path/to/file")\nllamacloudprod.FileNewParams{\n\tFile: file,\n\tPurpose: "purpose",\n}\n\n// A file from a string\nllamacloudprod.FileNewParams{\n\tFile: strings.NewReader("my file contents"),\n\tPurpose: "purpose",\n}\n\n// With a custom filename and contentType\nllamacloudprod.FileNewParams{\n\tFile: llamacloudprod.NewFile(strings.NewReader(`{"hello": "foo"}`), "file.go", "application/json"),\n\tPurpose: "purpose",\n}\n```\n\n### Retries\n\nCertain errors will be automatically retried 2 times by default, with a short exponential backoff.\nWe retry by default all connection errors, 408 Request Timeout, 409 Conflict, 429 Rate Limit,\nand >=500 Internal errors.\n\nYou can use the `WithMaxRetries` option to configure or disable this:\n\n```go\n// Configure the default for all requests:\nclient := llamacloudprod.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Beta.Indexes.List(\n\tcontext.TODO(),\n\tllamacloudprod.BetaIndexListParams{\n\t\tProjectID: llamacloudprod.String("my-project-id"),\n\t},\n\toption.WithMaxRetries(5),\n)\n```\n\n\n### Accessing raw response data (e.g. response headers)\n\nYou can access the raw HTTP response data by using the `option.WithResponseInto()` request option. This is useful when\nyou need to examine response headers, status codes, or other details.\n\n```go\n// Create a variable to store the HTTP response\nvar response *http.Response\npage, err := client.Beta.Indexes.List(\n\tcontext.TODO(),\n\tllamacloudprod.BetaIndexListParams{\n\t\tProjectID: llamacloudprod.String("my-project-id"),\n\t},\n\toption.WithResponseInto(&response),\n)\nif err != nil {\n\t// handle error\n}\nfmt.Printf("%+v\\n", page)\n\nfmt.Printf("Status Code: %d\\n", response.StatusCode)\nfmt.Printf("Headers: %+#v\\n", response.Header)\n```\n\n### Making custom/undocumented requests\n\nThis library is typed for convenient access to the documented API. If you need to access undocumented\nendpoints, params, or response properties, the library can still be used.\n\n#### Undocumented endpoints\n\nTo make requests to undocumented endpoints, you can use `client.Get`, `client.Post`, and other HTTP verbs.\n`RequestOptions` on the client, such as retries, will be respected when making these requests.\n\n```go\nvar (\n // params can be an io.Reader, a []byte, an encoding/json serializable object,\n // or a "…Params" struct defined in this library.\n params map[string]interface{}\n\n // result can be an []byte, *http.Response, a encoding/json deserializable object,\n // or a model defined in this library.\n result *http.Response\n)\nerr := client.Post(context.Background(), "/unspecified", params, &result)\nif err != nil {\n …\n}\n```\n\n#### Undocumented request params\n\nTo make requests using undocumented parameters, you may use either the `SDK_PackageOptionName.WithQuerySet()`\nor the `SDK_PackageOptionName.WithJSONSet()` methods.\n\n```go\nparams := FooNewParams{\n ID: SDK_PackageName.F("id_xxxx"),\n Data: SDK_PackageName.F(FooNewParamsData{\n FirstName: SDK_PackageName.F("John"),\n }),\n}\nclient.Foo.New(context.Background(), params, SDK_PackageOptionName.WithJSONSet("data.last_name", "Doe"))\n```\n\n#### Undocumented response properties\n\nTo access undocumented response properties, you may either access the raw JSON of the response as a string\nwith `result.JSON.RawJSON()`, or get the raw JSON of a particular field on the result with\n`result.JSON.Foo.Raw()`.\n\nAny fields that are not present on the response struct will be saved and can be accessed by `result.JSON.ExtraFields()` which returns the extra fields as a `map[string]Field`.\n\n### Middleware\n\nWe provide `SDK_PackageOptionName.WithMiddleware` which applies the given\nmiddleware to requests.\n\n```go\nfunc Logger(req *http.Request, next SDK_PackageOptionName.MiddlewareNext) (res *http.Response, err error) {\n\t// Before the request\n\tstart := time.Now()\n\tLogReq(req)\n\n\t// Forward the request to the next handler\n\tres, err = next(req)\n\n\t// Handle stuff after the request\n\tend := time.Now()\n\tLogRes(res, err, start - end)\n\n return res, err\n}\n\nclient := SDK_PackageName.SDK_ClientInitializerName(\n\tSDK_PackageOptionName.WithMiddleware(Logger),\n)\n```\n\nWhen multiple middlewares are provided as variadic arguments, the middlewares\nare applied left to right. If `SDK_PackageOptionName.WithMiddleware` is given\nmultiple times, for example first in the client then the method, the\nmiddleware in the client will run first and the middleware given in the method\nwill run next.\n\nYou may also replace the default `http.Client` with\n`SDK_PackageOptionName.WithHTTPClient(client)`. Only one http client is\naccepted (this overwrites any previous client) and receives requests after any\nmiddleware has been applied.\n\n## Semantic versioning\n\nThis package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions:\n\n1. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_\n2. Changes that we do not expect to impact the vast majority of users in practice.\n\nWe take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience.\n\nWe are keen for your feedback; please open an [issue](https://www.github.com/run-llama/llama-parse-go/issues) with questions, bugs, or suggestions.\n\n## Contributing\n\nSee [the contributing documentation](./CONTRIBUTING.md).\n', }, { language: 'cli', content: "# Llama Cloud CLI\n\nThe official CLI for the [Llama Cloud REST API](https://developers.llamaindex.ai/).\n\nIt is generated with [Stainless](https://www.stainless.com/).\n\n\n\n## Installation\n\n### Installing with Go\n\nTo test or install the CLI locally, you need [Go](https://go.dev/doc/install) version 1.22 or later installed.\n\n~~~sh\ngo install 'github.com/run-llama/llama-parse-cli/cmd/llamacloud-prod@latest'\n~~~\n\nOnce you have run `go install`, the binary is placed in your Go bin directory:\n\n- **Default location**: `$HOME/go/bin` (or `$GOPATH/bin` if GOPATH is set)\n- **Check your path**: Run `go env GOPATH` to see the base directory\n\nIf commands aren't found after installation, add the Go bin directory to your PATH:\n\n~~~sh\n# Add to your shell profile (.zshrc, .bashrc, etc.)\nexport PATH=\"$PATH:$(go env GOPATH)/bin\"\n~~~\n\n\n\n### Running Locally\n\nAfter cloning the git repository for this project, you can use the\n`scripts/run` script to run the tool locally:\n\n~~~sh\n./scripts/run args...\n~~~\n\n## Usage\n\nThe CLI follows a resource-based command structure:\n\n~~~sh\nllamacloud-prod [resource] [flags...]\n~~~\n\n~~~sh\nllamacloud-prod parsing create \\\n --api-key 'My API Key' \\\n --tier agentic \\\n --version latest \\\n --file-id abc1234\n~~~\n\nFor details about specific commands, use the `--help` flag.\n\n### Environment variables\n\n| Environment variable | Required |\n| --------------------- | -------- |\n| `LLAMA_CLOUD_API_KEY` | yes |\n\n### Global flags\n\n- `--api-key` (can also be set with `LLAMA_CLOUD_API_KEY` env var)\n- `--help` - Show command line usage\n- `--debug` - Enable debug logging (includes HTTP request/response details)\n- `--version`, `-v` - Show the CLI version\n- `--base-url` - Use a custom API backend URL\n- `--format` - Change the output format (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--format-error` - Change the output format for errors (`auto`, `explore`, `json`, `jsonl`, `pretty`, `raw`, `yaml`)\n- `--transform` - Transform the data output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n- `--transform-error` - Transform the error output using [GJSON syntax](https://github.com/tidwall/gjson/blob/master/SYNTAX.md)\n\n### Passing files as arguments\n\nTo pass files to your API, you can use the `@myfile.ext` syntax:\n\n~~~bash\nllamacloud-prod --arg @abe.jpg\n~~~\n\nFiles can also be passed inside JSON or YAML blobs:\n\n~~~bash\nllamacloud-prod --arg '{image: \"@abe.jpg\"}'\n# Equivalent:\nllamacloud-prod < --username '\\@abe'\n~~~\n\n#### Explicit encoding\n\nFor JSON endpoints, the CLI tool does filetype sniffing to determine whether the\nfile contents should be sent as a string literal (for plain text files) or as a\nbase64-encoded string literal (for binary files). If you need to explicitly send\nthe file as either plain text or base64-encoded data, you can use\n`@file://myfile.txt` (for string encoding) or `@data://myfile.dat` (for\nbase64-encoding). Note that absolute paths will begin with `@file://` or\n`@data://`, followed by a third `/` (for example, `@file:///tmp/file.txt`).\n\n~~~bash\nllamacloud-prod --arg @data://file.txt\n~~~\n\n## Linking different Go SDK versions\n\nYou can link the CLI against a different version of the Llama Cloud Go SDK\nfor development purposes using the `./scripts/link` script.\n\nTo link to a specific version from a repository (version can be a branch,\ngit tag, or commit hash):\n\n~~~bash\n./scripts/link github.com/org/repo@version\n~~~\n\nTo link to a local copy of the SDK:\n\n~~~bash\n./scripts/link ../path/to/llamacloudprod-go\n~~~\n\nIf you run the link script without any arguments, it will default to `../llamacloudprod-go`.\n", }, ]; const INDEX_OPTIONS = { fields: [ 'name', 'endpoint', 'summary', 'description', 'qualified', 'stainlessPath', 'content', 'sectionContext', ], storeFields: ['kind', '_original'], searchOptions: { prefix: true, fuzzy: 0.1, boost: { name: 5, stainlessPath: 3, endpoint: 3, qualified: 3, summary: 2, content: 1, description: 1, } as Record, }, }; /** * Self-contained local search engine backed by MiniSearch. * Method data is embedded at SDK build time; prose documents * can be loaded from an optional docs directory at runtime. */ export class LocalDocsSearch { private methodIndex: MiniSearch; private proseIndex: MiniSearch; private constructor() { this.methodIndex = new MiniSearch(INDEX_OPTIONS); this.proseIndex = new MiniSearch(INDEX_OPTIONS); } static async create(opts?: { docsDir?: string }): Promise { const instance = new LocalDocsSearch(); instance.indexMethods(EMBEDDED_METHODS); for (const readme of EMBEDDED_READMES) { instance.indexProse(readme.content, `readme:${readme.language}`); } if (opts?.docsDir) { await instance.loadDocsDirectory(opts.docsDir); } return instance; } search(props: { query: string; language?: string; detail?: string; maxResults?: number; maxLength?: number; }): SearchResult { const { query, language = 'typescript', detail = 'default', maxResults = 5, maxLength = 100_000 } = props; const useMarkdown = detail === 'verbose' || detail === 'high'; // Search both indices and merge results by score. // Filter prose hits so language-tagged content (READMEs and docs with // frontmatter) only matches the requested language. const methodHits = this.methodIndex .search(query) .map((hit) => ({ ...hit, _kind: 'http_method' as const })); const proseHits = this.proseIndex .search(query) .filter((hit) => { const source = ((hit as Record)['_original'] as ProseChunk | undefined)?.source; if (!source) return true; // Check for language-tagged sources: "readme:" or "lang::" let taggedLang: string | undefined; if (source.startsWith('readme:')) taggedLang = source.slice('readme:'.length); else if (source.startsWith('lang:')) taggedLang = source.split(':')[1]; if (!taggedLang) return true; return taggedLang === language || (language === 'javascript' && taggedLang === 'typescript'); }) .map((hit) => ({ ...hit, _kind: 'prose' as const })); const merged = [...methodHits, ...proseHits].sort((a, b) => b.score - a.score); const top = merged.slice(0, maxResults); const fullResults: (string | Record)[] = []; for (const hit of top) { const original = (hit as Record)['_original']; if (hit._kind === 'http_method') { const m = original as MethodEntry; if (useMarkdown && m.markdown) { fullResults.push(m.markdown); } else { // Use per-language data when available, falling back to the // top-level fields (which are TypeScript-specific in the // legacy codepath). const langData = m.perLanguage?.[language]; fullResults.push({ method: langData?.method ?? m.qualified, summary: m.summary, description: m.description, endpoint: `${m.httpMethod.toUpperCase()} ${m.endpoint}`, ...(langData?.example ? { example: langData.example } : {}), ...(m.params ? { params: m.params } : {}), ...(m.response ? { response: m.response } : {}), }); } } else { const c = original as ProseChunk; fullResults.push({ content: c.content, ...(c.source ? { source: c.source } : {}), }); } } let totalLength = 0; const results: (string | Record)[] = []; for (const result of fullResults) { const len = typeof result === 'string' ? result.length : JSON.stringify(result).length; totalLength += len; if (totalLength > maxLength) break; results.push(result); } if (results.length < fullResults.length) { results.unshift(`Truncated; showing ${results.length} of ${fullResults.length} results.`); } return { results }; } private indexMethods(methods: MethodEntry[]): void { const docs: MiniSearchDocument[] = methods.map((m, i) => ({ id: `method-${i}`, kind: 'http_method' as const, name: m.name, endpoint: m.endpoint, summary: m.summary, description: m.description, qualified: m.qualified, stainlessPath: m.stainlessPath, _original: m as unknown as Record, })); if (docs.length > 0) { this.methodIndex.addAll(docs); } } private async loadDocsDirectory(docsDir: string): Promise { let entries; try { entries = await fs.readdir(docsDir, { withFileTypes: true }); } catch (err) { getLogger().warn({ err, docsDir }, 'Could not read docs directory'); return; } const files = entries .filter((e) => e.isFile()) .filter((e) => e.name.endsWith('.md') || e.name.endsWith('.markdown') || e.name.endsWith('.json')); for (const file of files) { try { const filePath = path.join(docsDir, file.name); const content = await fs.readFile(filePath, 'utf-8'); if (file.name.endsWith('.json')) { const texts = extractTexts(JSON.parse(content)); if (texts.length > 0) { this.indexProse(texts.join('\n\n'), file.name); } } else { // Parse optional YAML frontmatter for language tagging. // Files with a "language" field in frontmatter will only // surface in searches for that language. // // Example: // --- // language: python // --- // # Error handling in Python // ... const frontmatter = parseFrontmatter(content); const source = frontmatter.language ? `lang:${frontmatter.language}:${file.name}` : file.name; this.indexProse(content, source); } } catch (err) { getLogger().warn({ err, file: file.name }, 'Failed to index docs file'); } } } private indexProse(markdown: string, source: string): void { const chunks = chunkMarkdown(markdown); const baseId = this.proseIndex.documentCount; const docs: MiniSearchDocument[] = chunks.map((chunk, i) => ({ id: `prose-${baseId + i}`, kind: 'prose' as const, content: chunk.content, ...(chunk.sectionContext != null ? { sectionContext: chunk.sectionContext } : {}), _original: { ...chunk, source } as unknown as Record, })); if (docs.length > 0) { this.proseIndex.addAll(docs); } } } /** Lightweight markdown chunker — splits on headers, chunks by word count. */ function chunkMarkdown(markdown: string): { content: string; tag: string; sectionContext?: string }[] { // Strip YAML frontmatter const stripped = markdown.replace(/^---\n[\s\S]*?\n---\n?/, ''); const lines = stripped.split('\n'); const chunks: { content: string; tag: string; sectionContext?: string }[] = []; const headers: string[] = []; let current: string[] = []; const flush = () => { const text = current.join('\n').trim(); if (!text) return; const sectionContext = headers.length > 0 ? headers.join(' > ') : undefined; // Split into ~200-word chunks const words = text.split(/\s+/); for (let i = 0; i < words.length; i += 200) { const slice = words.slice(i, i + 200).join(' '); if (slice) { chunks.push({ content: slice, tag: 'p', ...(sectionContext != null ? { sectionContext } : {}) }); } } current = []; }; for (const line of lines) { const headerMatch = line.match(/^(#{1,6})\s+(.+)/); if (headerMatch) { flush(); const level = headerMatch[1]!.length; const text = headerMatch[2]!.trim(); while (headers.length >= level) headers.pop(); headers.push(text); } else { current.push(line); } } flush(); return chunks; } /** Recursively extracts string values from a JSON structure. */ function extractTexts(data: unknown, depth = 0): string[] { if (depth > 10) return []; if (typeof data === 'string') return data.trim() ? [data] : []; if (Array.isArray(data)) return data.flatMap((item) => extractTexts(item, depth + 1)); if (typeof data === 'object' && data !== null) { return Object.values(data).flatMap((v) => extractTexts(v, depth + 1)); } return []; } /** Parses YAML frontmatter from a markdown string, extracting the language field if present. */ function parseFrontmatter(markdown: string): { language?: string } { const match = markdown.match(/^---\n([\s\S]*?)\n---/); if (!match) return {}; const body = match[1] ?? ''; const langMatch = body.match(/^language:\s*(.+)$/m); return langMatch ? { language: langMatch[1]!.trim() } : {}; }