@llamaindex/llama-cloud-mcp 2.17.0 → 2.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +21 -0
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +21 -0
- package/code-tool-worker.mjs.map +1 -1
- package/local-docs-search.d.mts.map +1 -1
- package/local-docs-search.d.ts.map +1 -1
- package/local-docs-search.js +1215 -258
- package/local-docs-search.js.map +1 -1
- package/local-docs-search.mjs +1215 -258
- package/local-docs-search.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +126 -0
- package/methods.js.map +1 -1
- package/methods.mjs +126 -0
- package/methods.mjs.map +1 -1
- package/package.json +2 -2
- package/server.js +1 -1
- package/server.mjs +1 -1
- package/src/code-tool-worker.ts +21 -0
- package/src/local-docs-search.ts +1385 -255
- package/src/methods.ts +126 -0
- package/src/server.ts +1 -1
package/src/local-docs-search.ts
CHANGED
|
@@ -547,13 +547,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
547
547
|
endpoint: '/api/v1/split/jobs/{split_job_id}',
|
|
548
548
|
httpMethod: 'delete',
|
|
549
549
|
summary: 'Delete Split Job',
|
|
550
|
-
description:
|
|
550
|
+
description:
|
|
551
|
+
'Delete a split job and its results. A job that is not in a terminal state is refused with 409; cancel it first.',
|
|
551
552
|
stainlessPath: '(resource) split > (method) delete',
|
|
552
553
|
qualified: 'client.split.delete',
|
|
553
554
|
params: ['split_job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
554
555
|
response: 'object',
|
|
555
556
|
markdown:
|
|
556
|
-
"## delete\n\n`client.split.delete(split_job_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v1/split/jobs/{split_job_id}`\n\nDelete a split job and its results.\n\n### Parameters\n\n- `split_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 split = await client.split.delete('split_job_id');\n\nconsole.log(split);\n```",
|
|
557
|
+
"## delete\n\n`client.split.delete(split_job_id: string, organization_id?: string, project_id?: string): object`\n\n**delete** `/api/v1/split/jobs/{split_job_id}`\n\nDelete a split job and its results. A job that is not in a terminal state is refused with 409; cancel it first.\n\n### Parameters\n\n- `split_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 split = await client.split.delete('split_job_id');\n\nconsole.log(split);\n```",
|
|
557
558
|
perLanguage: {
|
|
558
559
|
python: {
|
|
559
560
|
method: 'split.delete',
|
|
@@ -651,7 +652,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
651
652
|
qualified: 'client.parsing.create',
|
|
652
653
|
params: [
|
|
653
654
|
"tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string;",
|
|
654
|
-
"version: 'latest' | '2026-
|
|
655
|
+
"version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | string;",
|
|
655
656
|
'organization_id?: string;',
|
|
656
657
|
'project_id?: string;',
|
|
657
658
|
'agentic_options?: { custom_prompt?: string; };',
|
|
@@ -666,7 +667,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
666
667
|
"output_options?: { additional_outputs?: string[]; extract_printed_page_number?: boolean; granular_bboxes?: 'cell' | 'line' | 'word'[]; images_to_save?: 'embedded' | 'layout' | 'screenshot'[]; markdown?: { annotate_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; };",
|
|
667
668
|
'page_ranges?: { max_pages?: number; target_pages?: string; };',
|
|
668
669
|
'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; }; };',
|
|
669
|
-
"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-
|
|
670
|
+
"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-10-16' | '2026-09-28' | '2026-06-15' | 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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'; };",
|
|
670
671
|
'source_url?: string;',
|
|
671
672
|
'user_metadata?: object;',
|
|
672
673
|
'webhook_configuration_ids?: string[];',
|
|
@@ -675,7 +676,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
675
676
|
response:
|
|
676
677
|
"{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; usage?: { credits?: number; }; user_metadata?: object; }",
|
|
677
678
|
markdown:
|
|
678
|
-
"## create\n\n`client.parsing.create(tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string, version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }, 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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, user_metadata?: object, webhook_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: 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; usage?: object; user_metadata?: object; }`\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-09-29' | '2026-09-28' | '2026-06-15' | 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`: `2026-06-15`\n- `cost_effective`: `2026-09-28`\n- `agentic`: `2026-09-29`\n- `agentic_plus`: `2026-09-28`\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?: { include_hidden_slides?: boolean; 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }`\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 save: 'screenshot' (full page renders), 'embedded' (images found within the document), 'layout' (cropped figures and diagrams). Defaults to saving 'layout' when the output links to cropped images; pass [] to save none\n - `markdown?: { annotate_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: 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 - `save_output_pdf?: boolean`\n Save a PDF copy of the parsed document, retrievable via `expand=output_pdf_content_metadata`. Not produced for spreadsheet, plain-text, or audio inputs\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 - `watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'`\n What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown, 'move_to_start' as the first block, and 'remove' drops it. The text output follows the same choice where the watermark is a line of its own in the PDF text layer. In every mode the detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise\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-09-29' | '2026-09-28' | '2026-06-15' | 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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-09-29' | '2026-09-28' | '2026-06-15' | 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 - `confidence_score_effort?: 'high'`\n Confidence scoring effort. Omit for standard scoring. 'high': more accurate assessment of the parsing quality of every page, plus a document-level score in the result metadata; costs an additional 5 credits per page\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 - `forms?: 'default' | 'enrich'`\n Beta: set to 'enrich' to run an additional AI form-analysis pass on pages detected as forms, producing a structured tree of the form's sections, fields, and fillable grids. Retrieve the result with expand=forms. 'default' (the default) applies standard parsing with no extra pass. Not available on the fast tier\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- `user_metadata?: object`\n Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not searchable. Limits apply to the number of entries and the length of keys and values; oversized metadata is rejected.\n\n- `webhook_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: 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; usage?: { credits?: number; }; user_metadata?: object; }`\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 - `usage?: { credits?: number; }`\n - `user_metadata?: object`\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```",
|
|
679
|
+
"## create\n\n`client.parsing.create(tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string, version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }, 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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, user_metadata?: object, webhook_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: 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; usage?: object; user_metadata?: object; }`\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-10-16' | '2026-09-28' | '2026-06-15' | 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`: `2026-06-15`\n- `cost_effective`: `2026-09-28`\n- `agentic`: `2026-10-16`\n- `agentic_plus`: `2026-09-28`\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?: { include_hidden_slides?: boolean; 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: { compact_markdown_tables?: boolean; markdown_table_multiline_separator?: string; merge_continued_tables?: boolean; output_tables_as_markdown?: boolean; }; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }`\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 save: 'screenshot' (full page renders), 'embedded' (images found within the document), 'layout' (cropped figures and diagrams). Defaults to saving 'layout' when the output links to cropped images; pass [] to save none\n - `markdown?: { annotate_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: 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 - `save_output_pdf?: boolean`\n Save a PDF copy of the parsed document, retrievable via `expand=output_pdf_content_metadata`. Not produced for spreadsheet, plain-text, or audio inputs\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 - `watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'`\n What to do with watermark text stamped across the page (e.g., 'CONFIDENTIAL', 'DRAFT'): 'move_to_end' (default) keeps it as the last block of the page's markdown, 'move_to_start' as the first block, and 'remove' drops it. The text output follows the same choice where the watermark is a line of its own in the PDF text layer. In every mode the detected text is reported in the page's `watermark` metadata. Requires version 2026-09-28 or later on the cost_effective, agentic, and agentic_plus tiers; ignored otherwise\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-10-16' | '2026-09-28' | '2026-06-15' | 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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-10-16' | '2026-09-28' | '2026-06-15' | 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 - `confidence_score_effort?: 'high'`\n Confidence scoring effort. Omit for standard scoring. 'high': more accurate assessment of the parsing quality of every page, plus a document-level score in the result metadata; costs an additional 5 credits per page\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 - `forms?: 'default' | 'enrich'`\n Beta: set to 'enrich' to run an additional AI form-analysis pass on pages detected as forms, producing a structured tree of the form's sections, fields, and fillable grids. Retrieve the result with expand=forms. 'default' (the default) applies standard parsing with no extra pass. Not available on the fast tier\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- `user_metadata?: object`\n Arbitrary key/value tags to attach to this job. Returned when retrieving the job. Not searchable. Limits apply to the number of entries and the length of keys and values; oversized metadata is rejected.\n\n- `webhook_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: 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; usage?: { credits?: number; }; user_metadata?: object; }`\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 - `usage?: { credits?: number; }`\n - `user_metadata?: object`\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```",
|
|
679
680
|
perLanguage: {
|
|
680
681
|
python: {
|
|
681
682
|
method: 'parsing.create',
|
|
@@ -731,7 +732,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
731
732
|
response:
|
|
732
733
|
"{ 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; usage?: object; user_metadata?: object; }; forms?: { pages: object | object[]; }; 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[]; document?: object; }; raw_parameters?: object; result_content_metadata?: object; text?: { pages: object[]; }; text_full?: string; }",
|
|
733
734
|
markdown:
|
|
734
|
-
"## get\n\n`client.parsing.get(job_id: string, expand?: string[], image_filenames?: string, organization_id?: string, project_id?: string): { job: object; forms?: 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` — processing details\n- `usage` — credits billed against the job\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, forms, job_metadata, usage, text_content_metadata, markdown_content_metadata, items_content_metadata, metadata_content_metadata, forms_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; usage?: { credits?: number; }; user_metadata?: object; }; forms?: { pages: { forms: form[]; page_number: number; success: true; detected_form_types?: string[]; page_height?: number; page_width?: number; } | { error: string; page_number: number; success: false; }[]; }; 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; revisions?: object[]; } | { error: string; page_number: number; success: false; }[]; }; job_metadata?: object; markdown?: { pages: { markdown: string; page_number: number; success: true; footer?: string; header?: string; line_numbers?: object[]; } | { 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; watermark?: string; }[]; document?: { confidence?: number; confidence_breakdown?: object; }; }; 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; usage?: { credits?: number; }; user_metadata?: object; }`\n - `forms?: { pages: { forms: { json: form_field | form_section | form_table |
|
|
735
|
+
"## get\n\n`client.parsing.get(job_id: string, expand?: string[], image_filenames?: string, organization_id?: string, project_id?: string): { job: object; forms?: 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` — processing details\n- `usage` — credits billed against the job\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, forms, job_metadata, usage, text_content_metadata, markdown_content_metadata, items_content_metadata, metadata_content_metadata, forms_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; usage?: { credits?: number; }; user_metadata?: object; }; forms?: { pages: { forms: form[]; page_number: number; success: true; detected_form_types?: string[]; page_height?: number; page_width?: number; } | { error: string; page_number: number; success: false; }[]; }; 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; revisions?: object[]; } | { error: string; page_number: number; success: false; }[]; }; job_metadata?: object; markdown?: { pages: { markdown: string; page_number: number; success: true; footer?: string; header?: string; line_numbers?: object[]; } | { 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; watermark?: string; }[]; document?: { confidence?: number; confidence_breakdown?: object; }; }; 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; usage?: { credits?: number; }; user_metadata?: object; }`\n - `forms?: { pages: { forms: { json: form_field | form_section | form_table | form_text[]; list: form_list_item; }[]; page_number: number; success: true; detected_form_types?: string[]; page_height?: number; page_width?: number; } | { error: string; page_number: number; success: false; }[]; }`\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; revisions?: { content: string; revision_bbox: { h: number; w: number; x: number; y: number; }; target: string; target_bbox: { h: number; w: number; x: number; y: number; }; type: 'comment' | 'deleted' | 'formatted' | 'inserted' | 'moved_from' | 'moved_to'; author?: string; end_index?: number; start_index?: number; target_spans?: { target: string; target_bbox: object; end_index?: number; start_index?: number; }[]; }[]; } | { 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; line_numbers?: { end_index: number; line_number: string; start_index: number; }[]; } | { 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; watermark?: string; }[]; document?: { confidence?: number; confidence_breakdown?: { min_page_score: number; scored_pages: number; total_pages: number; }; }; }`\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```",
|
|
735
736
|
perLanguage: {
|
|
736
737
|
python: {
|
|
737
738
|
method: 'parsing.get',
|
|
@@ -987,15 +988,15 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
987
988
|
'file_input: string;',
|
|
988
989
|
'organization_id?: string;',
|
|
989
990
|
'project_id?: string;',
|
|
990
|
-
"configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; };",
|
|
991
|
+
"configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; };",
|
|
991
992
|
'configuration_id?: string;',
|
|
992
993
|
'webhook_configuration_ids?: string[];',
|
|
993
994
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
994
995
|
],
|
|
995
996
|
response:
|
|
996
|
-
"{ 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
997
|
+
"{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
997
998
|
markdown:
|
|
998
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; }, configuration_id?: string, webhook_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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; usage?: 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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. Returned under `extract_metadata` (auto-included when set). Text-level on `turbo` (no bounding boxes).\n - `confidence_scores?: boolean`\n Include confidence scores in results. Returned under `extract_metadata` (auto-included when set).\n - `disable_cache?: boolean`\n Disable reuse and storage of Extract results\n - `extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'`\n Deprecated. Applies only to Agentic and Cost Effective versions 2.0 or earlier. 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. Agentic Plus supports per_doc only.\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. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.\n - `parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'`\n Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.\n - `sheet_names?: string[]`\n Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [\"Sheet 1\", \"My Sheet\"].\n - `spreadsheet_mode?: boolean`\n Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.\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' | 'agentic_plus' | 'cost_effective' | 'turbo'`\n Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)\n - `version?: string`\n Extract version name, such as '2.5'. Use 'latest' for the newest compatible release for the selected tier. Dates (YYYY-MM-DD) are also supported, which will use the latest version on or before the specified date.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `webhook_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
999
|
+
"## create\n\n`client.extract.create(file_input: string, organization_id?: string, project_id?: string, configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; }, configuration_id?: string, webhook_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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; usage?: 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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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 - `advanced_citations?: boolean`\n More precise citation bounding boxes. Set to false for faster extraction with less precise boxes.\n - `cite_sources?: boolean`\n Include citations in results. Returned under `extract_metadata` (auto-included when set). Text-level on `turbo` (no bounding boxes).\n - `confidence_scores?: boolean`\n Include confidence scores in results. Returned under `extract_metadata` (auto-included when set).\n - `disable_cache?: boolean`\n Disable reuse and storage of Extract results\n - `extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'`\n Deprecated. Applies only to Agentic and Cost Effective versions 2.0 or earlier. 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. Agentic Plus supports per_doc only.\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. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.\n - `parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'`\n Parse tier to use before extraction. Defaults to the extract tier if not specified. Turbo extract does not support parse configuration or produce a parse output; use another tier if your workflow requires parsed text.\n - `sheet_names?: string[]`\n Optional worksheet names to extract when spreadsheet_mode is on. Overrides target_pages for spreadsheets; omit to extract every sheet. Names are matched exactly (case-sensitive) — pass them as a list, e.g. [\"Sheet 1\", \"My Sheet\"].\n - `spreadsheet_mode?: boolean`\n Beta. When true, extract structured data directly from a spreadsheet workbook (.xlsx/.xls/.csv) — the agent reads cells straight from the workbook instead of the standard document path. Off by default (spreadsheets keep the standard path). Requires the agentic_plus tier. Billed on the standard per-page extract rate, against a page count derived from workbook size. Citations and confidence scores are not available in this mode.\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' | 'agentic_plus' | 'cost_effective' | 'turbo'`\n Extract tier: cost_effective (5 credits/page), agentic (15 credits/page), agentic_plus (50 credits/page), or turbo (35 credits/page)\n - `version?: string`\n Extract version name, such as '2.5'. Use 'latest' for the newest compatible release for the selected tier. Dates (YYYY-MM-DD) are also supported, which will use the latest version on or before the specified date.\n\n- `configuration_id?: string`\n Saved configuration ID\n\n- `webhook_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
999
1000
|
perLanguage: {
|
|
1000
1001
|
python: {
|
|
1001
1002
|
method: 'extract.create',
|
|
@@ -1058,9 +1059,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1058
1059
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED';",
|
|
1059
1060
|
],
|
|
1060
1061
|
response:
|
|
1061
|
-
"{ 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1062
|
+
"{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1062
1063
|
markdown:
|
|
1063
|
-
"## 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; usage?: 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
1064
|
+
"## 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; usage?: 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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
1064
1065
|
perLanguage: {
|
|
1065
1066
|
python: {
|
|
1066
1067
|
method: 'extract.list',
|
|
@@ -1108,9 +1109,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1108
1109
|
qualified: 'client.extract.get',
|
|
1109
1110
|
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
1110
1111
|
response:
|
|
1111
|
-
"{ 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1112
|
+
"{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1112
1113
|
markdown:
|
|
1113
|
-
"## 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; usage?: 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,\n`expand=extract_metadata` for per-field metadata, and\n`expand=usage` for credits billed against the job.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Additional fields to include: configuration, extract_metadata, usage\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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
1114
|
+
"## 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; usage?: 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,\n`expand=extract_metadata` for per-field metadata, and\n`expand=usage` for credits billed against the job.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Additional fields to include: configuration, extract_metadata, usage\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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: 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```",
|
|
1114
1115
|
perLanguage: {
|
|
1115
1116
|
python: {
|
|
1116
1117
|
method: 'extract.get',
|
|
@@ -1207,9 +1208,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1207
1208
|
qualified: 'client.extract.cancel',
|
|
1208
1209
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1209
1210
|
response:
|
|
1210
|
-
"{ 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1211
|
+
"{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }",
|
|
1211
1212
|
markdown:
|
|
1212
|
-
"## cancel\n\n`client.extract.cancel(job_id: 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; usage?: object; }`\n\n**post** `/api/v2/extract/{job_id}/cancel`\n\nCancel a running extraction job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.\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; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extractV2Job = await client.extract.cancel('job_id');\n\nconsole.log(extractV2Job);\n```",
|
|
1213
|
+
"## cancel\n\n`client.extract.cancel(job_id: 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; usage?: object; }`\n\n**post** `/api/v2/extract/{job_id}/cancel`\n\nCancel a running extraction job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.\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; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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; }; usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }; }`\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; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; 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_billed?: number; num_pages_extracted?: number; }; }`\n - `usage?: { credits?: number; extract_credits?: number; parse_credits?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst extractV2Job = await client.extract.cancel('job_id');\n\nconsole.log(extractV2Job);\n```",
|
|
1213
1214
|
perLanguage: {
|
|
1214
1215
|
python: {
|
|
1215
1216
|
method: 'extract.cancel',
|
|
@@ -1314,7 +1315,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1314
1315
|
response:
|
|
1315
1316
|
"{ 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'; tier?: 'agentic' | 'cost_effective'; use_experimental_processing?: boolean; } | object; }",
|
|
1316
1317
|
markdown:
|
|
1317
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-
|
|
1318
|
+
"## 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
1318
1319
|
perLanguage: {
|
|
1319
1320
|
python: {
|
|
1320
1321
|
method: 'extract.generate_schema',
|
|
@@ -1588,9 +1589,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1588
1589
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
1589
1590
|
],
|
|
1590
1591
|
response:
|
|
1591
|
-
"{ 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: 'CANCELLED' | '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; }",
|
|
1592
|
+
"{ 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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }",
|
|
1592
1593
|
markdown:
|
|
1593
|
-
"## 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_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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: 'CANCELLED' | '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_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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: 'CANCELLED' | '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: 'CANCELLED' | '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```",
|
|
1594
|
+
"## 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_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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: 'CANCELLED' | '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; usage?: object; }`\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_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: 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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }`\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: 'CANCELLED' | '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 - `usage?: { credits?: number; parse_credits?: number; }`\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```",
|
|
1594
1595
|
perLanguage: {
|
|
1595
1596
|
python: {
|
|
1596
1597
|
method: 'classify.create',
|
|
@@ -1648,9 +1649,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1648
1649
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
1649
1650
|
],
|
|
1650
1651
|
response:
|
|
1651
|
-
"{ 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: 'CANCELLED' | '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; }",
|
|
1652
|
+
"{ 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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }",
|
|
1652
1653
|
markdown:
|
|
1653
|
-
"## 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?: 'CANCELLED' | '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: 'CANCELLED' | '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?: 'CANCELLED' | '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: 'CANCELLED' | '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: 'CANCELLED' | '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```",
|
|
1654
|
+
"## 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?: 'CANCELLED' | '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: 'CANCELLED' | '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; usage?: object; }`\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?: 'CANCELLED' | '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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }`\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: 'CANCELLED' | '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 - `usage?: { credits?: number; parse_credits?: 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 classifyListResponse of client.classify.list()) {\n console.log(classifyListResponse);\n}\n```",
|
|
1654
1655
|
perLanguage: {
|
|
1655
1656
|
python: {
|
|
1656
1657
|
method: 'classify.list',
|
|
@@ -1693,14 +1694,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1693
1694
|
httpMethod: 'get',
|
|
1694
1695
|
summary: 'Get Classify Job',
|
|
1695
1696
|
description:
|
|
1696
|
-
'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.',
|
|
1697
|
+
'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.\nUse `expand=usage` for credits billed against the job.',
|
|
1697
1698
|
stainlessPath: '(resource) classify > (method) get',
|
|
1698
1699
|
qualified: 'client.classify.get',
|
|
1699
|
-
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1700
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
1700
1701
|
response:
|
|
1701
|
-
"{ 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: 'CANCELLED' | '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; }",
|
|
1702
|
+
"{ 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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }",
|
|
1702
1703
|
markdown:
|
|
1703
|
-
"## 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: 'CANCELLED' | '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: 'CANCELLED' | '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: 'CANCELLED' | '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```",
|
|
1704
|
+
"## get\n\n`client.classify.get(job_id: string, expand?: 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: 'CANCELLED' | '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; usage?: object; }`\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.\nUse `expand=usage` for credits billed against the job.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Additional fields to include: usage\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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }`\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: 'CANCELLED' | '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 - `usage?: { credits?: number; parse_credits?: number; }`\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```",
|
|
1704
1705
|
perLanguage: {
|
|
1705
1706
|
python: {
|
|
1706
1707
|
method: 'classify.get',
|
|
@@ -1748,9 +1749,9 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1748
1749
|
qualified: 'client.classify.cancel',
|
|
1749
1750
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1750
1751
|
response:
|
|
1751
|
-
"{ 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: 'CANCELLED' | '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; }",
|
|
1752
|
+
"{ 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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }",
|
|
1752
1753
|
markdown:
|
|
1753
|
-
"## cancel\n\n`client.classify.cancel(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: 'CANCELLED' | '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/{job_id}/cancel`\n\nCancel a running classify job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.\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: 'CANCELLED' | '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: 'CANCELLED' | '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 response = await client.classify.cancel('job_id');\n\nconsole.log(response);\n```",
|
|
1754
|
+
"## cancel\n\n`client.classify.cancel(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: 'CANCELLED' | '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; usage?: object; }`\n\n**post** `/api/v2/classify/{job_id}/cancel`\n\nCancel a running classify job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.\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: 'CANCELLED' | '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; usage?: { credits?: number; parse_credits?: number; }; }`\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: 'CANCELLED' | '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 - `usage?: { credits?: number; parse_credits?: number; }`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.classify.cancel('job_id');\n\nconsole.log(response);\n```",
|
|
1754
1755
|
perLanguage: {
|
|
1755
1756
|
python: {
|
|
1756
1757
|
method: 'classify.cancel',
|
|
@@ -1847,14 +1848,14 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1847
1848
|
qualified: 'client.configurations.create',
|
|
1848
1849
|
params: [
|
|
1849
1850
|
'name: string;',
|
|
1850
|
-
"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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-
|
|
1851
|
+
"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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; };",
|
|
1851
1852
|
'organization_id?: string;',
|
|
1852
1853
|
'project_id?: string;',
|
|
1853
1854
|
],
|
|
1854
1855
|
response:
|
|
1855
1856
|
"{ 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'; tier?: 'agentic' | 'cost_effective'; 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; }",
|
|
1856
1857
|
markdown:
|
|
1857
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
1858
|
+
"## 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
1858
1859
|
perLanguage: {
|
|
1859
1860
|
python: {
|
|
1860
1861
|
method: 'configurations.create',
|
|
@@ -1912,7 +1913,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1912
1913
|
response:
|
|
1913
1914
|
"{ 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'; tier?: 'agentic' | 'cost_effective'; 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; }",
|
|
1914
1915
|
markdown:
|
|
1915
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-
|
|
1916
|
+
"## 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
1916
1917
|
perLanguage: {
|
|
1917
1918
|
python: {
|
|
1918
1919
|
method: 'configurations.list',
|
|
@@ -1961,7 +1962,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
1961
1962
|
response:
|
|
1962
1963
|
"{ 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'; tier?: 'agentic' | 'cost_effective'; 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; }",
|
|
1963
1964
|
markdown:
|
|
1964
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-
|
|
1965
|
+
"## 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
1965
1966
|
perLanguage: {
|
|
1966
1967
|
python: {
|
|
1967
1968
|
method: 'configurations.retrieve',
|
|
@@ -2011,12 +2012,12 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
2011
2012
|
'organization_id?: string;',
|
|
2012
2013
|
'project_id?: string;',
|
|
2013
2014
|
'name?: string;',
|
|
2014
|
-
"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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-
|
|
2015
|
+
"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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; use_experimental_processing?: boolean; } | { product_type: 'unknown'; };",
|
|
2015
2016
|
],
|
|
2016
2017
|
response:
|
|
2017
2018
|
"{ 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'; tier?: 'agentic' | 'cost_effective'; 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; }",
|
|
2018
2019
|
markdown:
|
|
2019
|
-
"## 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-09-29' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
2020
|
+
"## 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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_configuration_ids?: string[]; webhook_configurations?: object[]; } | { categories: split_category[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: object; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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'; advanced_citations?: boolean; cite_sources?: boolean; confidence_scores?: boolean; disable_cache?: boolean; extraction_target?: 'per_doc' | 'per_page' | 'per_table_row'; max_pages?: number; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; sheet_names?: string[]; spreadsheet_mode?: boolean; system_prompt?: string; target_pages?: string; tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'turbo'; version?: string; } | { product_type: 'parse_v2'; tier: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | 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?: { include_hidden_slides?: boolean; 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_line_numbers?: boolean; annotate_links?: boolean; annotate_revisions?: boolean; inline_images?: boolean; tables?: object; }; save_output_pdf?: 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; }; watermark_handling?: 'move_to_end' | 'move_to_start' | 'remove'; }; 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; }[]; confidence_score_effort?: 'high'; cost_optimizer?: { enable?: boolean; }; disable_heuristics?: boolean; forms?: 'default' | 'enrich'; 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_configuration_ids?: string[]; webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[]; } | { categories: { name: string; description?: string; }[]; product_type: 'split_v1'; parse_config_id?: string; parse_tier?: 'agentic' | 'agentic_plus' | 'cost_effective' | 'fast'; splitting_strategy?: { allow_uncategorized?: 'forbid' | 'include' | 'omit'; custom_instructions?: string; min_pages_per_split?: number; }; target_pages?: string; version?: string; } | { 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'; tier?: 'agentic' | 'cost_effective'; 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```",
|
|
2020
2021
|
perLanguage: {
|
|
2021
2022
|
python: {
|
|
2022
2023
|
method: 'configurations.update',
|
|
@@ -5701,38 +5702,43 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5701
5702
|
httpMethod: 'get',
|
|
5702
5703
|
summary: 'Get Index',
|
|
5703
5704
|
description: 'Get an index by ID.',
|
|
5704
|
-
stainlessPath: '(resource)
|
|
5705
|
-
qualified: 'client.
|
|
5706
|
-
params: [
|
|
5705
|
+
stainlessPath: '(resource) indexes > (method) get',
|
|
5706
|
+
qualified: 'client.indexes.get',
|
|
5707
|
+
params: [
|
|
5708
|
+
'index_id: string;',
|
|
5709
|
+
"expand?: 'sync_in_progress'[];",
|
|
5710
|
+
'organization_id?: string;',
|
|
5711
|
+
'project_id?: string;',
|
|
5712
|
+
],
|
|
5707
5713
|
response:
|
|
5708
5714
|
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
5709
5715
|
markdown:
|
|
5710
|
-
"## get\n\n`client.
|
|
5716
|
+
"## get\n\n`client.indexes.get(index_id: string, expand?: 'sync_in_progress'[], organization_id?: string, project_id?: string): { id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; 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- `expand?: 'sync_in_progress'[]`\n Fields to expand. Supported value: sync_in_progress.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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.indexes.get('index_id');\n\nconsole.log(index);\n```",
|
|
5711
5717
|
perLanguage: {
|
|
5712
5718
|
python: {
|
|
5713
|
-
method: '
|
|
5719
|
+
method: 'indexes.get',
|
|
5714
5720
|
example:
|
|
5715
|
-
'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.
|
|
5721
|
+
'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.indexes.get(\n index_id="index_id",\n)\nprint(index.id)',
|
|
5716
5722
|
},
|
|
5717
5723
|
go: {
|
|
5718
|
-
method: 'client.
|
|
5724
|
+
method: 'client.Indexes.Get',
|
|
5719
5725
|
example:
|
|
5720
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.
|
|
5726
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.Indexes.Get(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloud.IndexGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", index.ID)\n}\n',
|
|
5721
5727
|
},
|
|
5722
5728
|
java: {
|
|
5723
|
-
method: '
|
|
5729
|
+
method: 'indexes().get',
|
|
5724
5730
|
example:
|
|
5725
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5731
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.indexes.IndexGetParams;\nimport ai.llamaindex.llamacloud.models.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.indexes().get("index_id");\n }\n}',
|
|
5726
5732
|
},
|
|
5727
5733
|
csharp: {
|
|
5728
|
-
method: '
|
|
5734
|
+
method: 'Indexes.Get',
|
|
5729
5735
|
example:
|
|
5730
|
-
'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.
|
|
5736
|
+
'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
5731
5737
|
},
|
|
5732
5738
|
typescript: {
|
|
5733
|
-
method: 'client.
|
|
5739
|
+
method: 'client.indexes.get',
|
|
5734
5740
|
example:
|
|
5735
|
-
"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.
|
|
5741
|
+
"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.indexes.get('index_id');\n\nconsole.log(index.id);",
|
|
5736
5742
|
},
|
|
5737
5743
|
http: {
|
|
5738
5744
|
example:
|
|
@@ -5740,7 +5746,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5740
5746
|
},
|
|
5741
5747
|
cli: {
|
|
5742
5748
|
method: 'indexes get',
|
|
5743
|
-
example: "llp
|
|
5749
|
+
example: "llp indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5744
5750
|
},
|
|
5745
5751
|
},
|
|
5746
5752
|
},
|
|
@@ -5750,36 +5756,36 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5750
5756
|
httpMethod: 'delete',
|
|
5751
5757
|
summary: 'Delete Index',
|
|
5752
5758
|
description: 'Delete an index.',
|
|
5753
|
-
stainlessPath: '(resource)
|
|
5754
|
-
qualified: 'client.
|
|
5759
|
+
stainlessPath: '(resource) indexes > (method) delete',
|
|
5760
|
+
qualified: 'client.indexes.delete',
|
|
5755
5761
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5756
5762
|
markdown:
|
|
5757
|
-
"## delete\n\n`client.
|
|
5763
|
+
"## delete\n\n`client.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.indexes.delete('index_id')\n```",
|
|
5758
5764
|
perLanguage: {
|
|
5759
5765
|
python: {
|
|
5760
|
-
method: '
|
|
5766
|
+
method: 'indexes.delete',
|
|
5761
5767
|
example:
|
|
5762
|
-
'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.
|
|
5768
|
+
'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.indexes.delete(\n index_id="index_id",\n)',
|
|
5763
5769
|
},
|
|
5764
5770
|
go: {
|
|
5765
|
-
method: 'client.
|
|
5771
|
+
method: 'client.Indexes.Delete',
|
|
5766
5772
|
example:
|
|
5767
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.
|
|
5773
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Indexes.Delete(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloud.IndexDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
5768
5774
|
},
|
|
5769
5775
|
java: {
|
|
5770
|
-
method: '
|
|
5776
|
+
method: 'indexes().delete',
|
|
5771
5777
|
example:
|
|
5772
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5778
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.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.indexes().delete("index_id");\n }\n}',
|
|
5773
5779
|
},
|
|
5774
5780
|
csharp: {
|
|
5775
|
-
method: '
|
|
5781
|
+
method: 'Indexes.Delete',
|
|
5776
5782
|
example:
|
|
5777
|
-
'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.
|
|
5783
|
+
'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Indexes.Delete(parameters);',
|
|
5778
5784
|
},
|
|
5779
5785
|
typescript: {
|
|
5780
|
-
method: 'client.
|
|
5786
|
+
method: 'client.indexes.delete',
|
|
5781
5787
|
example:
|
|
5782
|
-
"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.
|
|
5788
|
+
"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.indexes.delete('index_id');",
|
|
5783
5789
|
},
|
|
5784
5790
|
http: {
|
|
5785
5791
|
example:
|
|
@@ -5787,7 +5793,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5787
5793
|
},
|
|
5788
5794
|
cli: {
|
|
5789
5795
|
method: 'indexes delete',
|
|
5790
|
-
example: "llp
|
|
5796
|
+
example: "llp indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5791
5797
|
},
|
|
5792
5798
|
},
|
|
5793
5799
|
},
|
|
@@ -5797,8 +5803,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5797
5803
|
httpMethod: 'post',
|
|
5798
5804
|
summary: 'Create Index',
|
|
5799
5805
|
description: 'Create a searchable index over a source directory.',
|
|
5800
|
-
stainlessPath: '(resource)
|
|
5801
|
-
qualified: 'client.
|
|
5806
|
+
stainlessPath: '(resource) indexes > (method) create',
|
|
5807
|
+
qualified: 'client.indexes.create',
|
|
5802
5808
|
params: [
|
|
5803
5809
|
'source_directory_id: string;',
|
|
5804
5810
|
'organization_id?: string;',
|
|
@@ -5813,32 +5819,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5813
5819
|
response:
|
|
5814
5820
|
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
5815
5821
|
markdown:
|
|
5816
|
-
"## create\n\n`client.
|
|
5822
|
+
"## create\n\n`client.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; output_directory_id: 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; sync_in_progress?: boolean; 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; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index);\n```",
|
|
5817
5823
|
perLanguage: {
|
|
5818
5824
|
python: {
|
|
5819
|
-
method: '
|
|
5825
|
+
method: 'indexes.create',
|
|
5820
5826
|
example:
|
|
5821
|
-
'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.
|
|
5827
|
+
'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.indexes.create(\n source_directory_id="dir-abc123",\n)\nprint(index.id)',
|
|
5822
5828
|
},
|
|
5823
5829
|
go: {
|
|
5824
|
-
method: 'client.
|
|
5830
|
+
method: 'client.Indexes.New',
|
|
5825
5831
|
example:
|
|
5826
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.
|
|
5832
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.Indexes.New(context.TODO(), llamacloud.IndexNewParams{\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',
|
|
5827
5833
|
},
|
|
5828
5834
|
java: {
|
|
5829
|
-
method: '
|
|
5835
|
+
method: 'indexes().create',
|
|
5830
5836
|
example:
|
|
5831
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5837
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.indexes.IndexCreateParams;\nimport ai.llamaindex.llamacloud.models.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.indexes().create(params);\n }\n}',
|
|
5832
5838
|
},
|
|
5833
5839
|
csharp: {
|
|
5834
|
-
method: '
|
|
5840
|
+
method: 'Indexes.Create',
|
|
5835
5841
|
example:
|
|
5836
|
-
'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.
|
|
5842
|
+
'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
5837
5843
|
},
|
|
5838
5844
|
typescript: {
|
|
5839
|
-
method: 'client.
|
|
5845
|
+
method: 'client.indexes.create',
|
|
5840
5846
|
example:
|
|
5841
|
-
"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.
|
|
5847
|
+
"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.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index.id);",
|
|
5842
5848
|
},
|
|
5843
5849
|
http: {
|
|
5844
5850
|
example:
|
|
@@ -5846,8 +5852,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5846
5852
|
},
|
|
5847
5853
|
cli: {
|
|
5848
5854
|
method: 'indexes create',
|
|
5849
|
-
example:
|
|
5850
|
-
"llp beta:indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
5855
|
+
example: "llp indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
5851
5856
|
},
|
|
5852
5857
|
},
|
|
5853
5858
|
},
|
|
@@ -5858,37 +5863,37 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5858
5863
|
summary: 'Sync Index',
|
|
5859
5864
|
description:
|
|
5860
5865
|
'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
5861
|
-
stainlessPath: '(resource)
|
|
5862
|
-
qualified: 'client.
|
|
5866
|
+
stainlessPath: '(resource) indexes > (method) sync',
|
|
5867
|
+
qualified: 'client.indexes.sync',
|
|
5863
5868
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5864
5869
|
response: 'object',
|
|
5865
5870
|
markdown:
|
|
5866
|
-
"## sync\n\n`client.
|
|
5871
|
+
"## sync\n\n`client.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.indexes.sync('index_id');\n\nconsole.log(response);\n```",
|
|
5867
5872
|
perLanguage: {
|
|
5868
5873
|
python: {
|
|
5869
|
-
method: '
|
|
5874
|
+
method: 'indexes.sync',
|
|
5870
5875
|
example:
|
|
5871
|
-
'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.
|
|
5876
|
+
'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.indexes.sync(\n index_id="index_id",\n)\nprint(response)',
|
|
5872
5877
|
},
|
|
5873
5878
|
go: {
|
|
5874
|
-
method: 'client.
|
|
5879
|
+
method: 'client.Indexes.Sync',
|
|
5875
5880
|
example:
|
|
5876
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
5881
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Indexes.Sync(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloud.IndexSyncParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
|
|
5877
5882
|
},
|
|
5878
5883
|
java: {
|
|
5879
|
-
method: '
|
|
5884
|
+
method: 'indexes().sync',
|
|
5880
5885
|
example:
|
|
5881
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5886
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.indexes.IndexSyncParams;\nimport ai.llamaindex.llamacloud.models.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.indexes().sync("index_id");\n }\n}',
|
|
5882
5887
|
},
|
|
5883
5888
|
csharp: {
|
|
5884
|
-
method: '
|
|
5889
|
+
method: 'Indexes.Sync',
|
|
5885
5890
|
example:
|
|
5886
|
-
'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.
|
|
5891
|
+
'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
5887
5892
|
},
|
|
5888
5893
|
typescript: {
|
|
5889
|
-
method: 'client.
|
|
5894
|
+
method: 'client.indexes.sync',
|
|
5890
5895
|
example:
|
|
5891
|
-
"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.
|
|
5896
|
+
"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.indexes.sync('index_id');\n\nconsole.log(response);",
|
|
5892
5897
|
},
|
|
5893
5898
|
http: {
|
|
5894
5899
|
example:
|
|
@@ -5896,7 +5901,55 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5896
5901
|
},
|
|
5897
5902
|
cli: {
|
|
5898
5903
|
method: 'indexes sync',
|
|
5899
|
-
example: "llp
|
|
5904
|
+
example: "llp indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5905
|
+
},
|
|
5906
|
+
},
|
|
5907
|
+
},
|
|
5908
|
+
{
|
|
5909
|
+
name: 'cancel_sync',
|
|
5910
|
+
endpoint: '/api/v1/indexes/{index_id}/sync/cancel',
|
|
5911
|
+
httpMethod: 'post',
|
|
5912
|
+
summary: 'Cancel Index Sync',
|
|
5913
|
+
description: 'Cancel the running sync for an index. Returns 409 if no sync is running.',
|
|
5914
|
+
stainlessPath: '(resource) indexes > (method) cancel_sync',
|
|
5915
|
+
qualified: 'client.indexes.cancelSync',
|
|
5916
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5917
|
+
response: 'object',
|
|
5918
|
+
markdown:
|
|
5919
|
+
"## cancel_sync\n\n`client.indexes.cancelSync(index_id: string, organization_id?: string, project_id?: string): object`\n\n**post** `/api/v1/indexes/{index_id}/sync/cancel`\n\nCancel the running sync for an index. Returns 409 if no sync is running.\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.indexes.cancelSync('index_id');\n\nconsole.log(response);\n```",
|
|
5920
|
+
perLanguage: {
|
|
5921
|
+
python: {
|
|
5922
|
+
method: 'indexes.cancel_sync',
|
|
5923
|
+
example:
|
|
5924
|
+
'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.indexes.cancel_sync(\n index_id="index_id",\n)\nprint(response)',
|
|
5925
|
+
},
|
|
5926
|
+
go: {
|
|
5927
|
+
method: 'client.Indexes.CancelSync',
|
|
5928
|
+
example:
|
|
5929
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Indexes.CancelSync(\n\t\tcontext.TODO(),\n\t\t"index_id",\n\t\tllamacloud.IndexCancelSyncParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
|
|
5930
|
+
},
|
|
5931
|
+
java: {
|
|
5932
|
+
method: 'indexes().cancelSync',
|
|
5933
|
+
example:
|
|
5934
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.indexes.IndexCancelSyncParams;\nimport ai.llamaindex.llamacloud.models.indexes.IndexCancelSyncResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n IndexCancelSyncResponse response = client.indexes().cancelSync("index_id");\n }\n}',
|
|
5935
|
+
},
|
|
5936
|
+
csharp: {
|
|
5937
|
+
method: 'Indexes.CancelSync',
|
|
5938
|
+
example:
|
|
5939
|
+
'IndexCancelSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.CancelSync(parameters);\n\nConsole.WriteLine(response);',
|
|
5940
|
+
},
|
|
5941
|
+
typescript: {
|
|
5942
|
+
method: 'client.indexes.cancelSync',
|
|
5943
|
+
example:
|
|
5944
|
+
"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.indexes.cancelSync('index_id');\n\nconsole.log(response);",
|
|
5945
|
+
},
|
|
5946
|
+
http: {
|
|
5947
|
+
example:
|
|
5948
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5949
|
+
},
|
|
5950
|
+
cli: {
|
|
5951
|
+
method: 'indexes cancel_sync',
|
|
5952
|
+
example: "llp indexes cancel-sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5900
5953
|
},
|
|
5901
5954
|
},
|
|
5902
5955
|
},
|
|
@@ -5906,8 +5959,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5906
5959
|
httpMethod: 'get',
|
|
5907
5960
|
summary: 'List Indexes',
|
|
5908
5961
|
description: 'List indexes for the current project.',
|
|
5909
|
-
stainlessPath: '(resource)
|
|
5910
|
-
qualified: 'client.
|
|
5962
|
+
stainlessPath: '(resource) indexes > (method) list',
|
|
5963
|
+
qualified: 'client.indexes.list',
|
|
5911
5964
|
params: [
|
|
5912
5965
|
'organization_id?: string;',
|
|
5913
5966
|
'page_size?: number;',
|
|
@@ -5918,32 +5971,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5918
5971
|
response:
|
|
5919
5972
|
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
5920
5973
|
markdown:
|
|
5921
|
-
"## list\n\n`client.
|
|
5974
|
+
"## list\n\n`client.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; output_directory_id: 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; sync_in_progress?: boolean; 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; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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.indexes.list()) {\n console.log(indexListResponse);\n}\n```",
|
|
5922
5975
|
perLanguage: {
|
|
5923
5976
|
python: {
|
|
5924
|
-
method: '
|
|
5977
|
+
method: 'indexes.list',
|
|
5925
5978
|
example:
|
|
5926
|
-
'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.
|
|
5979
|
+
'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.indexes.list()\npage = page.items[0]\nprint(page.id)',
|
|
5927
5980
|
},
|
|
5928
5981
|
go: {
|
|
5929
|
-
method: 'client.
|
|
5982
|
+
method: 'client.Indexes.List',
|
|
5930
5983
|
example:
|
|
5931
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
5984
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Indexes.List(context.TODO(), llamacloud.IndexListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
5932
5985
|
},
|
|
5933
5986
|
java: {
|
|
5934
|
-
method: '
|
|
5987
|
+
method: 'indexes().list',
|
|
5935
5988
|
example:
|
|
5936
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5989
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.indexes.IndexListPage;\nimport ai.llamaindex.llamacloud.models.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.indexes().list();\n }\n}',
|
|
5937
5990
|
},
|
|
5938
5991
|
csharp: {
|
|
5939
|
-
method: '
|
|
5992
|
+
method: 'Indexes.List',
|
|
5940
5993
|
example:
|
|
5941
|
-
'IndexListParams parameters = new();\n\nvar page = await client.
|
|
5994
|
+
'IndexListParams parameters = new();\n\nvar page = await client.Indexes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5942
5995
|
},
|
|
5943
5996
|
typescript: {
|
|
5944
|
-
method: 'client.
|
|
5997
|
+
method: 'client.indexes.list',
|
|
5945
5998
|
example:
|
|
5946
|
-
"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.
|
|
5999
|
+
"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.indexes.list()) {\n console.log(indexListResponse.id);\n}",
|
|
5947
6000
|
},
|
|
5948
6001
|
http: {
|
|
5949
6002
|
example:
|
|
@@ -5951,7 +6004,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5951
6004
|
},
|
|
5952
6005
|
cli: {
|
|
5953
6006
|
method: 'indexes list',
|
|
5954
|
-
example: "llp
|
|
6007
|
+
example: "llp indexes list \\\n --api-key 'My API Key'",
|
|
5955
6008
|
},
|
|
5956
6009
|
},
|
|
5957
6010
|
},
|
|
@@ -5962,8 +6015,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5962
6015
|
summary: 'Retrieve',
|
|
5963
6016
|
description:
|
|
5964
6017
|
'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
5965
|
-
stainlessPath: '(resource)
|
|
5966
|
-
qualified: 'client.
|
|
6018
|
+
stainlessPath: '(resource) retrieval > (method) retrieve',
|
|
6019
|
+
qualified: 'client.retrieval.retrieve',
|
|
5967
6020
|
params: [
|
|
5968
6021
|
'index_id: string;',
|
|
5969
6022
|
'query: string;',
|
|
@@ -5981,32 +6034,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
5981
6034
|
response:
|
|
5982
6035
|
'{ 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; }; }[]; }',
|
|
5983
6036
|
markdown:
|
|
5984
|
-
"## retrieve\n\n`client.
|
|
6037
|
+
"## retrieve\n\n`client.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 Filter on a string field.\n\n- `top_k?: number`\n Maximum number of results to return. Values above 500 are capped at 500.\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.retrieval.retrieve({ index_id: 'idx-abc123', query: 'What are the key findings?' });\n\nconsole.log(retrieval);\n```",
|
|
5985
6038
|
perLanguage: {
|
|
5986
6039
|
python: {
|
|
5987
|
-
method: '
|
|
6040
|
+
method: 'retrieval.retrieve',
|
|
5988
6041
|
example:
|
|
5989
|
-
'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.
|
|
6042
|
+
'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.retrieval.retrieve(\n index_id="idx-abc123",\n query="What are the key findings?",\n)\nprint(retrieval.results)',
|
|
5990
6043
|
},
|
|
5991
6044
|
go: {
|
|
5992
|
-
method: 'client.
|
|
6045
|
+
method: 'client.Retrieval.Get',
|
|
5993
6046
|
example:
|
|
5994
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrieval, err := client.
|
|
6047
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrieval, err := client.Retrieval.Get(context.TODO(), llamacloud.RetrievalGetParams{\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',
|
|
5995
6048
|
},
|
|
5996
6049
|
java: {
|
|
5997
|
-
method: '
|
|
6050
|
+
method: 'retrieval().retrieve',
|
|
5998
6051
|
example:
|
|
5999
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6052
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.retrieval.RetrievalRetrieveParams;\nimport ai.llamaindex.llamacloud.models.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.retrieval().retrieve(params);\n }\n}',
|
|
6000
6053
|
},
|
|
6001
6054
|
csharp: {
|
|
6002
|
-
method: '
|
|
6055
|
+
method: 'Retrieval.Retrieve',
|
|
6003
6056
|
example:
|
|
6004
|
-
'RetrievalRetrieveParams parameters = new()\n{\n IndexID = "idx-abc123",\n Query = "What are the key findings?",\n};\n\nvar retrieval = await client.
|
|
6057
|
+
'RetrievalRetrieveParams parameters = new()\n{\n IndexID = "idx-abc123",\n Query = "What are the key findings?",\n};\n\nvar retrieval = await client.Retrieval.Retrieve(parameters);\n\nConsole.WriteLine(retrieval);',
|
|
6005
6058
|
},
|
|
6006
6059
|
typescript: {
|
|
6007
|
-
method: 'client.
|
|
6060
|
+
method: 'client.retrieval.retrieve',
|
|
6008
6061
|
example:
|
|
6009
|
-
"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.
|
|
6062
|
+
"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.retrieval.retrieve({\n index_id: 'idx-abc123',\n query: 'What are the key findings?',\n});\n\nconsole.log(retrieval.results);",
|
|
6010
6063
|
},
|
|
6011
6064
|
http: {
|
|
6012
6065
|
example:
|
|
@@ -6015,7 +6068,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6015
6068
|
cli: {
|
|
6016
6069
|
method: 'retrieval retrieve',
|
|
6017
6070
|
example:
|
|
6018
|
-
"llp
|
|
6071
|
+
"llp retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
6019
6072
|
},
|
|
6020
6073
|
},
|
|
6021
6074
|
},
|
|
@@ -6025,8 +6078,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6025
6078
|
httpMethod: 'post',
|
|
6026
6079
|
summary: 'Find Files',
|
|
6027
6080
|
description: 'Search for files by name.',
|
|
6028
|
-
stainlessPath: '(resource)
|
|
6029
|
-
qualified: 'client.
|
|
6081
|
+
stainlessPath: '(resource) retrieval > (method) find',
|
|
6082
|
+
qualified: 'client.retrieval.find',
|
|
6030
6083
|
params: [
|
|
6031
6084
|
'index_id: string;',
|
|
6032
6085
|
'organization_id?: string;',
|
|
@@ -6038,32 +6091,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6038
6091
|
],
|
|
6039
6092
|
response: '{ file_id: string; file_name: string; }',
|
|
6040
6093
|
markdown:
|
|
6041
|
-
"## find\n\n`client.
|
|
6094
|
+
"## find\n\n`client.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.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse);\n}\n```",
|
|
6042
6095
|
perLanguage: {
|
|
6043
6096
|
python: {
|
|
6044
|
-
method: '
|
|
6097
|
+
method: 'retrieval.find',
|
|
6045
6098
|
example:
|
|
6046
|
-
'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.
|
|
6099
|
+
'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.retrieval.find(\n index_id="idx-abc123",\n)\npage = page.items[0]\nprint(page.file_id)',
|
|
6047
6100
|
},
|
|
6048
6101
|
go: {
|
|
6049
|
-
method: 'client.
|
|
6102
|
+
method: 'client.Retrieval.Find',
|
|
6050
6103
|
example:
|
|
6051
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
6104
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Retrieval.Find(context.TODO(), llamacloud.RetrievalFindParams{\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',
|
|
6052
6105
|
},
|
|
6053
6106
|
java: {
|
|
6054
|
-
method: '
|
|
6107
|
+
method: 'retrieval().find',
|
|
6055
6108
|
example:
|
|
6056
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6109
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.retrieval.RetrievalFindPage;\nimport ai.llamaindex.llamacloud.models.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.retrieval().find(params);\n }\n}',
|
|
6057
6110
|
},
|
|
6058
6111
|
csharp: {
|
|
6059
|
-
method: '
|
|
6112
|
+
method: 'Retrieval.Find',
|
|
6060
6113
|
example:
|
|
6061
|
-
'RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };\n\nvar page = await client.
|
|
6114
|
+
'RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };\n\nvar page = await client.Retrieval.Find(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6062
6115
|
},
|
|
6063
6116
|
typescript: {
|
|
6064
|
-
method: 'client.
|
|
6117
|
+
method: 'client.retrieval.find',
|
|
6065
6118
|
example:
|
|
6066
|
-
"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.
|
|
6119
|
+
"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.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse.file_id);\n}",
|
|
6067
6120
|
},
|
|
6068
6121
|
http: {
|
|
6069
6122
|
example:
|
|
@@ -6071,7 +6124,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6071
6124
|
},
|
|
6072
6125
|
cli: {
|
|
6073
6126
|
method: 'retrieval find',
|
|
6074
|
-
example: "llp
|
|
6127
|
+
example: "llp retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
6075
6128
|
},
|
|
6076
6129
|
},
|
|
6077
6130
|
},
|
|
@@ -6081,8 +6134,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6081
6134
|
httpMethod: 'post',
|
|
6082
6135
|
summary: 'Grep File',
|
|
6083
6136
|
description: "Grep within a file's parsed content using a regex pattern.",
|
|
6084
|
-
stainlessPath: '(resource)
|
|
6085
|
-
qualified: 'client.
|
|
6137
|
+
stainlessPath: '(resource) retrieval > (method) grep',
|
|
6138
|
+
qualified: 'client.retrieval.grep',
|
|
6086
6139
|
params: [
|
|
6087
6140
|
'file_id: string;',
|
|
6088
6141
|
'index_id: string;',
|
|
@@ -6095,32 +6148,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6095
6148
|
],
|
|
6096
6149
|
response: '{ content: string; end_char: number; start_char: number; }',
|
|
6097
6150
|
markdown:
|
|
6098
|
-
"## grep\n\n`client.
|
|
6151
|
+
"## grep\n\n`client.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.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse);\n}\n```",
|
|
6099
6152
|
perLanguage: {
|
|
6100
6153
|
python: {
|
|
6101
|
-
method: '
|
|
6154
|
+
method: 'retrieval.grep',
|
|
6102
6155
|
example:
|
|
6103
|
-
'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.
|
|
6156
|
+
'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.retrieval.grep(\n file_id="file_id",\n index_id="idx-abc123",\n pattern="revenue|profit",\n)\npage = page.items[0]\nprint(page.content)',
|
|
6104
6157
|
},
|
|
6105
6158
|
go: {
|
|
6106
|
-
method: 'client.
|
|
6159
|
+
method: 'client.Retrieval.Grep',
|
|
6107
6160
|
example:
|
|
6108
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
6161
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Retrieval.Grep(context.TODO(), llamacloud.RetrievalGrepParams{\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',
|
|
6109
6162
|
},
|
|
6110
6163
|
java: {
|
|
6111
|
-
method: '
|
|
6164
|
+
method: 'retrieval().grep',
|
|
6112
6165
|
example:
|
|
6113
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6166
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.retrieval.RetrievalGrepPage;\nimport ai.llamaindex.llamacloud.models.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.retrieval().grep(params);\n }\n}',
|
|
6114
6167
|
},
|
|
6115
6168
|
csharp: {
|
|
6116
|
-
method: '
|
|
6169
|
+
method: 'Retrieval.Grep',
|
|
6117
6170
|
example:
|
|
6118
|
-
'RetrievalGrepParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n Pattern = "revenue|profit",\n};\n\nvar page = await client.
|
|
6171
|
+
'RetrievalGrepParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n Pattern = "revenue|profit",\n};\n\nvar page = await client.Retrieval.Grep(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6119
6172
|
},
|
|
6120
6173
|
typescript: {
|
|
6121
|
-
method: 'client.
|
|
6174
|
+
method: 'client.retrieval.grep',
|
|
6122
6175
|
example:
|
|
6123
|
-
"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.
|
|
6176
|
+
"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.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse.content);\n}",
|
|
6124
6177
|
},
|
|
6125
6178
|
http: {
|
|
6126
6179
|
example:
|
|
@@ -6129,7 +6182,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6129
6182
|
cli: {
|
|
6130
6183
|
method: 'retrieval grep',
|
|
6131
6184
|
example:
|
|
6132
|
-
"llp
|
|
6185
|
+
"llp retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'",
|
|
6133
6186
|
},
|
|
6134
6187
|
},
|
|
6135
6188
|
},
|
|
@@ -6139,8 +6192,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6139
6192
|
httpMethod: 'post',
|
|
6140
6193
|
summary: 'Read File',
|
|
6141
6194
|
description: 'Read the parsed text content of a specific file.',
|
|
6142
|
-
stainlessPath: '(resource)
|
|
6143
|
-
qualified: 'client.
|
|
6195
|
+
stainlessPath: '(resource) retrieval > (method) read',
|
|
6196
|
+
qualified: 'client.retrieval.read',
|
|
6144
6197
|
params: [
|
|
6145
6198
|
'file_id: string;',
|
|
6146
6199
|
'index_id: string;',
|
|
@@ -6151,32 +6204,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6151
6204
|
],
|
|
6152
6205
|
response: '{ content: string; }',
|
|
6153
6206
|
markdown:
|
|
6154
|
-
"## read\n\n`client.
|
|
6207
|
+
"## read\n\n`client.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.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response);\n```",
|
|
6155
6208
|
perLanguage: {
|
|
6156
6209
|
python: {
|
|
6157
|
-
method: '
|
|
6210
|
+
method: 'retrieval.read',
|
|
6158
6211
|
example:
|
|
6159
|
-
'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.
|
|
6212
|
+
'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.retrieval.read(\n file_id="file_id",\n index_id="idx-abc123",\n)\nprint(response.content)',
|
|
6160
6213
|
},
|
|
6161
6214
|
go: {
|
|
6162
|
-
method: 'client.
|
|
6215
|
+
method: 'client.Retrieval.Read',
|
|
6163
6216
|
example:
|
|
6164
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
6217
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Retrieval.Read(context.TODO(), llamacloud.RetrievalReadParams{\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',
|
|
6165
6218
|
},
|
|
6166
6219
|
java: {
|
|
6167
|
-
method: '
|
|
6220
|
+
method: 'retrieval().read',
|
|
6168
6221
|
example:
|
|
6169
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6222
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.retrieval.RetrievalReadParams;\nimport ai.llamaindex.llamacloud.models.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.retrieval().read(params);\n }\n}',
|
|
6170
6223
|
},
|
|
6171
6224
|
csharp: {
|
|
6172
|
-
method: '
|
|
6225
|
+
method: 'Retrieval.Read',
|
|
6173
6226
|
example:
|
|
6174
|
-
'RetrievalReadParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n};\n\nvar response = await client.
|
|
6227
|
+
'RetrievalReadParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n};\n\nvar response = await client.Retrieval.Read(parameters);\n\nConsole.WriteLine(response);',
|
|
6175
6228
|
},
|
|
6176
6229
|
typescript: {
|
|
6177
|
-
method: 'client.
|
|
6230
|
+
method: 'client.retrieval.read',
|
|
6178
6231
|
example:
|
|
6179
|
-
"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.
|
|
6232
|
+
"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.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response.content);",
|
|
6180
6233
|
},
|
|
6181
6234
|
http: {
|
|
6182
6235
|
example:
|
|
@@ -6185,7 +6238,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6185
6238
|
cli: {
|
|
6186
6239
|
method: 'retrieval read',
|
|
6187
6240
|
example:
|
|
6188
|
-
"llp
|
|
6241
|
+
"llp retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
6189
6242
|
},
|
|
6190
6243
|
},
|
|
6191
6244
|
},
|
|
@@ -6195,8 +6248,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6195
6248
|
httpMethod: 'get',
|
|
6196
6249
|
summary: 'List Sessions',
|
|
6197
6250
|
description: 'List all chat sessions for the current project.',
|
|
6198
|
-
stainlessPath: '(resource)
|
|
6199
|
-
qualified: 'client.
|
|
6251
|
+
stainlessPath: '(resource) chat > (method) list',
|
|
6252
|
+
qualified: 'client.chat.list',
|
|
6200
6253
|
params: [
|
|
6201
6254
|
'organization_id?: string;',
|
|
6202
6255
|
'page_size?: number;',
|
|
@@ -6206,32 +6259,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6206
6259
|
response:
|
|
6207
6260
|
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
6208
6261
|
markdown:
|
|
6209
|
-
"## list\n\n`client.
|
|
6262
|
+
"## list\n\n`client.chat.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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.chat.list()) {\n console.log(chatListResponse);\n}\n```",
|
|
6210
6263
|
perLanguage: {
|
|
6211
6264
|
python: {
|
|
6212
|
-
method: '
|
|
6265
|
+
method: 'chat.list',
|
|
6213
6266
|
example:
|
|
6214
|
-
'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.
|
|
6267
|
+
'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.chat.list()\npage = page.items[0]\nprint(page.session_id)',
|
|
6215
6268
|
},
|
|
6216
6269
|
go: {
|
|
6217
|
-
method: 'client.
|
|
6270
|
+
method: 'client.Chat.List',
|
|
6218
6271
|
example:
|
|
6219
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
6272
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Chat.List(context.TODO(), llamacloud.ChatListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
6220
6273
|
},
|
|
6221
6274
|
java: {
|
|
6222
|
-
method: '
|
|
6275
|
+
method: 'chat().list',
|
|
6223
6276
|
example:
|
|
6224
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6277
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.chat.ChatListPage;\nimport ai.llamaindex.llamacloud.models.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.chat().list();\n }\n}',
|
|
6225
6278
|
},
|
|
6226
6279
|
csharp: {
|
|
6227
|
-
method: '
|
|
6280
|
+
method: 'Chat.List',
|
|
6228
6281
|
example:
|
|
6229
|
-
'ChatListParams parameters = new();\n\nvar page = await client.
|
|
6282
|
+
'ChatListParams parameters = new();\n\nvar page = await client.Chat.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6230
6283
|
},
|
|
6231
6284
|
typescript: {
|
|
6232
|
-
method: 'client.
|
|
6285
|
+
method: 'client.chat.list',
|
|
6233
6286
|
example:
|
|
6234
|
-
"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.
|
|
6287
|
+
"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.chat.list()) {\n console.log(chatListResponse.session_id);\n}",
|
|
6235
6288
|
},
|
|
6236
6289
|
http: {
|
|
6237
6290
|
example:
|
|
@@ -6239,7 +6292,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6239
6292
|
},
|
|
6240
6293
|
cli: {
|
|
6241
6294
|
method: 'chat list',
|
|
6242
|
-
example: "llp
|
|
6295
|
+
example: "llp chat list \\\n --api-key 'My API Key'",
|
|
6243
6296
|
},
|
|
6244
6297
|
},
|
|
6245
6298
|
},
|
|
@@ -6249,8 +6302,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6249
6302
|
httpMethod: 'post',
|
|
6250
6303
|
summary: 'Create Session',
|
|
6251
6304
|
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
6252
|
-
stainlessPath: '(resource)
|
|
6253
|
-
qualified: 'client.
|
|
6305
|
+
stainlessPath: '(resource) chat > (method) create',
|
|
6306
|
+
qualified: 'client.chat.create',
|
|
6254
6307
|
params: [
|
|
6255
6308
|
'organization_id?: string;',
|
|
6256
6309
|
'project_id?: string;',
|
|
@@ -6260,32 +6313,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6260
6313
|
response:
|
|
6261
6314
|
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
6262
6315
|
markdown:
|
|
6263
|
-
"## create\n\n`client.
|
|
6316
|
+
"## create\n\n`client.chat.create(organization_id?: string, project_id?: string, index_ids?: string[], shared_access?: 'query' | 'read_only'): { last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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- `shared_access?: 'query' | 'read_only'`\n What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions). Null follows the deployment default.\n\n### Returns\n\n- `{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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.chat.create();\n\nconsole.log(chat);\n```",
|
|
6264
6317
|
perLanguage: {
|
|
6265
6318
|
python: {
|
|
6266
|
-
method: '
|
|
6319
|
+
method: 'chat.create',
|
|
6267
6320
|
example:
|
|
6268
|
-
'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.
|
|
6321
|
+
'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.chat.create()\nprint(chat.session_id)',
|
|
6269
6322
|
},
|
|
6270
6323
|
go: {
|
|
6271
|
-
method: 'client.
|
|
6324
|
+
method: 'client.Chat.New',
|
|
6272
6325
|
example:
|
|
6273
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.
|
|
6326
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.Chat.New(context.TODO(), llamacloud.ChatNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n',
|
|
6274
6327
|
},
|
|
6275
6328
|
java: {
|
|
6276
|
-
method: '
|
|
6329
|
+
method: 'chat().create',
|
|
6277
6330
|
example:
|
|
6278
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6331
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.chat.ChatCreateParams;\nimport ai.llamaindex.llamacloud.models.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.chat().create();\n }\n}',
|
|
6279
6332
|
},
|
|
6280
6333
|
csharp: {
|
|
6281
|
-
method: '
|
|
6334
|
+
method: 'Chat.Create',
|
|
6282
6335
|
example:
|
|
6283
|
-
'ChatCreateParams parameters = new();\n\nvar chat = await client.
|
|
6336
|
+
'ChatCreateParams parameters = new();\n\nvar chat = await client.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
6284
6337
|
},
|
|
6285
6338
|
typescript: {
|
|
6286
|
-
method: 'client.
|
|
6339
|
+
method: 'client.chat.create',
|
|
6287
6340
|
example:
|
|
6288
|
-
"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.
|
|
6341
|
+
"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.chat.create();\n\nconsole.log(chat.session_id);",
|
|
6289
6342
|
},
|
|
6290
6343
|
http: {
|
|
6291
6344
|
example:
|
|
@@ -6293,7 +6346,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6293
6346
|
},
|
|
6294
6347
|
cli: {
|
|
6295
6348
|
method: 'chat create',
|
|
6296
|
-
example: "llp
|
|
6349
|
+
example: "llp chat create \\\n --api-key 'My API Key'",
|
|
6297
6350
|
},
|
|
6298
6351
|
},
|
|
6299
6352
|
},
|
|
@@ -6303,38 +6356,38 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6303
6356
|
httpMethod: 'get',
|
|
6304
6357
|
summary: 'Get Full Session',
|
|
6305
6358
|
description: 'Retrieve a full session by ID, including its event history.',
|
|
6306
|
-
stainlessPath: '(resource)
|
|
6307
|
-
qualified: 'client.
|
|
6359
|
+
stainlessPath: '(resource) chat > (method) retrieve',
|
|
6360
|
+
qualified: 'client.chat.retrieve',
|
|
6308
6361
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6309
6362
|
response:
|
|
6310
6363
|
"{ events: { error: string; is_error: boolean; usage: { duration_ms?: number; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; skipped_index_ids?: string[]; 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; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
6311
6364
|
markdown:
|
|
6312
|
-
"## retrieve\n\n`client.
|
|
6365
|
+
"## retrieve\n\n`client.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; shared_access: 'query' | 'read_only'; 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; }; skipped_index_ids?: string[]; 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; shared_access: 'query' | 'read_only'; 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; }; skipped_index_ids?: string[]; 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 - `shared_access: 'query' | 'read_only'`\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.chat.retrieve('session_id');\n\nconsole.log(chat);\n```",
|
|
6313
6366
|
perLanguage: {
|
|
6314
6367
|
python: {
|
|
6315
|
-
method: '
|
|
6368
|
+
method: 'chat.retrieve',
|
|
6316
6369
|
example:
|
|
6317
|
-
'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.
|
|
6370
|
+
'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.chat.retrieve(\n session_id="session_id",\n)\nprint(chat.session_id)',
|
|
6318
6371
|
},
|
|
6319
6372
|
go: {
|
|
6320
|
-
method: 'client.
|
|
6373
|
+
method: 'client.Chat.Get',
|
|
6321
6374
|
example:
|
|
6322
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.
|
|
6375
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.Chat.Get(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloud.ChatGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n',
|
|
6323
6376
|
},
|
|
6324
6377
|
java: {
|
|
6325
|
-
method: '
|
|
6378
|
+
method: 'chat().retrieve',
|
|
6326
6379
|
example:
|
|
6327
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6380
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.chat.ChatRetrieveParams;\nimport ai.llamaindex.llamacloud.models.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.chat().retrieve("session_id");\n }\n}',
|
|
6328
6381
|
},
|
|
6329
6382
|
csharp: {
|
|
6330
|
-
method: '
|
|
6383
|
+
method: 'Chat.Retrieve',
|
|
6331
6384
|
example:
|
|
6332
|
-
'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.
|
|
6385
|
+
'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
6333
6386
|
},
|
|
6334
6387
|
typescript: {
|
|
6335
|
-
method: 'client.
|
|
6388
|
+
method: 'client.chat.retrieve',
|
|
6336
6389
|
example:
|
|
6337
|
-
"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.
|
|
6390
|
+
"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.chat.retrieve('session_id');\n\nconsole.log(chat.session_id);",
|
|
6338
6391
|
},
|
|
6339
6392
|
http: {
|
|
6340
6393
|
example:
|
|
@@ -6342,7 +6395,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6342
6395
|
},
|
|
6343
6396
|
cli: {
|
|
6344
6397
|
method: 'chat retrieve',
|
|
6345
|
-
example: "llp
|
|
6398
|
+
example: "llp chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6346
6399
|
},
|
|
6347
6400
|
},
|
|
6348
6401
|
},
|
|
@@ -6352,36 +6405,36 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6352
6405
|
httpMethod: 'delete',
|
|
6353
6406
|
summary: 'Delete Session',
|
|
6354
6407
|
description: 'Delete a session.',
|
|
6355
|
-
stainlessPath: '(resource)
|
|
6356
|
-
qualified: 'client.
|
|
6408
|
+
stainlessPath: '(resource) chat > (method) delete',
|
|
6409
|
+
qualified: 'client.chat.delete',
|
|
6357
6410
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6358
6411
|
markdown:
|
|
6359
|
-
"## delete\n\n`client.
|
|
6412
|
+
"## delete\n\n`client.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.chat.delete('session_id')\n```",
|
|
6360
6413
|
perLanguage: {
|
|
6361
6414
|
python: {
|
|
6362
|
-
method: '
|
|
6415
|
+
method: 'chat.delete',
|
|
6363
6416
|
example:
|
|
6364
|
-
'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.
|
|
6417
|
+
'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.chat.delete(\n session_id="session_id",\n)',
|
|
6365
6418
|
},
|
|
6366
6419
|
go: {
|
|
6367
|
-
method: 'client.
|
|
6420
|
+
method: 'client.Chat.Delete',
|
|
6368
6421
|
example:
|
|
6369
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.
|
|
6422
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.Chat.Delete(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloud.ChatDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
6370
6423
|
},
|
|
6371
6424
|
java: {
|
|
6372
|
-
method: '
|
|
6425
|
+
method: 'chat().delete',
|
|
6373
6426
|
example:
|
|
6374
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6427
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.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.chat().delete("session_id");\n }\n}',
|
|
6375
6428
|
},
|
|
6376
6429
|
csharp: {
|
|
6377
|
-
method: '
|
|
6430
|
+
method: 'Chat.Delete',
|
|
6378
6431
|
example:
|
|
6379
|
-
'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.
|
|
6432
|
+
'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Chat.Delete(parameters);',
|
|
6380
6433
|
},
|
|
6381
6434
|
typescript: {
|
|
6382
|
-
method: 'client.
|
|
6435
|
+
method: 'client.chat.delete',
|
|
6383
6436
|
example:
|
|
6384
|
-
"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.
|
|
6437
|
+
"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.chat.delete('session_id');",
|
|
6385
6438
|
},
|
|
6386
6439
|
http: {
|
|
6387
6440
|
example:
|
|
@@ -6389,7 +6442,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6389
6442
|
},
|
|
6390
6443
|
cli: {
|
|
6391
6444
|
method: 'chat delete',
|
|
6392
|
-
example: "llp
|
|
6445
|
+
example: "llp chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6393
6446
|
},
|
|
6394
6447
|
},
|
|
6395
6448
|
},
|
|
@@ -6399,38 +6452,38 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6399
6452
|
httpMethod: 'get',
|
|
6400
6453
|
summary: 'Get Session Summary',
|
|
6401
6454
|
description: 'Retrieve a session summary by ID.',
|
|
6402
|
-
stainlessPath: '(resource)
|
|
6403
|
-
qualified: 'client.
|
|
6455
|
+
stainlessPath: '(resource) chat > (method) get_summary',
|
|
6456
|
+
qualified: 'client.chat.getSummary',
|
|
6404
6457
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6405
6458
|
response:
|
|
6406
6459
|
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
6407
6460
|
markdown:
|
|
6408
|
-
"## get_summary\n\n`client.
|
|
6461
|
+
"## get_summary\n\n`client.chat.getSummary(session_id: string, organization_id?: string, project_id?: string): { last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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.chat.getSummary('session_id');\n\nconsole.log(response);\n```",
|
|
6409
6462
|
perLanguage: {
|
|
6410
6463
|
python: {
|
|
6411
|
-
method: '
|
|
6464
|
+
method: 'chat.get_summary',
|
|
6412
6465
|
example:
|
|
6413
|
-
'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.
|
|
6466
|
+
'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.chat.get_summary(\n session_id="session_id",\n)\nprint(response.session_id)',
|
|
6414
6467
|
},
|
|
6415
6468
|
go: {
|
|
6416
|
-
method: 'client.
|
|
6469
|
+
method: 'client.Chat.GetSummary',
|
|
6417
6470
|
example:
|
|
6418
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
6471
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Chat.GetSummary(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloud.ChatGetSummaryParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.SessionID)\n}\n',
|
|
6419
6472
|
},
|
|
6420
6473
|
java: {
|
|
6421
|
-
method: '
|
|
6474
|
+
method: 'chat().getSummary',
|
|
6422
6475
|
example:
|
|
6423
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6476
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.chat.ChatGetSummaryParams;\nimport ai.llamaindex.llamacloud.models.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.chat().getSummary("session_id");\n }\n}',
|
|
6424
6477
|
},
|
|
6425
6478
|
csharp: {
|
|
6426
|
-
method: '
|
|
6479
|
+
method: 'Chat.GetSummary',
|
|
6427
6480
|
example:
|
|
6428
|
-
'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.
|
|
6481
|
+
'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
6429
6482
|
},
|
|
6430
6483
|
typescript: {
|
|
6431
|
-
method: 'client.
|
|
6484
|
+
method: 'client.chat.getSummary',
|
|
6432
6485
|
example:
|
|
6433
|
-
"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.
|
|
6486
|
+
"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.chat.getSummary('session_id');\n\nconsole.log(response.session_id);",
|
|
6434
6487
|
},
|
|
6435
6488
|
http: {
|
|
6436
6489
|
example:
|
|
@@ -6438,7 +6491,7 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6438
6491
|
},
|
|
6439
6492
|
cli: {
|
|
6440
6493
|
method: 'chat get_summary',
|
|
6441
|
-
example: "llp
|
|
6494
|
+
example: "llp chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6442
6495
|
},
|
|
6443
6496
|
},
|
|
6444
6497
|
},
|
|
@@ -6448,8 +6501,8 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6448
6501
|
httpMethod: 'post',
|
|
6449
6502
|
summary: 'Stream Messages',
|
|
6450
6503
|
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
6451
|
-
stainlessPath: '(resource)
|
|
6452
|
-
qualified: 'client.
|
|
6504
|
+
stainlessPath: '(resource) chat > (method) stream',
|
|
6505
|
+
qualified: 'client.chat.stream',
|
|
6453
6506
|
params: [
|
|
6454
6507
|
'session_id: string;',
|
|
6455
6508
|
'index_ids: string[];',
|
|
@@ -6460,32 +6513,32 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6460
6513
|
],
|
|
6461
6514
|
response: 'object',
|
|
6462
6515
|
markdown:
|
|
6463
|
-
"## stream\n\n`client.
|
|
6516
|
+
"## stream\n\n`client.chat.stream(session_id: string, index_ids: string[], prompt: string, organization_id?: string, project_id?: string, require_all_indexes?: boolean): 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- `require_all_indexes?: boolean`\n Fail the turn if any requested index cannot be queried.\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.chat.stream('session_id', { index_ids: ['idx-abc123', 'idx-def456'], prompt: 'What were the main findings in Q3?' });\n\nconsole.log(response);\n```",
|
|
6464
6517
|
perLanguage: {
|
|
6465
6518
|
python: {
|
|
6466
|
-
method: '
|
|
6519
|
+
method: 'chat.stream',
|
|
6467
6520
|
example:
|
|
6468
|
-
'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.
|
|
6521
|
+
'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.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)',
|
|
6469
6522
|
},
|
|
6470
6523
|
go: {
|
|
6471
|
-
method: 'client.
|
|
6524
|
+
method: 'client.Chat.Stream',
|
|
6472
6525
|
example:
|
|
6473
|
-
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
6526
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Chat.Stream(\n\t\tcontext.TODO(),\n\t\t"session_id",\n\t\tllamacloud.ChatStreamParams{\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',
|
|
6474
6527
|
},
|
|
6475
6528
|
java: {
|
|
6476
|
-
method: '
|
|
6529
|
+
method: 'chat().stream',
|
|
6477
6530
|
example:
|
|
6478
|
-
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
6531
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.chat.ChatStreamParams;\nimport ai.llamaindex.llamacloud.models.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.chat().stream(params);\n }\n}',
|
|
6479
6532
|
},
|
|
6480
6533
|
csharp: {
|
|
6481
|
-
method: '
|
|
6534
|
+
method: 'Chat.Stream',
|
|
6482
6535
|
example:
|
|
6483
|
-
'ChatStreamParams parameters = new()\n{\n SessionID = "session_id",\n IndexIds =\n [\n "idx-abc123", "idx-def456"\n ],\n Prompt = "What were the main findings in Q3?",\n};\n\nvar response = await client.
|
|
6536
|
+
'ChatStreamParams parameters = new()\n{\n SessionID = "session_id",\n IndexIds =\n [\n "idx-abc123", "idx-def456"\n ],\n Prompt = "What were the main findings in Q3?",\n};\n\nvar response = await client.Chat.Stream(parameters);\n\nConsole.WriteLine(response);',
|
|
6484
6537
|
},
|
|
6485
6538
|
typescript: {
|
|
6486
|
-
method: 'client.
|
|
6539
|
+
method: 'client.chat.stream',
|
|
6487
6540
|
example:
|
|
6488
|
-
"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.
|
|
6541
|
+
"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.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);",
|
|
6489
6542
|
},
|
|
6490
6543
|
http: {
|
|
6491
6544
|
example:
|
|
@@ -6494,19 +6547,827 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
6494
6547
|
cli: {
|
|
6495
6548
|
method: 'chat stream',
|
|
6496
6549
|
example:
|
|
6497
|
-
"llp
|
|
6550
|
+
"llp 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?'",
|
|
6498
6551
|
},
|
|
6499
6552
|
},
|
|
6500
6553
|
},
|
|
6501
6554
|
{
|
|
6502
|
-
name: '
|
|
6503
|
-
endpoint: '/api/v1/
|
|
6555
|
+
name: 'get',
|
|
6556
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
6504
6557
|
httpMethod: 'get',
|
|
6505
|
-
summary: '
|
|
6506
|
-
description: '
|
|
6507
|
-
stainlessPath: '(resource) beta.
|
|
6508
|
-
qualified: 'client.beta.
|
|
6509
|
-
params: [
|
|
6558
|
+
summary: 'Get Index',
|
|
6559
|
+
description: 'Get an index by ID.',
|
|
6560
|
+
stainlessPath: '(resource) beta.indexes > (method) get',
|
|
6561
|
+
qualified: 'client.beta.indexes.get',
|
|
6562
|
+
params: [
|
|
6563
|
+
'index_id: string;',
|
|
6564
|
+
"expand?: 'sync_in_progress'[];",
|
|
6565
|
+
'organization_id?: string;',
|
|
6566
|
+
'project_id?: string;',
|
|
6567
|
+
],
|
|
6568
|
+
response:
|
|
6569
|
+
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
6570
|
+
markdown:
|
|
6571
|
+
"## get\n\n`client.beta.indexes.get(index_id: string, expand?: 'sync_in_progress'[], organization_id?: string, project_id?: string): { id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; 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- `expand?: 'sync_in_progress'[]`\n Fields to expand. Supported value: sync_in_progress.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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```",
|
|
6572
|
+
perLanguage: {
|
|
6573
|
+
python: {
|
|
6574
|
+
method: 'beta.indexes.get',
|
|
6575
|
+
example:
|
|
6576
|
+
'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)',
|
|
6577
|
+
},
|
|
6578
|
+
go: {
|
|
6579
|
+
method: 'client.Beta.Indexes.Get',
|
|
6580
|
+
example:
|
|
6581
|
+
'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 := llamacloud.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\tllamacloud.BetaIndexGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", index.ID)\n}\n',
|
|
6582
|
+
},
|
|
6583
|
+
java: {
|
|
6584
|
+
method: 'beta().indexes().get',
|
|
6585
|
+
example:
|
|
6586
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexGetParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
6587
|
+
},
|
|
6588
|
+
csharp: {
|
|
6589
|
+
method: 'Beta.Indexes.Get',
|
|
6590
|
+
example:
|
|
6591
|
+
'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Beta.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
6592
|
+
},
|
|
6593
|
+
typescript: {
|
|
6594
|
+
method: 'client.beta.indexes.get',
|
|
6595
|
+
example:
|
|
6596
|
+
"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);",
|
|
6597
|
+
},
|
|
6598
|
+
http: {
|
|
6599
|
+
example:
|
|
6600
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6601
|
+
},
|
|
6602
|
+
cli: {
|
|
6603
|
+
method: 'indexes get',
|
|
6604
|
+
example: "llp beta:indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
6605
|
+
},
|
|
6606
|
+
},
|
|
6607
|
+
},
|
|
6608
|
+
{
|
|
6609
|
+
name: 'delete',
|
|
6610
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
6611
|
+
httpMethod: 'delete',
|
|
6612
|
+
summary: 'Delete Index',
|
|
6613
|
+
description: 'Delete an index.',
|
|
6614
|
+
stainlessPath: '(resource) beta.indexes > (method) delete',
|
|
6615
|
+
qualified: 'client.beta.indexes.delete',
|
|
6616
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6617
|
+
markdown:
|
|
6618
|
+
"## 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```",
|
|
6619
|
+
perLanguage: {
|
|
6620
|
+
python: {
|
|
6621
|
+
method: 'beta.indexes.delete',
|
|
6622
|
+
example:
|
|
6623
|
+
'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)',
|
|
6624
|
+
},
|
|
6625
|
+
go: {
|
|
6626
|
+
method: 'client.Beta.Indexes.Delete',
|
|
6627
|
+
example:
|
|
6628
|
+
'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 := llamacloud.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\tllamacloud.BetaIndexDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
6629
|
+
},
|
|
6630
|
+
java: {
|
|
6631
|
+
method: 'beta().indexes().delete',
|
|
6632
|
+
example:
|
|
6633
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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}',
|
|
6634
|
+
},
|
|
6635
|
+
csharp: {
|
|
6636
|
+
method: 'Beta.Indexes.Delete',
|
|
6637
|
+
example:
|
|
6638
|
+
'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Beta.Indexes.Delete(parameters);',
|
|
6639
|
+
},
|
|
6640
|
+
typescript: {
|
|
6641
|
+
method: 'client.beta.indexes.delete',
|
|
6642
|
+
example:
|
|
6643
|
+
"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');",
|
|
6644
|
+
},
|
|
6645
|
+
http: {
|
|
6646
|
+
example:
|
|
6647
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6648
|
+
},
|
|
6649
|
+
cli: {
|
|
6650
|
+
method: 'indexes delete',
|
|
6651
|
+
example: "llp beta:indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
6652
|
+
},
|
|
6653
|
+
},
|
|
6654
|
+
},
|
|
6655
|
+
{
|
|
6656
|
+
name: 'create',
|
|
6657
|
+
endpoint: '/api/v1/indexes',
|
|
6658
|
+
httpMethod: 'post',
|
|
6659
|
+
summary: 'Create Index',
|
|
6660
|
+
description: 'Create a searchable index over a source directory.',
|
|
6661
|
+
stainlessPath: '(resource) beta.indexes > (method) create',
|
|
6662
|
+
qualified: 'client.beta.indexes.create',
|
|
6663
|
+
params: [
|
|
6664
|
+
'source_directory_id: string;',
|
|
6665
|
+
'organization_id?: string;',
|
|
6666
|
+
'project_id?: string;',
|
|
6667
|
+
'description?: string;',
|
|
6668
|
+
'name?: string;',
|
|
6669
|
+
'products?: { product_config_id: string; product_type: string; }[];',
|
|
6670
|
+
'store_attachments?: string[];',
|
|
6671
|
+
'sync_frequency?: string;',
|
|
6672
|
+
"vector_target?: 'DEFAULT' | 'DISABLED';",
|
|
6673
|
+
],
|
|
6674
|
+
response:
|
|
6675
|
+
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
6676
|
+
markdown:
|
|
6677
|
+
"## 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; output_directory_id: 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; sync_in_progress?: boolean; 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; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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```",
|
|
6678
|
+
perLanguage: {
|
|
6679
|
+
python: {
|
|
6680
|
+
method: 'beta.indexes.create',
|
|
6681
|
+
example:
|
|
6682
|
+
'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)',
|
|
6683
|
+
},
|
|
6684
|
+
go: {
|
|
6685
|
+
method: 'client.Beta.Indexes.New',
|
|
6686
|
+
example:
|
|
6687
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.Beta.Indexes.New(context.TODO(), llamacloud.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',
|
|
6688
|
+
},
|
|
6689
|
+
java: {
|
|
6690
|
+
method: 'beta().indexes().create',
|
|
6691
|
+
example:
|
|
6692
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexCreateParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
6693
|
+
},
|
|
6694
|
+
csharp: {
|
|
6695
|
+
method: 'Beta.Indexes.Create',
|
|
6696
|
+
example:
|
|
6697
|
+
'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Beta.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
6698
|
+
},
|
|
6699
|
+
typescript: {
|
|
6700
|
+
method: 'client.beta.indexes.create',
|
|
6701
|
+
example:
|
|
6702
|
+
"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);",
|
|
6703
|
+
},
|
|
6704
|
+
http: {
|
|
6705
|
+
example:
|
|
6706
|
+
'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 }\'',
|
|
6707
|
+
},
|
|
6708
|
+
cli: {
|
|
6709
|
+
method: 'indexes create',
|
|
6710
|
+
example:
|
|
6711
|
+
"llp beta:indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
6712
|
+
},
|
|
6713
|
+
},
|
|
6714
|
+
},
|
|
6715
|
+
{
|
|
6716
|
+
name: 'sync',
|
|
6717
|
+
endpoint: '/api/v1/indexes/{index_id}/sync',
|
|
6718
|
+
httpMethod: 'post',
|
|
6719
|
+
summary: 'Sync Index',
|
|
6720
|
+
description:
|
|
6721
|
+
'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
6722
|
+
stainlessPath: '(resource) beta.indexes > (method) sync',
|
|
6723
|
+
qualified: 'client.beta.indexes.sync',
|
|
6724
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6725
|
+
response: 'object',
|
|
6726
|
+
markdown:
|
|
6727
|
+
"## 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```",
|
|
6728
|
+
perLanguage: {
|
|
6729
|
+
python: {
|
|
6730
|
+
method: 'beta.indexes.sync',
|
|
6731
|
+
example:
|
|
6732
|
+
'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)',
|
|
6733
|
+
},
|
|
6734
|
+
go: {
|
|
6735
|
+
method: 'client.Beta.Indexes.Sync',
|
|
6736
|
+
example:
|
|
6737
|
+
'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 := llamacloud.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\tllamacloud.BetaIndexSyncParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response)\n}\n',
|
|
6738
|
+
},
|
|
6739
|
+
java: {
|
|
6740
|
+
method: 'beta().indexes().sync',
|
|
6741
|
+
example:
|
|
6742
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexSyncParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
6743
|
+
},
|
|
6744
|
+
csharp: {
|
|
6745
|
+
method: 'Beta.Indexes.Sync',
|
|
6746
|
+
example:
|
|
6747
|
+
'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Beta.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
6748
|
+
},
|
|
6749
|
+
typescript: {
|
|
6750
|
+
method: 'client.beta.indexes.sync',
|
|
6751
|
+
example:
|
|
6752
|
+
"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);",
|
|
6753
|
+
},
|
|
6754
|
+
http: {
|
|
6755
|
+
example:
|
|
6756
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6757
|
+
},
|
|
6758
|
+
cli: {
|
|
6759
|
+
method: 'indexes sync',
|
|
6760
|
+
example: "llp beta:indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
6761
|
+
},
|
|
6762
|
+
},
|
|
6763
|
+
},
|
|
6764
|
+
{
|
|
6765
|
+
name: 'list',
|
|
6766
|
+
endpoint: '/api/v1/indexes',
|
|
6767
|
+
httpMethod: 'get',
|
|
6768
|
+
summary: 'List Indexes',
|
|
6769
|
+
description: 'List indexes for the current project.',
|
|
6770
|
+
stainlessPath: '(resource) beta.indexes > (method) list',
|
|
6771
|
+
qualified: 'client.beta.indexes.list',
|
|
6772
|
+
params: [
|
|
6773
|
+
'organization_id?: string;',
|
|
6774
|
+
'page_size?: number;',
|
|
6775
|
+
'page_token?: string;',
|
|
6776
|
+
'project_id?: string;',
|
|
6777
|
+
'source_directory_id?: string;',
|
|
6778
|
+
],
|
|
6779
|
+
response:
|
|
6780
|
+
'{ id: string; export_config_id: string; name: string; output_directory_id: 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; sync_in_progress?: boolean; updated_at?: string; }',
|
|
6781
|
+
markdown:
|
|
6782
|
+
"## 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; output_directory_id: 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; sync_in_progress?: boolean; 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; output_directory_id: 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; sync_in_progress?: boolean; 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 - `output_directory_id: 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 - `sync_in_progress?: boolean`\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```",
|
|
6783
|
+
perLanguage: {
|
|
6784
|
+
python: {
|
|
6785
|
+
method: 'beta.indexes.list',
|
|
6786
|
+
example:
|
|
6787
|
+
'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)',
|
|
6788
|
+
},
|
|
6789
|
+
go: {
|
|
6790
|
+
method: 'client.Beta.Indexes.List',
|
|
6791
|
+
example:
|
|
6792
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Indexes.List(context.TODO(), llamacloud.BetaIndexListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
6793
|
+
},
|
|
6794
|
+
java: {
|
|
6795
|
+
method: 'beta().indexes().list',
|
|
6796
|
+
example:
|
|
6797
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexListPage;\nimport ai.llamaindex.llamacloud.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}',
|
|
6798
|
+
},
|
|
6799
|
+
csharp: {
|
|
6800
|
+
method: 'Beta.Indexes.List',
|
|
6801
|
+
example:
|
|
6802
|
+
'IndexListParams parameters = new();\n\nvar page = await client.Beta.Indexes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6803
|
+
},
|
|
6804
|
+
typescript: {
|
|
6805
|
+
method: 'client.beta.indexes.list',
|
|
6806
|
+
example:
|
|
6807
|
+
"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}",
|
|
6808
|
+
},
|
|
6809
|
+
http: {
|
|
6810
|
+
example:
|
|
6811
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6812
|
+
},
|
|
6813
|
+
cli: {
|
|
6814
|
+
method: 'indexes list',
|
|
6815
|
+
example: "llp beta:indexes list \\\n --api-key 'My API Key'",
|
|
6816
|
+
},
|
|
6817
|
+
},
|
|
6818
|
+
},
|
|
6819
|
+
{
|
|
6820
|
+
name: 'retrieve',
|
|
6821
|
+
endpoint: '/api/v1/retrieval/retrieve',
|
|
6822
|
+
httpMethod: 'post',
|
|
6823
|
+
summary: 'Retrieve',
|
|
6824
|
+
description:
|
|
6825
|
+
'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
6826
|
+
stainlessPath: '(resource) beta.retrieval > (method) retrieve',
|
|
6827
|
+
qualified: 'client.beta.retrieval.retrieve',
|
|
6828
|
+
params: [
|
|
6829
|
+
'index_id: string;',
|
|
6830
|
+
'query: string;',
|
|
6831
|
+
'organization_id?: string;',
|
|
6832
|
+
'project_id?: string;',
|
|
6833
|
+
'custom_filters?: object;',
|
|
6834
|
+
'full_text_pipeline_weight?: number;',
|
|
6835
|
+
'num_candidates?: number;',
|
|
6836
|
+
'rerank?: { enabled?: boolean; top_n?: number; };',
|
|
6837
|
+
'score_threshold?: number;',
|
|
6838
|
+
"static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; };",
|
|
6839
|
+
'top_k?: number;',
|
|
6840
|
+
'vector_pipeline_weight?: number;',
|
|
6841
|
+
],
|
|
6842
|
+
response:
|
|
6843
|
+
'{ 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; }; }[]; }',
|
|
6844
|
+
markdown:
|
|
6845
|
+
"## 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 Filter on a string field.\n\n- `top_k?: number`\n Maximum number of results to return. Values above 500 are capped at 500.\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```",
|
|
6846
|
+
perLanguage: {
|
|
6847
|
+
python: {
|
|
6848
|
+
method: 'beta.retrieval.retrieve',
|
|
6849
|
+
example:
|
|
6850
|
+
'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)',
|
|
6851
|
+
},
|
|
6852
|
+
go: {
|
|
6853
|
+
method: 'client.Beta.Retrieval.Get',
|
|
6854
|
+
example:
|
|
6855
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrieval, err := client.Beta.Retrieval.Get(context.TODO(), llamacloud.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',
|
|
6856
|
+
},
|
|
6857
|
+
java: {
|
|
6858
|
+
method: 'beta().retrieval().retrieve',
|
|
6859
|
+
example:
|
|
6860
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.retrieval.RetrievalRetrieveParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
6861
|
+
},
|
|
6862
|
+
csharp: {
|
|
6863
|
+
method: 'Beta.Retrieval.Retrieve',
|
|
6864
|
+
example:
|
|
6865
|
+
'RetrievalRetrieveParams parameters = new()\n{\n IndexID = "idx-abc123",\n Query = "What are the key findings?",\n};\n\nvar retrieval = await client.Beta.Retrieval.Retrieve(parameters);\n\nConsole.WriteLine(retrieval);',
|
|
6866
|
+
},
|
|
6867
|
+
typescript: {
|
|
6868
|
+
method: 'client.beta.retrieval.retrieve',
|
|
6869
|
+
example:
|
|
6870
|
+
"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);",
|
|
6871
|
+
},
|
|
6872
|
+
http: {
|
|
6873
|
+
example:
|
|
6874
|
+
'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 }\'',
|
|
6875
|
+
},
|
|
6876
|
+
cli: {
|
|
6877
|
+
method: 'retrieval retrieve',
|
|
6878
|
+
example:
|
|
6879
|
+
"llp beta:retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
6880
|
+
},
|
|
6881
|
+
},
|
|
6882
|
+
},
|
|
6883
|
+
{
|
|
6884
|
+
name: 'find',
|
|
6885
|
+
endpoint: '/api/v1/retrieval/files/find',
|
|
6886
|
+
httpMethod: 'post',
|
|
6887
|
+
summary: 'Find Files',
|
|
6888
|
+
description: 'Search for files by name.',
|
|
6889
|
+
stainlessPath: '(resource) beta.retrieval > (method) find',
|
|
6890
|
+
qualified: 'client.beta.retrieval.find',
|
|
6891
|
+
params: [
|
|
6892
|
+
'index_id: string;',
|
|
6893
|
+
'organization_id?: string;',
|
|
6894
|
+
'project_id?: string;',
|
|
6895
|
+
'file_name?: string;',
|
|
6896
|
+
'file_name_contains?: string;',
|
|
6897
|
+
'page_size?: number;',
|
|
6898
|
+
'page_token?: string;',
|
|
6899
|
+
],
|
|
6900
|
+
response: '{ file_id: string; file_name: string; }',
|
|
6901
|
+
markdown:
|
|
6902
|
+
"## 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```",
|
|
6903
|
+
perLanguage: {
|
|
6904
|
+
python: {
|
|
6905
|
+
method: 'beta.retrieval.find',
|
|
6906
|
+
example:
|
|
6907
|
+
'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)',
|
|
6908
|
+
},
|
|
6909
|
+
go: {
|
|
6910
|
+
method: 'client.Beta.Retrieval.Find',
|
|
6911
|
+
example:
|
|
6912
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Retrieval.Find(context.TODO(), llamacloud.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',
|
|
6913
|
+
},
|
|
6914
|
+
java: {
|
|
6915
|
+
method: 'beta().retrieval().find',
|
|
6916
|
+
example:
|
|
6917
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.retrieval.RetrievalFindPage;\nimport ai.llamaindex.llamacloud.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}',
|
|
6918
|
+
},
|
|
6919
|
+
csharp: {
|
|
6920
|
+
method: 'Beta.Retrieval.Find',
|
|
6921
|
+
example:
|
|
6922
|
+
'RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };\n\nvar page = await client.Beta.Retrieval.Find(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6923
|
+
},
|
|
6924
|
+
typescript: {
|
|
6925
|
+
method: 'client.beta.retrieval.find',
|
|
6926
|
+
example:
|
|
6927
|
+
"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}",
|
|
6928
|
+
},
|
|
6929
|
+
http: {
|
|
6930
|
+
example:
|
|
6931
|
+
'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 }\'',
|
|
6932
|
+
},
|
|
6933
|
+
cli: {
|
|
6934
|
+
method: 'retrieval find',
|
|
6935
|
+
example: "llp beta:retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
6936
|
+
},
|
|
6937
|
+
},
|
|
6938
|
+
},
|
|
6939
|
+
{
|
|
6940
|
+
name: 'grep',
|
|
6941
|
+
endpoint: '/api/v1/retrieval/files/grep',
|
|
6942
|
+
httpMethod: 'post',
|
|
6943
|
+
summary: 'Grep File',
|
|
6944
|
+
description: "Grep within a file's parsed content using a regex pattern.",
|
|
6945
|
+
stainlessPath: '(resource) beta.retrieval > (method) grep',
|
|
6946
|
+
qualified: 'client.beta.retrieval.grep',
|
|
6947
|
+
params: [
|
|
6948
|
+
'file_id: string;',
|
|
6949
|
+
'index_id: string;',
|
|
6950
|
+
'pattern: string;',
|
|
6951
|
+
'organization_id?: string;',
|
|
6952
|
+
'project_id?: string;',
|
|
6953
|
+
'context_chars?: number;',
|
|
6954
|
+
'page_size?: number;',
|
|
6955
|
+
'page_token?: string;',
|
|
6956
|
+
],
|
|
6957
|
+
response: '{ content: string; end_char: number; start_char: number; }',
|
|
6958
|
+
markdown:
|
|
6959
|
+
"## 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```",
|
|
6960
|
+
perLanguage: {
|
|
6961
|
+
python: {
|
|
6962
|
+
method: 'beta.retrieval.grep',
|
|
6963
|
+
example:
|
|
6964
|
+
'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)',
|
|
6965
|
+
},
|
|
6966
|
+
go: {
|
|
6967
|
+
method: 'client.Beta.Retrieval.Grep',
|
|
6968
|
+
example:
|
|
6969
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Retrieval.Grep(context.TODO(), llamacloud.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',
|
|
6970
|
+
},
|
|
6971
|
+
java: {
|
|
6972
|
+
method: 'beta().retrieval().grep',
|
|
6973
|
+
example:
|
|
6974
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.retrieval.RetrievalGrepPage;\nimport ai.llamaindex.llamacloud.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}',
|
|
6975
|
+
},
|
|
6976
|
+
csharp: {
|
|
6977
|
+
method: 'Beta.Retrieval.Grep',
|
|
6978
|
+
example:
|
|
6979
|
+
'RetrievalGrepParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n Pattern = "revenue|profit",\n};\n\nvar page = await client.Beta.Retrieval.Grep(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
6980
|
+
},
|
|
6981
|
+
typescript: {
|
|
6982
|
+
method: 'client.beta.retrieval.grep',
|
|
6983
|
+
example:
|
|
6984
|
+
"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}",
|
|
6985
|
+
},
|
|
6986
|
+
http: {
|
|
6987
|
+
example:
|
|
6988
|
+
'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 }\'',
|
|
6989
|
+
},
|
|
6990
|
+
cli: {
|
|
6991
|
+
method: 'retrieval grep',
|
|
6992
|
+
example:
|
|
6993
|
+
"llp beta:retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'",
|
|
6994
|
+
},
|
|
6995
|
+
},
|
|
6996
|
+
},
|
|
6997
|
+
{
|
|
6998
|
+
name: 'read',
|
|
6999
|
+
endpoint: '/api/v1/retrieval/files/read',
|
|
7000
|
+
httpMethod: 'post',
|
|
7001
|
+
summary: 'Read File',
|
|
7002
|
+
description: 'Read the parsed text content of a specific file.',
|
|
7003
|
+
stainlessPath: '(resource) beta.retrieval > (method) read',
|
|
7004
|
+
qualified: 'client.beta.retrieval.read',
|
|
7005
|
+
params: [
|
|
7006
|
+
'file_id: string;',
|
|
7007
|
+
'index_id: string;',
|
|
7008
|
+
'organization_id?: string;',
|
|
7009
|
+
'project_id?: string;',
|
|
7010
|
+
'max_length?: number;',
|
|
7011
|
+
'offset?: number;',
|
|
7012
|
+
],
|
|
7013
|
+
response: '{ content: string; }',
|
|
7014
|
+
markdown:
|
|
7015
|
+
"## 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```",
|
|
7016
|
+
perLanguage: {
|
|
7017
|
+
python: {
|
|
7018
|
+
method: 'beta.retrieval.read',
|
|
7019
|
+
example:
|
|
7020
|
+
'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)',
|
|
7021
|
+
},
|
|
7022
|
+
go: {
|
|
7023
|
+
method: 'client.Beta.Retrieval.Read',
|
|
7024
|
+
example:
|
|
7025
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Beta.Retrieval.Read(context.TODO(), llamacloud.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',
|
|
7026
|
+
},
|
|
7027
|
+
java: {
|
|
7028
|
+
method: 'beta().retrieval().read',
|
|
7029
|
+
example:
|
|
7030
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.retrieval.RetrievalReadParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
7031
|
+
},
|
|
7032
|
+
csharp: {
|
|
7033
|
+
method: 'Beta.Retrieval.Read',
|
|
7034
|
+
example:
|
|
7035
|
+
'RetrievalReadParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n};\n\nvar response = await client.Beta.Retrieval.Read(parameters);\n\nConsole.WriteLine(response);',
|
|
7036
|
+
},
|
|
7037
|
+
typescript: {
|
|
7038
|
+
method: 'client.beta.retrieval.read',
|
|
7039
|
+
example:
|
|
7040
|
+
"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);",
|
|
7041
|
+
},
|
|
7042
|
+
http: {
|
|
7043
|
+
example:
|
|
7044
|
+
'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 }\'',
|
|
7045
|
+
},
|
|
7046
|
+
cli: {
|
|
7047
|
+
method: 'retrieval read',
|
|
7048
|
+
example:
|
|
7049
|
+
"llp beta:retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
7050
|
+
},
|
|
7051
|
+
},
|
|
7052
|
+
},
|
|
7053
|
+
{
|
|
7054
|
+
name: 'list',
|
|
7055
|
+
endpoint: '/api/v1/chat',
|
|
7056
|
+
httpMethod: 'get',
|
|
7057
|
+
summary: 'List Sessions',
|
|
7058
|
+
description: 'List all chat sessions for the current project.',
|
|
7059
|
+
stainlessPath: '(resource) beta.chat > (method) list',
|
|
7060
|
+
qualified: 'client.beta.chat.list',
|
|
7061
|
+
params: [
|
|
7062
|
+
'organization_id?: string;',
|
|
7063
|
+
'page_size?: number;',
|
|
7064
|
+
'page_token?: string;',
|
|
7065
|
+
'project_id?: string;',
|
|
7066
|
+
],
|
|
7067
|
+
response:
|
|
7068
|
+
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
7069
|
+
markdown:
|
|
7070
|
+
"## 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; shared_access: 'query' | 'read_only'; 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; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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```",
|
|
7071
|
+
perLanguage: {
|
|
7072
|
+
python: {
|
|
7073
|
+
method: 'beta.chat.list',
|
|
7074
|
+
example:
|
|
7075
|
+
'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)',
|
|
7076
|
+
},
|
|
7077
|
+
go: {
|
|
7078
|
+
method: 'client.Beta.Chat.List',
|
|
7079
|
+
example:
|
|
7080
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Beta.Chat.List(context.TODO(), llamacloud.BetaChatListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
7081
|
+
},
|
|
7082
|
+
java: {
|
|
7083
|
+
method: 'beta().chat().list',
|
|
7084
|
+
example:
|
|
7085
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.chat.ChatListPage;\nimport ai.llamaindex.llamacloud.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}',
|
|
7086
|
+
},
|
|
7087
|
+
csharp: {
|
|
7088
|
+
method: 'Beta.Chat.List',
|
|
7089
|
+
example:
|
|
7090
|
+
'ChatListParams parameters = new();\n\nvar page = await client.Beta.Chat.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
7091
|
+
},
|
|
7092
|
+
typescript: {
|
|
7093
|
+
method: 'client.beta.chat.list',
|
|
7094
|
+
example:
|
|
7095
|
+
"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}",
|
|
7096
|
+
},
|
|
7097
|
+
http: {
|
|
7098
|
+
example:
|
|
7099
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7100
|
+
},
|
|
7101
|
+
cli: {
|
|
7102
|
+
method: 'chat list',
|
|
7103
|
+
example: "llp beta:chat list \\\n --api-key 'My API Key'",
|
|
7104
|
+
},
|
|
7105
|
+
},
|
|
7106
|
+
},
|
|
7107
|
+
{
|
|
7108
|
+
name: 'create',
|
|
7109
|
+
endpoint: '/api/v1/chat',
|
|
7110
|
+
httpMethod: 'post',
|
|
7111
|
+
summary: 'Create Session',
|
|
7112
|
+
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
7113
|
+
stainlessPath: '(resource) beta.chat > (method) create',
|
|
7114
|
+
qualified: 'client.beta.chat.create',
|
|
7115
|
+
params: [
|
|
7116
|
+
'organization_id?: string;',
|
|
7117
|
+
'project_id?: string;',
|
|
7118
|
+
'index_ids?: string[];',
|
|
7119
|
+
"shared_access?: 'query' | 'read_only';",
|
|
7120
|
+
],
|
|
7121
|
+
response:
|
|
7122
|
+
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
7123
|
+
markdown:
|
|
7124
|
+
"## create\n\n`client.beta.chat.create(organization_id?: string, project_id?: string, index_ids?: string[], shared_access?: 'query' | 'read_only'): { last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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- `shared_access?: 'query' | 'read_only'`\n What this chat's share link grants: read_only (transcript only) or query (viewers may ask new questions). Null follows the deployment default.\n\n### Returns\n\n- `{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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```",
|
|
7125
|
+
perLanguage: {
|
|
7126
|
+
python: {
|
|
7127
|
+
method: 'beta.chat.create',
|
|
7128
|
+
example:
|
|
7129
|
+
'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)',
|
|
7130
|
+
},
|
|
7131
|
+
go: {
|
|
7132
|
+
method: 'client.Beta.Chat.New',
|
|
7133
|
+
example:
|
|
7134
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.Beta.Chat.New(context.TODO(), llamacloud.BetaChatNewParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n',
|
|
7135
|
+
},
|
|
7136
|
+
java: {
|
|
7137
|
+
method: 'beta().chat().create',
|
|
7138
|
+
example:
|
|
7139
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.chat.ChatCreateParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
7140
|
+
},
|
|
7141
|
+
csharp: {
|
|
7142
|
+
method: 'Beta.Chat.Create',
|
|
7143
|
+
example:
|
|
7144
|
+
'ChatCreateParams parameters = new();\n\nvar chat = await client.Beta.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
7145
|
+
},
|
|
7146
|
+
typescript: {
|
|
7147
|
+
method: 'client.beta.chat.create',
|
|
7148
|
+
example:
|
|
7149
|
+
"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);",
|
|
7150
|
+
},
|
|
7151
|
+
http: {
|
|
7152
|
+
example:
|
|
7153
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7154
|
+
},
|
|
7155
|
+
cli: {
|
|
7156
|
+
method: 'chat create',
|
|
7157
|
+
example: "llp beta:chat create \\\n --api-key 'My API Key'",
|
|
7158
|
+
},
|
|
7159
|
+
},
|
|
7160
|
+
},
|
|
7161
|
+
{
|
|
7162
|
+
name: 'retrieve',
|
|
7163
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
7164
|
+
httpMethod: 'get',
|
|
7165
|
+
summary: 'Get Full Session',
|
|
7166
|
+
description: 'Retrieve a full session by ID, including its event history.',
|
|
7167
|
+
stainlessPath: '(resource) beta.chat > (method) retrieve',
|
|
7168
|
+
qualified: 'client.beta.chat.retrieve',
|
|
7169
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7170
|
+
response:
|
|
7171
|
+
"{ events: { error: string; is_error: boolean; usage: { duration_ms?: number; total_input_tokens?: number; total_output_tokens?: number; turns?: number; }; skipped_index_ids?: string[]; 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; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
7172
|
+
markdown:
|
|
7173
|
+
"## 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; shared_access: 'query' | 'read_only'; 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; }; skipped_index_ids?: string[]; 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; shared_access: 'query' | 'read_only'; 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; }; skipped_index_ids?: string[]; 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 - `shared_access: 'query' | 'read_only'`\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```",
|
|
7174
|
+
perLanguage: {
|
|
7175
|
+
python: {
|
|
7176
|
+
method: 'beta.chat.retrieve',
|
|
7177
|
+
example:
|
|
7178
|
+
'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)',
|
|
7179
|
+
},
|
|
7180
|
+
go: {
|
|
7181
|
+
method: 'client.Beta.Chat.Get',
|
|
7182
|
+
example:
|
|
7183
|
+
'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 := llamacloud.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\tllamacloud.BetaChatGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", chat.SessionID)\n}\n',
|
|
7184
|
+
},
|
|
7185
|
+
java: {
|
|
7186
|
+
method: 'beta().chat().retrieve',
|
|
7187
|
+
example:
|
|
7188
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.chat.ChatRetrieveParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
7189
|
+
},
|
|
7190
|
+
csharp: {
|
|
7191
|
+
method: 'Beta.Chat.Retrieve',
|
|
7192
|
+
example:
|
|
7193
|
+
'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Beta.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
7194
|
+
},
|
|
7195
|
+
typescript: {
|
|
7196
|
+
method: 'client.beta.chat.retrieve',
|
|
7197
|
+
example:
|
|
7198
|
+
"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);",
|
|
7199
|
+
},
|
|
7200
|
+
http: {
|
|
7201
|
+
example:
|
|
7202
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7203
|
+
},
|
|
7204
|
+
cli: {
|
|
7205
|
+
method: 'chat retrieve',
|
|
7206
|
+
example: "llp beta:chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
7207
|
+
},
|
|
7208
|
+
},
|
|
7209
|
+
},
|
|
7210
|
+
{
|
|
7211
|
+
name: 'delete',
|
|
7212
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
7213
|
+
httpMethod: 'delete',
|
|
7214
|
+
summary: 'Delete Session',
|
|
7215
|
+
description: 'Delete a session.',
|
|
7216
|
+
stainlessPath: '(resource) beta.chat > (method) delete',
|
|
7217
|
+
qualified: 'client.beta.chat.delete',
|
|
7218
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7219
|
+
markdown:
|
|
7220
|
+
"## 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```",
|
|
7221
|
+
perLanguage: {
|
|
7222
|
+
python: {
|
|
7223
|
+
method: 'beta.chat.delete',
|
|
7224
|
+
example:
|
|
7225
|
+
'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)',
|
|
7226
|
+
},
|
|
7227
|
+
go: {
|
|
7228
|
+
method: 'client.Beta.Chat.Delete',
|
|
7229
|
+
example:
|
|
7230
|
+
'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 := llamacloud.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\tllamacloud.BetaChatDeleteParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n}\n',
|
|
7231
|
+
},
|
|
7232
|
+
java: {
|
|
7233
|
+
method: 'beta().chat().delete',
|
|
7234
|
+
example:
|
|
7235
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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}',
|
|
7236
|
+
},
|
|
7237
|
+
csharp: {
|
|
7238
|
+
method: 'Beta.Chat.Delete',
|
|
7239
|
+
example:
|
|
7240
|
+
'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Beta.Chat.Delete(parameters);',
|
|
7241
|
+
},
|
|
7242
|
+
typescript: {
|
|
7243
|
+
method: 'client.beta.chat.delete',
|
|
7244
|
+
example:
|
|
7245
|
+
"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');",
|
|
7246
|
+
},
|
|
7247
|
+
http: {
|
|
7248
|
+
example:
|
|
7249
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7250
|
+
},
|
|
7251
|
+
cli: {
|
|
7252
|
+
method: 'chat delete',
|
|
7253
|
+
example: "llp beta:chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
7254
|
+
},
|
|
7255
|
+
},
|
|
7256
|
+
},
|
|
7257
|
+
{
|
|
7258
|
+
name: 'get_summary',
|
|
7259
|
+
endpoint: '/api/v1/chat/{session_id}/summary',
|
|
7260
|
+
httpMethod: 'get',
|
|
7261
|
+
summary: 'Get Session Summary',
|
|
7262
|
+
description: 'Retrieve a session summary by ID.',
|
|
7263
|
+
stainlessPath: '(resource) beta.chat > (method) get_summary',
|
|
7264
|
+
qualified: 'client.beta.chat.getSummary',
|
|
7265
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7266
|
+
response:
|
|
7267
|
+
"{ last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; }; }",
|
|
7268
|
+
markdown:
|
|
7269
|
+
"## get_summary\n\n`client.beta.chat.getSummary(session_id: string, organization_id?: string, project_id?: string): { last_updated_at: string; session_id: string; shared_access: 'query' | 'read_only'; 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; shared_access: 'query' | 'read_only'; 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 - `shared_access: 'query' | 'read_only'`\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```",
|
|
7270
|
+
perLanguage: {
|
|
7271
|
+
python: {
|
|
7272
|
+
method: 'beta.chat.get_summary',
|
|
7273
|
+
example:
|
|
7274
|
+
'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)',
|
|
7275
|
+
},
|
|
7276
|
+
go: {
|
|
7277
|
+
method: 'client.Beta.Chat.GetSummary',
|
|
7278
|
+
example:
|
|
7279
|
+
'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 := llamacloud.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\tllamacloud.BetaChatGetSummaryParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.SessionID)\n}\n',
|
|
7280
|
+
},
|
|
7281
|
+
java: {
|
|
7282
|
+
method: 'beta().chat().getSummary',
|
|
7283
|
+
example:
|
|
7284
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.chat.ChatGetSummaryParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
7285
|
+
},
|
|
7286
|
+
csharp: {
|
|
7287
|
+
method: 'Beta.Chat.GetSummary',
|
|
7288
|
+
example:
|
|
7289
|
+
'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Beta.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
7290
|
+
},
|
|
7291
|
+
typescript: {
|
|
7292
|
+
method: 'client.beta.chat.getSummary',
|
|
7293
|
+
example:
|
|
7294
|
+
"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);",
|
|
7295
|
+
},
|
|
7296
|
+
http: {
|
|
7297
|
+
example:
|
|
7298
|
+
'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7299
|
+
},
|
|
7300
|
+
cli: {
|
|
7301
|
+
method: 'chat get_summary',
|
|
7302
|
+
example: "llp beta:chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
7303
|
+
},
|
|
7304
|
+
},
|
|
7305
|
+
},
|
|
7306
|
+
{
|
|
7307
|
+
name: 'stream',
|
|
7308
|
+
endpoint: '/api/v1/chat/{session_id}/messages/stream',
|
|
7309
|
+
httpMethod: 'post',
|
|
7310
|
+
summary: 'Stream Messages',
|
|
7311
|
+
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
7312
|
+
stainlessPath: '(resource) beta.chat > (method) stream',
|
|
7313
|
+
qualified: 'client.beta.chat.stream',
|
|
7314
|
+
params: [
|
|
7315
|
+
'session_id: string;',
|
|
7316
|
+
'index_ids: string[];',
|
|
7317
|
+
'prompt: string;',
|
|
7318
|
+
'organization_id?: string;',
|
|
7319
|
+
'project_id?: string;',
|
|
7320
|
+
'require_all_indexes?: boolean;',
|
|
7321
|
+
],
|
|
7322
|
+
response: 'object',
|
|
7323
|
+
markdown:
|
|
7324
|
+
"## stream\n\n`client.beta.chat.stream(session_id: string, index_ids: string[], prompt: string, organization_id?: string, project_id?: string, require_all_indexes?: boolean): 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- `require_all_indexes?: boolean`\n Fail the turn if any requested index cannot be queried.\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```",
|
|
7325
|
+
perLanguage: {
|
|
7326
|
+
python: {
|
|
7327
|
+
method: 'beta.chat.stream',
|
|
7328
|
+
example:
|
|
7329
|
+
'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)',
|
|
7330
|
+
},
|
|
7331
|
+
go: {
|
|
7332
|
+
method: 'client.Beta.Chat.Stream',
|
|
7333
|
+
example:
|
|
7334
|
+
'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 := llamacloud.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\tllamacloud.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',
|
|
7335
|
+
},
|
|
7336
|
+
java: {
|
|
7337
|
+
method: 'beta().chat().stream',
|
|
7338
|
+
example:
|
|
7339
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.beta.chat.ChatStreamParams;\nimport ai.llamaindex.llamacloud.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}',
|
|
7340
|
+
},
|
|
7341
|
+
csharp: {
|
|
7342
|
+
method: 'Beta.Chat.Stream',
|
|
7343
|
+
example:
|
|
7344
|
+
'ChatStreamParams parameters = new()\n{\n SessionID = "session_id",\n IndexIds =\n [\n "idx-abc123", "idx-def456"\n ],\n Prompt = "What were the main findings in Q3?",\n};\n\nvar response = await client.Beta.Chat.Stream(parameters);\n\nConsole.WriteLine(response);',
|
|
7345
|
+
},
|
|
7346
|
+
typescript: {
|
|
7347
|
+
method: 'client.beta.chat.stream',
|
|
7348
|
+
example:
|
|
7349
|
+
"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);",
|
|
7350
|
+
},
|
|
7351
|
+
http: {
|
|
7352
|
+
example:
|
|
7353
|
+
'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 "require_all_indexes": true\n }\'',
|
|
7354
|
+
},
|
|
7355
|
+
cli: {
|
|
7356
|
+
method: 'chat stream',
|
|
7357
|
+
example:
|
|
7358
|
+
"llp 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?'",
|
|
7359
|
+
},
|
|
7360
|
+
},
|
|
7361
|
+
},
|
|
7362
|
+
{
|
|
7363
|
+
name: 'list',
|
|
7364
|
+
endpoint: '/api/v1/beta/attachments',
|
|
7365
|
+
httpMethod: 'get',
|
|
7366
|
+
summary: 'List Attachments',
|
|
7367
|
+
description: 'List the attachments associated with a file (e.g. per-page screenshots).',
|
|
7368
|
+
stainlessPath: '(resource) beta.attachments > (method) list',
|
|
7369
|
+
qualified: 'client.beta.attachments.list',
|
|
7370
|
+
params: [
|
|
6510
7371
|
'source_id: string;',
|
|
6511
7372
|
'organization_id?: string;',
|
|
6512
7373
|
'page_size?: number;',
|
|
@@ -7771,6 +8632,275 @@ const EMBEDDED_METHODS: MethodEntry[] = [
|
|
|
7771
8632
|
},
|
|
7772
8633
|
},
|
|
7773
8634
|
},
|
|
8635
|
+
{
|
|
8636
|
+
name: 'list',
|
|
8637
|
+
endpoint: '/api/alpha/verify',
|
|
8638
|
+
httpMethod: 'get',
|
|
8639
|
+
summary: 'List Verify Jobs',
|
|
8640
|
+
description:
|
|
8641
|
+
'List Verify jobs with optional filtering and pagination.\n\nFilter by `status`, specific `job_ids`, or creation date range.',
|
|
8642
|
+
stainlessPath: '(resource) alpha.verify > (method) list',
|
|
8643
|
+
qualified: 'client.alpha.verify.list',
|
|
8644
|
+
params: [
|
|
8645
|
+
'created_at_on_or_after?: string;',
|
|
8646
|
+
'created_at_on_or_before?: string;',
|
|
8647
|
+
'expand?: string[];',
|
|
8648
|
+
'job_ids?: string[];',
|
|
8649
|
+
'organization_id?: string;',
|
|
8650
|
+
'page_size?: number;',
|
|
8651
|
+
'page_token?: string;',
|
|
8652
|
+
'project_id?: string;',
|
|
8653
|
+
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
8654
|
+
],
|
|
8655
|
+
response:
|
|
8656
|
+
"{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }",
|
|
8657
|
+
markdown:
|
|
8658
|
+
"## list\n\n`client.alpha.verify.list(created_at_on_or_after?: string, created_at_on_or_before?: string, expand?: string[], job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'): { id: string; configuration: object; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: object; transaction_id?: string; updated_at?: string; }`\n\n**get** `/api/alpha/verify`\n\nList Verify jobs with optional filtering and pagination.\n\nFilter by `status`, specific `job_ids`, or creation date range.\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- `expand?: string[]`\n Optional fields to include (e.g. `result`).\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\n\n### Returns\n\n- `{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }`\n Response for a Verify job.\n\n - `id: string`\n - `configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: { applicable?: boolean; score?: number; }; document_coherence?: { applicable?: boolean; score?: number; }; document_metadata?: { applicable?: boolean; score?: number; }; known_fraud?: { applicable?: boolean; score?: number; }; manually_edited?: { applicable?: boolean; score?: number; }; recapture?: { applicable?: boolean; score?: number; }; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }`\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 verifyListResponse of client.alpha.verify.list()) {\n console.log(verifyListResponse);\n}\n```",
|
|
8659
|
+
perLanguage: {
|
|
8660
|
+
python: {
|
|
8661
|
+
method: 'alpha.verify.list',
|
|
8662
|
+
example:
|
|
8663
|
+
'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.alpha.verify.list()\npage = page.items[0]\nprint(page.id)',
|
|
8664
|
+
},
|
|
8665
|
+
go: {
|
|
8666
|
+
method: 'client.Alpha.Verify.List',
|
|
8667
|
+
example:
|
|
8668
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.Alpha.Verify.List(context.TODO(), llamacloud.AlphaVerifyListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", page)\n}\n',
|
|
8669
|
+
},
|
|
8670
|
+
java: {
|
|
8671
|
+
method: 'alpha().verify().list',
|
|
8672
|
+
example:
|
|
8673
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyListPage;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyListParams;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n VerifyListPage page = client.alpha().verify().list();\n }\n}',
|
|
8674
|
+
},
|
|
8675
|
+
csharp: {
|
|
8676
|
+
method: 'Alpha.Verify.List',
|
|
8677
|
+
example:
|
|
8678
|
+
'VerifyListParams parameters = new();\n\nvar page = await client.Alpha.Verify.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
8679
|
+
},
|
|
8680
|
+
typescript: {
|
|
8681
|
+
method: 'client.alpha.verify.list',
|
|
8682
|
+
example:
|
|
8683
|
+
"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 verifyListResponse of client.alpha.verify.list()) {\n console.log(verifyListResponse.id);\n}",
|
|
8684
|
+
},
|
|
8685
|
+
http: {
|
|
8686
|
+
example:
|
|
8687
|
+
'curl https://api.cloud.llamaindex.ai/api/alpha/verify \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
8688
|
+
},
|
|
8689
|
+
cli: {
|
|
8690
|
+
method: 'verify list',
|
|
8691
|
+
example: "llp alpha:verify list \\\n --api-key 'My API Key'",
|
|
8692
|
+
},
|
|
8693
|
+
},
|
|
8694
|
+
},
|
|
8695
|
+
{
|
|
8696
|
+
name: 'create',
|
|
8697
|
+
endpoint: '/api/alpha/verify',
|
|
8698
|
+
httpMethod: 'post',
|
|
8699
|
+
summary: 'Create Verify Job',
|
|
8700
|
+
description:
|
|
8701
|
+
'Create a Verify job.\n\nAnalyzes a document for signs of doctoring (splicing, copy-move,\nAI generation, metadata tampering, ...). Set `file_input` to a\nfile ID (`dfl-...`). Optionally provide a `configuration` object\nto control the semantic agent.\n\nThe job runs asynchronously. Poll `GET /verify/{job_id}`\nwith `expand=result` to check status and retrieve results.',
|
|
8702
|
+
stainlessPath: '(resource) alpha.verify > (method) create',
|
|
8703
|
+
qualified: 'client.alpha.verify.create',
|
|
8704
|
+
params: [
|
|
8705
|
+
'file_input: string;',
|
|
8706
|
+
'organization_id?: string;',
|
|
8707
|
+
'project_id?: string;',
|
|
8708
|
+
"configuration?: { target_pages?: string; tier?: 'agentic' | 'fast'; };",
|
|
8709
|
+
'transaction_id?: string;',
|
|
8710
|
+
'webhook_configuration_ids?: string[];',
|
|
8711
|
+
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
8712
|
+
],
|
|
8713
|
+
response:
|
|
8714
|
+
"{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }",
|
|
8715
|
+
markdown:
|
|
8716
|
+
"## create\n\n`client.alpha.verify.create(file_input: string, organization_id?: string, project_id?: string, configuration?: { target_pages?: string; tier?: 'agentic' | 'fast'; }, transaction_id?: string, webhook_configuration_ids?: string[], webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[]): { id: string; configuration: object; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: object; transaction_id?: string; updated_at?: string; }`\n\n**post** `/api/alpha/verify`\n\nCreate a Verify job.\n\nAnalyzes a document for signs of doctoring (splicing, copy-move,\nAI generation, metadata tampering, ...). Set `file_input` to a\nfile ID (`dfl-...`). Optionally provide a `configuration` object\nto control the semantic agent.\n\nThe job runs asynchronously. Poll `GET /verify/{job_id}`\nwith `expand=result` to check status and retrieve results.\n\n### Parameters\n\n- `file_input: string`\n File ID of the document to analyze\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `configuration?: { target_pages?: string; tier?: 'agentic' | 'fast'; }`\n Configuration for a Verify job.\n - `target_pages?: string`\n Comma-separated page numbers or ranges to analyze (1-based). Omit to analyze all pages. Ignored for non-PDF inputs.\n - `tier?: 'agentic' | 'fast'`\n Verify tier: 'fast' runs only the quick deterministic forensic checks (metadata, content integrity, container structure, pixel statistics); 'agentic' (default) runs the full pipeline including the learned detectors and the semantic review pass.\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_configuration_ids?: string[]`\n IDs of saved webhook configurations to notify for this job.\n\n- `webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[]`\n Outbound webhook endpoints to notify on job status changes\n\n### Returns\n\n- `{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }`\n Response for a Verify job.\n\n - `id: string`\n - `configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: { applicable?: boolean; score?: number; }; document_coherence?: { applicable?: boolean; score?: number; }; document_metadata?: { applicable?: boolean; score?: number; }; known_fraud?: { applicable?: boolean; score?: number; }; manually_edited?: { applicable?: boolean; score?: number; }; recapture?: { applicable?: boolean; score?: number; }; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }`\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 verify = await client.alpha.verify.create({ file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee' });\n\nconsole.log(verify);\n```",
|
|
8717
|
+
perLanguage: {
|
|
8718
|
+
python: {
|
|
8719
|
+
method: 'alpha.verify.create',
|
|
8720
|
+
example:
|
|
8721
|
+
'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)\nverify = client.alpha.verify.create(\n file_input="dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n)\nprint(verify.id)',
|
|
8722
|
+
},
|
|
8723
|
+
go: {
|
|
8724
|
+
method: 'client.Alpha.Verify.New',
|
|
8725
|
+
example:
|
|
8726
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tverify, err := client.Alpha.Verify.New(context.TODO(), llamacloud.AlphaVerifyNewParams{\n\t\tFileInput: "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", verify.ID)\n}\n',
|
|
8727
|
+
},
|
|
8728
|
+
java: {
|
|
8729
|
+
method: 'alpha().verify().create',
|
|
8730
|
+
example:
|
|
8731
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyCreateParams;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyCreateResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n VerifyCreateParams params = VerifyCreateParams.builder()\n .fileInput("dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")\n .build();\n VerifyCreateResponse verify = client.alpha().verify().create(params);\n }\n}',
|
|
8732
|
+
},
|
|
8733
|
+
csharp: {
|
|
8734
|
+
method: 'Alpha.Verify.Create',
|
|
8735
|
+
example:
|
|
8736
|
+
'VerifyCreateParams parameters = new()\n{\n FileInput = "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"\n};\n\nvar verify = await client.Alpha.Verify.Create(parameters);\n\nConsole.WriteLine(verify);',
|
|
8737
|
+
},
|
|
8738
|
+
typescript: {
|
|
8739
|
+
method: 'client.alpha.verify.create',
|
|
8740
|
+
example:
|
|
8741
|
+
"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 verify = await client.alpha.verify.create({\n file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',\n});\n\nconsole.log(verify.id);",
|
|
8742
|
+
},
|
|
8743
|
+
http: {
|
|
8744
|
+
example:
|
|
8745
|
+
'curl https://api.cloud.llamaindex.ai/api/alpha/verify \\\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 "transaction_id": "tx-unique-idempotency-key",\n "webhook_configuration_ids": [\n "whc-...",\n "whc-..."\n ]\n }\'',
|
|
8746
|
+
},
|
|
8747
|
+
cli: {
|
|
8748
|
+
method: 'verify create',
|
|
8749
|
+
example:
|
|
8750
|
+
"llp alpha:verify create \\\n --api-key 'My API Key' \\\n --file-input dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
8751
|
+
},
|
|
8752
|
+
},
|
|
8753
|
+
},
|
|
8754
|
+
{
|
|
8755
|
+
name: 'get',
|
|
8756
|
+
endpoint: '/api/alpha/verify/{job_id}',
|
|
8757
|
+
httpMethod: 'get',
|
|
8758
|
+
summary: 'Get Verify Job',
|
|
8759
|
+
description:
|
|
8760
|
+
'Get a Verify job by ID.\n\nReturns the job status and configuration. Pass `expand=result`\nto include the Verify result (overall score, verdict, confidence,\ncomposite scores, and suspect regions) when the job is complete.\n\nRaw per-signal detail is available via `GET /verify/{job_id}/details`.',
|
|
8761
|
+
stainlessPath: '(resource) alpha.verify > (method) get',
|
|
8762
|
+
qualified: 'client.alpha.verify.get',
|
|
8763
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
8764
|
+
response:
|
|
8765
|
+
"{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }",
|
|
8766
|
+
markdown:
|
|
8767
|
+
"## get\n\n`client.alpha.verify.get(job_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; configuration: object; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: object; transaction_id?: string; updated_at?: string; }`\n\n**get** `/api/alpha/verify/{job_id}`\n\nGet a Verify job by ID.\n\nReturns the job status and configuration. Pass `expand=result`\nto include the Verify result (overall score, verdict, confidence,\ncomposite scores, and suspect regions) when the job is complete.\n\nRaw per-signal detail is available via `GET /verify/{job_id}/details`.\n\n### Parameters\n\n- `job_id: string`\n\n- `expand?: string[]`\n Optional fields to include (e.g. `result`).\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }`\n Response for a Verify job.\n\n - `id: string`\n - `configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: { applicable?: boolean; score?: number; }; document_coherence?: { applicable?: boolean; score?: number; }; document_metadata?: { applicable?: boolean; score?: number; }; known_fraud?: { applicable?: boolean; score?: number; }; manually_edited?: { applicable?: boolean; score?: number; }; recapture?: { applicable?: boolean; score?: number; }; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }`\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 verify = await client.alpha.verify.get('job_id');\n\nconsole.log(verify);\n```",
|
|
8768
|
+
perLanguage: {
|
|
8769
|
+
python: {
|
|
8770
|
+
method: 'alpha.verify.get',
|
|
8771
|
+
example:
|
|
8772
|
+
'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)\nverify = client.alpha.verify.get(\n job_id="job_id",\n)\nprint(verify.id)',
|
|
8773
|
+
},
|
|
8774
|
+
go: {
|
|
8775
|
+
method: 'client.Alpha.Verify.Get',
|
|
8776
|
+
example:
|
|
8777
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tverify, err := client.Alpha.Verify.Get(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloud.AlphaVerifyGetParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", verify.ID)\n}\n',
|
|
8778
|
+
},
|
|
8779
|
+
java: {
|
|
8780
|
+
method: 'alpha().verify().get',
|
|
8781
|
+
example:
|
|
8782
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyGetParams;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyGetResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n VerifyGetResponse verify = client.alpha().verify().get("job_id");\n }\n}',
|
|
8783
|
+
},
|
|
8784
|
+
csharp: {
|
|
8785
|
+
method: 'Alpha.Verify.Get',
|
|
8786
|
+
example:
|
|
8787
|
+
'VerifyGetParams parameters = new() { JobID = "job_id" };\n\nvar verify = await client.Alpha.Verify.Get(parameters);\n\nConsole.WriteLine(verify);',
|
|
8788
|
+
},
|
|
8789
|
+
typescript: {
|
|
8790
|
+
method: 'client.alpha.verify.get',
|
|
8791
|
+
example:
|
|
8792
|
+
"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 verify = await client.alpha.verify.get('job_id');\n\nconsole.log(verify.id);",
|
|
8793
|
+
},
|
|
8794
|
+
http: {
|
|
8795
|
+
example:
|
|
8796
|
+
'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
8797
|
+
},
|
|
8798
|
+
cli: {
|
|
8799
|
+
method: 'verify get',
|
|
8800
|
+
example: "llp alpha:verify get \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
8801
|
+
},
|
|
8802
|
+
},
|
|
8803
|
+
},
|
|
8804
|
+
{
|
|
8805
|
+
name: 'cancel',
|
|
8806
|
+
endpoint: '/api/alpha/verify/{job_id}/cancel',
|
|
8807
|
+
httpMethod: 'post',
|
|
8808
|
+
summary: 'Cancel Verify Job',
|
|
8809
|
+
description:
|
|
8810
|
+
'Cancel a running Verify job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.',
|
|
8811
|
+
stainlessPath: '(resource) alpha.verify > (method) cancel',
|
|
8812
|
+
qualified: 'client.alpha.verify.cancel',
|
|
8813
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
8814
|
+
response:
|
|
8815
|
+
"{ id: string; configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }",
|
|
8816
|
+
markdown:
|
|
8817
|
+
"## cancel\n\n`client.alpha.verify.cancel(job_id: string, organization_id?: string, project_id?: string): { id: string; configuration: object; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: object; transaction_id?: string; updated_at?: string; }`\n\n**post** `/api/alpha/verify/{job_id}/cancel`\n\nCancel a running Verify job.\n\nStops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.\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: { target_pages?: string; tier?: 'agentic' | 'fast'; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; user_id: string; created_at?: string; error_message?: string; result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: object; document_coherence?: object; document_metadata?: object; known_fraud?: object; manually_edited?: object; recapture?: object; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }; transaction_id?: string; updated_at?: string; }`\n Response for a Verify job.\n\n - `id: string`\n - `configuration: { target_pages?: string; tier?: 'agentic' | 'fast'; }`\n - `document_input_type: 'file_id' | 'parse_job_id' | 'url'`\n - `file_input: string`\n - `project_id: string`\n - `status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'`\n - `user_id: string`\n - `created_at?: string`\n - `error_message?: string`\n - `result?: { detector_version: string; overall_score: number; verdict: 'AUTHENTIC' | 'DOCTORED' | 'LIKELY_DOCTORED' | 'NO_STRONG_SIGNAL' | 'SUSPICIOUS'; composite_scores?: { ai_generated?: { applicable?: boolean; score?: number; }; document_coherence?: { applicable?: boolean; score?: number; }; document_metadata?: { applicable?: boolean; score?: number; }; known_fraud?: { applicable?: boolean; score?: number; }; manually_edited?: { applicable?: boolean; score?: number; }; recapture?: { applicable?: boolean; score?: number; }; }; confidence?: number; error?: string; page_count?: number; page_dimensions?: { height: number; page: number; width: number; }[]; reasoning?: string; suspect_regions?: { bbox: number[]; explanation: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; }[]; synthetic_score?: number; tampering_score?: number; }`\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 response = await client.alpha.verify.cancel('job_id');\n\nconsole.log(response);\n```",
|
|
8818
|
+
perLanguage: {
|
|
8819
|
+
python: {
|
|
8820
|
+
method: 'alpha.verify.cancel',
|
|
8821
|
+
example:
|
|
8822
|
+
'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.alpha.verify.cancel(\n job_id="job_id",\n)\nprint(response.id)',
|
|
8823
|
+
},
|
|
8824
|
+
go: {
|
|
8825
|
+
method: 'client.Alpha.Verify.Cancel',
|
|
8826
|
+
example:
|
|
8827
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Alpha.Verify.Cancel(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloud.AlphaVerifyCancelParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.ID)\n}\n',
|
|
8828
|
+
},
|
|
8829
|
+
java: {
|
|
8830
|
+
method: 'alpha().verify().cancel',
|
|
8831
|
+
example:
|
|
8832
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyCancelParams;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyCancelResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n VerifyCancelResponse response = client.alpha().verify().cancel("job_id");\n }\n}',
|
|
8833
|
+
},
|
|
8834
|
+
csharp: {
|
|
8835
|
+
method: 'Alpha.Verify.Cancel',
|
|
8836
|
+
example:
|
|
8837
|
+
'VerifyCancelParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.Cancel(parameters);\n\nConsole.WriteLine(response);',
|
|
8838
|
+
},
|
|
8839
|
+
typescript: {
|
|
8840
|
+
method: 'client.alpha.verify.cancel',
|
|
8841
|
+
example:
|
|
8842
|
+
"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.alpha.verify.cancel('job_id');\n\nconsole.log(response.id);",
|
|
8843
|
+
},
|
|
8844
|
+
http: {
|
|
8845
|
+
example:
|
|
8846
|
+
'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
8847
|
+
},
|
|
8848
|
+
cli: {
|
|
8849
|
+
method: 'verify cancel',
|
|
8850
|
+
example: "llp alpha:verify cancel \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
8851
|
+
},
|
|
8852
|
+
},
|
|
8853
|
+
},
|
|
8854
|
+
{
|
|
8855
|
+
name: 'get_details',
|
|
8856
|
+
endpoint: '/api/alpha/verify/{job_id}/details',
|
|
8857
|
+
httpMethod: 'get',
|
|
8858
|
+
summary: 'Get Verify Job Details',
|
|
8859
|
+
description:
|
|
8860
|
+
'Get the raw per-signal detail for a completed Verify job.\n\nForensic drill-down behind the simplified result: the full evidence\nlist, per-family sub-scores, raw localized regions, and per-page\nforensic heatmap overlays (presigned image URLs).',
|
|
8861
|
+
stainlessPath: '(resource) alpha.verify > (method) get_details',
|
|
8862
|
+
qualified: 'client.alpha.verify.getDetails',
|
|
8863
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
8864
|
+
response:
|
|
8865
|
+
'{ job_id: string; degraded_tools?: { tool: string; reason?: string; }[]; evidence?: { code: string; detail: string; family: string; score: number; tool: string; hard?: boolean; metadata?: object; }[]; heatmaps?: { expires_at: string; kind: string; page: number; url: string; score?: number; }[]; page_dimensions?: { height: number; page: number; width: number; }[]; regions?: { bbox: number[]; detail: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; review_note?: string; }[]; sub_scores?: object; }',
|
|
8866
|
+
markdown:
|
|
8867
|
+
"## get_details\n\n`client.alpha.verify.getDetails(job_id: string, organization_id?: string, project_id?: string): { job_id: string; degraded_tools?: object[]; evidence?: object[]; heatmaps?: object[]; page_dimensions?: object[]; regions?: object[]; sub_scores?: object; }`\n\n**get** `/api/alpha/verify/{job_id}/details`\n\nGet the raw per-signal detail for a completed Verify job.\n\nForensic drill-down behind the simplified result: the full evidence\nlist, per-family sub-scores, raw localized regions, and per-page\nforensic heatmap overlays (presigned image URLs).\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; degraded_tools?: { tool: string; reason?: string; }[]; evidence?: { code: string; detail: string; family: string; score: number; tool: string; hard?: boolean; metadata?: object; }[]; heatmaps?: { expires_at: string; kind: string; page: number; url: string; score?: number; }[]; page_dimensions?: { height: number; page: number; width: number; }[]; regions?: { bbox: number[]; detail: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; review_note?: string; }[]; sub_scores?: object; }`\n Raw per-signal detail for a completed Verify job.\n\nForensic drill-down behind the simplified result: the full evidence list,\nper-family sub-scores, raw localized regions, and heatmap overlays.\n\n - `job_id: string`\n - `degraded_tools?: { tool: string; reason?: string; }[]`\n - `evidence?: { code: string; detail: string; family: string; score: number; tool: string; hard?: boolean; metadata?: object; }[]`\n - `heatmaps?: { expires_at: string; kind: string; page: number; url: string; score?: number; }[]`\n - `page_dimensions?: { height: number; page: number; width: number; }[]`\n - `regions?: { bbox: number[]; detail: string; kind: string; page: number; score: number; source: string; primary?: boolean; review?: string; review_note?: string; }[]`\n - `sub_scores?: object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.alpha.verify.getDetails('job_id');\n\nconsole.log(response);\n```",
|
|
8868
|
+
perLanguage: {
|
|
8869
|
+
python: {
|
|
8870
|
+
method: 'alpha.verify.get_details',
|
|
8871
|
+
example:
|
|
8872
|
+
'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.alpha.verify.get_details(\n job_id="job_id",\n)\nprint(response.job_id)',
|
|
8873
|
+
},
|
|
8874
|
+
go: {
|
|
8875
|
+
method: 'client.Alpha.Verify.GetDetails',
|
|
8876
|
+
example:
|
|
8877
|
+
'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 := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.Alpha.Verify.GetDetails(\n\t\tcontext.TODO(),\n\t\t"job_id",\n\t\tllamacloud.AlphaVerifyGetDetailsParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf("%+v\\n", response.JobID)\n}\n',
|
|
8878
|
+
},
|
|
8879
|
+
java: {
|
|
8880
|
+
method: 'alpha().verify().getDetails',
|
|
8881
|
+
example:
|
|
8882
|
+
'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyGetDetailsParams;\nimport ai.llamaindex.llamacloud.models.alpha.verify.VerifyGetDetailsResponse;\n\npublic final class Main {\n private Main() {}\n\n public static void main(String[] args) {\n LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv();\n\n VerifyGetDetailsResponse response = client.alpha().verify().getDetails("job_id");\n }\n}',
|
|
8883
|
+
},
|
|
8884
|
+
csharp: {
|
|
8885
|
+
method: 'Alpha.Verify.GetDetails',
|
|
8886
|
+
example:
|
|
8887
|
+
'VerifyGetDetailsParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.GetDetails(parameters);\n\nConsole.WriteLine(response);',
|
|
8888
|
+
},
|
|
8889
|
+
typescript: {
|
|
8890
|
+
method: 'client.alpha.verify.getDetails',
|
|
8891
|
+
example:
|
|
8892
|
+
"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.alpha.verify.getDetails('job_id');\n\nconsole.log(response.job_id);",
|
|
8893
|
+
},
|
|
8894
|
+
http: {
|
|
8895
|
+
example:
|
|
8896
|
+
'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/details \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
8897
|
+
},
|
|
8898
|
+
cli: {
|
|
8899
|
+
method: 'verify get_details',
|
|
8900
|
+
example: "llp alpha:verify get-details \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
8901
|
+
},
|
|
8902
|
+
},
|
|
8903
|
+
},
|
|
7774
8904
|
{
|
|
7775
8905
|
name: 'run_search',
|
|
7776
8906
|
endpoint: '/api/v1/pipelines/{pipeline_id}/retrieve',
|
|
@@ -7815,17 +8945,17 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [
|
|
|
7815
8945
|
{
|
|
7816
8946
|
language: 'python',
|
|
7817
8947
|
content:
|
|
7818
|
-
'# Llama Cloud Python API library\n\n<!-- prettier-ignore -->\n[)](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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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',
|
|
8948
|
+
'# Llama Cloud Python API library\n\n<!-- prettier-ignore -->\n[)](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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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.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).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).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.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 `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.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',
|
|
7819
8949
|
},
|
|
7820
8950
|
{
|
|
7821
8951
|
language: 'go',
|
|
7822
8952
|
content:
|
|
7823
|
-
'# Llama Cloud Go API Library\n\n<a href="https://pkg.go.dev/github.com/run-llama/llama-parse-go"><img src="https://pkg.go.dev/badge/github.com/run-llama/llama-parse-go.svg" alt="Go Reference"></a>\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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/run-llama/llama-parse-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/run-llama/llama-parse-go@v1.7.0\'\n```\n\n<!-- x-release-please-end -->\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 := llamacloud.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(), llamacloud.ParsingNewParams{\n\t\tTier: llamacloud.ParsingNewParamsTierAgentic,\n\t\tVersion: llamacloud.ParsingNewParamsVersionLatest,\n\t\tFileID: llamacloud.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(), llamacloud.ExtractListParams{\n\tPageSize: llamacloud.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(), llamacloud.ExtractListParams{\n\tPageSize: llamacloud.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(), llamacloud.BetaIndexListParams{\n\tProjectID: llamacloud.String("my-project-id"),\n})\nif err != nil {\n\tvar apierr *llamacloud.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\tllamacloud.BetaIndexListParams{\n\t\tProjectID: llamacloud.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")\nllamacloud.FileNewParams{\n\tFile: file,\n\tPurpose: "purpose",\n}\n\n// A file from a string\nllamacloud.FileNewParams{\n\tFile: strings.NewReader("my file contents"),\n\tPurpose: "purpose",\n}\n\n// With a custom filename and contentType\nllamacloud.FileNewParams{\n\tFile: llamacloud.File(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 := llamacloud.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Beta.Indexes.List(\n\tcontext.TODO(),\n\tllamacloud.BetaIndexListParams{\n\t\tProjectID: llamacloud.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\tllamacloud.BetaIndexListParams{\n\t\tProjectID: llamacloud.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',
|
|
8953
|
+
'# Llama Cloud Go API Library\n\n<a href="https://pkg.go.dev/github.com/run-llama/llama-parse-go"><img src="https://pkg.go.dev/badge/github.com/run-llama/llama-parse-go.svg" alt="Go Reference"></a>\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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- x-release-please-start-version -->\n\n```go\nimport (\n\t"github.com/run-llama/llama-parse-go" // imported as SDK_PackageName\n)\n```\n\n<!-- x-release-please-end -->\n\nOr to pin the version:\n\n<!-- x-release-please-start-version -->\n\n```sh\ngo get -u \'github.com/run-llama/llama-parse-go@v1.9.0\'\n```\n\n<!-- x-release-please-end -->\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 := llamacloud.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(), llamacloud.ParsingNewParams{\n\t\tTier: llamacloud.ParsingNewParamsTierAgentic,\n\t\tVersion: llamacloud.ParsingNewParamsVersionLatest,\n\t\tFileID: llamacloud.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.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(), llamacloud.ExtractListParams{\n\tPageSize: llamacloud.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(), llamacloud.ExtractListParams{\n\tPageSize: llamacloud.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.Indexes.List(context.TODO(), llamacloud.IndexListParams{\n\tProjectID: llamacloud.String("my-project-id"),\n})\nif err != nil {\n\tvar apierr *llamacloud.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.Indexes.List(\n\tctx,\n\tllamacloud.IndexListParams{\n\t\tProjectID: llamacloud.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")\nllamacloud.FileNewParams{\n\tFile: file,\n\tPurpose: "purpose",\n}\n\n// A file from a string\nllamacloud.FileNewParams{\n\tFile: strings.NewReader("my file contents"),\n\tPurpose: "purpose",\n}\n\n// With a custom filename and contentType\nllamacloud.FileNewParams{\n\tFile: llamacloud.File(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 := llamacloud.NewClient(\n\toption.WithMaxRetries(0), // default is 2\n)\n\n// Override per-request:\nclient.Indexes.List(\n\tcontext.TODO(),\n\tllamacloud.IndexListParams{\n\t\tProjectID: llamacloud.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.Indexes.List(\n\tcontext.TODO(),\n\tllamacloud.IndexListParams{\n\t\tProjectID: llamacloud.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',
|
|
7824
8954
|
},
|
|
7825
8955
|
{
|
|
7826
8956
|
language: 'java',
|
|
7827
8957
|
content:
|
|
7828
|
-
'# Llama Cloud Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/ai.llamaindex.llamacloud/llama-cloud/1.7.0)\n[](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.7.0)\n<!-- x-release-please-end -->\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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- x-release-please-start-version -->\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/ai.llamaindex.llamacloud/llama-cloud/1.7.0).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("ai.llamaindex:llama-cloud:1.7.0")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>ai.llamaindex</groupId>\n <artifactId>llama-cloud</artifactId>\n <version>1.7.0</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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<ParsingCreateResponse> parsing = client.async().parsing().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport ai.llamaindex.llamacloud.client.LlamaCloudClientAsync;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClientAsync;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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<ParsingCreateResponse> 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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.MultipartField;\nimport ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.models.files.FileCreateResponse;\nimport java.io.InputStream;\nimport java.net.URL;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file(MultipartField.<InputStream>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 ai.llamaindex.llamacloud.core.http.Headers;\nimport ai.llamaindex.llamacloud.core.http.HttpResponseFor;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexListPage;\nimport ai.llamaindex.llamacloud.models.beta.indexes.IndexListParams;\n\nIndexListParams params = IndexListParams.builder()\n .projectId("my-project-id")\n .build();\nHttpResponseFor<IndexListPage> 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 ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/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-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnexpectedStatusCodeException.kt) |\n\n- [`LlamaCloudIoException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/LlamaCloudIoException.kt): I/O networking errors.\n\n- [`LlamaCloudRetryableException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/LlamaCloudRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`LlamaCloudInvalidDataException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/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-core/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.models.extract.ExtractListPage;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/http/AsyncStreamResponse.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.http.AsyncStreamResponse;\nimport ai.llamaindex.llamacloud.models.extract.ExtractListPageAsync;\nimport ai.llamaindex.llamacloud.models.extract.ExtractV2Job;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<ExtractListPageAsync> 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<Throwable> 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 ai.llamaindex.llamacloud.models.extract.ExtractListPage;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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-core` is published with a [configuration file](llama-cloud-core/src/main/resources/META-INF/proguard/llama-cloud-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-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudClient`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClient.kt), [`LlamaCloudClientAsync`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsync.kt), [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt), and [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), all of which can work with any HTTP client\n- `llama-cloud-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) and [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClientAsync.kt), which provide a way to construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) and [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), respectively, using OkHttp\n- `llama-cloud`\n - Depends on and exposes the APIs of both `llama-cloud-core` and `llama-cloud-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` dependency](#installation) with `llama-cloud-core`\n2. Copy `llama-cloud-client-okhttp`\'s [`OkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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` dependency](#installation) with `llama-cloud-core`\n2. Write a class that implements the [`HttpClient`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/core/http/HttpClient.kt) interface\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt) object to its setter:\n\n```java\nimport ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.JsonMissing;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> 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 ai.llamaindex.llamacloud.core.JsonField;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport java.util.Optional;\n\nJsonField<ParsingCreateParams.Tier> 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<String> 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-core/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` 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',
|
|
8958
|
+
'# Llama Cloud Java API Library\n\n<!-- x-release-please-start-version -->\n[](https://central.sonatype.com/artifact/ai.llamaindex.llamacloud/llama-cloud/1.9.0)\n[](https://javadoc.io/doc/ai.llamaindex.llamacloud/llama-cloud/1.9.0)\n<!-- x-release-please-end -->\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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- x-release-please-start-version -->\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/ai.llamaindex.llamacloud/llama-cloud/1.9.0).\n\n<!-- x-release-please-end -->\n\n## Installation\n\n<!-- x-release-please-start-version -->\n\n### Gradle\n\n~~~kotlin\nimplementation("ai.llamaindex:llama-cloud:1.9.0")\n~~~\n\n### Maven\n\n~~~xml\n<dependency>\n <groupId>ai.llamaindex</groupId>\n <artifactId>llama-cloud</artifactId>\n <version>1.9.0</version>\n</dependency>\n~~~\n\n<!-- x-release-please-end -->\n\n## Requirements\n\nThis library requires Java 8 or later.\n\n## Usage\n\n```java\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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<ParsingCreateResponse> parsing = client.async().parsing().create(params);\n```\n\nOr create an asynchronous client from the beginning:\n\n```java\nimport ai.llamaindex.llamacloud.client.LlamaCloudClientAsync;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClientAsync;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport ai.llamaindex.llamacloud.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<ParsingCreateResponse> 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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.MultipartField;\nimport ai.llamaindex.llamacloud.models.files.FileCreateParams;\nimport ai.llamaindex.llamacloud.models.files.FileCreateResponse;\nimport java.io.InputStream;\nimport java.net.URL;\n\nFileCreateParams params = FileCreateParams.builder()\n .purpose("purpose")\n .file(MultipartField.<InputStream>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 ai.llamaindex.llamacloud.core.http.Headers;\nimport ai.llamaindex.llamacloud.core.http.HttpResponseFor;\nimport ai.llamaindex.llamacloud.models.indexes.IndexListPage;\nimport ai.llamaindex.llamacloud.models.indexes.IndexListParams;\n\nIndexListParams params = IndexListParams.builder()\n .projectId("my-project-id")\n .build();\nHttpResponseFor<IndexListPage> page = client.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 ai.llamaindex.llamacloud.models.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-core/src/main/kotlin/ai/llamaindex/llamacloud/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-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/BadRequestException.kt) |\n | 401 | [`UnauthorizedException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnauthorizedException.kt) |\n | 403 | [`PermissionDeniedException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/PermissionDeniedException.kt) |\n | 404 | [`NotFoundException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/NotFoundException.kt) |\n | 422 | [`UnprocessableEntityException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnprocessableEntityException.kt) |\n | 429 | [`RateLimitException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/RateLimitException.kt) |\n | 5xx | [`InternalServerException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/InternalServerException.kt) |\n | others | [`UnexpectedStatusCodeException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/UnexpectedStatusCodeException.kt) |\n\n- [`LlamaCloudIoException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/LlamaCloudIoException.kt): I/O networking errors.\n\n- [`LlamaCloudRetryableException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/errors/LlamaCloudRetryableException.kt): Generic error indicating a failure that could be retried by the client.\n\n- [`LlamaCloudInvalidDataException`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/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-core/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.models.extract.ExtractListPage;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/http/AsyncStreamResponse.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.http.AsyncStreamResponse;\nimport ai.llamaindex.llamacloud.models.extract.ExtractListPageAsync;\nimport ai.llamaindex.llamacloud.models.extract.ExtractV2Job;\nimport java.util.Optional;\nimport java.util.concurrent.CompletableFuture;\n\nCompletableFuture<ExtractListPageAsync> 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<Throwable> 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 ai.llamaindex.llamacloud.models.extract.ExtractListPage;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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-core` is published with a [configuration file](llama-cloud-core/src/main/resources/META-INF/proguard/llama-cloud-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-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.models.indexes.IndexListPage;\n\nIndexListPage page = client.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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-core`\n - Contains core SDK logic\n - Does not depend on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudClient`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClient.kt), [`LlamaCloudClientAsync`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsync.kt), [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt), and [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), all of which can work with any HTTP client\n- `llama-cloud-client-okhttp`\n - Depends on [OkHttp](https://square.github.io/okhttp)\n - Exposes [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) and [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClientAsync.kt), which provide a way to construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) and [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), respectively, using OkHttp\n- `llama-cloud`\n - Depends on and exposes the APIs of both `llama-cloud-core` and `llama-cloud-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` dependency](#installation) with `llama-cloud-core`\n2. Copy `llama-cloud-client-okhttp`\'s [`OkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/OkHttpClient.kt) class into your code and customize it\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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` dependency](#installation) with `llama-cloud-core`\n2. Write a class that implements the [`HttpClient`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/core/http/HttpClient.kt) interface\n3. Construct [`LlamaCloudClientImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientImpl.kt) or [`LlamaCloudClientAsyncImpl`](llama-cloud-core/src/main/kotlin/ai/llamaindex/llamacloud/client/LlamaCloudClientAsyncImpl.kt), similarly to [`LlamaCloudOkHttpClient`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/client/okhttp/LlamaCloudOkHttpClient.kt) or [`LlamaCloudOkHttpClientAsync`](llama-cloud-client-okhttp/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt) object to its setter:\n\n```java\nimport ai.llamaindex.llamacloud.core.JsonValue;\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt) is using its `from(...)` method:\n\n```java\nimport ai.llamaindex.llamacloud.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-core/src/main/kotlin/ai/llamaindex/llamacloud/core/Values.kt):\n\n```java\nimport ai.llamaindex.llamacloud.core.JsonMissing;\nimport ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.core.JsonValue;\nimport java.util.Map;\n\nMap<String, JsonValue> 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 ai.llamaindex.llamacloud.core.JsonField;\nimport ai.llamaindex.llamacloud.models.parsing.ParsingCreateParams;\nimport java.util.Optional;\n\nJsonField<ParsingCreateParams.Tier> 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<String> 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-core/src/main/kotlin/ai/llamaindex/llamacloud/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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.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 ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.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<T>` instead of just plain `T`?\n\nUsing `JsonField<T>` 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',
|
|
7829
8959
|
},
|
|
7830
8960
|
{
|
|
7831
8961
|
language: 'csharp',
|
|
@@ -7835,7 +8965,7 @@ const EMBEDDED_READMES: { language: string; content: string }[] = [
|
|
|
7835
8965
|
{
|
|
7836
8966
|
language: 'typescript',
|
|
7837
8967
|
content:
|
|
7838
|
-
"# Llama Cloud TypeScript API Library\n\n[)](https://npmjs.org/package/@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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\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",
|
|
8968
|
+
"# Llama Cloud TypeScript API Library\n\n[)](https://npmjs.org/package/@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[](https://cursor.com/en-US/install-mcp?name=%40llamaindex%2Fllama-cloud-mcp&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBsbGFtYWluZGV4L2xsYW1hLWNsb3VkLW1jcCJdLCJlbnYiOnsiTExBTUFfQ0xPVURfQVBJX0tFWSI6Ik15IEFQSSBLZXkifX0)\n[](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<!-- prettier-ignore -->\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<!-- prettier-ignore -->\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.IndexListParams = { project_id: 'my-project-id' };\nconst [indexListResponse]: [LlamaCloud.IndexListResponse] = await client.indexes.list(params);\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<!-- prettier-ignore -->\n```ts\nconst page = await client.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<!-- prettier-ignore -->\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.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<!-- prettier-ignore -->\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.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<!-- prettier-ignore -->\n```ts\nconst client = new LlamaCloud();\n\nconst response = await client.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.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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/node.svg\" align=\"top\" width=\"18\" height=\"21\"> **Node** <sup>[[docs](https://github.com/nodejs/undici/blob/main/docs/docs/api/ProxyAgent.md#example---proxyagent-with-fetch)]</sup>\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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/bun.svg\" align=\"top\" width=\"18\" height=\"21\"> **Bun** <sup>[[docs](https://bun.sh/guides/http/proxy)]</sup>\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<img src=\"https://raw.githubusercontent.com/stainless-api/sdk-assets/refs/heads/main/deno.svg\" align=\"top\" width=\"18\" height=\"21\"> **Deno** <sup>[[docs](https://docs.deno.com/api/deno/~/Deno.createHttpClient)]</sup>\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",
|
|
7839
8969
|
},
|
|
7840
8970
|
{
|
|
7841
8971
|
language: 'cli',
|