@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/local-docs-search.js
CHANGED
|
@@ -462,12 +462,12 @@ const EMBEDDED_METHODS = [
|
|
|
462
462
|
endpoint: '/api/v1/split/jobs/{split_job_id}',
|
|
463
463
|
httpMethod: 'delete',
|
|
464
464
|
summary: 'Delete Split Job',
|
|
465
|
-
description: 'Delete a split job and its results.',
|
|
465
|
+
description: 'Delete a split job and its results. A job that is not in a terminal state is refused with 409; cancel it first.',
|
|
466
466
|
stainlessPath: '(resource) split > (method) delete',
|
|
467
467
|
qualified: 'client.split.delete',
|
|
468
468
|
params: ['split_job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
469
469
|
response: 'object',
|
|
470
|
-
markdown: "## 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```",
|
|
470
|
+
markdown: "## 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```",
|
|
471
471
|
perLanguage: {
|
|
472
472
|
python: {
|
|
473
473
|
method: 'split.delete',
|
|
@@ -549,7 +549,7 @@ const EMBEDDED_METHODS = [
|
|
|
549
549
|
qualified: 'client.parsing.create',
|
|
550
550
|
params: [
|
|
551
551
|
"tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string;",
|
|
552
|
-
"version: 'latest' | '2026-
|
|
552
|
+
"version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | string;",
|
|
553
553
|
'organization_id?: string;',
|
|
554
554
|
'project_id?: string;',
|
|
555
555
|
'agentic_options?: { custom_prompt?: string; };',
|
|
@@ -564,14 +564,14 @@ const EMBEDDED_METHODS = [
|
|
|
564
564
|
"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'; };",
|
|
565
565
|
'page_ranges?: { max_pages?: number; target_pages?: string; };',
|
|
566
566
|
'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; }; };',
|
|
567
|
-
"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-
|
|
567
|
+
"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'; };",
|
|
568
568
|
'source_url?: string;',
|
|
569
569
|
'user_metadata?: object;',
|
|
570
570
|
'webhook_configuration_ids?: string[];',
|
|
571
571
|
"webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[];",
|
|
572
572
|
],
|
|
573
573
|
response: "{ id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; usage?: { credits?: number; }; user_metadata?: object; }",
|
|
574
|
-
markdown: "## 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```",
|
|
574
|
+
markdown: "## 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```",
|
|
575
575
|
perLanguage: {
|
|
576
576
|
python: {
|
|
577
577
|
method: 'parsing.create',
|
|
@@ -618,7 +618,7 @@ const EMBEDDED_METHODS = [
|
|
|
618
618
|
'project_id?: string;',
|
|
619
619
|
],
|
|
620
620
|
response: "{ job: { id: string; project_id: string; status: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING'; created_at?: string; error_message?: string; name?: string; tier?: string; updated_at?: string; 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; }",
|
|
621
|
-
markdown: "## 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 |
|
|
621
|
+
markdown: "## 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```",
|
|
622
622
|
perLanguage: {
|
|
623
623
|
python: {
|
|
624
624
|
method: 'parsing.get',
|
|
@@ -833,13 +833,13 @@ const EMBEDDED_METHODS = [
|
|
|
833
833
|
'file_input: string;',
|
|
834
834
|
'organization_id?: string;',
|
|
835
835
|
'project_id?: string;',
|
|
836
|
-
"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; };",
|
|
836
|
+
"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; };",
|
|
837
837
|
'configuration_id?: string;',
|
|
838
838
|
'webhook_configuration_ids?: string[];',
|
|
839
839
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
840
840
|
],
|
|
841
|
-
response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; 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; }; }",
|
|
842
|
-
markdown: "## create\n\n`client.extract.create(file_input: string, organization_id?: string, project_id?: string, configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; 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```",
|
|
841
|
+
response: "{ 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; }; }",
|
|
842
|
+
markdown: "## 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```",
|
|
843
843
|
perLanguage: {
|
|
844
844
|
python: {
|
|
845
845
|
method: 'extract.create',
|
|
@@ -893,8 +893,8 @@ const EMBEDDED_METHODS = [
|
|
|
893
893
|
'project_id?: string;',
|
|
894
894
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED';",
|
|
895
895
|
],
|
|
896
|
-
response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; 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; }; }",
|
|
897
|
-
markdown: "## list\n\n`client.extract.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, document_input_type?: string, document_input_value?: string, expand?: string[], file_input?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; 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```",
|
|
896
|
+
response: "{ 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; }; }",
|
|
897
|
+
markdown: "## list\n\n`client.extract.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, document_input_type?: string, document_input_value?: string, expand?: string[], file_input?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED'): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; 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```",
|
|
898
898
|
perLanguage: {
|
|
899
899
|
python: {
|
|
900
900
|
method: 'extract.list',
|
|
@@ -934,8 +934,8 @@ const EMBEDDED_METHODS = [
|
|
|
934
934
|
stainlessPath: '(resource) extract > (method) get',
|
|
935
935
|
qualified: 'client.extract.get',
|
|
936
936
|
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
937
|
-
response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; 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; }; }",
|
|
938
|
-
markdown: "## get\n\n`client.extract.get(job_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; 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```",
|
|
937
|
+
response: "{ 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; }; }",
|
|
938
|
+
markdown: "## get\n\n`client.extract.get(job_id: string, expand?: string[], organization_id?: string, project_id?: string): { id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: extract_configuration; configuration_id?: string; error_message?: string; extract_metadata?: extract_job_metadata; extract_result?: object | object[]; metadata?: object; 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```",
|
|
939
939
|
perLanguage: {
|
|
940
940
|
python: {
|
|
941
941
|
method: 'extract.get',
|
|
@@ -1016,8 +1016,8 @@ const EMBEDDED_METHODS = [
|
|
|
1016
1016
|
stainlessPath: '(resource) extract > (method) cancel',
|
|
1017
1017
|
qualified: 'client.extract.cancel',
|
|
1018
1018
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1019
|
-
response: "{ id: string; created_at: string; file_input: string; project_id: string; status: string; updated_at: string; configuration?: { data_schema: object; cite_sources?: boolean; confidence_scores?: boolean; 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; }; }",
|
|
1020
|
-
markdown: "## 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```",
|
|
1019
|
+
response: "{ 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; }; }",
|
|
1020
|
+
markdown: "## 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```",
|
|
1021
1021
|
perLanguage: {
|
|
1022
1022
|
python: {
|
|
1023
1023
|
method: 'extract.cancel',
|
|
@@ -1106,7 +1106,7 @@ const EMBEDDED_METHODS = [
|
|
|
1106
1106
|
'prompt?: string;',
|
|
1107
1107
|
],
|
|
1108
1108
|
response: "{ name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; tier?: 'agentic' | 'cost_effective'; use_experimental_processing?: boolean; } | object; }",
|
|
1109
|
-
markdown: "## generate_schema\n\n`client.extract.generateSchema(organization_id?: string, project_id?: string, data_schema?: object, file_id?: string, name?: string, prompt?: string): { name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; }`\n\n**post** `/api/v2/extract/schema/generate`\n\nGenerate a JSON schema and return a product configuration request.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `data_schema?: object`\n Optional schema to validate, refine, or extend\n\n- `file_id?: string`\n Optional file ID to analyze for schema generation\n\n- `name?: string`\n Name for the generated configuration (auto-generated if omitted)\n\n- `prompt?: string`\n Natural language description of the data structure to extract\n\n### Returns\n\n- `{ name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; 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-
|
|
1109
|
+
markdown: "## generate_schema\n\n`client.extract.generateSchema(organization_id?: string, project_id?: string, data_schema?: object, file_id?: string, name?: string, prompt?: string): { name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; }`\n\n**post** `/api/v2/extract/schema/generate`\n\nGenerate a JSON schema and return a product configuration request.\n\n### Parameters\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `data_schema?: object`\n Optional schema to validate, refine, or extend\n\n- `file_id?: string`\n Optional file ID to analyze for schema generation\n\n- `name?: string`\n Name for the generated configuration (auto-generated if omitted)\n\n- `prompt?: string`\n Natural language description of the data structure to extract\n\n### Returns\n\n- `{ name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; 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```",
|
|
1110
1110
|
perLanguage: {
|
|
1111
1111
|
python: {
|
|
1112
1112
|
method: 'extract.generate_schema',
|
|
@@ -1337,8 +1337,8 @@ const EMBEDDED_METHODS = [
|
|
|
1337
1337
|
'webhook_configuration_ids?: string[];',
|
|
1338
1338
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
1339
1339
|
],
|
|
1340
|
-
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }",
|
|
1341
|
-
markdown: "## create\n\n`client.classify.create(organization_id?: string, project_id?: string, configuration?: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }, configuration_id?: string, file_id?: string, file_input?: string, parse_job_id?: string, transaction_id?: string, webhook_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```",
|
|
1340
|
+
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }; }",
|
|
1341
|
+
markdown: "## create\n\n`client.classify.create(organization_id?: string, project_id?: string, configuration?: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }, configuration_id?: string, file_id?: string, file_input?: string, parse_job_id?: string, transaction_id?: string, webhook_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```",
|
|
1342
1342
|
perLanguage: {
|
|
1343
1343
|
python: {
|
|
1344
1344
|
method: 'classify.create',
|
|
@@ -1388,8 +1388,8 @@ const EMBEDDED_METHODS = [
|
|
|
1388
1388
|
'project_id?: string;',
|
|
1389
1389
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
1390
1390
|
],
|
|
1391
|
-
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }",
|
|
1392
|
-
markdown: "## list\n\n`client.classify.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: '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```",
|
|
1391
|
+
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }; }",
|
|
1392
|
+
markdown: "## list\n\n`client.classify.list(configuration_id?: string, created_at_on_or_after?: string, created_at_on_or_before?: string, job_ids?: string[], organization_id?: string, page_size?: number, page_token?: string, project_id?: string, status?: '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```",
|
|
1393
1393
|
perLanguage: {
|
|
1394
1394
|
python: {
|
|
1395
1395
|
method: 'classify.list',
|
|
@@ -1425,12 +1425,12 @@ const EMBEDDED_METHODS = [
|
|
|
1425
1425
|
endpoint: '/api/v2/classify/{job_id}',
|
|
1426
1426
|
httpMethod: 'get',
|
|
1427
1427
|
summary: 'Get Classify Job',
|
|
1428
|
-
description: 'Get a classify job by ID.\n\nReturns the job status, configuration, and classify result\nwhen complete. The result includes the matched document type,\nconfidence score, and reasoning.',
|
|
1428
|
+
description: 'Get a classify job by ID.\n\nReturns the job status, configuration, and classify result\nwhen complete. The result includes the matched document type,\nconfidence score, and reasoning.\nUse `expand=usage` for credits billed against the job.',
|
|
1429
1429
|
stainlessPath: '(resource) classify > (method) get',
|
|
1430
1430
|
qualified: 'client.classify.get',
|
|
1431
|
-
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1432
|
-
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }",
|
|
1433
|
-
markdown: "## get\n\n`client.classify.get(job_id: string, organization_id?: string, project_id?: string): { id: string; configuration: classify_configuration; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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```",
|
|
1431
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
1432
|
+
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }; }",
|
|
1433
|
+
markdown: "## 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```",
|
|
1434
1434
|
perLanguage: {
|
|
1435
1435
|
python: {
|
|
1436
1436
|
method: 'classify.get',
|
|
@@ -1470,8 +1470,8 @@ const EMBEDDED_METHODS = [
|
|
|
1470
1470
|
stainlessPath: '(resource) classify > (method) cancel',
|
|
1471
1471
|
qualified: 'client.classify.cancel',
|
|
1472
1472
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1473
|
-
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }",
|
|
1474
|
-
markdown: "## 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```",
|
|
1473
|
+
response: "{ id: string; configuration: { rules: object[]; mode?: 'FAST'; parsing_configuration?: object; }; document_input_type: 'file_id' | 'parse_job_id' | 'url'; file_input: string; project_id: string; status: '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; }; }",
|
|
1474
|
+
markdown: "## 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```",
|
|
1475
1475
|
perLanguage: {
|
|
1476
1476
|
python: {
|
|
1477
1477
|
method: 'classify.cancel',
|
|
@@ -1553,12 +1553,12 @@ const EMBEDDED_METHODS = [
|
|
|
1553
1553
|
qualified: 'client.configurations.create',
|
|
1554
1554
|
params: [
|
|
1555
1555
|
'name: string;',
|
|
1556
|
-
"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-
|
|
1556
|
+
"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'; };",
|
|
1557
1557
|
'organization_id?: string;',
|
|
1558
1558
|
'project_id?: string;',
|
|
1559
1559
|
],
|
|
1560
1560
|
response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; 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; }",
|
|
1561
|
-
markdown: "## create\n\n`client.configurations.create(name: string, parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; 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```",
|
|
1561
|
+
markdown: "## create\n\n`client.configurations.create(name: string, parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; 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```",
|
|
1562
1562
|
perLanguage: {
|
|
1563
1563
|
python: {
|
|
1564
1564
|
method: 'configurations.create',
|
|
@@ -1607,7 +1607,7 @@ const EMBEDDED_METHODS = [
|
|
|
1607
1607
|
'project_id?: string;',
|
|
1608
1608
|
],
|
|
1609
1609
|
response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; 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; }",
|
|
1610
|
-
markdown: "## list\n\n`client.configurations.list(latest_only?: boolean, name?: string, organization_id?: string, page_size?: number, page_token?: string, product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[], project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations`\n\nList product configurations for the current project.\n\n### Parameters\n\n- `latest_only?: boolean`\n Return only the latest version per configuration name.\n\n- `name?: string`\n Filter by configuration name.\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page.\n\n- `page_token?: string`\n Pagination token.\n\n- `product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[]`\n Filter by one or more product types. Repeat the parameter for multiple values.\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; 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-
|
|
1610
|
+
markdown: "## list\n\n`client.configurations.list(latest_only?: boolean, name?: string, organization_id?: string, page_size?: number, page_token?: string, product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[], project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations`\n\nList product configurations for the current project.\n\n### Parameters\n\n- `latest_only?: boolean`\n Return only the latest version per configuration name.\n\n- `name?: string`\n Filter by configuration name.\n\n- `organization_id?: string`\n\n- `page_size?: number`\n Number of items per page.\n\n- `page_token?: string`\n Pagination token.\n\n- `product_type?: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'[]`\n Filter by one or more product types. Repeat the parameter for multiple values.\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; 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```",
|
|
1611
1611
|
perLanguage: {
|
|
1612
1612
|
python: {
|
|
1613
1613
|
method: 'configurations.list',
|
|
@@ -1648,7 +1648,7 @@ const EMBEDDED_METHODS = [
|
|
|
1648
1648
|
qualified: 'client.configurations.retrieve',
|
|
1649
1649
|
params: ['config_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1650
1650
|
response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; 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; }",
|
|
1651
|
-
markdown: "## retrieve\n\n`client.configurations.retrieve(config_id: string, organization_id?: string, project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations/{config_id}`\n\nGet a single product configuration by ID.\n\n### Parameters\n\n- `config_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; 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-
|
|
1651
|
+
markdown: "## retrieve\n\n`client.configurations.retrieve(config_id: string, organization_id?: string, project_id?: string): { id: string; name: string; parameters: classify_v2_parameters | extract_v2_parameters | parse_v2_parameters | split_v1_parameters | object | untyped_parameters; product_type: 'classify_v2' | 'extract_v2' | 'parse_v2' | 'split_v1' | 'spreadsheet_v1' | 'unknown'; version: string; created_at?: string; updated_at?: string; }`\n\n**get** `/api/v1/beta/configurations/{config_id}`\n\nGet a single product configuration by ID.\n\n### Parameters\n\n- `config_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `{ id: string; name: string; parameters: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; 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```",
|
|
1652
1652
|
perLanguage: {
|
|
1653
1653
|
python: {
|
|
1654
1654
|
method: 'configurations.retrieve',
|
|
@@ -1692,10 +1692,10 @@ const EMBEDDED_METHODS = [
|
|
|
1692
1692
|
'organization_id?: string;',
|
|
1693
1693
|
'project_id?: string;',
|
|
1694
1694
|
'name?: string;',
|
|
1695
|
-
"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-
|
|
1695
|
+
"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'; };",
|
|
1696
1696
|
],
|
|
1697
1697
|
response: "{ id: string; name: string; parameters: object | object | object | object | { product_type: 'spreadsheet_v1'; extraction_range?: string; flatten_hierarchical_tables?: boolean; generate_additional_metadata?: boolean; include_hidden_cells?: boolean; sheet_names?: string[]; specialization?: string; table_merge_sensitivity?: 'strong' | 'weak'; 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; }",
|
|
1698
|
-
markdown: "## update\n\n`client.configurations.update(config_id: string, organization_id?: string, project_id?: string, name?: string, parameters?: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; cite_sources?: boolean; confidence_scores?: boolean; 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```",
|
|
1698
|
+
markdown: "## update\n\n`client.configurations.update(config_id: string, organization_id?: string, project_id?: string, name?: string, parameters?: { product_type: 'classify_v2'; rules: object[]; mode?: 'FAST'; parsing_configuration?: object; } | { data_schema: object; product_type: 'extract_v2'; 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```",
|
|
1699
1699
|
perLanguage: {
|
|
1700
1700
|
python: {
|
|
1701
1701
|
method: 'configurations.update',
|
|
@@ -4781,38 +4781,43 @@ const EMBEDDED_METHODS = [
|
|
|
4781
4781
|
httpMethod: 'get',
|
|
4782
4782
|
summary: 'Get Index',
|
|
4783
4783
|
description: 'Get an index by ID.',
|
|
4784
|
-
stainlessPath: '(resource)
|
|
4785
|
-
qualified: 'client.
|
|
4786
|
-
params: [
|
|
4784
|
+
stainlessPath: '(resource) indexes > (method) get',
|
|
4785
|
+
qualified: 'client.indexes.get',
|
|
4786
|
+
params: [
|
|
4787
|
+
'index_id: string;',
|
|
4788
|
+
"expand?: 'sync_in_progress'[];",
|
|
4789
|
+
'organization_id?: string;',
|
|
4790
|
+
'project_id?: string;',
|
|
4791
|
+
],
|
|
4787
4792
|
response: '{ 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; }',
|
|
4788
|
-
markdown: "## get\n\n`client.
|
|
4793
|
+
markdown: "## 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```",
|
|
4789
4794
|
perLanguage: {
|
|
4790
4795
|
python: {
|
|
4791
|
-
method: '
|
|
4792
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.
|
|
4796
|
+
method: 'indexes.get',
|
|
4797
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.indexes.get(\n index_id="index_id",\n)\nprint(index.id)',
|
|
4793
4798
|
},
|
|
4794
4799
|
go: {
|
|
4795
|
-
method: 'client.
|
|
4796
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.
|
|
4800
|
+
method: 'client.Indexes.Get',
|
|
4801
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4797
4802
|
},
|
|
4798
4803
|
java: {
|
|
4799
|
-
method: '
|
|
4800
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
4804
|
+
method: 'indexes().get',
|
|
4805
|
+
example: '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}',
|
|
4801
4806
|
},
|
|
4802
4807
|
csharp: {
|
|
4803
|
-
method: '
|
|
4804
|
-
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.
|
|
4808
|
+
method: 'Indexes.Get',
|
|
4809
|
+
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
4805
4810
|
},
|
|
4806
4811
|
typescript: {
|
|
4807
|
-
method: 'client.
|
|
4808
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.
|
|
4812
|
+
method: 'client.indexes.get',
|
|
4813
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.indexes.get('index_id');\n\nconsole.log(index.id);",
|
|
4809
4814
|
},
|
|
4810
4815
|
http: {
|
|
4811
4816
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4812
4817
|
},
|
|
4813
4818
|
cli: {
|
|
4814
4819
|
method: 'indexes get',
|
|
4815
|
-
example: "llp
|
|
4820
|
+
example: "llp indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4816
4821
|
},
|
|
4817
4822
|
},
|
|
4818
4823
|
},
|
|
@@ -4822,37 +4827,37 @@ const EMBEDDED_METHODS = [
|
|
|
4822
4827
|
httpMethod: 'delete',
|
|
4823
4828
|
summary: 'Delete Index',
|
|
4824
4829
|
description: 'Delete an index.',
|
|
4825
|
-
stainlessPath: '(resource)
|
|
4826
|
-
qualified: 'client.
|
|
4830
|
+
stainlessPath: '(resource) indexes > (method) delete',
|
|
4831
|
+
qualified: 'client.indexes.delete',
|
|
4827
4832
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4828
|
-
markdown: "## delete\n\n`client.
|
|
4833
|
+
markdown: "## 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```",
|
|
4829
4834
|
perLanguage: {
|
|
4830
4835
|
python: {
|
|
4831
|
-
method: '
|
|
4832
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.
|
|
4836
|
+
method: 'indexes.delete',
|
|
4837
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.indexes.delete(\n index_id="index_id",\n)',
|
|
4833
4838
|
},
|
|
4834
4839
|
go: {
|
|
4835
|
-
method: 'client.
|
|
4836
|
-
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.
|
|
4840
|
+
method: 'client.Indexes.Delete',
|
|
4841
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4837
4842
|
},
|
|
4838
4843
|
java: {
|
|
4839
|
-
method: '
|
|
4840
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
4844
|
+
method: 'indexes().delete',
|
|
4845
|
+
example: '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}',
|
|
4841
4846
|
},
|
|
4842
4847
|
csharp: {
|
|
4843
|
-
method: '
|
|
4844
|
-
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.
|
|
4848
|
+
method: 'Indexes.Delete',
|
|
4849
|
+
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Indexes.Delete(parameters);',
|
|
4845
4850
|
},
|
|
4846
4851
|
typescript: {
|
|
4847
|
-
method: 'client.
|
|
4848
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.
|
|
4852
|
+
method: 'client.indexes.delete',
|
|
4853
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.indexes.delete('index_id');",
|
|
4849
4854
|
},
|
|
4850
4855
|
http: {
|
|
4851
4856
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4852
4857
|
},
|
|
4853
4858
|
cli: {
|
|
4854
4859
|
method: 'indexes delete',
|
|
4855
|
-
example: "llp
|
|
4860
|
+
example: "llp indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4856
4861
|
},
|
|
4857
4862
|
},
|
|
4858
4863
|
},
|
|
@@ -4862,8 +4867,8 @@ const EMBEDDED_METHODS = [
|
|
|
4862
4867
|
httpMethod: 'post',
|
|
4863
4868
|
summary: 'Create Index',
|
|
4864
4869
|
description: 'Create a searchable index over a source directory.',
|
|
4865
|
-
stainlessPath: '(resource)
|
|
4866
|
-
qualified: 'client.
|
|
4870
|
+
stainlessPath: '(resource) indexes > (method) create',
|
|
4871
|
+
qualified: 'client.indexes.create',
|
|
4867
4872
|
params: [
|
|
4868
4873
|
'source_directory_id: string;',
|
|
4869
4874
|
'organization_id?: string;',
|
|
@@ -4876,34 +4881,34 @@ const EMBEDDED_METHODS = [
|
|
|
4876
4881
|
"vector_target?: 'DEFAULT' | 'DISABLED';",
|
|
4877
4882
|
],
|
|
4878
4883
|
response: '{ 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; }',
|
|
4879
|
-
markdown: "## create\n\n`client.
|
|
4884
|
+
markdown: "## 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```",
|
|
4880
4885
|
perLanguage: {
|
|
4881
4886
|
python: {
|
|
4882
|
-
method: '
|
|
4883
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.
|
|
4887
|
+
method: 'indexes.create',
|
|
4888
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.indexes.create(\n source_directory_id="dir-abc123",\n)\nprint(index.id)',
|
|
4884
4889
|
},
|
|
4885
4890
|
go: {
|
|
4886
|
-
method: 'client.
|
|
4887
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tindex, err := client.
|
|
4891
|
+
method: 'client.Indexes.New',
|
|
4892
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4888
4893
|
},
|
|
4889
4894
|
java: {
|
|
4890
|
-
method: '
|
|
4891
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
4895
|
+
method: 'indexes().create',
|
|
4896
|
+
example: '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}',
|
|
4892
4897
|
},
|
|
4893
4898
|
csharp: {
|
|
4894
|
-
method: '
|
|
4895
|
-
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.
|
|
4899
|
+
method: 'Indexes.Create',
|
|
4900
|
+
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
4896
4901
|
},
|
|
4897
4902
|
typescript: {
|
|
4898
|
-
method: 'client.
|
|
4899
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.
|
|
4903
|
+
method: 'client.indexes.create',
|
|
4904
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index.id);",
|
|
4900
4905
|
},
|
|
4901
4906
|
http: {
|
|
4902
4907
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "source_directory_id": "dir-abc123",\n "products": [\n {\n "product_config_id": "cfg-abc123",\n "product_type": "parse"\n }\n ],\n "store_attachments": [\n "screenshots"\n ],\n "sync_frequency": "manual",\n "vector_target": "DEFAULT"\n }\'',
|
|
4903
4908
|
},
|
|
4904
4909
|
cli: {
|
|
4905
4910
|
method: 'indexes create',
|
|
4906
|
-
example: "llp
|
|
4911
|
+
example: "llp indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
4907
4912
|
},
|
|
4908
4913
|
},
|
|
4909
4914
|
},
|
|
@@ -4913,38 +4918,79 @@ const EMBEDDED_METHODS = [
|
|
|
4913
4918
|
httpMethod: 'post',
|
|
4914
4919
|
summary: 'Sync Index',
|
|
4915
4920
|
description: 'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
4916
|
-
stainlessPath: '(resource)
|
|
4917
|
-
qualified: 'client.
|
|
4921
|
+
stainlessPath: '(resource) indexes > (method) sync',
|
|
4922
|
+
qualified: 'client.indexes.sync',
|
|
4918
4923
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4919
4924
|
response: 'object',
|
|
4920
|
-
markdown: "## sync\n\n`client.
|
|
4925
|
+
markdown: "## 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```",
|
|
4921
4926
|
perLanguage: {
|
|
4922
4927
|
python: {
|
|
4923
|
-
method: '
|
|
4924
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.
|
|
4928
|
+
method: 'indexes.sync',
|
|
4929
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.indexes.sync(\n index_id="index_id",\n)\nprint(response)',
|
|
4925
4930
|
},
|
|
4926
4931
|
go: {
|
|
4927
|
-
method: 'client.
|
|
4928
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
4932
|
+
method: 'client.Indexes.Sync',
|
|
4933
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4929
4934
|
},
|
|
4930
4935
|
java: {
|
|
4931
|
-
method: '
|
|
4932
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
4936
|
+
method: 'indexes().sync',
|
|
4937
|
+
example: '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}',
|
|
4933
4938
|
},
|
|
4934
4939
|
csharp: {
|
|
4935
|
-
method: '
|
|
4936
|
-
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.
|
|
4940
|
+
method: 'Indexes.Sync',
|
|
4941
|
+
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
4937
4942
|
},
|
|
4938
4943
|
typescript: {
|
|
4939
|
-
method: 'client.
|
|
4940
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.
|
|
4944
|
+
method: 'client.indexes.sync',
|
|
4945
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.indexes.sync('index_id');\n\nconsole.log(response);",
|
|
4941
4946
|
},
|
|
4942
4947
|
http: {
|
|
4943
4948
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4944
4949
|
},
|
|
4945
4950
|
cli: {
|
|
4946
4951
|
method: 'indexes sync',
|
|
4947
|
-
example: "llp
|
|
4952
|
+
example: "llp indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4953
|
+
},
|
|
4954
|
+
},
|
|
4955
|
+
},
|
|
4956
|
+
{
|
|
4957
|
+
name: 'cancel_sync',
|
|
4958
|
+
endpoint: '/api/v1/indexes/{index_id}/sync/cancel',
|
|
4959
|
+
httpMethod: 'post',
|
|
4960
|
+
summary: 'Cancel Index Sync',
|
|
4961
|
+
description: 'Cancel the running sync for an index. Returns 409 if no sync is running.',
|
|
4962
|
+
stainlessPath: '(resource) indexes > (method) cancel_sync',
|
|
4963
|
+
qualified: 'client.indexes.cancelSync',
|
|
4964
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4965
|
+
response: 'object',
|
|
4966
|
+
markdown: "## 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```",
|
|
4967
|
+
perLanguage: {
|
|
4968
|
+
python: {
|
|
4969
|
+
method: 'indexes.cancel_sync',
|
|
4970
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.indexes.cancel_sync(\n index_id="index_id",\n)\nprint(response)',
|
|
4971
|
+
},
|
|
4972
|
+
go: {
|
|
4973
|
+
method: 'client.Indexes.CancelSync',
|
|
4974
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4975
|
+
},
|
|
4976
|
+
java: {
|
|
4977
|
+
method: 'indexes().cancelSync',
|
|
4978
|
+
example: '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}',
|
|
4979
|
+
},
|
|
4980
|
+
csharp: {
|
|
4981
|
+
method: 'Indexes.CancelSync',
|
|
4982
|
+
example: 'IndexCancelSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.CancelSync(parameters);\n\nConsole.WriteLine(response);',
|
|
4983
|
+
},
|
|
4984
|
+
typescript: {
|
|
4985
|
+
method: 'client.indexes.cancelSync',
|
|
4986
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.indexes.cancelSync('index_id');\n\nconsole.log(response);",
|
|
4987
|
+
},
|
|
4988
|
+
http: {
|
|
4989
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4990
|
+
},
|
|
4991
|
+
cli: {
|
|
4992
|
+
method: 'indexes cancel_sync',
|
|
4993
|
+
example: "llp indexes cancel-sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4948
4994
|
},
|
|
4949
4995
|
},
|
|
4950
4996
|
},
|
|
@@ -4954,8 +5000,8 @@ const EMBEDDED_METHODS = [
|
|
|
4954
5000
|
httpMethod: 'get',
|
|
4955
5001
|
summary: 'List Indexes',
|
|
4956
5002
|
description: 'List indexes for the current project.',
|
|
4957
|
-
stainlessPath: '(resource)
|
|
4958
|
-
qualified: 'client.
|
|
5003
|
+
stainlessPath: '(resource) indexes > (method) list',
|
|
5004
|
+
qualified: 'client.indexes.list',
|
|
4959
5005
|
params: [
|
|
4960
5006
|
'organization_id?: string;',
|
|
4961
5007
|
'page_size?: number;',
|
|
@@ -4964,34 +5010,34 @@ const EMBEDDED_METHODS = [
|
|
|
4964
5010
|
'source_directory_id?: string;',
|
|
4965
5011
|
],
|
|
4966
5012
|
response: '{ 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; }',
|
|
4967
|
-
markdown: "## list\n\n`client.
|
|
5013
|
+
markdown: "## 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```",
|
|
4968
5014
|
perLanguage: {
|
|
4969
5015
|
python: {
|
|
4970
|
-
method: '
|
|
4971
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.
|
|
5016
|
+
method: 'indexes.list',
|
|
5017
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.indexes.list()\npage = page.items[0]\nprint(page.id)',
|
|
4972
5018
|
},
|
|
4973
5019
|
go: {
|
|
4974
|
-
method: 'client.
|
|
4975
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
5020
|
+
method: 'client.Indexes.List',
|
|
5021
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
4976
5022
|
},
|
|
4977
5023
|
java: {
|
|
4978
|
-
method: '
|
|
4979
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5024
|
+
method: 'indexes().list',
|
|
5025
|
+
example: '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}',
|
|
4980
5026
|
},
|
|
4981
5027
|
csharp: {
|
|
4982
|
-
method: '
|
|
4983
|
-
example: 'IndexListParams parameters = new();\n\nvar page = await client.
|
|
5028
|
+
method: 'Indexes.List',
|
|
5029
|
+
example: 'IndexListParams parameters = new();\n\nvar page = await client.Indexes.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
4984
5030
|
},
|
|
4985
5031
|
typescript: {
|
|
4986
|
-
method: 'client.
|
|
4987
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const indexListResponse of client.
|
|
5032
|
+
method: 'client.indexes.list',
|
|
5033
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const indexListResponse of client.indexes.list()) {\n console.log(indexListResponse.id);\n}",
|
|
4988
5034
|
},
|
|
4989
5035
|
http: {
|
|
4990
5036
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4991
5037
|
},
|
|
4992
5038
|
cli: {
|
|
4993
5039
|
method: 'indexes list',
|
|
4994
|
-
example: "llp
|
|
5040
|
+
example: "llp indexes list \\\n --api-key 'My API Key'",
|
|
4995
5041
|
},
|
|
4996
5042
|
},
|
|
4997
5043
|
},
|
|
@@ -5001,8 +5047,8 @@ const EMBEDDED_METHODS = [
|
|
|
5001
5047
|
httpMethod: 'post',
|
|
5002
5048
|
summary: 'Retrieve',
|
|
5003
5049
|
description: 'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
5004
|
-
stainlessPath: '(resource)
|
|
5005
|
-
qualified: 'client.
|
|
5050
|
+
stainlessPath: '(resource) retrieval > (method) retrieve',
|
|
5051
|
+
qualified: 'client.retrieval.retrieve',
|
|
5006
5052
|
params: [
|
|
5007
5053
|
'index_id: string;',
|
|
5008
5054
|
'query: string;',
|
|
@@ -5018,34 +5064,34 @@ const EMBEDDED_METHODS = [
|
|
|
5018
5064
|
'vector_pipeline_weight?: number;',
|
|
5019
5065
|
],
|
|
5020
5066
|
response: '{ results: { content: string; metadata?: object; rerank_score?: number; score?: number; static_fields?: { attachments?: object[]; chunk_end_char?: number; chunk_index?: number; chunk_start_char?: number; chunk_token_count?: number; page_range_end?: number; page_range_start?: number; parsed_directory_file_id?: string; }; }[]; }',
|
|
5021
|
-
markdown: "## retrieve\n\n`client.
|
|
5067
|
+
markdown: "## 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```",
|
|
5022
5068
|
perLanguage: {
|
|
5023
5069
|
python: {
|
|
5024
|
-
method: '
|
|
5025
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretrieval = client.
|
|
5070
|
+
method: 'retrieval.retrieve',
|
|
5071
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretrieval = client.retrieval.retrieve(\n index_id="idx-abc123",\n query="What are the key findings?",\n)\nprint(retrieval.results)',
|
|
5026
5072
|
},
|
|
5027
5073
|
go: {
|
|
5028
|
-
method: 'client.
|
|
5029
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tretrieval, err := client.
|
|
5074
|
+
method: 'client.Retrieval.Get',
|
|
5075
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5030
5076
|
},
|
|
5031
5077
|
java: {
|
|
5032
|
-
method: '
|
|
5033
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5078
|
+
method: 'retrieval().retrieve',
|
|
5079
|
+
example: '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}',
|
|
5034
5080
|
},
|
|
5035
5081
|
csharp: {
|
|
5036
|
-
method: '
|
|
5037
|
-
example: 'RetrievalRetrieveParams parameters = new()\n{\n IndexID = "idx-abc123",\n Query = "What are the key findings?",\n};\n\nvar retrieval = await client.
|
|
5082
|
+
method: 'Retrieval.Retrieve',
|
|
5083
|
+
example: '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);',
|
|
5038
5084
|
},
|
|
5039
5085
|
typescript: {
|
|
5040
|
-
method: 'client.
|
|
5041
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retrieval = await client.
|
|
5086
|
+
method: 'client.retrieval.retrieve',
|
|
5087
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retrieval = await client.retrieval.retrieve({\n index_id: 'idx-abc123',\n query: 'What are the key findings?',\n});\n\nconsole.log(retrieval.results);",
|
|
5042
5088
|
},
|
|
5043
5089
|
http: {
|
|
5044
5090
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123",\n "query": "What are the key findings?",\n "top_k": 10\n }\'',
|
|
5045
5091
|
},
|
|
5046
5092
|
cli: {
|
|
5047
5093
|
method: 'retrieval retrieve',
|
|
5048
|
-
example: "llp
|
|
5094
|
+
example: "llp retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
5049
5095
|
},
|
|
5050
5096
|
},
|
|
5051
5097
|
},
|
|
@@ -5055,8 +5101,8 @@ const EMBEDDED_METHODS = [
|
|
|
5055
5101
|
httpMethod: 'post',
|
|
5056
5102
|
summary: 'Find Files',
|
|
5057
5103
|
description: 'Search for files by name.',
|
|
5058
|
-
stainlessPath: '(resource)
|
|
5059
|
-
qualified: 'client.
|
|
5104
|
+
stainlessPath: '(resource) retrieval > (method) find',
|
|
5105
|
+
qualified: 'client.retrieval.find',
|
|
5060
5106
|
params: [
|
|
5061
5107
|
'index_id: string;',
|
|
5062
5108
|
'organization_id?: string;',
|
|
@@ -5067,34 +5113,34 @@ const EMBEDDED_METHODS = [
|
|
|
5067
5113
|
'page_token?: string;',
|
|
5068
5114
|
],
|
|
5069
5115
|
response: '{ file_id: string; file_name: string; }',
|
|
5070
|
-
markdown: "## find\n\n`client.
|
|
5116
|
+
markdown: "## 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```",
|
|
5071
5117
|
perLanguage: {
|
|
5072
5118
|
python: {
|
|
5073
|
-
method: '
|
|
5074
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.
|
|
5119
|
+
method: 'retrieval.find',
|
|
5120
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.retrieval.find(\n index_id="idx-abc123",\n)\npage = page.items[0]\nprint(page.file_id)',
|
|
5075
5121
|
},
|
|
5076
5122
|
go: {
|
|
5077
|
-
method: 'client.
|
|
5078
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
5123
|
+
method: 'client.Retrieval.Find',
|
|
5124
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5079
5125
|
},
|
|
5080
5126
|
java: {
|
|
5081
|
-
method: '
|
|
5082
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5127
|
+
method: 'retrieval().find',
|
|
5128
|
+
example: '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}',
|
|
5083
5129
|
},
|
|
5084
5130
|
csharp: {
|
|
5085
|
-
method: '
|
|
5086
|
-
example: 'RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };\n\nvar page = await client.
|
|
5131
|
+
method: 'Retrieval.Find',
|
|
5132
|
+
example: '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}',
|
|
5087
5133
|
},
|
|
5088
5134
|
typescript: {
|
|
5089
|
-
method: 'client.
|
|
5090
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.
|
|
5135
|
+
method: 'client.retrieval.find',
|
|
5136
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse.file_id);\n}",
|
|
5091
5137
|
},
|
|
5092
5138
|
http: {
|
|
5093
5139
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/find \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123"\n }\'',
|
|
5094
5140
|
},
|
|
5095
5141
|
cli: {
|
|
5096
5142
|
method: 'retrieval find',
|
|
5097
|
-
example: "llp
|
|
5143
|
+
example: "llp retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
5098
5144
|
},
|
|
5099
5145
|
},
|
|
5100
5146
|
},
|
|
@@ -5104,8 +5150,8 @@ const EMBEDDED_METHODS = [
|
|
|
5104
5150
|
httpMethod: 'post',
|
|
5105
5151
|
summary: 'Grep File',
|
|
5106
5152
|
description: "Grep within a file's parsed content using a regex pattern.",
|
|
5107
|
-
stainlessPath: '(resource)
|
|
5108
|
-
qualified: 'client.
|
|
5153
|
+
stainlessPath: '(resource) retrieval > (method) grep',
|
|
5154
|
+
qualified: 'client.retrieval.grep',
|
|
5109
5155
|
params: [
|
|
5110
5156
|
'file_id: string;',
|
|
5111
5157
|
'index_id: string;',
|
|
@@ -5117,34 +5163,34 @@ const EMBEDDED_METHODS = [
|
|
|
5117
5163
|
'page_token?: string;',
|
|
5118
5164
|
],
|
|
5119
5165
|
response: '{ content: string; end_char: number; start_char: number; }',
|
|
5120
|
-
markdown: "## grep\n\n`client.
|
|
5166
|
+
markdown: "## 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```",
|
|
5121
5167
|
perLanguage: {
|
|
5122
5168
|
python: {
|
|
5123
|
-
method: '
|
|
5124
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.
|
|
5169
|
+
method: 'retrieval.grep',
|
|
5170
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.retrieval.grep(\n file_id="file_id",\n index_id="idx-abc123",\n pattern="revenue|profit",\n)\npage = page.items[0]\nprint(page.content)',
|
|
5125
5171
|
},
|
|
5126
5172
|
go: {
|
|
5127
|
-
method: 'client.
|
|
5128
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
5173
|
+
method: 'client.Retrieval.Grep',
|
|
5174
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5129
5175
|
},
|
|
5130
5176
|
java: {
|
|
5131
|
-
method: '
|
|
5132
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5177
|
+
method: 'retrieval().grep',
|
|
5178
|
+
example: '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}',
|
|
5133
5179
|
},
|
|
5134
5180
|
csharp: {
|
|
5135
|
-
method: '
|
|
5136
|
-
example: 'RetrievalGrepParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n Pattern = "revenue|profit",\n};\n\nvar page = await client.
|
|
5181
|
+
method: 'Retrieval.Grep',
|
|
5182
|
+
example: '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}',
|
|
5137
5183
|
},
|
|
5138
5184
|
typescript: {
|
|
5139
|
-
method: 'client.
|
|
5140
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.
|
|
5185
|
+
method: 'client.retrieval.grep',
|
|
5186
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse.content);\n}",
|
|
5141
5187
|
},
|
|
5142
5188
|
http: {
|
|
5143
5189
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/grep \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123",\n "pattern": "revenue|profit"\n }\'',
|
|
5144
5190
|
},
|
|
5145
5191
|
cli: {
|
|
5146
5192
|
method: 'retrieval grep',
|
|
5147
|
-
example: "llp
|
|
5193
|
+
example: "llp retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'",
|
|
5148
5194
|
},
|
|
5149
5195
|
},
|
|
5150
5196
|
},
|
|
@@ -5154,8 +5200,8 @@ const EMBEDDED_METHODS = [
|
|
|
5154
5200
|
httpMethod: 'post',
|
|
5155
5201
|
summary: 'Read File',
|
|
5156
5202
|
description: 'Read the parsed text content of a specific file.',
|
|
5157
|
-
stainlessPath: '(resource)
|
|
5158
|
-
qualified: 'client.
|
|
5203
|
+
stainlessPath: '(resource) retrieval > (method) read',
|
|
5204
|
+
qualified: 'client.retrieval.read',
|
|
5159
5205
|
params: [
|
|
5160
5206
|
'file_id: string;',
|
|
5161
5207
|
'index_id: string;',
|
|
@@ -5165,34 +5211,34 @@ const EMBEDDED_METHODS = [
|
|
|
5165
5211
|
'offset?: number;',
|
|
5166
5212
|
],
|
|
5167
5213
|
response: '{ content: string; }',
|
|
5168
|
-
markdown: "## read\n\n`client.
|
|
5214
|
+
markdown: "## 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```",
|
|
5169
5215
|
perLanguage: {
|
|
5170
5216
|
python: {
|
|
5171
|
-
method: '
|
|
5172
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.
|
|
5217
|
+
method: 'retrieval.read',
|
|
5218
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.retrieval.read(\n file_id="file_id",\n index_id="idx-abc123",\n)\nprint(response.content)',
|
|
5173
5219
|
},
|
|
5174
5220
|
go: {
|
|
5175
|
-
method: 'client.
|
|
5176
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
5221
|
+
method: 'client.Retrieval.Read',
|
|
5222
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5177
5223
|
},
|
|
5178
5224
|
java: {
|
|
5179
|
-
method: '
|
|
5180
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5225
|
+
method: 'retrieval().read',
|
|
5226
|
+
example: '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}',
|
|
5181
5227
|
},
|
|
5182
5228
|
csharp: {
|
|
5183
|
-
method: '
|
|
5184
|
-
example: 'RetrievalReadParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n};\n\nvar response = await client.
|
|
5229
|
+
method: 'Retrieval.Read',
|
|
5230
|
+
example: '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);',
|
|
5185
5231
|
},
|
|
5186
5232
|
typescript: {
|
|
5187
|
-
method: 'client.
|
|
5188
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.
|
|
5233
|
+
method: 'client.retrieval.read',
|
|
5234
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response.content);",
|
|
5189
5235
|
},
|
|
5190
5236
|
http: {
|
|
5191
5237
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/read \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123"\n }\'',
|
|
5192
5238
|
},
|
|
5193
5239
|
cli: {
|
|
5194
5240
|
method: 'retrieval read',
|
|
5195
|
-
example: "llp
|
|
5241
|
+
example: "llp retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
5196
5242
|
},
|
|
5197
5243
|
},
|
|
5198
5244
|
},
|
|
@@ -5202,8 +5248,8 @@ const EMBEDDED_METHODS = [
|
|
|
5202
5248
|
httpMethod: 'get',
|
|
5203
5249
|
summary: 'List Sessions',
|
|
5204
5250
|
description: 'List all chat sessions for the current project.',
|
|
5205
|
-
stainlessPath: '(resource)
|
|
5206
|
-
qualified: 'client.
|
|
5251
|
+
stainlessPath: '(resource) chat > (method) list',
|
|
5252
|
+
qualified: 'client.chat.list',
|
|
5207
5253
|
params: [
|
|
5208
5254
|
'organization_id?: string;',
|
|
5209
5255
|
'page_size?: number;',
|
|
@@ -5211,34 +5257,34 @@ const EMBEDDED_METHODS = [
|
|
|
5211
5257
|
'project_id?: string;',
|
|
5212
5258
|
],
|
|
5213
5259
|
response: "{ 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; }; }",
|
|
5214
|
-
markdown: "## list\n\n`client.
|
|
5260
|
+
markdown: "## 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```",
|
|
5215
5261
|
perLanguage: {
|
|
5216
5262
|
python: {
|
|
5217
|
-
method: '
|
|
5218
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.
|
|
5263
|
+
method: 'chat.list',
|
|
5264
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.chat.list()\npage = page.items[0]\nprint(page.session_id)',
|
|
5219
5265
|
},
|
|
5220
5266
|
go: {
|
|
5221
|
-
method: 'client.
|
|
5222
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tpage, err := client.
|
|
5267
|
+
method: 'client.Chat.List',
|
|
5268
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5223
5269
|
},
|
|
5224
5270
|
java: {
|
|
5225
|
-
method: '
|
|
5226
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5271
|
+
method: 'chat().list',
|
|
5272
|
+
example: '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}',
|
|
5227
5273
|
},
|
|
5228
5274
|
csharp: {
|
|
5229
|
-
method: '
|
|
5230
|
-
example: 'ChatListParams parameters = new();\n\nvar page = await client.
|
|
5275
|
+
method: 'Chat.List',
|
|
5276
|
+
example: 'ChatListParams parameters = new();\n\nvar page = await client.Chat.List(parameters);\nawait foreach (var item in page.Paginate())\n{\n Console.WriteLine(item);\n}',
|
|
5231
5277
|
},
|
|
5232
5278
|
typescript: {
|
|
5233
|
-
method: 'client.
|
|
5234
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatListResponse of client.
|
|
5279
|
+
method: 'client.chat.list',
|
|
5280
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatListResponse of client.chat.list()) {\n console.log(chatListResponse.session_id);\n}",
|
|
5235
5281
|
},
|
|
5236
5282
|
http: {
|
|
5237
5283
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5238
5284
|
},
|
|
5239
5285
|
cli: {
|
|
5240
5286
|
method: 'chat list',
|
|
5241
|
-
example: "llp
|
|
5287
|
+
example: "llp chat list \\\n --api-key 'My API Key'",
|
|
5242
5288
|
},
|
|
5243
5289
|
},
|
|
5244
5290
|
},
|
|
@@ -5248,8 +5294,8 @@ const EMBEDDED_METHODS = [
|
|
|
5248
5294
|
httpMethod: 'post',
|
|
5249
5295
|
summary: 'Create Session',
|
|
5250
5296
|
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
5251
|
-
stainlessPath: '(resource)
|
|
5252
|
-
qualified: 'client.
|
|
5297
|
+
stainlessPath: '(resource) chat > (method) create',
|
|
5298
|
+
qualified: 'client.chat.create',
|
|
5253
5299
|
params: [
|
|
5254
5300
|
'organization_id?: string;',
|
|
5255
5301
|
'project_id?: string;',
|
|
@@ -5257,34 +5303,34 @@ const EMBEDDED_METHODS = [
|
|
|
5257
5303
|
"shared_access?: 'query' | 'read_only';",
|
|
5258
5304
|
],
|
|
5259
5305
|
response: "{ 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; }; }",
|
|
5260
|
-
markdown: "## create\n\n`client.
|
|
5306
|
+
markdown: "## 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```",
|
|
5261
5307
|
perLanguage: {
|
|
5262
5308
|
python: {
|
|
5263
|
-
method: '
|
|
5264
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.
|
|
5309
|
+
method: 'chat.create',
|
|
5310
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.chat.create()\nprint(chat.session_id)',
|
|
5265
5311
|
},
|
|
5266
5312
|
go: {
|
|
5267
|
-
method: 'client.
|
|
5268
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.
|
|
5313
|
+
method: 'client.Chat.New',
|
|
5314
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5269
5315
|
},
|
|
5270
5316
|
java: {
|
|
5271
|
-
method: '
|
|
5272
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5317
|
+
method: 'chat().create',
|
|
5318
|
+
example: '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}',
|
|
5273
5319
|
},
|
|
5274
5320
|
csharp: {
|
|
5275
|
-
method: '
|
|
5276
|
-
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.
|
|
5321
|
+
method: 'Chat.Create',
|
|
5322
|
+
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
5277
5323
|
},
|
|
5278
5324
|
typescript: {
|
|
5279
|
-
method: 'client.
|
|
5280
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.
|
|
5325
|
+
method: 'client.chat.create',
|
|
5326
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.chat.create();\n\nconsole.log(chat.session_id);",
|
|
5281
5327
|
},
|
|
5282
5328
|
http: {
|
|
5283
5329
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5284
5330
|
},
|
|
5285
5331
|
cli: {
|
|
5286
5332
|
method: 'chat create',
|
|
5287
|
-
example: "llp
|
|
5333
|
+
example: "llp chat create \\\n --api-key 'My API Key'",
|
|
5288
5334
|
},
|
|
5289
5335
|
},
|
|
5290
5336
|
},
|
|
@@ -5294,38 +5340,38 @@ const EMBEDDED_METHODS = [
|
|
|
5294
5340
|
httpMethod: 'get',
|
|
5295
5341
|
summary: 'Get Full Session',
|
|
5296
5342
|
description: 'Retrieve a full session by ID, including its event history.',
|
|
5297
|
-
stainlessPath: '(resource)
|
|
5298
|
-
qualified: 'client.
|
|
5343
|
+
stainlessPath: '(resource) chat > (method) retrieve',
|
|
5344
|
+
qualified: 'client.chat.retrieve',
|
|
5299
5345
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5300
5346
|
response: "{ 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; }; }",
|
|
5301
|
-
markdown: "## retrieve\n\n`client.
|
|
5347
|
+
markdown: "## 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```",
|
|
5302
5348
|
perLanguage: {
|
|
5303
5349
|
python: {
|
|
5304
|
-
method: '
|
|
5305
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.
|
|
5350
|
+
method: 'chat.retrieve',
|
|
5351
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.chat.retrieve(\n session_id="session_id",\n)\nprint(chat.session_id)',
|
|
5306
5352
|
},
|
|
5307
5353
|
go: {
|
|
5308
|
-
method: 'client.
|
|
5309
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tchat, err := client.
|
|
5354
|
+
method: 'client.Chat.Get',
|
|
5355
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5310
5356
|
},
|
|
5311
5357
|
java: {
|
|
5312
|
-
method: '
|
|
5313
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5358
|
+
method: 'chat().retrieve',
|
|
5359
|
+
example: '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}',
|
|
5314
5360
|
},
|
|
5315
5361
|
csharp: {
|
|
5316
|
-
method: '
|
|
5317
|
-
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.
|
|
5362
|
+
method: 'Chat.Retrieve',
|
|
5363
|
+
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
5318
5364
|
},
|
|
5319
5365
|
typescript: {
|
|
5320
|
-
method: 'client.
|
|
5321
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.
|
|
5366
|
+
method: 'client.chat.retrieve',
|
|
5367
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.chat.retrieve('session_id');\n\nconsole.log(chat.session_id);",
|
|
5322
5368
|
},
|
|
5323
5369
|
http: {
|
|
5324
5370
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5325
5371
|
},
|
|
5326
5372
|
cli: {
|
|
5327
5373
|
method: 'chat retrieve',
|
|
5328
|
-
example: "llp
|
|
5374
|
+
example: "llp chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5329
5375
|
},
|
|
5330
5376
|
},
|
|
5331
5377
|
},
|
|
@@ -5335,37 +5381,37 @@ const EMBEDDED_METHODS = [
|
|
|
5335
5381
|
httpMethod: 'delete',
|
|
5336
5382
|
summary: 'Delete Session',
|
|
5337
5383
|
description: 'Delete a session.',
|
|
5338
|
-
stainlessPath: '(resource)
|
|
5339
|
-
qualified: 'client.
|
|
5384
|
+
stainlessPath: '(resource) chat > (method) delete',
|
|
5385
|
+
qualified: 'client.chat.delete',
|
|
5340
5386
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5341
|
-
markdown: "## delete\n\n`client.
|
|
5387
|
+
markdown: "## 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```",
|
|
5342
5388
|
perLanguage: {
|
|
5343
5389
|
python: {
|
|
5344
|
-
method: '
|
|
5345
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.
|
|
5390
|
+
method: 'chat.delete',
|
|
5391
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.chat.delete(\n session_id="session_id",\n)',
|
|
5346
5392
|
},
|
|
5347
5393
|
go: {
|
|
5348
|
-
method: 'client.
|
|
5349
|
-
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\terr := client.
|
|
5394
|
+
method: 'client.Chat.Delete',
|
|
5395
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5350
5396
|
},
|
|
5351
5397
|
java: {
|
|
5352
|
-
method: '
|
|
5353
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5398
|
+
method: 'chat().delete',
|
|
5399
|
+
example: '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}',
|
|
5354
5400
|
},
|
|
5355
5401
|
csharp: {
|
|
5356
|
-
method: '
|
|
5357
|
-
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.
|
|
5402
|
+
method: 'Chat.Delete',
|
|
5403
|
+
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Chat.Delete(parameters);',
|
|
5358
5404
|
},
|
|
5359
5405
|
typescript: {
|
|
5360
|
-
method: 'client.
|
|
5361
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.
|
|
5406
|
+
method: 'client.chat.delete',
|
|
5407
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.chat.delete('session_id');",
|
|
5362
5408
|
},
|
|
5363
5409
|
http: {
|
|
5364
5410
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5365
5411
|
},
|
|
5366
5412
|
cli: {
|
|
5367
5413
|
method: 'chat delete',
|
|
5368
|
-
example: "llp
|
|
5414
|
+
example: "llp chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5369
5415
|
},
|
|
5370
5416
|
},
|
|
5371
5417
|
},
|
|
@@ -5375,38 +5421,38 @@ const EMBEDDED_METHODS = [
|
|
|
5375
5421
|
httpMethod: 'get',
|
|
5376
5422
|
summary: 'Get Session Summary',
|
|
5377
5423
|
description: 'Retrieve a session summary by ID.',
|
|
5378
|
-
stainlessPath: '(resource)
|
|
5379
|
-
qualified: 'client.
|
|
5424
|
+
stainlessPath: '(resource) chat > (method) get_summary',
|
|
5425
|
+
qualified: 'client.chat.getSummary',
|
|
5380
5426
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5381
5427
|
response: "{ 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; }; }",
|
|
5382
|
-
markdown: "## get_summary\n\n`client.
|
|
5428
|
+
markdown: "## 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```",
|
|
5383
5429
|
perLanguage: {
|
|
5384
5430
|
python: {
|
|
5385
|
-
method: '
|
|
5386
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.
|
|
5431
|
+
method: 'chat.get_summary',
|
|
5432
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.chat.get_summary(\n session_id="session_id",\n)\nprint(response.session_id)',
|
|
5387
5433
|
},
|
|
5388
5434
|
go: {
|
|
5389
|
-
method: 'client.
|
|
5390
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
5435
|
+
method: 'client.Chat.GetSummary',
|
|
5436
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5391
5437
|
},
|
|
5392
5438
|
java: {
|
|
5393
|
-
method: '
|
|
5394
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5439
|
+
method: 'chat().getSummary',
|
|
5440
|
+
example: '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}',
|
|
5395
5441
|
},
|
|
5396
5442
|
csharp: {
|
|
5397
|
-
method: '
|
|
5398
|
-
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.
|
|
5443
|
+
method: 'Chat.GetSummary',
|
|
5444
|
+
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
5399
5445
|
},
|
|
5400
5446
|
typescript: {
|
|
5401
|
-
method: 'client.
|
|
5402
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.
|
|
5447
|
+
method: 'client.chat.getSummary',
|
|
5448
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.chat.getSummary('session_id');\n\nconsole.log(response.session_id);",
|
|
5403
5449
|
},
|
|
5404
5450
|
http: {
|
|
5405
5451
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5406
5452
|
},
|
|
5407
5453
|
cli: {
|
|
5408
5454
|
method: 'chat get_summary',
|
|
5409
|
-
example: "llp
|
|
5455
|
+
example: "llp chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5410
5456
|
},
|
|
5411
5457
|
},
|
|
5412
5458
|
},
|
|
@@ -5416,8 +5462,8 @@ const EMBEDDED_METHODS = [
|
|
|
5416
5462
|
httpMethod: 'post',
|
|
5417
5463
|
summary: 'Stream Messages',
|
|
5418
5464
|
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
5419
|
-
stainlessPath: '(resource)
|
|
5420
|
-
qualified: 'client.
|
|
5465
|
+
stainlessPath: '(resource) chat > (method) stream',
|
|
5466
|
+
qualified: 'client.chat.stream',
|
|
5421
5467
|
params: [
|
|
5422
5468
|
'session_id: string;',
|
|
5423
5469
|
'index_ids: string[];',
|
|
@@ -5427,54 +5473,742 @@ const EMBEDDED_METHODS = [
|
|
|
5427
5473
|
'require_all_indexes?: boolean;',
|
|
5428
5474
|
],
|
|
5429
5475
|
response: 'object',
|
|
5430
|
-
markdown: "## stream\n\n`client.
|
|
5476
|
+
markdown: "## 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```",
|
|
5431
5477
|
perLanguage: {
|
|
5432
5478
|
python: {
|
|
5433
|
-
method: '
|
|
5434
|
-
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.
|
|
5479
|
+
method: 'chat.stream',
|
|
5480
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.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)',
|
|
5435
5481
|
},
|
|
5436
5482
|
go: {
|
|
5437
|
-
method: 'client.
|
|
5438
|
-
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := llamacloud.NewClient(\n\t\toption.WithAPIKey("My API Key"),\n\t)\n\tresponse, err := client.
|
|
5483
|
+
method: 'client.Chat.Stream',
|
|
5484
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5439
5485
|
},
|
|
5440
5486
|
java: {
|
|
5441
|
-
method: '
|
|
5442
|
-
example: 'package ai.llamaindex.llamacloud.example;\n\nimport ai.llamaindex.llamacloud.client.LlamaCloudClient;\nimport ai.llamaindex.llamacloud.client.okhttp.LlamaCloudOkHttpClient;\nimport ai.llamaindex.llamacloud.models.
|
|
5487
|
+
method: 'chat().stream',
|
|
5488
|
+
example: '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}',
|
|
5443
5489
|
},
|
|
5444
5490
|
csharp: {
|
|
5445
|
-
method: '
|
|
5446
|
-
example: '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.
|
|
5491
|
+
method: 'Chat.Stream',
|
|
5492
|
+
example: '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);',
|
|
5447
5493
|
},
|
|
5448
5494
|
typescript: {
|
|
5449
|
-
method: 'client.
|
|
5450
|
-
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.
|
|
5495
|
+
method: 'client.chat.stream',
|
|
5496
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.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);",
|
|
5451
5497
|
},
|
|
5452
5498
|
http: {
|
|
5453
5499
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/messages/stream \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_ids": [\n "idx-abc123",\n "idx-def456"\n ],\n "prompt": "What were the main findings in Q3?",\n "require_all_indexes": true\n }\'',
|
|
5454
5500
|
},
|
|
5455
5501
|
cli: {
|
|
5456
5502
|
method: 'chat stream',
|
|
5457
|
-
example: "llp
|
|
5503
|
+
example: "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?'",
|
|
5458
5504
|
},
|
|
5459
5505
|
},
|
|
5460
5506
|
},
|
|
5461
5507
|
{
|
|
5462
|
-
name: '
|
|
5463
|
-
endpoint: '/api/v1/
|
|
5508
|
+
name: 'get',
|
|
5509
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
5464
5510
|
httpMethod: 'get',
|
|
5465
|
-
summary: '
|
|
5466
|
-
description: '
|
|
5467
|
-
stainlessPath: '(resource) beta.
|
|
5468
|
-
qualified: 'client.beta.
|
|
5511
|
+
summary: 'Get Index',
|
|
5512
|
+
description: 'Get an index by ID.',
|
|
5513
|
+
stainlessPath: '(resource) beta.indexes > (method) get',
|
|
5514
|
+
qualified: 'client.beta.indexes.get',
|
|
5469
5515
|
params: [
|
|
5470
|
-
'
|
|
5516
|
+
'index_id: string;',
|
|
5517
|
+
"expand?: 'sync_in_progress'[];",
|
|
5471
5518
|
'organization_id?: string;',
|
|
5472
|
-
'page_size?: number;',
|
|
5473
|
-
'page_token?: string;',
|
|
5474
5519
|
'project_id?: string;',
|
|
5475
5520
|
],
|
|
5476
|
-
response: '{ name: string;
|
|
5477
|
-
markdown: "##
|
|
5521
|
+
response: '{ 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; }',
|
|
5522
|
+
markdown: "## 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```",
|
|
5523
|
+
perLanguage: {
|
|
5524
|
+
python: {
|
|
5525
|
+
method: 'beta.indexes.get',
|
|
5526
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.beta.indexes.get(\n index_id="index_id",\n)\nprint(index.id)',
|
|
5527
|
+
},
|
|
5528
|
+
go: {
|
|
5529
|
+
method: 'client.Beta.Indexes.Get',
|
|
5530
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5531
|
+
},
|
|
5532
|
+
java: {
|
|
5533
|
+
method: 'beta().indexes().get',
|
|
5534
|
+
example: '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}',
|
|
5535
|
+
},
|
|
5536
|
+
csharp: {
|
|
5537
|
+
method: 'Beta.Indexes.Get',
|
|
5538
|
+
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Beta.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
5539
|
+
},
|
|
5540
|
+
typescript: {
|
|
5541
|
+
method: 'client.beta.indexes.get',
|
|
5542
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.beta.indexes.get('index_id');\n\nconsole.log(index.id);",
|
|
5543
|
+
},
|
|
5544
|
+
http: {
|
|
5545
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5546
|
+
},
|
|
5547
|
+
cli: {
|
|
5548
|
+
method: 'indexes get',
|
|
5549
|
+
example: "llp beta:indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5550
|
+
},
|
|
5551
|
+
},
|
|
5552
|
+
},
|
|
5553
|
+
{
|
|
5554
|
+
name: 'delete',
|
|
5555
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
5556
|
+
httpMethod: 'delete',
|
|
5557
|
+
summary: 'Delete Index',
|
|
5558
|
+
description: 'Delete an index.',
|
|
5559
|
+
stainlessPath: '(resource) beta.indexes > (method) delete',
|
|
5560
|
+
qualified: 'client.beta.indexes.delete',
|
|
5561
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5562
|
+
markdown: "## delete\n\n`client.beta.indexes.delete(index_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/indexes/{index_id}`\n\nDelete an index.\n\n### Parameters\n\n- `index_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.indexes.delete('index_id')\n```",
|
|
5563
|
+
perLanguage: {
|
|
5564
|
+
python: {
|
|
5565
|
+
method: 'beta.indexes.delete',
|
|
5566
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.indexes.delete(\n index_id="index_id",\n)',
|
|
5567
|
+
},
|
|
5568
|
+
go: {
|
|
5569
|
+
method: 'client.Beta.Indexes.Delete',
|
|
5570
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5571
|
+
},
|
|
5572
|
+
java: {
|
|
5573
|
+
method: 'beta().indexes().delete',
|
|
5574
|
+
example: '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}',
|
|
5575
|
+
},
|
|
5576
|
+
csharp: {
|
|
5577
|
+
method: 'Beta.Indexes.Delete',
|
|
5578
|
+
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Beta.Indexes.Delete(parameters);',
|
|
5579
|
+
},
|
|
5580
|
+
typescript: {
|
|
5581
|
+
method: 'client.beta.indexes.delete',
|
|
5582
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.indexes.delete('index_id');",
|
|
5583
|
+
},
|
|
5584
|
+
http: {
|
|
5585
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5586
|
+
},
|
|
5587
|
+
cli: {
|
|
5588
|
+
method: 'indexes delete',
|
|
5589
|
+
example: "llp beta:indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5590
|
+
},
|
|
5591
|
+
},
|
|
5592
|
+
},
|
|
5593
|
+
{
|
|
5594
|
+
name: 'create',
|
|
5595
|
+
endpoint: '/api/v1/indexes',
|
|
5596
|
+
httpMethod: 'post',
|
|
5597
|
+
summary: 'Create Index',
|
|
5598
|
+
description: 'Create a searchable index over a source directory.',
|
|
5599
|
+
stainlessPath: '(resource) beta.indexes > (method) create',
|
|
5600
|
+
qualified: 'client.beta.indexes.create',
|
|
5601
|
+
params: [
|
|
5602
|
+
'source_directory_id: string;',
|
|
5603
|
+
'organization_id?: string;',
|
|
5604
|
+
'project_id?: string;',
|
|
5605
|
+
'description?: string;',
|
|
5606
|
+
'name?: string;',
|
|
5607
|
+
'products?: { product_config_id: string; product_type: string; }[];',
|
|
5608
|
+
'store_attachments?: string[];',
|
|
5609
|
+
'sync_frequency?: string;',
|
|
5610
|
+
"vector_target?: 'DEFAULT' | 'DISABLED';",
|
|
5611
|
+
],
|
|
5612
|
+
response: '{ 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; }',
|
|
5613
|
+
markdown: "## create\n\n`client.beta.indexes.create(source_directory_id: string, organization_id?: string, project_id?: string, description?: string, name?: string, products?: { product_config_id: string; product_type: string; }[], store_attachments?: string[], sync_frequency?: string, vector_target?: 'DEFAULT' | 'DISABLED'): { id: string; export_config_id: string; name: string; 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```",
|
|
5614
|
+
perLanguage: {
|
|
5615
|
+
python: {
|
|
5616
|
+
method: 'beta.indexes.create',
|
|
5617
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nindex = client.beta.indexes.create(\n source_directory_id="dir-abc123",\n)\nprint(index.id)',
|
|
5618
|
+
},
|
|
5619
|
+
go: {
|
|
5620
|
+
method: 'client.Beta.Indexes.New',
|
|
5621
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5622
|
+
},
|
|
5623
|
+
java: {
|
|
5624
|
+
method: 'beta().indexes().create',
|
|
5625
|
+
example: '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}',
|
|
5626
|
+
},
|
|
5627
|
+
csharp: {
|
|
5628
|
+
method: 'Beta.Indexes.Create',
|
|
5629
|
+
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Beta.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
5630
|
+
},
|
|
5631
|
+
typescript: {
|
|
5632
|
+
method: 'client.beta.indexes.create',
|
|
5633
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst index = await client.beta.indexes.create({ source_directory_id: 'dir-abc123' });\n\nconsole.log(index.id);",
|
|
5634
|
+
},
|
|
5635
|
+
http: {
|
|
5636
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "source_directory_id": "dir-abc123",\n "products": [\n {\n "product_config_id": "cfg-abc123",\n "product_type": "parse"\n }\n ],\n "store_attachments": [\n "screenshots"\n ],\n "sync_frequency": "manual",\n "vector_target": "DEFAULT"\n }\'',
|
|
5637
|
+
},
|
|
5638
|
+
cli: {
|
|
5639
|
+
method: 'indexes create',
|
|
5640
|
+
example: "llp beta:indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
5641
|
+
},
|
|
5642
|
+
},
|
|
5643
|
+
},
|
|
5644
|
+
{
|
|
5645
|
+
name: 'sync',
|
|
5646
|
+
endpoint: '/api/v1/indexes/{index_id}/sync',
|
|
5647
|
+
httpMethod: 'post',
|
|
5648
|
+
summary: 'Sync Index',
|
|
5649
|
+
description: 'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
5650
|
+
stainlessPath: '(resource) beta.indexes > (method) sync',
|
|
5651
|
+
qualified: 'client.beta.indexes.sync',
|
|
5652
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5653
|
+
response: 'object',
|
|
5654
|
+
markdown: "## sync\n\n`client.beta.indexes.sync(index_id: string, organization_id?: string, project_id?: string): object`\n\n**post** `/api/v1/indexes/{index_id}/sync`\n\nTrigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.\n\n### Parameters\n\n- `index_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Returns\n\n- `object`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.indexes.sync('index_id');\n\nconsole.log(response);\n```",
|
|
5655
|
+
perLanguage: {
|
|
5656
|
+
python: {
|
|
5657
|
+
method: 'beta.indexes.sync',
|
|
5658
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.indexes.sync(\n index_id="index_id",\n)\nprint(response)',
|
|
5659
|
+
},
|
|
5660
|
+
go: {
|
|
5661
|
+
method: 'client.Beta.Indexes.Sync',
|
|
5662
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5663
|
+
},
|
|
5664
|
+
java: {
|
|
5665
|
+
method: 'beta().indexes().sync',
|
|
5666
|
+
example: '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}',
|
|
5667
|
+
},
|
|
5668
|
+
csharp: {
|
|
5669
|
+
method: 'Beta.Indexes.Sync',
|
|
5670
|
+
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Beta.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
5671
|
+
},
|
|
5672
|
+
typescript: {
|
|
5673
|
+
method: 'client.beta.indexes.sync',
|
|
5674
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.indexes.sync('index_id');\n\nconsole.log(response);",
|
|
5675
|
+
},
|
|
5676
|
+
http: {
|
|
5677
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5678
|
+
},
|
|
5679
|
+
cli: {
|
|
5680
|
+
method: 'indexes sync',
|
|
5681
|
+
example: "llp beta:indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5682
|
+
},
|
|
5683
|
+
},
|
|
5684
|
+
},
|
|
5685
|
+
{
|
|
5686
|
+
name: 'list',
|
|
5687
|
+
endpoint: '/api/v1/indexes',
|
|
5688
|
+
httpMethod: 'get',
|
|
5689
|
+
summary: 'List Indexes',
|
|
5690
|
+
description: 'List indexes for the current project.',
|
|
5691
|
+
stainlessPath: '(resource) beta.indexes > (method) list',
|
|
5692
|
+
qualified: 'client.beta.indexes.list',
|
|
5693
|
+
params: [
|
|
5694
|
+
'organization_id?: string;',
|
|
5695
|
+
'page_size?: number;',
|
|
5696
|
+
'page_token?: string;',
|
|
5697
|
+
'project_id?: string;',
|
|
5698
|
+
'source_directory_id?: string;',
|
|
5699
|
+
],
|
|
5700
|
+
response: '{ 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; }',
|
|
5701
|
+
markdown: "## list\n\n`client.beta.indexes.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string, source_directory_id?: string): { id: string; export_config_id: string; name: string; 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```",
|
|
5702
|
+
perLanguage: {
|
|
5703
|
+
python: {
|
|
5704
|
+
method: 'beta.indexes.list',
|
|
5705
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.indexes.list()\npage = page.items[0]\nprint(page.id)',
|
|
5706
|
+
},
|
|
5707
|
+
go: {
|
|
5708
|
+
method: 'client.Beta.Indexes.List',
|
|
5709
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5710
|
+
},
|
|
5711
|
+
java: {
|
|
5712
|
+
method: 'beta().indexes().list',
|
|
5713
|
+
example: '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}',
|
|
5714
|
+
},
|
|
5715
|
+
csharp: {
|
|
5716
|
+
method: 'Beta.Indexes.List',
|
|
5717
|
+
example: '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}',
|
|
5718
|
+
},
|
|
5719
|
+
typescript: {
|
|
5720
|
+
method: 'client.beta.indexes.list',
|
|
5721
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const indexListResponse of client.beta.indexes.list()) {\n console.log(indexListResponse.id);\n}",
|
|
5722
|
+
},
|
|
5723
|
+
http: {
|
|
5724
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5725
|
+
},
|
|
5726
|
+
cli: {
|
|
5727
|
+
method: 'indexes list',
|
|
5728
|
+
example: "llp beta:indexes list \\\n --api-key 'My API Key'",
|
|
5729
|
+
},
|
|
5730
|
+
},
|
|
5731
|
+
},
|
|
5732
|
+
{
|
|
5733
|
+
name: 'retrieve',
|
|
5734
|
+
endpoint: '/api/v1/retrieval/retrieve',
|
|
5735
|
+
httpMethod: 'post',
|
|
5736
|
+
summary: 'Retrieve',
|
|
5737
|
+
description: 'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
5738
|
+
stainlessPath: '(resource) beta.retrieval > (method) retrieve',
|
|
5739
|
+
qualified: 'client.beta.retrieval.retrieve',
|
|
5740
|
+
params: [
|
|
5741
|
+
'index_id: string;',
|
|
5742
|
+
'query: string;',
|
|
5743
|
+
'organization_id?: string;',
|
|
5744
|
+
'project_id?: string;',
|
|
5745
|
+
'custom_filters?: object;',
|
|
5746
|
+
'full_text_pipeline_weight?: number;',
|
|
5747
|
+
'num_candidates?: number;',
|
|
5748
|
+
'rerank?: { enabled?: boolean; top_n?: number; };',
|
|
5749
|
+
'score_threshold?: number;',
|
|
5750
|
+
"static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; };",
|
|
5751
|
+
'top_k?: number;',
|
|
5752
|
+
'vector_pipeline_weight?: number;',
|
|
5753
|
+
],
|
|
5754
|
+
response: '{ results: { content: string; metadata?: object; rerank_score?: number; score?: number; static_fields?: { attachments?: object[]; chunk_end_char?: number; chunk_index?: number; chunk_start_char?: number; chunk_token_count?: number; page_range_end?: number; page_range_start?: number; parsed_directory_file_id?: string; }; }[]; }',
|
|
5755
|
+
markdown: "## retrieve\n\n`client.beta.retrieval.retrieve(index_id: string, query: string, organization_id?: string, project_id?: string, custom_filters?: object, full_text_pipeline_weight?: number, num_candidates?: number, rerank?: { enabled?: boolean; top_n?: number; }, score_threshold?: number, static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; }, top_k?: number, vector_pipeline_weight?: number): { results: object[]; }`\n\n**post** `/api/v1/retrieval/retrieve`\n\nRetrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.\n\n### Parameters\n\n- `index_id: string`\n ID of the index to retrieve against.\n\n- `query: string`\n Natural-language query to retrieve relevant chunks.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `custom_filters?: object`\n Filters on user-defined metadata fields.\n\n- `full_text_pipeline_weight?: number`\n Weight of the full-text search pipeline (0-1).\n\n- `num_candidates?: number`\n Number of candidates for approximate nearest neighbor search.\n\n- `rerank?: { enabled?: boolean; top_n?: number; }`\n Reranking configuration applied after hybrid search. Enabled by default.\n - `enabled?: boolean`\n Set to false to disable reranking.\n - `top_n?: number`\n Number of results to return after reranking.\n\n- `score_threshold?: number`\n Minimum score threshold for returned results.\n\n- `static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; }`\n Filters on built-in document fields (page range, chunk index, etc.).\n - `parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }`\n 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```",
|
|
5756
|
+
perLanguage: {
|
|
5757
|
+
python: {
|
|
5758
|
+
method: 'beta.retrieval.retrieve',
|
|
5759
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nretrieval = client.beta.retrieval.retrieve(\n index_id="idx-abc123",\n query="What are the key findings?",\n)\nprint(retrieval.results)',
|
|
5760
|
+
},
|
|
5761
|
+
go: {
|
|
5762
|
+
method: 'client.Beta.Retrieval.Get',
|
|
5763
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5764
|
+
},
|
|
5765
|
+
java: {
|
|
5766
|
+
method: 'beta().retrieval().retrieve',
|
|
5767
|
+
example: '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}',
|
|
5768
|
+
},
|
|
5769
|
+
csharp: {
|
|
5770
|
+
method: 'Beta.Retrieval.Retrieve',
|
|
5771
|
+
example: '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);',
|
|
5772
|
+
},
|
|
5773
|
+
typescript: {
|
|
5774
|
+
method: 'client.beta.retrieval.retrieve',
|
|
5775
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst retrieval = await client.beta.retrieval.retrieve({\n index_id: 'idx-abc123',\n query: 'What are the key findings?',\n});\n\nconsole.log(retrieval.results);",
|
|
5776
|
+
},
|
|
5777
|
+
http: {
|
|
5778
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/retrieve \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123",\n "query": "What are the key findings?",\n "top_k": 10\n }\'',
|
|
5779
|
+
},
|
|
5780
|
+
cli: {
|
|
5781
|
+
method: 'retrieval retrieve',
|
|
5782
|
+
example: "llp beta:retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
5783
|
+
},
|
|
5784
|
+
},
|
|
5785
|
+
},
|
|
5786
|
+
{
|
|
5787
|
+
name: 'find',
|
|
5788
|
+
endpoint: '/api/v1/retrieval/files/find',
|
|
5789
|
+
httpMethod: 'post',
|
|
5790
|
+
summary: 'Find Files',
|
|
5791
|
+
description: 'Search for files by name.',
|
|
5792
|
+
stainlessPath: '(resource) beta.retrieval > (method) find',
|
|
5793
|
+
qualified: 'client.beta.retrieval.find',
|
|
5794
|
+
params: [
|
|
5795
|
+
'index_id: string;',
|
|
5796
|
+
'organization_id?: string;',
|
|
5797
|
+
'project_id?: string;',
|
|
5798
|
+
'file_name?: string;',
|
|
5799
|
+
'file_name_contains?: string;',
|
|
5800
|
+
'page_size?: number;',
|
|
5801
|
+
'page_token?: string;',
|
|
5802
|
+
],
|
|
5803
|
+
response: '{ file_id: string; file_name: string; }',
|
|
5804
|
+
markdown: "## find\n\n`client.beta.retrieval.find(index_id: string, organization_id?: string, project_id?: string, file_name?: string, file_name_contains?: string, page_size?: number, page_token?: string): { file_id: string; file_name: string; }`\n\n**post** `/api/v1/retrieval/files/find`\n\nSearch for files by name.\n\n### Parameters\n\n- `index_id: string`\n ID of the index to search within.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `file_name?: string`\n Exact file name to match.\n\n- `file_name_contains?: string`\n Substring match on file name (case-insensitive).\n\n- `page_size?: number`\n The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ file_id: string; file_name: string; }`\n A file returned by find.\n\n - `file_id: string`\n - `file_name: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.beta.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse);\n}\n```",
|
|
5805
|
+
perLanguage: {
|
|
5806
|
+
python: {
|
|
5807
|
+
method: 'beta.retrieval.find',
|
|
5808
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.retrieval.find(\n index_id="idx-abc123",\n)\npage = page.items[0]\nprint(page.file_id)',
|
|
5809
|
+
},
|
|
5810
|
+
go: {
|
|
5811
|
+
method: 'client.Beta.Retrieval.Find',
|
|
5812
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5813
|
+
},
|
|
5814
|
+
java: {
|
|
5815
|
+
method: 'beta().retrieval().find',
|
|
5816
|
+
example: '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}',
|
|
5817
|
+
},
|
|
5818
|
+
csharp: {
|
|
5819
|
+
method: 'Beta.Retrieval.Find',
|
|
5820
|
+
example: '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}',
|
|
5821
|
+
},
|
|
5822
|
+
typescript: {
|
|
5823
|
+
method: 'client.beta.retrieval.find',
|
|
5824
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalFindResponse of client.beta.retrieval.find({ index_id: 'idx-abc123' })) {\n console.log(retrievalFindResponse.file_id);\n}",
|
|
5825
|
+
},
|
|
5826
|
+
http: {
|
|
5827
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/find \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_id": "idx-abc123"\n }\'',
|
|
5828
|
+
},
|
|
5829
|
+
cli: {
|
|
5830
|
+
method: 'retrieval find',
|
|
5831
|
+
example: "llp beta:retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
5832
|
+
},
|
|
5833
|
+
},
|
|
5834
|
+
},
|
|
5835
|
+
{
|
|
5836
|
+
name: 'grep',
|
|
5837
|
+
endpoint: '/api/v1/retrieval/files/grep',
|
|
5838
|
+
httpMethod: 'post',
|
|
5839
|
+
summary: 'Grep File',
|
|
5840
|
+
description: "Grep within a file's parsed content using a regex pattern.",
|
|
5841
|
+
stainlessPath: '(resource) beta.retrieval > (method) grep',
|
|
5842
|
+
qualified: 'client.beta.retrieval.grep',
|
|
5843
|
+
params: [
|
|
5844
|
+
'file_id: string;',
|
|
5845
|
+
'index_id: string;',
|
|
5846
|
+
'pattern: string;',
|
|
5847
|
+
'organization_id?: string;',
|
|
5848
|
+
'project_id?: string;',
|
|
5849
|
+
'context_chars?: number;',
|
|
5850
|
+
'page_size?: number;',
|
|
5851
|
+
'page_token?: string;',
|
|
5852
|
+
],
|
|
5853
|
+
response: '{ content: string; end_char: number; start_char: number; }',
|
|
5854
|
+
markdown: "## grep\n\n`client.beta.retrieval.grep(file_id: string, index_id: string, pattern: string, organization_id?: string, project_id?: string, context_chars?: number, page_size?: number, page_token?: string): { content: string; end_char: number; start_char: number; }`\n\n**post** `/api/v1/retrieval/files/grep`\n\nGrep within a file's parsed content using a regex pattern.\n\n### Parameters\n\n- `file_id: string`\n ID of the file to grep.\n\n- `index_id: string`\n ID of the index the file belongs to.\n\n- `pattern: string`\n Regex pattern to search for.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `context_chars?: number`\n Number of characters of context to include before and after the matched pattern in the content field of the response\n\n- `page_size?: number`\n The maximum number of items to return. The service may return fewer than this value. If unspecified, a default page size will be used. The maximum value is typically 1000; values above this will be coerced to the maximum.\n\n- `page_token?: string`\n A page token, received from a previous list call. Provide this to retrieve the subsequent page.\n\n### Returns\n\n- `{ content: string; end_char: number; start_char: number; }`\n A single grep match within a file.\n\n - `content: string`\n - `end_char: number`\n - `start_char: number`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.beta.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse);\n}\n```",
|
|
5855
|
+
perLanguage: {
|
|
5856
|
+
python: {
|
|
5857
|
+
method: 'beta.retrieval.grep',
|
|
5858
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.retrieval.grep(\n file_id="file_id",\n index_id="idx-abc123",\n pattern="revenue|profit",\n)\npage = page.items[0]\nprint(page.content)',
|
|
5859
|
+
},
|
|
5860
|
+
go: {
|
|
5861
|
+
method: 'client.Beta.Retrieval.Grep',
|
|
5862
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5863
|
+
},
|
|
5864
|
+
java: {
|
|
5865
|
+
method: 'beta().retrieval().grep',
|
|
5866
|
+
example: '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}',
|
|
5867
|
+
},
|
|
5868
|
+
csharp: {
|
|
5869
|
+
method: 'Beta.Retrieval.Grep',
|
|
5870
|
+
example: '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}',
|
|
5871
|
+
},
|
|
5872
|
+
typescript: {
|
|
5873
|
+
method: 'client.beta.retrieval.grep',
|
|
5874
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const retrievalGrepResponse of client.beta.retrieval.grep({\n file_id: 'file_id',\n index_id: 'idx-abc123',\n pattern: 'revenue|profit',\n})) {\n console.log(retrievalGrepResponse.content);\n}",
|
|
5875
|
+
},
|
|
5876
|
+
http: {
|
|
5877
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/grep \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123",\n "pattern": "revenue|profit"\n }\'',
|
|
5878
|
+
},
|
|
5879
|
+
cli: {
|
|
5880
|
+
method: 'retrieval grep',
|
|
5881
|
+
example: "llp beta:retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'",
|
|
5882
|
+
},
|
|
5883
|
+
},
|
|
5884
|
+
},
|
|
5885
|
+
{
|
|
5886
|
+
name: 'read',
|
|
5887
|
+
endpoint: '/api/v1/retrieval/files/read',
|
|
5888
|
+
httpMethod: 'post',
|
|
5889
|
+
summary: 'Read File',
|
|
5890
|
+
description: 'Read the parsed text content of a specific file.',
|
|
5891
|
+
stainlessPath: '(resource) beta.retrieval > (method) read',
|
|
5892
|
+
qualified: 'client.beta.retrieval.read',
|
|
5893
|
+
params: [
|
|
5894
|
+
'file_id: string;',
|
|
5895
|
+
'index_id: string;',
|
|
5896
|
+
'organization_id?: string;',
|
|
5897
|
+
'project_id?: string;',
|
|
5898
|
+
'max_length?: number;',
|
|
5899
|
+
'offset?: number;',
|
|
5900
|
+
],
|
|
5901
|
+
response: '{ content: string; }',
|
|
5902
|
+
markdown: "## read\n\n`client.beta.retrieval.read(file_id: string, index_id: string, organization_id?: string, project_id?: string, max_length?: number, offset?: number): { content: string; }`\n\n**post** `/api/v1/retrieval/files/read`\n\nRead the parsed text content of a specific file.\n\n### Parameters\n\n- `file_id: string`\n ID of the file to read.\n\n- `index_id: string`\n ID of the index the file belongs to.\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n- `max_length?: number`\n Maximum number of characters to read from the offset.\n\n- `offset?: number`\n Starting character offset.\n\n### Returns\n\n- `{ content: string; }`\n File read result.\n\n - `content: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nconst response = await client.beta.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response);\n```",
|
|
5903
|
+
perLanguage: {
|
|
5904
|
+
python: {
|
|
5905
|
+
method: 'beta.retrieval.read',
|
|
5906
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.retrieval.read(\n file_id="file_id",\n index_id="idx-abc123",\n)\nprint(response.content)',
|
|
5907
|
+
},
|
|
5908
|
+
go: {
|
|
5909
|
+
method: 'client.Beta.Retrieval.Read',
|
|
5910
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5911
|
+
},
|
|
5912
|
+
java: {
|
|
5913
|
+
method: 'beta().retrieval().read',
|
|
5914
|
+
example: '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}',
|
|
5915
|
+
},
|
|
5916
|
+
csharp: {
|
|
5917
|
+
method: 'Beta.Retrieval.Read',
|
|
5918
|
+
example: '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);',
|
|
5919
|
+
},
|
|
5920
|
+
typescript: {
|
|
5921
|
+
method: 'client.beta.retrieval.read',
|
|
5922
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.retrieval.read({ file_id: 'file_id', index_id: 'idx-abc123' });\n\nconsole.log(response.content);",
|
|
5923
|
+
},
|
|
5924
|
+
http: {
|
|
5925
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/retrieval/files/read \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "file_id": "file_id",\n "index_id": "idx-abc123"\n }\'',
|
|
5926
|
+
},
|
|
5927
|
+
cli: {
|
|
5928
|
+
method: 'retrieval read',
|
|
5929
|
+
example: "llp beta:retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
5930
|
+
},
|
|
5931
|
+
},
|
|
5932
|
+
},
|
|
5933
|
+
{
|
|
5934
|
+
name: 'list',
|
|
5935
|
+
endpoint: '/api/v1/chat',
|
|
5936
|
+
httpMethod: 'get',
|
|
5937
|
+
summary: 'List Sessions',
|
|
5938
|
+
description: 'List all chat sessions for the current project.',
|
|
5939
|
+
stainlessPath: '(resource) beta.chat > (method) list',
|
|
5940
|
+
qualified: 'client.beta.chat.list',
|
|
5941
|
+
params: [
|
|
5942
|
+
'organization_id?: string;',
|
|
5943
|
+
'page_size?: number;',
|
|
5944
|
+
'page_token?: string;',
|
|
5945
|
+
'project_id?: string;',
|
|
5946
|
+
],
|
|
5947
|
+
response: "{ 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; }; }",
|
|
5948
|
+
markdown: "## list\n\n`client.beta.chat.list(organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { last_updated_at: string; session_id: string; 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```",
|
|
5949
|
+
perLanguage: {
|
|
5950
|
+
python: {
|
|
5951
|
+
method: 'beta.chat.list',
|
|
5952
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.beta.chat.list()\npage = page.items[0]\nprint(page.session_id)',
|
|
5953
|
+
},
|
|
5954
|
+
go: {
|
|
5955
|
+
method: 'client.Beta.Chat.List',
|
|
5956
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
5957
|
+
},
|
|
5958
|
+
java: {
|
|
5959
|
+
method: 'beta().chat().list',
|
|
5960
|
+
example: '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}',
|
|
5961
|
+
},
|
|
5962
|
+
csharp: {
|
|
5963
|
+
method: 'Beta.Chat.List',
|
|
5964
|
+
example: '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}',
|
|
5965
|
+
},
|
|
5966
|
+
typescript: {
|
|
5967
|
+
method: 'client.beta.chat.list',
|
|
5968
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const chatListResponse of client.beta.chat.list()) {\n console.log(chatListResponse.session_id);\n}",
|
|
5969
|
+
},
|
|
5970
|
+
http: {
|
|
5971
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5972
|
+
},
|
|
5973
|
+
cli: {
|
|
5974
|
+
method: 'chat list',
|
|
5975
|
+
example: "llp beta:chat list \\\n --api-key 'My API Key'",
|
|
5976
|
+
},
|
|
5977
|
+
},
|
|
5978
|
+
},
|
|
5979
|
+
{
|
|
5980
|
+
name: 'create',
|
|
5981
|
+
endpoint: '/api/v1/chat',
|
|
5982
|
+
httpMethod: 'post',
|
|
5983
|
+
summary: 'Create Session',
|
|
5984
|
+
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
5985
|
+
stainlessPath: '(resource) beta.chat > (method) create',
|
|
5986
|
+
qualified: 'client.beta.chat.create',
|
|
5987
|
+
params: [
|
|
5988
|
+
'organization_id?: string;',
|
|
5989
|
+
'project_id?: string;',
|
|
5990
|
+
'index_ids?: string[];',
|
|
5991
|
+
"shared_access?: 'query' | 'read_only';",
|
|
5992
|
+
],
|
|
5993
|
+
response: "{ 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; }; }",
|
|
5994
|
+
markdown: "## 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```",
|
|
5995
|
+
perLanguage: {
|
|
5996
|
+
python: {
|
|
5997
|
+
method: 'beta.chat.create',
|
|
5998
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.beta.chat.create()\nprint(chat.session_id)',
|
|
5999
|
+
},
|
|
6000
|
+
go: {
|
|
6001
|
+
method: 'client.Beta.Chat.New',
|
|
6002
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
6003
|
+
},
|
|
6004
|
+
java: {
|
|
6005
|
+
method: 'beta().chat().create',
|
|
6006
|
+
example: '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}',
|
|
6007
|
+
},
|
|
6008
|
+
csharp: {
|
|
6009
|
+
method: 'Beta.Chat.Create',
|
|
6010
|
+
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.Beta.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
6011
|
+
},
|
|
6012
|
+
typescript: {
|
|
6013
|
+
method: 'client.beta.chat.create',
|
|
6014
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.beta.chat.create();\n\nconsole.log(chat.session_id);",
|
|
6015
|
+
},
|
|
6016
|
+
http: {
|
|
6017
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6018
|
+
},
|
|
6019
|
+
cli: {
|
|
6020
|
+
method: 'chat create',
|
|
6021
|
+
example: "llp beta:chat create \\\n --api-key 'My API Key'",
|
|
6022
|
+
},
|
|
6023
|
+
},
|
|
6024
|
+
},
|
|
6025
|
+
{
|
|
6026
|
+
name: 'retrieve',
|
|
6027
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
6028
|
+
httpMethod: 'get',
|
|
6029
|
+
summary: 'Get Full Session',
|
|
6030
|
+
description: 'Retrieve a full session by ID, including its event history.',
|
|
6031
|
+
stainlessPath: '(resource) beta.chat > (method) retrieve',
|
|
6032
|
+
qualified: 'client.beta.chat.retrieve',
|
|
6033
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6034
|
+
response: "{ 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; }; }",
|
|
6035
|
+
markdown: "## retrieve\n\n`client.beta.chat.retrieve(session_id: string, organization_id?: string, project_id?: string): { events: object | object | object | object | object | object | object | object[]; last_updated_at: string; session_id: string; 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```",
|
|
6036
|
+
perLanguage: {
|
|
6037
|
+
python: {
|
|
6038
|
+
method: 'beta.chat.retrieve',
|
|
6039
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nchat = client.beta.chat.retrieve(\n session_id="session_id",\n)\nprint(chat.session_id)',
|
|
6040
|
+
},
|
|
6041
|
+
go: {
|
|
6042
|
+
method: 'client.Beta.Chat.Get',
|
|
6043
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
6044
|
+
},
|
|
6045
|
+
java: {
|
|
6046
|
+
method: 'beta().chat().retrieve',
|
|
6047
|
+
example: '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}',
|
|
6048
|
+
},
|
|
6049
|
+
csharp: {
|
|
6050
|
+
method: 'Beta.Chat.Retrieve',
|
|
6051
|
+
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Beta.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
6052
|
+
},
|
|
6053
|
+
typescript: {
|
|
6054
|
+
method: 'client.beta.chat.retrieve',
|
|
6055
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst chat = await client.beta.chat.retrieve('session_id');\n\nconsole.log(chat.session_id);",
|
|
6056
|
+
},
|
|
6057
|
+
http: {
|
|
6058
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6059
|
+
},
|
|
6060
|
+
cli: {
|
|
6061
|
+
method: 'chat retrieve',
|
|
6062
|
+
example: "llp beta:chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6063
|
+
},
|
|
6064
|
+
},
|
|
6065
|
+
},
|
|
6066
|
+
{
|
|
6067
|
+
name: 'delete',
|
|
6068
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
6069
|
+
httpMethod: 'delete',
|
|
6070
|
+
summary: 'Delete Session',
|
|
6071
|
+
description: 'Delete a session.',
|
|
6072
|
+
stainlessPath: '(resource) beta.chat > (method) delete',
|
|
6073
|
+
qualified: 'client.beta.chat.delete',
|
|
6074
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6075
|
+
markdown: "## delete\n\n`client.beta.chat.delete(session_id: string, organization_id?: string, project_id?: string): void`\n\n**delete** `/api/v1/chat/{session_id}`\n\nDelete a session.\n\n### Parameters\n\n- `session_id: string`\n\n- `organization_id?: string`\n\n- `project_id?: string`\n\n### Example\n\n```typescript\nimport LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud();\n\nawait client.beta.chat.delete('session_id')\n```",
|
|
6076
|
+
perLanguage: {
|
|
6077
|
+
python: {
|
|
6078
|
+
method: 'beta.chat.delete',
|
|
6079
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nclient.beta.chat.delete(\n session_id="session_id",\n)',
|
|
6080
|
+
},
|
|
6081
|
+
go: {
|
|
6082
|
+
method: 'client.Beta.Chat.Delete',
|
|
6083
|
+
example: 'package main\n\nimport (\n\t"context"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
6084
|
+
},
|
|
6085
|
+
java: {
|
|
6086
|
+
method: 'beta().chat().delete',
|
|
6087
|
+
example: '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}',
|
|
6088
|
+
},
|
|
6089
|
+
csharp: {
|
|
6090
|
+
method: 'Beta.Chat.Delete',
|
|
6091
|
+
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Beta.Chat.Delete(parameters);',
|
|
6092
|
+
},
|
|
6093
|
+
typescript: {
|
|
6094
|
+
method: 'client.beta.chat.delete',
|
|
6095
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nawait client.beta.chat.delete('session_id');",
|
|
6096
|
+
},
|
|
6097
|
+
http: {
|
|
6098
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6099
|
+
},
|
|
6100
|
+
cli: {
|
|
6101
|
+
method: 'chat delete',
|
|
6102
|
+
example: "llp beta:chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6103
|
+
},
|
|
6104
|
+
},
|
|
6105
|
+
},
|
|
6106
|
+
{
|
|
6107
|
+
name: 'get_summary',
|
|
6108
|
+
endpoint: '/api/v1/chat/{session_id}/summary',
|
|
6109
|
+
httpMethod: 'get',
|
|
6110
|
+
summary: 'Get Session Summary',
|
|
6111
|
+
description: 'Retrieve a session summary by ID.',
|
|
6112
|
+
stainlessPath: '(resource) beta.chat > (method) get_summary',
|
|
6113
|
+
qualified: 'client.beta.chat.getSummary',
|
|
6114
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6115
|
+
response: "{ 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; }; }",
|
|
6116
|
+
markdown: "## get_summary\n\n`client.beta.chat.getSummary(session_id: string, organization_id?: string, project_id?: string): { last_updated_at: string; session_id: string; 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```",
|
|
6117
|
+
perLanguage: {
|
|
6118
|
+
python: {
|
|
6119
|
+
method: 'beta.chat.get_summary',
|
|
6120
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.chat.get_summary(\n session_id="session_id",\n)\nprint(response.session_id)',
|
|
6121
|
+
},
|
|
6122
|
+
go: {
|
|
6123
|
+
method: 'client.Beta.Chat.GetSummary',
|
|
6124
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
6125
|
+
},
|
|
6126
|
+
java: {
|
|
6127
|
+
method: 'beta().chat().getSummary',
|
|
6128
|
+
example: '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}',
|
|
6129
|
+
},
|
|
6130
|
+
csharp: {
|
|
6131
|
+
method: 'Beta.Chat.GetSummary',
|
|
6132
|
+
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Beta.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
6133
|
+
},
|
|
6134
|
+
typescript: {
|
|
6135
|
+
method: 'client.beta.chat.getSummary',
|
|
6136
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.chat.getSummary('session_id');\n\nconsole.log(response.session_id);",
|
|
6137
|
+
},
|
|
6138
|
+
http: {
|
|
6139
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6140
|
+
},
|
|
6141
|
+
cli: {
|
|
6142
|
+
method: 'chat get_summary',
|
|
6143
|
+
example: "llp beta:chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6144
|
+
},
|
|
6145
|
+
},
|
|
6146
|
+
},
|
|
6147
|
+
{
|
|
6148
|
+
name: 'stream',
|
|
6149
|
+
endpoint: '/api/v1/chat/{session_id}/messages/stream',
|
|
6150
|
+
httpMethod: 'post',
|
|
6151
|
+
summary: 'Stream Messages',
|
|
6152
|
+
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
6153
|
+
stainlessPath: '(resource) beta.chat > (method) stream',
|
|
6154
|
+
qualified: 'client.beta.chat.stream',
|
|
6155
|
+
params: [
|
|
6156
|
+
'session_id: string;',
|
|
6157
|
+
'index_ids: string[];',
|
|
6158
|
+
'prompt: string;',
|
|
6159
|
+
'organization_id?: string;',
|
|
6160
|
+
'project_id?: string;',
|
|
6161
|
+
'require_all_indexes?: boolean;',
|
|
6162
|
+
],
|
|
6163
|
+
response: 'object',
|
|
6164
|
+
markdown: "## 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```",
|
|
6165
|
+
perLanguage: {
|
|
6166
|
+
python: {
|
|
6167
|
+
method: 'beta.chat.stream',
|
|
6168
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.beta.chat.stream(\n session_id="session_id",\n index_ids=["idx-abc123", "idx-def456"],\n prompt="What were the main findings in Q3?",\n)\nprint(response)',
|
|
6169
|
+
},
|
|
6170
|
+
go: {
|
|
6171
|
+
method: 'client.Beta.Chat.Stream',
|
|
6172
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
6173
|
+
},
|
|
6174
|
+
java: {
|
|
6175
|
+
method: 'beta().chat().stream',
|
|
6176
|
+
example: '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}',
|
|
6177
|
+
},
|
|
6178
|
+
csharp: {
|
|
6179
|
+
method: 'Beta.Chat.Stream',
|
|
6180
|
+
example: '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);',
|
|
6181
|
+
},
|
|
6182
|
+
typescript: {
|
|
6183
|
+
method: 'client.beta.chat.stream',
|
|
6184
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.beta.chat.stream('session_id', {\n index_ids: ['idx-abc123', 'idx-def456'],\n prompt: 'What were the main findings in Q3?',\n});\n\nconsole.log(response);",
|
|
6185
|
+
},
|
|
6186
|
+
http: {
|
|
6187
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/messages/stream \\\n -H \'Content-Type: application/json\' \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY" \\\n -d \'{\n "index_ids": [\n "idx-abc123",\n "idx-def456"\n ],\n "prompt": "What were the main findings in Q3?",\n "require_all_indexes": true\n }\'',
|
|
6188
|
+
},
|
|
6189
|
+
cli: {
|
|
6190
|
+
method: 'chat stream',
|
|
6191
|
+
example: "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?'",
|
|
6192
|
+
},
|
|
6193
|
+
},
|
|
6194
|
+
},
|
|
6195
|
+
{
|
|
6196
|
+
name: 'list',
|
|
6197
|
+
endpoint: '/api/v1/beta/attachments',
|
|
6198
|
+
httpMethod: 'get',
|
|
6199
|
+
summary: 'List Attachments',
|
|
6200
|
+
description: 'List the attachments associated with a file (e.g. per-page screenshots).',
|
|
6201
|
+
stainlessPath: '(resource) beta.attachments > (method) list',
|
|
6202
|
+
qualified: 'client.beta.attachments.list',
|
|
6203
|
+
params: [
|
|
6204
|
+
'source_id: string;',
|
|
6205
|
+
'organization_id?: string;',
|
|
6206
|
+
'page_size?: number;',
|
|
6207
|
+
'page_token?: string;',
|
|
6208
|
+
'project_id?: string;',
|
|
6209
|
+
],
|
|
6210
|
+
response: '{ name: string; size: number; last_modified?: string; }',
|
|
6211
|
+
markdown: "## list\n\n`client.beta.attachments.list(source_id: string, organization_id?: string, page_size?: number, page_token?: string, project_id?: string): { name: string; size: number; last_modified?: string; }`\n\n**get** `/api/v1/beta/attachments`\n\nList the attachments associated with a file (e.g. per-page screenshots).\n\n### Parameters\n\n- `source_id: string`\n File UUID or directory file ID (dfl-...).\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- `{ name: string; size: number; last_modified?: string; }`\n Metadata for a single file attachment.\n\n - `name: string`\n - `size: number`\n - `last_modified?: 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 attachmentListResponse of client.beta.attachments.list({ source_id: 'source_id' })) {\n console.log(attachmentListResponse);\n}\n```",
|
|
5478
6212
|
perLanguage: {
|
|
5479
6213
|
python: {
|
|
5480
6214
|
method: 'beta.attachments.list',
|
|
@@ -6535,6 +7269,229 @@ const EMBEDDED_METHODS = [
|
|
|
6535
7269
|
},
|
|
6536
7270
|
},
|
|
6537
7271
|
},
|
|
7272
|
+
{
|
|
7273
|
+
name: 'list',
|
|
7274
|
+
endpoint: '/api/alpha/verify',
|
|
7275
|
+
httpMethod: 'get',
|
|
7276
|
+
summary: 'List Verify Jobs',
|
|
7277
|
+
description: 'List Verify jobs with optional filtering and pagination.\n\nFilter by `status`, specific `job_ids`, or creation date range.',
|
|
7278
|
+
stainlessPath: '(resource) alpha.verify > (method) list',
|
|
7279
|
+
qualified: 'client.alpha.verify.list',
|
|
7280
|
+
params: [
|
|
7281
|
+
'created_at_on_or_after?: string;',
|
|
7282
|
+
'created_at_on_or_before?: string;',
|
|
7283
|
+
'expand?: string[];',
|
|
7284
|
+
'job_ids?: string[];',
|
|
7285
|
+
'organization_id?: string;',
|
|
7286
|
+
'page_size?: number;',
|
|
7287
|
+
'page_token?: string;',
|
|
7288
|
+
'project_id?: string;',
|
|
7289
|
+
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
7290
|
+
],
|
|
7291
|
+
response: "{ 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; }",
|
|
7292
|
+
markdown: "## 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```",
|
|
7293
|
+
perLanguage: {
|
|
7294
|
+
python: {
|
|
7295
|
+
method: 'alpha.verify.list',
|
|
7296
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\npage = client.alpha.verify.list()\npage = page.items[0]\nprint(page.id)',
|
|
7297
|
+
},
|
|
7298
|
+
go: {
|
|
7299
|
+
method: 'client.Alpha.Verify.List',
|
|
7300
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
7301
|
+
},
|
|
7302
|
+
java: {
|
|
7303
|
+
method: 'alpha().verify().list',
|
|
7304
|
+
example: '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}',
|
|
7305
|
+
},
|
|
7306
|
+
csharp: {
|
|
7307
|
+
method: 'Alpha.Verify.List',
|
|
7308
|
+
example: '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}',
|
|
7309
|
+
},
|
|
7310
|
+
typescript: {
|
|
7311
|
+
method: 'client.alpha.verify.list',
|
|
7312
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\n// Automatically fetches more pages as needed.\nfor await (const verifyListResponse of client.alpha.verify.list()) {\n console.log(verifyListResponse.id);\n}",
|
|
7313
|
+
},
|
|
7314
|
+
http: {
|
|
7315
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7316
|
+
},
|
|
7317
|
+
cli: {
|
|
7318
|
+
method: 'verify list',
|
|
7319
|
+
example: "llp alpha:verify list \\\n --api-key 'My API Key'",
|
|
7320
|
+
},
|
|
7321
|
+
},
|
|
7322
|
+
},
|
|
7323
|
+
{
|
|
7324
|
+
name: 'create',
|
|
7325
|
+
endpoint: '/api/alpha/verify',
|
|
7326
|
+
httpMethod: 'post',
|
|
7327
|
+
summary: 'Create Verify Job',
|
|
7328
|
+
description: '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.',
|
|
7329
|
+
stainlessPath: '(resource) alpha.verify > (method) create',
|
|
7330
|
+
qualified: 'client.alpha.verify.create',
|
|
7331
|
+
params: [
|
|
7332
|
+
'file_input: string;',
|
|
7333
|
+
'organization_id?: string;',
|
|
7334
|
+
'project_id?: string;',
|
|
7335
|
+
"configuration?: { target_pages?: string; tier?: 'agentic' | 'fast'; };",
|
|
7336
|
+
'transaction_id?: string;',
|
|
7337
|
+
'webhook_configuration_ids?: string[];',
|
|
7338
|
+
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
7339
|
+
],
|
|
7340
|
+
response: "{ 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; }",
|
|
7341
|
+
markdown: "## 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```",
|
|
7342
|
+
perLanguage: {
|
|
7343
|
+
python: {
|
|
7344
|
+
method: 'alpha.verify.create',
|
|
7345
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nverify = client.alpha.verify.create(\n file_input="dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",\n)\nprint(verify.id)',
|
|
7346
|
+
},
|
|
7347
|
+
go: {
|
|
7348
|
+
method: 'client.Alpha.Verify.New',
|
|
7349
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
7350
|
+
},
|
|
7351
|
+
java: {
|
|
7352
|
+
method: 'alpha().verify().create',
|
|
7353
|
+
example: '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}',
|
|
7354
|
+
},
|
|
7355
|
+
csharp: {
|
|
7356
|
+
method: 'Alpha.Verify.Create',
|
|
7357
|
+
example: '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);',
|
|
7358
|
+
},
|
|
7359
|
+
typescript: {
|
|
7360
|
+
method: 'client.alpha.verify.create',
|
|
7361
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst verify = await client.alpha.verify.create({\n file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',\n});\n\nconsole.log(verify.id);",
|
|
7362
|
+
},
|
|
7363
|
+
http: {
|
|
7364
|
+
example: '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 }\'',
|
|
7365
|
+
},
|
|
7366
|
+
cli: {
|
|
7367
|
+
method: 'verify create',
|
|
7368
|
+
example: "llp alpha:verify create \\\n --api-key 'My API Key' \\\n --file-input dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
7369
|
+
},
|
|
7370
|
+
},
|
|
7371
|
+
},
|
|
7372
|
+
{
|
|
7373
|
+
name: 'get',
|
|
7374
|
+
endpoint: '/api/alpha/verify/{job_id}',
|
|
7375
|
+
httpMethod: 'get',
|
|
7376
|
+
summary: 'Get Verify Job',
|
|
7377
|
+
description: '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`.',
|
|
7378
|
+
stainlessPath: '(resource) alpha.verify > (method) get',
|
|
7379
|
+
qualified: 'client.alpha.verify.get',
|
|
7380
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
7381
|
+
response: "{ 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; }",
|
|
7382
|
+
markdown: "## 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```",
|
|
7383
|
+
perLanguage: {
|
|
7384
|
+
python: {
|
|
7385
|
+
method: 'alpha.verify.get',
|
|
7386
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nverify = client.alpha.verify.get(\n job_id="job_id",\n)\nprint(verify.id)',
|
|
7387
|
+
},
|
|
7388
|
+
go: {
|
|
7389
|
+
method: 'client.Alpha.Verify.Get',
|
|
7390
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
7391
|
+
},
|
|
7392
|
+
java: {
|
|
7393
|
+
method: 'alpha().verify().get',
|
|
7394
|
+
example: '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}',
|
|
7395
|
+
},
|
|
7396
|
+
csharp: {
|
|
7397
|
+
method: 'Alpha.Verify.Get',
|
|
7398
|
+
example: 'VerifyGetParams parameters = new() { JobID = "job_id" };\n\nvar verify = await client.Alpha.Verify.Get(parameters);\n\nConsole.WriteLine(verify);',
|
|
7399
|
+
},
|
|
7400
|
+
typescript: {
|
|
7401
|
+
method: 'client.alpha.verify.get',
|
|
7402
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst verify = await client.alpha.verify.get('job_id');\n\nconsole.log(verify.id);",
|
|
7403
|
+
},
|
|
7404
|
+
http: {
|
|
7405
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7406
|
+
},
|
|
7407
|
+
cli: {
|
|
7408
|
+
method: 'verify get',
|
|
7409
|
+
example: "llp alpha:verify get \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7410
|
+
},
|
|
7411
|
+
},
|
|
7412
|
+
},
|
|
7413
|
+
{
|
|
7414
|
+
name: 'cancel',
|
|
7415
|
+
endpoint: '/api/alpha/verify/{job_id}/cancel',
|
|
7416
|
+
httpMethod: 'post',
|
|
7417
|
+
summary: 'Cancel Verify Job',
|
|
7418
|
+
description: '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.',
|
|
7419
|
+
stainlessPath: '(resource) alpha.verify > (method) cancel',
|
|
7420
|
+
qualified: 'client.alpha.verify.cancel',
|
|
7421
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7422
|
+
response: "{ 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; }",
|
|
7423
|
+
markdown: "## 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```",
|
|
7424
|
+
perLanguage: {
|
|
7425
|
+
python: {
|
|
7426
|
+
method: 'alpha.verify.cancel',
|
|
7427
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.alpha.verify.cancel(\n job_id="job_id",\n)\nprint(response.id)',
|
|
7428
|
+
},
|
|
7429
|
+
go: {
|
|
7430
|
+
method: 'client.Alpha.Verify.Cancel',
|
|
7431
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
7432
|
+
},
|
|
7433
|
+
java: {
|
|
7434
|
+
method: 'alpha().verify().cancel',
|
|
7435
|
+
example: '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}',
|
|
7436
|
+
},
|
|
7437
|
+
csharp: {
|
|
7438
|
+
method: 'Alpha.Verify.Cancel',
|
|
7439
|
+
example: 'VerifyCancelParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.Cancel(parameters);\n\nConsole.WriteLine(response);',
|
|
7440
|
+
},
|
|
7441
|
+
typescript: {
|
|
7442
|
+
method: 'client.alpha.verify.cancel',
|
|
7443
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.alpha.verify.cancel('job_id');\n\nconsole.log(response.id);",
|
|
7444
|
+
},
|
|
7445
|
+
http: {
|
|
7446
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7447
|
+
},
|
|
7448
|
+
cli: {
|
|
7449
|
+
method: 'verify cancel',
|
|
7450
|
+
example: "llp alpha:verify cancel \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7451
|
+
},
|
|
7452
|
+
},
|
|
7453
|
+
},
|
|
7454
|
+
{
|
|
7455
|
+
name: 'get_details',
|
|
7456
|
+
endpoint: '/api/alpha/verify/{job_id}/details',
|
|
7457
|
+
httpMethod: 'get',
|
|
7458
|
+
summary: 'Get Verify Job Details',
|
|
7459
|
+
description: '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).',
|
|
7460
|
+
stainlessPath: '(resource) alpha.verify > (method) get_details',
|
|
7461
|
+
qualified: 'client.alpha.verify.getDetails',
|
|
7462
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7463
|
+
response: '{ 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; }',
|
|
7464
|
+
markdown: "## 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```",
|
|
7465
|
+
perLanguage: {
|
|
7466
|
+
python: {
|
|
7467
|
+
method: 'alpha.verify.get_details',
|
|
7468
|
+
example: 'import os\nfrom llama_cloud import LlamaCloud\n\nclient = LlamaCloud(\n api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted\n)\nresponse = client.alpha.verify.get_details(\n job_id="job_id",\n)\nprint(response.job_id)',
|
|
7469
|
+
},
|
|
7470
|
+
go: {
|
|
7471
|
+
method: 'client.Alpha.Verify.GetDetails',
|
|
7472
|
+
example: 'package main\n\nimport (\n\t"context"\n\t"fmt"\n\n\t"github.com/run-llama/llama-parse-go"\n\t"github.com/run-llama/llama-parse-go/option"\n)\n\nfunc main() {\n\tclient := 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',
|
|
7473
|
+
},
|
|
7474
|
+
java: {
|
|
7475
|
+
method: 'alpha().verify().getDetails',
|
|
7476
|
+
example: '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}',
|
|
7477
|
+
},
|
|
7478
|
+
csharp: {
|
|
7479
|
+
method: 'Alpha.Verify.GetDetails',
|
|
7480
|
+
example: 'VerifyGetDetailsParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.GetDetails(parameters);\n\nConsole.WriteLine(response);',
|
|
7481
|
+
},
|
|
7482
|
+
typescript: {
|
|
7483
|
+
method: 'client.alpha.verify.getDetails',
|
|
7484
|
+
example: "import LlamaCloud from '@llamaindex/llama-cloud';\n\nconst client = new LlamaCloud({\n apiKey: process.env['LLAMA_CLOUD_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.alpha.verify.getDetails('job_id');\n\nconsole.log(response.job_id);",
|
|
7485
|
+
},
|
|
7486
|
+
http: {
|
|
7487
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/details \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7488
|
+
},
|
|
7489
|
+
cli: {
|
|
7490
|
+
method: 'verify get_details',
|
|
7491
|
+
example: "llp alpha:verify get-details \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7492
|
+
},
|
|
7493
|
+
},
|
|
7494
|
+
},
|
|
6538
7495
|
{
|
|
6539
7496
|
name: 'run_search',
|
|
6540
7497
|
endpoint: '/api/v1/pipelines/{pipeline_id}/retrieve',
|
|
@@ -6573,15 +7530,15 @@ const EMBEDDED_METHODS = [
|
|
|
6573
7530
|
const EMBEDDED_READMES = [
|
|
6574
7531
|
{
|
|
6575
7532
|
language: 'python',
|
|
6576
|
-
content: '# 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',
|
|
7533
|
+
content: '# 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',
|
|
6577
7534
|
},
|
|
6578
7535
|
{
|
|
6579
7536
|
language: 'go',
|
|
6580
|
-
content: '# 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',
|
|
7537
|
+
content: '# 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',
|
|
6581
7538
|
},
|
|
6582
7539
|
{
|
|
6583
7540
|
language: 'java',
|
|
6584
|
-
content: '# 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',
|
|
7541
|
+
content: '# 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',
|
|
6585
7542
|
},
|
|
6586
7543
|
{
|
|
6587
7544
|
language: 'csharp',
|
|
@@ -6589,7 +7546,7 @@ const EMBEDDED_READMES = [
|
|
|
6589
7546
|
},
|
|
6590
7547
|
{
|
|
6591
7548
|
language: 'typescript',
|
|
6592
|
-
content: "# 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",
|
|
7549
|
+
content: "# 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",
|
|
6593
7550
|
},
|
|
6594
7551
|
{
|
|
6595
7552
|
language: 'cli',
|