@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.mjs
CHANGED
|
@@ -423,12 +423,12 @@ const EMBEDDED_METHODS = [
|
|
|
423
423
|
endpoint: '/api/v1/split/jobs/{split_job_id}',
|
|
424
424
|
httpMethod: 'delete',
|
|
425
425
|
summary: 'Delete Split Job',
|
|
426
|
-
description: 'Delete a split job and its results.',
|
|
426
|
+
description: 'Delete a split job and its results. A job that is not in a terminal state is refused with 409; cancel it first.',
|
|
427
427
|
stainlessPath: '(resource) split > (method) delete',
|
|
428
428
|
qualified: 'client.split.delete',
|
|
429
429
|
params: ['split_job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
430
430
|
response: 'object',
|
|
431
|
-
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```",
|
|
431
|
+
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```",
|
|
432
432
|
perLanguage: {
|
|
433
433
|
python: {
|
|
434
434
|
method: 'split.delete',
|
|
@@ -510,7 +510,7 @@ const EMBEDDED_METHODS = [
|
|
|
510
510
|
qualified: 'client.parsing.create',
|
|
511
511
|
params: [
|
|
512
512
|
"tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | string;",
|
|
513
|
-
"version: 'latest' | '2026-
|
|
513
|
+
"version: 'latest' | '2026-10-16' | '2026-09-28' | '2026-06-15' | string;",
|
|
514
514
|
'organization_id?: string;',
|
|
515
515
|
'project_id?: string;',
|
|
516
516
|
'agentic_options?: { custom_prompt?: string; };',
|
|
@@ -525,14 +525,14 @@ const EMBEDDED_METHODS = [
|
|
|
525
525
|
"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'; };",
|
|
526
526
|
'page_ranges?: { max_pages?: number; target_pages?: string; };',
|
|
527
527
|
'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; }; };',
|
|
528
|
-
"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-
|
|
528
|
+
"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'; };",
|
|
529
529
|
'source_url?: string;',
|
|
530
530
|
'user_metadata?: object;',
|
|
531
531
|
'webhook_configuration_ids?: string[];',
|
|
532
532
|
"webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: 'json' | 'string'; webhook_signing_secret?: string; webhook_url?: string; }[];",
|
|
533
533
|
],
|
|
534
534
|
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; }",
|
|
535
|
-
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```",
|
|
535
|
+
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```",
|
|
536
536
|
perLanguage: {
|
|
537
537
|
python: {
|
|
538
538
|
method: 'parsing.create',
|
|
@@ -579,7 +579,7 @@ const EMBEDDED_METHODS = [
|
|
|
579
579
|
'project_id?: string;',
|
|
580
580
|
],
|
|
581
581
|
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; }",
|
|
582
|
-
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 |
|
|
582
|
+
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```",
|
|
583
583
|
perLanguage: {
|
|
584
584
|
python: {
|
|
585
585
|
method: 'parsing.get',
|
|
@@ -794,13 +794,13 @@ const EMBEDDED_METHODS = [
|
|
|
794
794
|
'file_input: string;',
|
|
795
795
|
'organization_id?: string;',
|
|
796
796
|
'project_id?: string;',
|
|
797
|
-
"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; };",
|
|
797
|
+
"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; };",
|
|
798
798
|
'configuration_id?: string;',
|
|
799
799
|
'webhook_configuration_ids?: string[];',
|
|
800
800
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
801
801
|
],
|
|
802
|
-
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; }; }",
|
|
803
|
-
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```",
|
|
802
|
+
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; }; }",
|
|
803
|
+
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```",
|
|
804
804
|
perLanguage: {
|
|
805
805
|
python: {
|
|
806
806
|
method: 'extract.create',
|
|
@@ -854,8 +854,8 @@ const EMBEDDED_METHODS = [
|
|
|
854
854
|
'project_id?: string;',
|
|
855
855
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING' | 'THROTTLED';",
|
|
856
856
|
],
|
|
857
|
-
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; }; }",
|
|
858
|
-
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```",
|
|
857
|
+
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; }; }",
|
|
858
|
+
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```",
|
|
859
859
|
perLanguage: {
|
|
860
860
|
python: {
|
|
861
861
|
method: 'extract.list',
|
|
@@ -895,8 +895,8 @@ const EMBEDDED_METHODS = [
|
|
|
895
895
|
stainlessPath: '(resource) extract > (method) get',
|
|
896
896
|
qualified: 'client.extract.get',
|
|
897
897
|
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
898
|
-
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; }; }",
|
|
899
|
-
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```",
|
|
898
|
+
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; }; }",
|
|
899
|
+
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```",
|
|
900
900
|
perLanguage: {
|
|
901
901
|
python: {
|
|
902
902
|
method: 'extract.get',
|
|
@@ -977,8 +977,8 @@ const EMBEDDED_METHODS = [
|
|
|
977
977
|
stainlessPath: '(resource) extract > (method) cancel',
|
|
978
978
|
qualified: 'client.extract.cancel',
|
|
979
979
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
980
|
-
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; }; }",
|
|
981
|
-
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```",
|
|
980
|
+
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; }; }",
|
|
981
|
+
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```",
|
|
982
982
|
perLanguage: {
|
|
983
983
|
python: {
|
|
984
984
|
method: 'extract.cancel',
|
|
@@ -1067,7 +1067,7 @@ const EMBEDDED_METHODS = [
|
|
|
1067
1067
|
'prompt?: string;',
|
|
1068
1068
|
],
|
|
1069
1069
|
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; }",
|
|
1070
|
-
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-
|
|
1070
|
+
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```",
|
|
1071
1071
|
perLanguage: {
|
|
1072
1072
|
python: {
|
|
1073
1073
|
method: 'extract.generate_schema',
|
|
@@ -1298,8 +1298,8 @@ const EMBEDDED_METHODS = [
|
|
|
1298
1298
|
'webhook_configuration_ids?: string[];',
|
|
1299
1299
|
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
1300
1300
|
],
|
|
1301
|
-
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; }",
|
|
1302
|
-
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```",
|
|
1301
|
+
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; }; }",
|
|
1302
|
+
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```",
|
|
1303
1303
|
perLanguage: {
|
|
1304
1304
|
python: {
|
|
1305
1305
|
method: 'classify.create',
|
|
@@ -1349,8 +1349,8 @@ const EMBEDDED_METHODS = [
|
|
|
1349
1349
|
'project_id?: string;',
|
|
1350
1350
|
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
1351
1351
|
],
|
|
1352
|
-
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; }",
|
|
1353
|
-
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```",
|
|
1352
|
+
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; }; }",
|
|
1353
|
+
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```",
|
|
1354
1354
|
perLanguage: {
|
|
1355
1355
|
python: {
|
|
1356
1356
|
method: 'classify.list',
|
|
@@ -1386,12 +1386,12 @@ const EMBEDDED_METHODS = [
|
|
|
1386
1386
|
endpoint: '/api/v2/classify/{job_id}',
|
|
1387
1387
|
httpMethod: 'get',
|
|
1388
1388
|
summary: 'Get Classify Job',
|
|
1389
|
-
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.',
|
|
1389
|
+
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.',
|
|
1390
1390
|
stainlessPath: '(resource) classify > (method) get',
|
|
1391
1391
|
qualified: 'client.classify.get',
|
|
1392
|
-
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1393
|
-
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; }",
|
|
1394
|
-
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```",
|
|
1392
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
1393
|
+
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; }; }",
|
|
1394
|
+
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```",
|
|
1395
1395
|
perLanguage: {
|
|
1396
1396
|
python: {
|
|
1397
1397
|
method: 'classify.get',
|
|
@@ -1431,8 +1431,8 @@ const EMBEDDED_METHODS = [
|
|
|
1431
1431
|
stainlessPath: '(resource) classify > (method) cancel',
|
|
1432
1432
|
qualified: 'client.classify.cancel',
|
|
1433
1433
|
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1434
|
-
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; }",
|
|
1435
|
-
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```",
|
|
1434
|
+
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; }; }",
|
|
1435
|
+
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```",
|
|
1436
1436
|
perLanguage: {
|
|
1437
1437
|
python: {
|
|
1438
1438
|
method: 'classify.cancel',
|
|
@@ -1514,12 +1514,12 @@ const EMBEDDED_METHODS = [
|
|
|
1514
1514
|
qualified: 'client.configurations.create',
|
|
1515
1515
|
params: [
|
|
1516
1516
|
'name: string;',
|
|
1517
|
-
"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-
|
|
1517
|
+
"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'; };",
|
|
1518
1518
|
'organization_id?: string;',
|
|
1519
1519
|
'project_id?: string;',
|
|
1520
1520
|
],
|
|
1521
1521
|
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; }",
|
|
1522
|
-
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```",
|
|
1522
|
+
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```",
|
|
1523
1523
|
perLanguage: {
|
|
1524
1524
|
python: {
|
|
1525
1525
|
method: 'configurations.create',
|
|
@@ -1568,7 +1568,7 @@ const EMBEDDED_METHODS = [
|
|
|
1568
1568
|
'project_id?: string;',
|
|
1569
1569
|
],
|
|
1570
1570
|
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; }",
|
|
1571
|
-
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-
|
|
1571
|
+
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```",
|
|
1572
1572
|
perLanguage: {
|
|
1573
1573
|
python: {
|
|
1574
1574
|
method: 'configurations.list',
|
|
@@ -1609,7 +1609,7 @@ const EMBEDDED_METHODS = [
|
|
|
1609
1609
|
qualified: 'client.configurations.retrieve',
|
|
1610
1610
|
params: ['config_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
1611
1611
|
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; }",
|
|
1612
|
-
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-
|
|
1612
|
+
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```",
|
|
1613
1613
|
perLanguage: {
|
|
1614
1614
|
python: {
|
|
1615
1615
|
method: 'configurations.retrieve',
|
|
@@ -1653,10 +1653,10 @@ const EMBEDDED_METHODS = [
|
|
|
1653
1653
|
'organization_id?: string;',
|
|
1654
1654
|
'project_id?: string;',
|
|
1655
1655
|
'name?: string;',
|
|
1656
|
-
"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-
|
|
1656
|
+
"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'; };",
|
|
1657
1657
|
],
|
|
1658
1658
|
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; }",
|
|
1659
|
-
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```",
|
|
1659
|
+
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```",
|
|
1660
1660
|
perLanguage: {
|
|
1661
1661
|
python: {
|
|
1662
1662
|
method: 'configurations.update',
|
|
@@ -4742,38 +4742,43 @@ const EMBEDDED_METHODS = [
|
|
|
4742
4742
|
httpMethod: 'get',
|
|
4743
4743
|
summary: 'Get Index',
|
|
4744
4744
|
description: 'Get an index by ID.',
|
|
4745
|
-
stainlessPath: '(resource)
|
|
4746
|
-
qualified: 'client.
|
|
4747
|
-
params: [
|
|
4745
|
+
stainlessPath: '(resource) indexes > (method) get',
|
|
4746
|
+
qualified: 'client.indexes.get',
|
|
4747
|
+
params: [
|
|
4748
|
+
'index_id: string;',
|
|
4749
|
+
"expand?: 'sync_in_progress'[];",
|
|
4750
|
+
'organization_id?: string;',
|
|
4751
|
+
'project_id?: string;',
|
|
4752
|
+
],
|
|
4748
4753
|
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; }',
|
|
4749
|
-
markdown: "## get\n\n`client.
|
|
4754
|
+
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```",
|
|
4750
4755
|
perLanguage: {
|
|
4751
4756
|
python: {
|
|
4752
|
-
method: '
|
|
4753
|
-
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.
|
|
4757
|
+
method: 'indexes.get',
|
|
4758
|
+
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)',
|
|
4754
4759
|
},
|
|
4755
4760
|
go: {
|
|
4756
|
-
method: 'client.
|
|
4757
|
-
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.
|
|
4761
|
+
method: 'client.Indexes.Get',
|
|
4762
|
+
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',
|
|
4758
4763
|
},
|
|
4759
4764
|
java: {
|
|
4760
|
-
method: '
|
|
4761
|
-
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.
|
|
4765
|
+
method: 'indexes().get',
|
|
4766
|
+
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}',
|
|
4762
4767
|
},
|
|
4763
4768
|
csharp: {
|
|
4764
|
-
method: '
|
|
4765
|
-
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.
|
|
4769
|
+
method: 'Indexes.Get',
|
|
4770
|
+
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
4766
4771
|
},
|
|
4767
4772
|
typescript: {
|
|
4768
|
-
method: 'client.
|
|
4769
|
-
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.
|
|
4773
|
+
method: 'client.indexes.get',
|
|
4774
|
+
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);",
|
|
4770
4775
|
},
|
|
4771
4776
|
http: {
|
|
4772
4777
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4773
4778
|
},
|
|
4774
4779
|
cli: {
|
|
4775
4780
|
method: 'indexes get',
|
|
4776
|
-
example: "llp
|
|
4781
|
+
example: "llp indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4777
4782
|
},
|
|
4778
4783
|
},
|
|
4779
4784
|
},
|
|
@@ -4783,37 +4788,37 @@ const EMBEDDED_METHODS = [
|
|
|
4783
4788
|
httpMethod: 'delete',
|
|
4784
4789
|
summary: 'Delete Index',
|
|
4785
4790
|
description: 'Delete an index.',
|
|
4786
|
-
stainlessPath: '(resource)
|
|
4787
|
-
qualified: 'client.
|
|
4791
|
+
stainlessPath: '(resource) indexes > (method) delete',
|
|
4792
|
+
qualified: 'client.indexes.delete',
|
|
4788
4793
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4789
|
-
markdown: "## delete\n\n`client.
|
|
4794
|
+
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```",
|
|
4790
4795
|
perLanguage: {
|
|
4791
4796
|
python: {
|
|
4792
|
-
method: '
|
|
4793
|
-
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.
|
|
4797
|
+
method: 'indexes.delete',
|
|
4798
|
+
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)',
|
|
4794
4799
|
},
|
|
4795
4800
|
go: {
|
|
4796
|
-
method: 'client.
|
|
4797
|
-
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.
|
|
4801
|
+
method: 'client.Indexes.Delete',
|
|
4802
|
+
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',
|
|
4798
4803
|
},
|
|
4799
4804
|
java: {
|
|
4800
|
-
method: '
|
|
4801
|
-
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.
|
|
4805
|
+
method: 'indexes().delete',
|
|
4806
|
+
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}',
|
|
4802
4807
|
},
|
|
4803
4808
|
csharp: {
|
|
4804
|
-
method: '
|
|
4805
|
-
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.
|
|
4809
|
+
method: 'Indexes.Delete',
|
|
4810
|
+
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Indexes.Delete(parameters);',
|
|
4806
4811
|
},
|
|
4807
4812
|
typescript: {
|
|
4808
|
-
method: 'client.
|
|
4809
|
-
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.
|
|
4813
|
+
method: 'client.indexes.delete',
|
|
4814
|
+
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');",
|
|
4810
4815
|
},
|
|
4811
4816
|
http: {
|
|
4812
4817
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4813
4818
|
},
|
|
4814
4819
|
cli: {
|
|
4815
4820
|
method: 'indexes delete',
|
|
4816
|
-
example: "llp
|
|
4821
|
+
example: "llp indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4817
4822
|
},
|
|
4818
4823
|
},
|
|
4819
4824
|
},
|
|
@@ -4823,8 +4828,8 @@ const EMBEDDED_METHODS = [
|
|
|
4823
4828
|
httpMethod: 'post',
|
|
4824
4829
|
summary: 'Create Index',
|
|
4825
4830
|
description: 'Create a searchable index over a source directory.',
|
|
4826
|
-
stainlessPath: '(resource)
|
|
4827
|
-
qualified: 'client.
|
|
4831
|
+
stainlessPath: '(resource) indexes > (method) create',
|
|
4832
|
+
qualified: 'client.indexes.create',
|
|
4828
4833
|
params: [
|
|
4829
4834
|
'source_directory_id: string;',
|
|
4830
4835
|
'organization_id?: string;',
|
|
@@ -4837,34 +4842,34 @@ const EMBEDDED_METHODS = [
|
|
|
4837
4842
|
"vector_target?: 'DEFAULT' | 'DISABLED';",
|
|
4838
4843
|
],
|
|
4839
4844
|
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; }',
|
|
4840
|
-
markdown: "## create\n\n`client.
|
|
4845
|
+
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```",
|
|
4841
4846
|
perLanguage: {
|
|
4842
4847
|
python: {
|
|
4843
|
-
method: '
|
|
4844
|
-
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.
|
|
4848
|
+
method: 'indexes.create',
|
|
4849
|
+
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)',
|
|
4845
4850
|
},
|
|
4846
4851
|
go: {
|
|
4847
|
-
method: 'client.
|
|
4848
|
-
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.
|
|
4852
|
+
method: 'client.Indexes.New',
|
|
4853
|
+
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',
|
|
4849
4854
|
},
|
|
4850
4855
|
java: {
|
|
4851
|
-
method: '
|
|
4852
|
-
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.
|
|
4856
|
+
method: 'indexes().create',
|
|
4857
|
+
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}',
|
|
4853
4858
|
},
|
|
4854
4859
|
csharp: {
|
|
4855
|
-
method: '
|
|
4856
|
-
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.
|
|
4860
|
+
method: 'Indexes.Create',
|
|
4861
|
+
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
4857
4862
|
},
|
|
4858
4863
|
typescript: {
|
|
4859
|
-
method: 'client.
|
|
4860
|
-
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.
|
|
4864
|
+
method: 'client.indexes.create',
|
|
4865
|
+
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);",
|
|
4861
4866
|
},
|
|
4862
4867
|
http: {
|
|
4863
4868
|
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 }\'',
|
|
4864
4869
|
},
|
|
4865
4870
|
cli: {
|
|
4866
4871
|
method: 'indexes create',
|
|
4867
|
-
example: "llp
|
|
4872
|
+
example: "llp indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
4868
4873
|
},
|
|
4869
4874
|
},
|
|
4870
4875
|
},
|
|
@@ -4874,38 +4879,79 @@ const EMBEDDED_METHODS = [
|
|
|
4874
4879
|
httpMethod: 'post',
|
|
4875
4880
|
summary: 'Sync Index',
|
|
4876
4881
|
description: 'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
4877
|
-
stainlessPath: '(resource)
|
|
4878
|
-
qualified: 'client.
|
|
4882
|
+
stainlessPath: '(resource) indexes > (method) sync',
|
|
4883
|
+
qualified: 'client.indexes.sync',
|
|
4879
4884
|
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4880
4885
|
response: 'object',
|
|
4881
|
-
markdown: "## sync\n\n`client.
|
|
4886
|
+
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```",
|
|
4882
4887
|
perLanguage: {
|
|
4883
4888
|
python: {
|
|
4884
|
-
method: '
|
|
4885
|
-
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.
|
|
4889
|
+
method: 'indexes.sync',
|
|
4890
|
+
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)',
|
|
4886
4891
|
},
|
|
4887
4892
|
go: {
|
|
4888
|
-
method: 'client.
|
|
4889
|
-
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.
|
|
4893
|
+
method: 'client.Indexes.Sync',
|
|
4894
|
+
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',
|
|
4890
4895
|
},
|
|
4891
4896
|
java: {
|
|
4892
|
-
method: '
|
|
4893
|
-
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.
|
|
4897
|
+
method: 'indexes().sync',
|
|
4898
|
+
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}',
|
|
4894
4899
|
},
|
|
4895
4900
|
csharp: {
|
|
4896
|
-
method: '
|
|
4897
|
-
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.
|
|
4901
|
+
method: 'Indexes.Sync',
|
|
4902
|
+
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
4898
4903
|
},
|
|
4899
4904
|
typescript: {
|
|
4900
|
-
method: 'client.
|
|
4901
|
-
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.
|
|
4905
|
+
method: 'client.indexes.sync',
|
|
4906
|
+
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);",
|
|
4902
4907
|
},
|
|
4903
4908
|
http: {
|
|
4904
4909
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4905
4910
|
},
|
|
4906
4911
|
cli: {
|
|
4907
4912
|
method: 'indexes sync',
|
|
4908
|
-
example: "llp
|
|
4913
|
+
example: "llp indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4914
|
+
},
|
|
4915
|
+
},
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
name: 'cancel_sync',
|
|
4919
|
+
endpoint: '/api/v1/indexes/{index_id}/sync/cancel',
|
|
4920
|
+
httpMethod: 'post',
|
|
4921
|
+
summary: 'Cancel Index Sync',
|
|
4922
|
+
description: 'Cancel the running sync for an index. Returns 409 if no sync is running.',
|
|
4923
|
+
stainlessPath: '(resource) indexes > (method) cancel_sync',
|
|
4924
|
+
qualified: 'client.indexes.cancelSync',
|
|
4925
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
4926
|
+
response: 'object',
|
|
4927
|
+
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```",
|
|
4928
|
+
perLanguage: {
|
|
4929
|
+
python: {
|
|
4930
|
+
method: 'indexes.cancel_sync',
|
|
4931
|
+
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)',
|
|
4932
|
+
},
|
|
4933
|
+
go: {
|
|
4934
|
+
method: 'client.Indexes.CancelSync',
|
|
4935
|
+
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',
|
|
4936
|
+
},
|
|
4937
|
+
java: {
|
|
4938
|
+
method: 'indexes().cancelSync',
|
|
4939
|
+
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}',
|
|
4940
|
+
},
|
|
4941
|
+
csharp: {
|
|
4942
|
+
method: 'Indexes.CancelSync',
|
|
4943
|
+
example: 'IndexCancelSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Indexes.CancelSync(parameters);\n\nConsole.WriteLine(response);',
|
|
4944
|
+
},
|
|
4945
|
+
typescript: {
|
|
4946
|
+
method: 'client.indexes.cancelSync',
|
|
4947
|
+
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);",
|
|
4948
|
+
},
|
|
4949
|
+
http: {
|
|
4950
|
+
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"',
|
|
4951
|
+
},
|
|
4952
|
+
cli: {
|
|
4953
|
+
method: 'indexes cancel_sync',
|
|
4954
|
+
example: "llp indexes cancel-sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
4909
4955
|
},
|
|
4910
4956
|
},
|
|
4911
4957
|
},
|
|
@@ -4915,8 +4961,8 @@ const EMBEDDED_METHODS = [
|
|
|
4915
4961
|
httpMethod: 'get',
|
|
4916
4962
|
summary: 'List Indexes',
|
|
4917
4963
|
description: 'List indexes for the current project.',
|
|
4918
|
-
stainlessPath: '(resource)
|
|
4919
|
-
qualified: 'client.
|
|
4964
|
+
stainlessPath: '(resource) indexes > (method) list',
|
|
4965
|
+
qualified: 'client.indexes.list',
|
|
4920
4966
|
params: [
|
|
4921
4967
|
'organization_id?: string;',
|
|
4922
4968
|
'page_size?: number;',
|
|
@@ -4925,34 +4971,34 @@ const EMBEDDED_METHODS = [
|
|
|
4925
4971
|
'source_directory_id?: string;',
|
|
4926
4972
|
],
|
|
4927
4973
|
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; }',
|
|
4928
|
-
markdown: "## list\n\n`client.
|
|
4974
|
+
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```",
|
|
4929
4975
|
perLanguage: {
|
|
4930
4976
|
python: {
|
|
4931
|
-
method: '
|
|
4932
|
-
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.
|
|
4977
|
+
method: 'indexes.list',
|
|
4978
|
+
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)',
|
|
4933
4979
|
},
|
|
4934
4980
|
go: {
|
|
4935
|
-
method: 'client.
|
|
4936
|
-
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.
|
|
4981
|
+
method: 'client.Indexes.List',
|
|
4982
|
+
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',
|
|
4937
4983
|
},
|
|
4938
4984
|
java: {
|
|
4939
|
-
method: '
|
|
4940
|
-
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.
|
|
4985
|
+
method: 'indexes().list',
|
|
4986
|
+
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}',
|
|
4941
4987
|
},
|
|
4942
4988
|
csharp: {
|
|
4943
|
-
method: '
|
|
4944
|
-
example: 'IndexListParams parameters = new();\n\nvar page = await client.
|
|
4989
|
+
method: 'Indexes.List',
|
|
4990
|
+
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}',
|
|
4945
4991
|
},
|
|
4946
4992
|
typescript: {
|
|
4947
|
-
method: 'client.
|
|
4948
|
-
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.
|
|
4993
|
+
method: 'client.indexes.list',
|
|
4994
|
+
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}",
|
|
4949
4995
|
},
|
|
4950
4996
|
http: {
|
|
4951
4997
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
4952
4998
|
},
|
|
4953
4999
|
cli: {
|
|
4954
5000
|
method: 'indexes list',
|
|
4955
|
-
example: "llp
|
|
5001
|
+
example: "llp indexes list \\\n --api-key 'My API Key'",
|
|
4956
5002
|
},
|
|
4957
5003
|
},
|
|
4958
5004
|
},
|
|
@@ -4962,8 +5008,8 @@ const EMBEDDED_METHODS = [
|
|
|
4962
5008
|
httpMethod: 'post',
|
|
4963
5009
|
summary: 'Retrieve',
|
|
4964
5010
|
description: 'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
4965
|
-
stainlessPath: '(resource)
|
|
4966
|
-
qualified: 'client.
|
|
5011
|
+
stainlessPath: '(resource) retrieval > (method) retrieve',
|
|
5012
|
+
qualified: 'client.retrieval.retrieve',
|
|
4967
5013
|
params: [
|
|
4968
5014
|
'index_id: string;',
|
|
4969
5015
|
'query: string;',
|
|
@@ -4979,34 +5025,34 @@ const EMBEDDED_METHODS = [
|
|
|
4979
5025
|
'vector_pipeline_weight?: number;',
|
|
4980
5026
|
],
|
|
4981
5027
|
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; }; }[]; }',
|
|
4982
|
-
markdown: "## retrieve\n\n`client.
|
|
5028
|
+
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```",
|
|
4983
5029
|
perLanguage: {
|
|
4984
5030
|
python: {
|
|
4985
|
-
method: '
|
|
4986
|
-
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.
|
|
5031
|
+
method: 'retrieval.retrieve',
|
|
5032
|
+
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)',
|
|
4987
5033
|
},
|
|
4988
5034
|
go: {
|
|
4989
|
-
method: 'client.
|
|
4990
|
-
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.
|
|
5035
|
+
method: 'client.Retrieval.Get',
|
|
5036
|
+
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',
|
|
4991
5037
|
},
|
|
4992
5038
|
java: {
|
|
4993
|
-
method: '
|
|
4994
|
-
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.
|
|
5039
|
+
method: 'retrieval().retrieve',
|
|
5040
|
+
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}',
|
|
4995
5041
|
},
|
|
4996
5042
|
csharp: {
|
|
4997
|
-
method: '
|
|
4998
|
-
example: 'RetrievalRetrieveParams parameters = new()\n{\n IndexID = "idx-abc123",\n Query = "What are the key findings?",\n};\n\nvar retrieval = await client.
|
|
5043
|
+
method: 'Retrieval.Retrieve',
|
|
5044
|
+
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);',
|
|
4999
5045
|
},
|
|
5000
5046
|
typescript: {
|
|
5001
|
-
method: 'client.
|
|
5002
|
-
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.
|
|
5047
|
+
method: 'client.retrieval.retrieve',
|
|
5048
|
+
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);",
|
|
5003
5049
|
},
|
|
5004
5050
|
http: {
|
|
5005
5051
|
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 }\'',
|
|
5006
5052
|
},
|
|
5007
5053
|
cli: {
|
|
5008
5054
|
method: 'retrieval retrieve',
|
|
5009
|
-
example: "llp
|
|
5055
|
+
example: "llp retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
5010
5056
|
},
|
|
5011
5057
|
},
|
|
5012
5058
|
},
|
|
@@ -5016,8 +5062,8 @@ const EMBEDDED_METHODS = [
|
|
|
5016
5062
|
httpMethod: 'post',
|
|
5017
5063
|
summary: 'Find Files',
|
|
5018
5064
|
description: 'Search for files by name.',
|
|
5019
|
-
stainlessPath: '(resource)
|
|
5020
|
-
qualified: 'client.
|
|
5065
|
+
stainlessPath: '(resource) retrieval > (method) find',
|
|
5066
|
+
qualified: 'client.retrieval.find',
|
|
5021
5067
|
params: [
|
|
5022
5068
|
'index_id: string;',
|
|
5023
5069
|
'organization_id?: string;',
|
|
@@ -5028,34 +5074,34 @@ const EMBEDDED_METHODS = [
|
|
|
5028
5074
|
'page_token?: string;',
|
|
5029
5075
|
],
|
|
5030
5076
|
response: '{ file_id: string; file_name: string; }',
|
|
5031
|
-
markdown: "## find\n\n`client.
|
|
5077
|
+
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```",
|
|
5032
5078
|
perLanguage: {
|
|
5033
5079
|
python: {
|
|
5034
|
-
method: '
|
|
5035
|
-
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.
|
|
5080
|
+
method: 'retrieval.find',
|
|
5081
|
+
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)',
|
|
5036
5082
|
},
|
|
5037
5083
|
go: {
|
|
5038
|
-
method: 'client.
|
|
5039
|
-
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.
|
|
5084
|
+
method: 'client.Retrieval.Find',
|
|
5085
|
+
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',
|
|
5040
5086
|
},
|
|
5041
5087
|
java: {
|
|
5042
|
-
method: '
|
|
5043
|
-
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.
|
|
5088
|
+
method: 'retrieval().find',
|
|
5089
|
+
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}',
|
|
5044
5090
|
},
|
|
5045
5091
|
csharp: {
|
|
5046
|
-
method: '
|
|
5047
|
-
example: 'RetrievalFindParams parameters = new() { IndexID = "idx-abc123" };\n\nvar page = await client.
|
|
5092
|
+
method: 'Retrieval.Find',
|
|
5093
|
+
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}',
|
|
5048
5094
|
},
|
|
5049
5095
|
typescript: {
|
|
5050
|
-
method: 'client.
|
|
5051
|
-
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.
|
|
5096
|
+
method: 'client.retrieval.find',
|
|
5097
|
+
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}",
|
|
5052
5098
|
},
|
|
5053
5099
|
http: {
|
|
5054
5100
|
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 }\'',
|
|
5055
5101
|
},
|
|
5056
5102
|
cli: {
|
|
5057
5103
|
method: 'retrieval find',
|
|
5058
|
-
example: "llp
|
|
5104
|
+
example: "llp retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
5059
5105
|
},
|
|
5060
5106
|
},
|
|
5061
5107
|
},
|
|
@@ -5065,8 +5111,8 @@ const EMBEDDED_METHODS = [
|
|
|
5065
5111
|
httpMethod: 'post',
|
|
5066
5112
|
summary: 'Grep File',
|
|
5067
5113
|
description: "Grep within a file's parsed content using a regex pattern.",
|
|
5068
|
-
stainlessPath: '(resource)
|
|
5069
|
-
qualified: 'client.
|
|
5114
|
+
stainlessPath: '(resource) retrieval > (method) grep',
|
|
5115
|
+
qualified: 'client.retrieval.grep',
|
|
5070
5116
|
params: [
|
|
5071
5117
|
'file_id: string;',
|
|
5072
5118
|
'index_id: string;',
|
|
@@ -5078,34 +5124,34 @@ const EMBEDDED_METHODS = [
|
|
|
5078
5124
|
'page_token?: string;',
|
|
5079
5125
|
],
|
|
5080
5126
|
response: '{ content: string; end_char: number; start_char: number; }',
|
|
5081
|
-
markdown: "## grep\n\n`client.
|
|
5127
|
+
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```",
|
|
5082
5128
|
perLanguage: {
|
|
5083
5129
|
python: {
|
|
5084
|
-
method: '
|
|
5085
|
-
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.
|
|
5130
|
+
method: 'retrieval.grep',
|
|
5131
|
+
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)',
|
|
5086
5132
|
},
|
|
5087
5133
|
go: {
|
|
5088
|
-
method: 'client.
|
|
5089
|
-
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.
|
|
5134
|
+
method: 'client.Retrieval.Grep',
|
|
5135
|
+
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',
|
|
5090
5136
|
},
|
|
5091
5137
|
java: {
|
|
5092
|
-
method: '
|
|
5093
|
-
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.
|
|
5138
|
+
method: 'retrieval().grep',
|
|
5139
|
+
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}',
|
|
5094
5140
|
},
|
|
5095
5141
|
csharp: {
|
|
5096
|
-
method: '
|
|
5097
|
-
example: 'RetrievalGrepParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n Pattern = "revenue|profit",\n};\n\nvar page = await client.
|
|
5142
|
+
method: 'Retrieval.Grep',
|
|
5143
|
+
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}',
|
|
5098
5144
|
},
|
|
5099
5145
|
typescript: {
|
|
5100
|
-
method: 'client.
|
|
5101
|
-
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.
|
|
5146
|
+
method: 'client.retrieval.grep',
|
|
5147
|
+
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}",
|
|
5102
5148
|
},
|
|
5103
5149
|
http: {
|
|
5104
5150
|
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 }\'',
|
|
5105
5151
|
},
|
|
5106
5152
|
cli: {
|
|
5107
5153
|
method: 'retrieval grep',
|
|
5108
|
-
example: "llp
|
|
5154
|
+
example: "llp retrieval grep \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123 \\\n --pattern 'revenue|profit'",
|
|
5109
5155
|
},
|
|
5110
5156
|
},
|
|
5111
5157
|
},
|
|
@@ -5115,8 +5161,8 @@ const EMBEDDED_METHODS = [
|
|
|
5115
5161
|
httpMethod: 'post',
|
|
5116
5162
|
summary: 'Read File',
|
|
5117
5163
|
description: 'Read the parsed text content of a specific file.',
|
|
5118
|
-
stainlessPath: '(resource)
|
|
5119
|
-
qualified: 'client.
|
|
5164
|
+
stainlessPath: '(resource) retrieval > (method) read',
|
|
5165
|
+
qualified: 'client.retrieval.read',
|
|
5120
5166
|
params: [
|
|
5121
5167
|
'file_id: string;',
|
|
5122
5168
|
'index_id: string;',
|
|
@@ -5126,34 +5172,34 @@ const EMBEDDED_METHODS = [
|
|
|
5126
5172
|
'offset?: number;',
|
|
5127
5173
|
],
|
|
5128
5174
|
response: '{ content: string; }',
|
|
5129
|
-
markdown: "## read\n\n`client.
|
|
5175
|
+
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```",
|
|
5130
5176
|
perLanguage: {
|
|
5131
5177
|
python: {
|
|
5132
|
-
method: '
|
|
5133
|
-
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.
|
|
5178
|
+
method: 'retrieval.read',
|
|
5179
|
+
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)',
|
|
5134
5180
|
},
|
|
5135
5181
|
go: {
|
|
5136
|
-
method: 'client.
|
|
5137
|
-
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.
|
|
5182
|
+
method: 'client.Retrieval.Read',
|
|
5183
|
+
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',
|
|
5138
5184
|
},
|
|
5139
5185
|
java: {
|
|
5140
|
-
method: '
|
|
5141
|
-
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.
|
|
5186
|
+
method: 'retrieval().read',
|
|
5187
|
+
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}',
|
|
5142
5188
|
},
|
|
5143
5189
|
csharp: {
|
|
5144
|
-
method: '
|
|
5145
|
-
example: 'RetrievalReadParams parameters = new()\n{\n FileID = "file_id",\n IndexID = "idx-abc123",\n};\n\nvar response = await client.
|
|
5190
|
+
method: 'Retrieval.Read',
|
|
5191
|
+
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);',
|
|
5146
5192
|
},
|
|
5147
5193
|
typescript: {
|
|
5148
|
-
method: 'client.
|
|
5149
|
-
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.
|
|
5194
|
+
method: 'client.retrieval.read',
|
|
5195
|
+
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);",
|
|
5150
5196
|
},
|
|
5151
5197
|
http: {
|
|
5152
5198
|
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 }\'',
|
|
5153
5199
|
},
|
|
5154
5200
|
cli: {
|
|
5155
5201
|
method: 'retrieval read',
|
|
5156
|
-
example: "llp
|
|
5202
|
+
example: "llp retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
5157
5203
|
},
|
|
5158
5204
|
},
|
|
5159
5205
|
},
|
|
@@ -5163,8 +5209,8 @@ const EMBEDDED_METHODS = [
|
|
|
5163
5209
|
httpMethod: 'get',
|
|
5164
5210
|
summary: 'List Sessions',
|
|
5165
5211
|
description: 'List all chat sessions for the current project.',
|
|
5166
|
-
stainlessPath: '(resource)
|
|
5167
|
-
qualified: 'client.
|
|
5212
|
+
stainlessPath: '(resource) chat > (method) list',
|
|
5213
|
+
qualified: 'client.chat.list',
|
|
5168
5214
|
params: [
|
|
5169
5215
|
'organization_id?: string;',
|
|
5170
5216
|
'page_size?: number;',
|
|
@@ -5172,34 +5218,34 @@ const EMBEDDED_METHODS = [
|
|
|
5172
5218
|
'project_id?: string;',
|
|
5173
5219
|
],
|
|
5174
5220
|
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; }; }",
|
|
5175
|
-
markdown: "## list\n\n`client.
|
|
5221
|
+
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```",
|
|
5176
5222
|
perLanguage: {
|
|
5177
5223
|
python: {
|
|
5178
|
-
method: '
|
|
5179
|
-
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.
|
|
5224
|
+
method: 'chat.list',
|
|
5225
|
+
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)',
|
|
5180
5226
|
},
|
|
5181
5227
|
go: {
|
|
5182
|
-
method: 'client.
|
|
5183
|
-
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.
|
|
5228
|
+
method: 'client.Chat.List',
|
|
5229
|
+
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',
|
|
5184
5230
|
},
|
|
5185
5231
|
java: {
|
|
5186
|
-
method: '
|
|
5187
|
-
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.
|
|
5232
|
+
method: 'chat().list',
|
|
5233
|
+
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}',
|
|
5188
5234
|
},
|
|
5189
5235
|
csharp: {
|
|
5190
|
-
method: '
|
|
5191
|
-
example: 'ChatListParams parameters = new();\n\nvar page = await client.
|
|
5236
|
+
method: 'Chat.List',
|
|
5237
|
+
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}',
|
|
5192
5238
|
},
|
|
5193
5239
|
typescript: {
|
|
5194
|
-
method: 'client.
|
|
5195
|
-
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.
|
|
5240
|
+
method: 'client.chat.list',
|
|
5241
|
+
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}",
|
|
5196
5242
|
},
|
|
5197
5243
|
http: {
|
|
5198
5244
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5199
5245
|
},
|
|
5200
5246
|
cli: {
|
|
5201
5247
|
method: 'chat list',
|
|
5202
|
-
example: "llp
|
|
5248
|
+
example: "llp chat list \\\n --api-key 'My API Key'",
|
|
5203
5249
|
},
|
|
5204
5250
|
},
|
|
5205
5251
|
},
|
|
@@ -5209,8 +5255,8 @@ const EMBEDDED_METHODS = [
|
|
|
5209
5255
|
httpMethod: 'post',
|
|
5210
5256
|
summary: 'Create Session',
|
|
5211
5257
|
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
5212
|
-
stainlessPath: '(resource)
|
|
5213
|
-
qualified: 'client.
|
|
5258
|
+
stainlessPath: '(resource) chat > (method) create',
|
|
5259
|
+
qualified: 'client.chat.create',
|
|
5214
5260
|
params: [
|
|
5215
5261
|
'organization_id?: string;',
|
|
5216
5262
|
'project_id?: string;',
|
|
@@ -5218,34 +5264,34 @@ const EMBEDDED_METHODS = [
|
|
|
5218
5264
|
"shared_access?: 'query' | 'read_only';",
|
|
5219
5265
|
],
|
|
5220
5266
|
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; }; }",
|
|
5221
|
-
markdown: "## create\n\n`client.
|
|
5267
|
+
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```",
|
|
5222
5268
|
perLanguage: {
|
|
5223
5269
|
python: {
|
|
5224
|
-
method: '
|
|
5225
|
-
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.
|
|
5270
|
+
method: 'chat.create',
|
|
5271
|
+
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)',
|
|
5226
5272
|
},
|
|
5227
5273
|
go: {
|
|
5228
|
-
method: 'client.
|
|
5229
|
-
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.
|
|
5274
|
+
method: 'client.Chat.New',
|
|
5275
|
+
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',
|
|
5230
5276
|
},
|
|
5231
5277
|
java: {
|
|
5232
|
-
method: '
|
|
5233
|
-
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.
|
|
5278
|
+
method: 'chat().create',
|
|
5279
|
+
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}',
|
|
5234
5280
|
},
|
|
5235
5281
|
csharp: {
|
|
5236
|
-
method: '
|
|
5237
|
-
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.
|
|
5282
|
+
method: 'Chat.Create',
|
|
5283
|
+
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
5238
5284
|
},
|
|
5239
5285
|
typescript: {
|
|
5240
|
-
method: 'client.
|
|
5241
|
-
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.
|
|
5286
|
+
method: 'client.chat.create',
|
|
5287
|
+
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);",
|
|
5242
5288
|
},
|
|
5243
5289
|
http: {
|
|
5244
5290
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5245
5291
|
},
|
|
5246
5292
|
cli: {
|
|
5247
5293
|
method: 'chat create',
|
|
5248
|
-
example: "llp
|
|
5294
|
+
example: "llp chat create \\\n --api-key 'My API Key'",
|
|
5249
5295
|
},
|
|
5250
5296
|
},
|
|
5251
5297
|
},
|
|
@@ -5255,38 +5301,38 @@ const EMBEDDED_METHODS = [
|
|
|
5255
5301
|
httpMethod: 'get',
|
|
5256
5302
|
summary: 'Get Full Session',
|
|
5257
5303
|
description: 'Retrieve a full session by ID, including its event history.',
|
|
5258
|
-
stainlessPath: '(resource)
|
|
5259
|
-
qualified: 'client.
|
|
5304
|
+
stainlessPath: '(resource) chat > (method) retrieve',
|
|
5305
|
+
qualified: 'client.chat.retrieve',
|
|
5260
5306
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5261
5307
|
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; }; }",
|
|
5262
|
-
markdown: "## retrieve\n\n`client.
|
|
5308
|
+
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```",
|
|
5263
5309
|
perLanguage: {
|
|
5264
5310
|
python: {
|
|
5265
|
-
method: '
|
|
5266
|
-
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.
|
|
5311
|
+
method: 'chat.retrieve',
|
|
5312
|
+
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)',
|
|
5267
5313
|
},
|
|
5268
5314
|
go: {
|
|
5269
|
-
method: 'client.
|
|
5270
|
-
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.
|
|
5315
|
+
method: 'client.Chat.Get',
|
|
5316
|
+
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',
|
|
5271
5317
|
},
|
|
5272
5318
|
java: {
|
|
5273
|
-
method: '
|
|
5274
|
-
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.
|
|
5319
|
+
method: 'chat().retrieve',
|
|
5320
|
+
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}',
|
|
5275
5321
|
},
|
|
5276
5322
|
csharp: {
|
|
5277
|
-
method: '
|
|
5278
|
-
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.
|
|
5323
|
+
method: 'Chat.Retrieve',
|
|
5324
|
+
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
5279
5325
|
},
|
|
5280
5326
|
typescript: {
|
|
5281
|
-
method: 'client.
|
|
5282
|
-
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.
|
|
5327
|
+
method: 'client.chat.retrieve',
|
|
5328
|
+
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);",
|
|
5283
5329
|
},
|
|
5284
5330
|
http: {
|
|
5285
5331
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5286
5332
|
},
|
|
5287
5333
|
cli: {
|
|
5288
5334
|
method: 'chat retrieve',
|
|
5289
|
-
example: "llp
|
|
5335
|
+
example: "llp chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5290
5336
|
},
|
|
5291
5337
|
},
|
|
5292
5338
|
},
|
|
@@ -5296,37 +5342,37 @@ const EMBEDDED_METHODS = [
|
|
|
5296
5342
|
httpMethod: 'delete',
|
|
5297
5343
|
summary: 'Delete Session',
|
|
5298
5344
|
description: 'Delete a session.',
|
|
5299
|
-
stainlessPath: '(resource)
|
|
5300
|
-
qualified: 'client.
|
|
5345
|
+
stainlessPath: '(resource) chat > (method) delete',
|
|
5346
|
+
qualified: 'client.chat.delete',
|
|
5301
5347
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5302
|
-
markdown: "## delete\n\n`client.
|
|
5348
|
+
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```",
|
|
5303
5349
|
perLanguage: {
|
|
5304
5350
|
python: {
|
|
5305
|
-
method: '
|
|
5306
|
-
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.
|
|
5351
|
+
method: 'chat.delete',
|
|
5352
|
+
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)',
|
|
5307
5353
|
},
|
|
5308
5354
|
go: {
|
|
5309
|
-
method: 'client.
|
|
5310
|
-
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.
|
|
5355
|
+
method: 'client.Chat.Delete',
|
|
5356
|
+
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',
|
|
5311
5357
|
},
|
|
5312
5358
|
java: {
|
|
5313
|
-
method: '
|
|
5314
|
-
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.
|
|
5359
|
+
method: 'chat().delete',
|
|
5360
|
+
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}',
|
|
5315
5361
|
},
|
|
5316
5362
|
csharp: {
|
|
5317
|
-
method: '
|
|
5318
|
-
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.
|
|
5363
|
+
method: 'Chat.Delete',
|
|
5364
|
+
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Chat.Delete(parameters);',
|
|
5319
5365
|
},
|
|
5320
5366
|
typescript: {
|
|
5321
|
-
method: 'client.
|
|
5322
|
-
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.
|
|
5367
|
+
method: 'client.chat.delete',
|
|
5368
|
+
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');",
|
|
5323
5369
|
},
|
|
5324
5370
|
http: {
|
|
5325
5371
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5326
5372
|
},
|
|
5327
5373
|
cli: {
|
|
5328
5374
|
method: 'chat delete',
|
|
5329
|
-
example: "llp
|
|
5375
|
+
example: "llp chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5330
5376
|
},
|
|
5331
5377
|
},
|
|
5332
5378
|
},
|
|
@@ -5336,38 +5382,38 @@ const EMBEDDED_METHODS = [
|
|
|
5336
5382
|
httpMethod: 'get',
|
|
5337
5383
|
summary: 'Get Session Summary',
|
|
5338
5384
|
description: 'Retrieve a session summary by ID.',
|
|
5339
|
-
stainlessPath: '(resource)
|
|
5340
|
-
qualified: 'client.
|
|
5385
|
+
stainlessPath: '(resource) chat > (method) get_summary',
|
|
5386
|
+
qualified: 'client.chat.getSummary',
|
|
5341
5387
|
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5342
5388
|
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; }; }",
|
|
5343
|
-
markdown: "## get_summary\n\n`client.
|
|
5389
|
+
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```",
|
|
5344
5390
|
perLanguage: {
|
|
5345
5391
|
python: {
|
|
5346
|
-
method: '
|
|
5347
|
-
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.
|
|
5392
|
+
method: 'chat.get_summary',
|
|
5393
|
+
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)',
|
|
5348
5394
|
},
|
|
5349
5395
|
go: {
|
|
5350
|
-
method: 'client.
|
|
5351
|
-
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.
|
|
5396
|
+
method: 'client.Chat.GetSummary',
|
|
5397
|
+
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',
|
|
5352
5398
|
},
|
|
5353
5399
|
java: {
|
|
5354
|
-
method: '
|
|
5355
|
-
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.
|
|
5400
|
+
method: 'chat().getSummary',
|
|
5401
|
+
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}',
|
|
5356
5402
|
},
|
|
5357
5403
|
csharp: {
|
|
5358
|
-
method: '
|
|
5359
|
-
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.
|
|
5404
|
+
method: 'Chat.GetSummary',
|
|
5405
|
+
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
5360
5406
|
},
|
|
5361
5407
|
typescript: {
|
|
5362
|
-
method: 'client.
|
|
5363
|
-
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.
|
|
5408
|
+
method: 'client.chat.getSummary',
|
|
5409
|
+
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);",
|
|
5364
5410
|
},
|
|
5365
5411
|
http: {
|
|
5366
5412
|
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5367
5413
|
},
|
|
5368
5414
|
cli: {
|
|
5369
5415
|
method: 'chat get_summary',
|
|
5370
|
-
example: "llp
|
|
5416
|
+
example: "llp chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
5371
5417
|
},
|
|
5372
5418
|
},
|
|
5373
5419
|
},
|
|
@@ -5377,8 +5423,8 @@ const EMBEDDED_METHODS = [
|
|
|
5377
5423
|
httpMethod: 'post',
|
|
5378
5424
|
summary: 'Stream Messages',
|
|
5379
5425
|
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
5380
|
-
stainlessPath: '(resource)
|
|
5381
|
-
qualified: 'client.
|
|
5426
|
+
stainlessPath: '(resource) chat > (method) stream',
|
|
5427
|
+
qualified: 'client.chat.stream',
|
|
5382
5428
|
params: [
|
|
5383
5429
|
'session_id: string;',
|
|
5384
5430
|
'index_ids: string[];',
|
|
@@ -5388,54 +5434,742 @@ const EMBEDDED_METHODS = [
|
|
|
5388
5434
|
'require_all_indexes?: boolean;',
|
|
5389
5435
|
],
|
|
5390
5436
|
response: 'object',
|
|
5391
|
-
markdown: "## stream\n\n`client.
|
|
5437
|
+
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```",
|
|
5392
5438
|
perLanguage: {
|
|
5393
5439
|
python: {
|
|
5394
|
-
method: '
|
|
5395
|
-
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.
|
|
5440
|
+
method: 'chat.stream',
|
|
5441
|
+
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)',
|
|
5396
5442
|
},
|
|
5397
5443
|
go: {
|
|
5398
|
-
method: 'client.
|
|
5399
|
-
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.
|
|
5444
|
+
method: 'client.Chat.Stream',
|
|
5445
|
+
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',
|
|
5400
5446
|
},
|
|
5401
5447
|
java: {
|
|
5402
|
-
method: '
|
|
5403
|
-
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.
|
|
5448
|
+
method: 'chat().stream',
|
|
5449
|
+
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}',
|
|
5404
5450
|
},
|
|
5405
5451
|
csharp: {
|
|
5406
|
-
method: '
|
|
5407
|
-
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.
|
|
5452
|
+
method: 'Chat.Stream',
|
|
5453
|
+
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);',
|
|
5408
5454
|
},
|
|
5409
5455
|
typescript: {
|
|
5410
|
-
method: 'client.
|
|
5411
|
-
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.
|
|
5456
|
+
method: 'client.chat.stream',
|
|
5457
|
+
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);",
|
|
5412
5458
|
},
|
|
5413
5459
|
http: {
|
|
5414
5460
|
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 }\'',
|
|
5415
5461
|
},
|
|
5416
5462
|
cli: {
|
|
5417
5463
|
method: 'chat stream',
|
|
5418
|
-
example: "llp
|
|
5464
|
+
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?'",
|
|
5419
5465
|
},
|
|
5420
5466
|
},
|
|
5421
5467
|
},
|
|
5422
5468
|
{
|
|
5423
|
-
name: '
|
|
5424
|
-
endpoint: '/api/v1/
|
|
5469
|
+
name: 'get',
|
|
5470
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
5425
5471
|
httpMethod: 'get',
|
|
5426
|
-
summary: '
|
|
5427
|
-
description: '
|
|
5428
|
-
stainlessPath: '(resource) beta.
|
|
5429
|
-
qualified: 'client.beta.
|
|
5472
|
+
summary: 'Get Index',
|
|
5473
|
+
description: 'Get an index by ID.',
|
|
5474
|
+
stainlessPath: '(resource) beta.indexes > (method) get',
|
|
5475
|
+
qualified: 'client.beta.indexes.get',
|
|
5430
5476
|
params: [
|
|
5431
|
-
'
|
|
5477
|
+
'index_id: string;',
|
|
5478
|
+
"expand?: 'sync_in_progress'[];",
|
|
5432
5479
|
'organization_id?: string;',
|
|
5433
|
-
'page_size?: number;',
|
|
5434
|
-
'page_token?: string;',
|
|
5435
5480
|
'project_id?: string;',
|
|
5436
5481
|
],
|
|
5437
|
-
response: '{ name: string;
|
|
5438
|
-
markdown: "##
|
|
5482
|
+
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; }',
|
|
5483
|
+
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```",
|
|
5484
|
+
perLanguage: {
|
|
5485
|
+
python: {
|
|
5486
|
+
method: 'beta.indexes.get',
|
|
5487
|
+
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)',
|
|
5488
|
+
},
|
|
5489
|
+
go: {
|
|
5490
|
+
method: 'client.Beta.Indexes.Get',
|
|
5491
|
+
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',
|
|
5492
|
+
},
|
|
5493
|
+
java: {
|
|
5494
|
+
method: 'beta().indexes().get',
|
|
5495
|
+
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}',
|
|
5496
|
+
},
|
|
5497
|
+
csharp: {
|
|
5498
|
+
method: 'Beta.Indexes.Get',
|
|
5499
|
+
example: 'IndexGetParams parameters = new() { IndexID = "index_id" };\n\nvar index = await client.Beta.Indexes.Get(parameters);\n\nConsole.WriteLine(index);',
|
|
5500
|
+
},
|
|
5501
|
+
typescript: {
|
|
5502
|
+
method: 'client.beta.indexes.get',
|
|
5503
|
+
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);",
|
|
5504
|
+
},
|
|
5505
|
+
http: {
|
|
5506
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5507
|
+
},
|
|
5508
|
+
cli: {
|
|
5509
|
+
method: 'indexes get',
|
|
5510
|
+
example: "llp beta:indexes get \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5511
|
+
},
|
|
5512
|
+
},
|
|
5513
|
+
},
|
|
5514
|
+
{
|
|
5515
|
+
name: 'delete',
|
|
5516
|
+
endpoint: '/api/v1/indexes/{index_id}',
|
|
5517
|
+
httpMethod: 'delete',
|
|
5518
|
+
summary: 'Delete Index',
|
|
5519
|
+
description: 'Delete an index.',
|
|
5520
|
+
stainlessPath: '(resource) beta.indexes > (method) delete',
|
|
5521
|
+
qualified: 'client.beta.indexes.delete',
|
|
5522
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5523
|
+
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```",
|
|
5524
|
+
perLanguage: {
|
|
5525
|
+
python: {
|
|
5526
|
+
method: 'beta.indexes.delete',
|
|
5527
|
+
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)',
|
|
5528
|
+
},
|
|
5529
|
+
go: {
|
|
5530
|
+
method: 'client.Beta.Indexes.Delete',
|
|
5531
|
+
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',
|
|
5532
|
+
},
|
|
5533
|
+
java: {
|
|
5534
|
+
method: 'beta().indexes().delete',
|
|
5535
|
+
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}',
|
|
5536
|
+
},
|
|
5537
|
+
csharp: {
|
|
5538
|
+
method: 'Beta.Indexes.Delete',
|
|
5539
|
+
example: 'IndexDeleteParams parameters = new() { IndexID = "index_id" };\n\nawait client.Beta.Indexes.Delete(parameters);',
|
|
5540
|
+
},
|
|
5541
|
+
typescript: {
|
|
5542
|
+
method: 'client.beta.indexes.delete',
|
|
5543
|
+
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');",
|
|
5544
|
+
},
|
|
5545
|
+
http: {
|
|
5546
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5547
|
+
},
|
|
5548
|
+
cli: {
|
|
5549
|
+
method: 'indexes delete',
|
|
5550
|
+
example: "llp beta:indexes delete \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5551
|
+
},
|
|
5552
|
+
},
|
|
5553
|
+
},
|
|
5554
|
+
{
|
|
5555
|
+
name: 'create',
|
|
5556
|
+
endpoint: '/api/v1/indexes',
|
|
5557
|
+
httpMethod: 'post',
|
|
5558
|
+
summary: 'Create Index',
|
|
5559
|
+
description: 'Create a searchable index over a source directory.',
|
|
5560
|
+
stainlessPath: '(resource) beta.indexes > (method) create',
|
|
5561
|
+
qualified: 'client.beta.indexes.create',
|
|
5562
|
+
params: [
|
|
5563
|
+
'source_directory_id: string;',
|
|
5564
|
+
'organization_id?: string;',
|
|
5565
|
+
'project_id?: string;',
|
|
5566
|
+
'description?: string;',
|
|
5567
|
+
'name?: string;',
|
|
5568
|
+
'products?: { product_config_id: string; product_type: string; }[];',
|
|
5569
|
+
'store_attachments?: string[];',
|
|
5570
|
+
'sync_frequency?: string;',
|
|
5571
|
+
"vector_target?: 'DEFAULT' | 'DISABLED';",
|
|
5572
|
+
],
|
|
5573
|
+
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; }',
|
|
5574
|
+
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```",
|
|
5575
|
+
perLanguage: {
|
|
5576
|
+
python: {
|
|
5577
|
+
method: 'beta.indexes.create',
|
|
5578
|
+
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)',
|
|
5579
|
+
},
|
|
5580
|
+
go: {
|
|
5581
|
+
method: 'client.Beta.Indexes.New',
|
|
5582
|
+
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',
|
|
5583
|
+
},
|
|
5584
|
+
java: {
|
|
5585
|
+
method: 'beta().indexes().create',
|
|
5586
|
+
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}',
|
|
5587
|
+
},
|
|
5588
|
+
csharp: {
|
|
5589
|
+
method: 'Beta.Indexes.Create',
|
|
5590
|
+
example: 'IndexCreateParams parameters = new() { SourceDirectoryID = "dir-abc123" };\n\nvar index = await client.Beta.Indexes.Create(parameters);\n\nConsole.WriteLine(index);',
|
|
5591
|
+
},
|
|
5592
|
+
typescript: {
|
|
5593
|
+
method: 'client.beta.indexes.create',
|
|
5594
|
+
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);",
|
|
5595
|
+
},
|
|
5596
|
+
http: {
|
|
5597
|
+
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 }\'',
|
|
5598
|
+
},
|
|
5599
|
+
cli: {
|
|
5600
|
+
method: 'indexes create',
|
|
5601
|
+
example: "llp beta:indexes create \\\n --api-key 'My API Key' \\\n --source-directory-id dir-abc123",
|
|
5602
|
+
},
|
|
5603
|
+
},
|
|
5604
|
+
},
|
|
5605
|
+
{
|
|
5606
|
+
name: 'sync',
|
|
5607
|
+
endpoint: '/api/v1/indexes/{index_id}/sync',
|
|
5608
|
+
httpMethod: 'post',
|
|
5609
|
+
summary: 'Sync Index',
|
|
5610
|
+
description: 'Trigger a sync and export for an existing index, re-parsing changed files and exporting updated chunks.',
|
|
5611
|
+
stainlessPath: '(resource) beta.indexes > (method) sync',
|
|
5612
|
+
qualified: 'client.beta.indexes.sync',
|
|
5613
|
+
params: ['index_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5614
|
+
response: 'object',
|
|
5615
|
+
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```",
|
|
5616
|
+
perLanguage: {
|
|
5617
|
+
python: {
|
|
5618
|
+
method: 'beta.indexes.sync',
|
|
5619
|
+
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)',
|
|
5620
|
+
},
|
|
5621
|
+
go: {
|
|
5622
|
+
method: 'client.Beta.Indexes.Sync',
|
|
5623
|
+
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',
|
|
5624
|
+
},
|
|
5625
|
+
java: {
|
|
5626
|
+
method: 'beta().indexes().sync',
|
|
5627
|
+
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}',
|
|
5628
|
+
},
|
|
5629
|
+
csharp: {
|
|
5630
|
+
method: 'Beta.Indexes.Sync',
|
|
5631
|
+
example: 'IndexSyncParams parameters = new() { IndexID = "index_id" };\n\nvar response = await client.Beta.Indexes.Sync(parameters);\n\nConsole.WriteLine(response);',
|
|
5632
|
+
},
|
|
5633
|
+
typescript: {
|
|
5634
|
+
method: 'client.beta.indexes.sync',
|
|
5635
|
+
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);",
|
|
5636
|
+
},
|
|
5637
|
+
http: {
|
|
5638
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes/$INDEX_ID/sync \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5639
|
+
},
|
|
5640
|
+
cli: {
|
|
5641
|
+
method: 'indexes sync',
|
|
5642
|
+
example: "llp beta:indexes sync \\\n --api-key 'My API Key' \\\n --index-id index_id",
|
|
5643
|
+
},
|
|
5644
|
+
},
|
|
5645
|
+
},
|
|
5646
|
+
{
|
|
5647
|
+
name: 'list',
|
|
5648
|
+
endpoint: '/api/v1/indexes',
|
|
5649
|
+
httpMethod: 'get',
|
|
5650
|
+
summary: 'List Indexes',
|
|
5651
|
+
description: 'List indexes for the current project.',
|
|
5652
|
+
stainlessPath: '(resource) beta.indexes > (method) list',
|
|
5653
|
+
qualified: 'client.beta.indexes.list',
|
|
5654
|
+
params: [
|
|
5655
|
+
'organization_id?: string;',
|
|
5656
|
+
'page_size?: number;',
|
|
5657
|
+
'page_token?: string;',
|
|
5658
|
+
'project_id?: string;',
|
|
5659
|
+
'source_directory_id?: string;',
|
|
5660
|
+
],
|
|
5661
|
+
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; }',
|
|
5662
|
+
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```",
|
|
5663
|
+
perLanguage: {
|
|
5664
|
+
python: {
|
|
5665
|
+
method: 'beta.indexes.list',
|
|
5666
|
+
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)',
|
|
5667
|
+
},
|
|
5668
|
+
go: {
|
|
5669
|
+
method: 'client.Beta.Indexes.List',
|
|
5670
|
+
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',
|
|
5671
|
+
},
|
|
5672
|
+
java: {
|
|
5673
|
+
method: 'beta().indexes().list',
|
|
5674
|
+
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}',
|
|
5675
|
+
},
|
|
5676
|
+
csharp: {
|
|
5677
|
+
method: 'Beta.Indexes.List',
|
|
5678
|
+
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}',
|
|
5679
|
+
},
|
|
5680
|
+
typescript: {
|
|
5681
|
+
method: 'client.beta.indexes.list',
|
|
5682
|
+
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}",
|
|
5683
|
+
},
|
|
5684
|
+
http: {
|
|
5685
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/indexes \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5686
|
+
},
|
|
5687
|
+
cli: {
|
|
5688
|
+
method: 'indexes list',
|
|
5689
|
+
example: "llp beta:indexes list \\\n --api-key 'My API Key'",
|
|
5690
|
+
},
|
|
5691
|
+
},
|
|
5692
|
+
},
|
|
5693
|
+
{
|
|
5694
|
+
name: 'retrieve',
|
|
5695
|
+
endpoint: '/api/v1/retrieval/retrieve',
|
|
5696
|
+
httpMethod: 'post',
|
|
5697
|
+
summary: 'Retrieve',
|
|
5698
|
+
description: 'Retrieve relevant chunks via hybrid search (vector + full-text), with filtering on built-in or user-defined metadata.',
|
|
5699
|
+
stainlessPath: '(resource) beta.retrieval > (method) retrieve',
|
|
5700
|
+
qualified: 'client.beta.retrieval.retrieve',
|
|
5701
|
+
params: [
|
|
5702
|
+
'index_id: string;',
|
|
5703
|
+
'query: string;',
|
|
5704
|
+
'organization_id?: string;',
|
|
5705
|
+
'project_id?: string;',
|
|
5706
|
+
'custom_filters?: object;',
|
|
5707
|
+
'full_text_pipeline_weight?: number;',
|
|
5708
|
+
'num_candidates?: number;',
|
|
5709
|
+
'rerank?: { enabled?: boolean; top_n?: number; };',
|
|
5710
|
+
'score_threshold?: number;',
|
|
5711
|
+
"static_filters?: { parsed_directory_file_id?: { operator: 'eq' | 'gt' | 'gte' | 'in' | 'lt' | 'lte' | 'ne' | 'nin'; value: string | string[]; }; };",
|
|
5712
|
+
'top_k?: number;',
|
|
5713
|
+
'vector_pipeline_weight?: number;',
|
|
5714
|
+
],
|
|
5715
|
+
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; }; }[]; }',
|
|
5716
|
+
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```",
|
|
5717
|
+
perLanguage: {
|
|
5718
|
+
python: {
|
|
5719
|
+
method: 'beta.retrieval.retrieve',
|
|
5720
|
+
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)',
|
|
5721
|
+
},
|
|
5722
|
+
go: {
|
|
5723
|
+
method: 'client.Beta.Retrieval.Get',
|
|
5724
|
+
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',
|
|
5725
|
+
},
|
|
5726
|
+
java: {
|
|
5727
|
+
method: 'beta().retrieval().retrieve',
|
|
5728
|
+
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}',
|
|
5729
|
+
},
|
|
5730
|
+
csharp: {
|
|
5731
|
+
method: 'Beta.Retrieval.Retrieve',
|
|
5732
|
+
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);',
|
|
5733
|
+
},
|
|
5734
|
+
typescript: {
|
|
5735
|
+
method: 'client.beta.retrieval.retrieve',
|
|
5736
|
+
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);",
|
|
5737
|
+
},
|
|
5738
|
+
http: {
|
|
5739
|
+
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 }\'',
|
|
5740
|
+
},
|
|
5741
|
+
cli: {
|
|
5742
|
+
method: 'retrieval retrieve',
|
|
5743
|
+
example: "llp beta:retrieval retrieve \\\n --api-key 'My API Key' \\\n --index-id idx-abc123 \\\n --query 'What are the key findings?'",
|
|
5744
|
+
},
|
|
5745
|
+
},
|
|
5746
|
+
},
|
|
5747
|
+
{
|
|
5748
|
+
name: 'find',
|
|
5749
|
+
endpoint: '/api/v1/retrieval/files/find',
|
|
5750
|
+
httpMethod: 'post',
|
|
5751
|
+
summary: 'Find Files',
|
|
5752
|
+
description: 'Search for files by name.',
|
|
5753
|
+
stainlessPath: '(resource) beta.retrieval > (method) find',
|
|
5754
|
+
qualified: 'client.beta.retrieval.find',
|
|
5755
|
+
params: [
|
|
5756
|
+
'index_id: string;',
|
|
5757
|
+
'organization_id?: string;',
|
|
5758
|
+
'project_id?: string;',
|
|
5759
|
+
'file_name?: string;',
|
|
5760
|
+
'file_name_contains?: string;',
|
|
5761
|
+
'page_size?: number;',
|
|
5762
|
+
'page_token?: string;',
|
|
5763
|
+
],
|
|
5764
|
+
response: '{ file_id: string; file_name: string; }',
|
|
5765
|
+
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```",
|
|
5766
|
+
perLanguage: {
|
|
5767
|
+
python: {
|
|
5768
|
+
method: 'beta.retrieval.find',
|
|
5769
|
+
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)',
|
|
5770
|
+
},
|
|
5771
|
+
go: {
|
|
5772
|
+
method: 'client.Beta.Retrieval.Find',
|
|
5773
|
+
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',
|
|
5774
|
+
},
|
|
5775
|
+
java: {
|
|
5776
|
+
method: 'beta().retrieval().find',
|
|
5777
|
+
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}',
|
|
5778
|
+
},
|
|
5779
|
+
csharp: {
|
|
5780
|
+
method: 'Beta.Retrieval.Find',
|
|
5781
|
+
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}',
|
|
5782
|
+
},
|
|
5783
|
+
typescript: {
|
|
5784
|
+
method: 'client.beta.retrieval.find',
|
|
5785
|
+
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}",
|
|
5786
|
+
},
|
|
5787
|
+
http: {
|
|
5788
|
+
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 }\'',
|
|
5789
|
+
},
|
|
5790
|
+
cli: {
|
|
5791
|
+
method: 'retrieval find',
|
|
5792
|
+
example: "llp beta:retrieval find \\\n --api-key 'My API Key' \\\n --index-id idx-abc123",
|
|
5793
|
+
},
|
|
5794
|
+
},
|
|
5795
|
+
},
|
|
5796
|
+
{
|
|
5797
|
+
name: 'grep',
|
|
5798
|
+
endpoint: '/api/v1/retrieval/files/grep',
|
|
5799
|
+
httpMethod: 'post',
|
|
5800
|
+
summary: 'Grep File',
|
|
5801
|
+
description: "Grep within a file's parsed content using a regex pattern.",
|
|
5802
|
+
stainlessPath: '(resource) beta.retrieval > (method) grep',
|
|
5803
|
+
qualified: 'client.beta.retrieval.grep',
|
|
5804
|
+
params: [
|
|
5805
|
+
'file_id: string;',
|
|
5806
|
+
'index_id: string;',
|
|
5807
|
+
'pattern: string;',
|
|
5808
|
+
'organization_id?: string;',
|
|
5809
|
+
'project_id?: string;',
|
|
5810
|
+
'context_chars?: number;',
|
|
5811
|
+
'page_size?: number;',
|
|
5812
|
+
'page_token?: string;',
|
|
5813
|
+
],
|
|
5814
|
+
response: '{ content: string; end_char: number; start_char: number; }',
|
|
5815
|
+
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```",
|
|
5816
|
+
perLanguage: {
|
|
5817
|
+
python: {
|
|
5818
|
+
method: 'beta.retrieval.grep',
|
|
5819
|
+
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)',
|
|
5820
|
+
},
|
|
5821
|
+
go: {
|
|
5822
|
+
method: 'client.Beta.Retrieval.Grep',
|
|
5823
|
+
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',
|
|
5824
|
+
},
|
|
5825
|
+
java: {
|
|
5826
|
+
method: 'beta().retrieval().grep',
|
|
5827
|
+
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}',
|
|
5828
|
+
},
|
|
5829
|
+
csharp: {
|
|
5830
|
+
method: 'Beta.Retrieval.Grep',
|
|
5831
|
+
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}',
|
|
5832
|
+
},
|
|
5833
|
+
typescript: {
|
|
5834
|
+
method: 'client.beta.retrieval.grep',
|
|
5835
|
+
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}",
|
|
5836
|
+
},
|
|
5837
|
+
http: {
|
|
5838
|
+
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 }\'',
|
|
5839
|
+
},
|
|
5840
|
+
cli: {
|
|
5841
|
+
method: 'retrieval grep',
|
|
5842
|
+
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'",
|
|
5843
|
+
},
|
|
5844
|
+
},
|
|
5845
|
+
},
|
|
5846
|
+
{
|
|
5847
|
+
name: 'read',
|
|
5848
|
+
endpoint: '/api/v1/retrieval/files/read',
|
|
5849
|
+
httpMethod: 'post',
|
|
5850
|
+
summary: 'Read File',
|
|
5851
|
+
description: 'Read the parsed text content of a specific file.',
|
|
5852
|
+
stainlessPath: '(resource) beta.retrieval > (method) read',
|
|
5853
|
+
qualified: 'client.beta.retrieval.read',
|
|
5854
|
+
params: [
|
|
5855
|
+
'file_id: string;',
|
|
5856
|
+
'index_id: string;',
|
|
5857
|
+
'organization_id?: string;',
|
|
5858
|
+
'project_id?: string;',
|
|
5859
|
+
'max_length?: number;',
|
|
5860
|
+
'offset?: number;',
|
|
5861
|
+
],
|
|
5862
|
+
response: '{ content: string; }',
|
|
5863
|
+
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```",
|
|
5864
|
+
perLanguage: {
|
|
5865
|
+
python: {
|
|
5866
|
+
method: 'beta.retrieval.read',
|
|
5867
|
+
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)',
|
|
5868
|
+
},
|
|
5869
|
+
go: {
|
|
5870
|
+
method: 'client.Beta.Retrieval.Read',
|
|
5871
|
+
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',
|
|
5872
|
+
},
|
|
5873
|
+
java: {
|
|
5874
|
+
method: 'beta().retrieval().read',
|
|
5875
|
+
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}',
|
|
5876
|
+
},
|
|
5877
|
+
csharp: {
|
|
5878
|
+
method: 'Beta.Retrieval.Read',
|
|
5879
|
+
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);',
|
|
5880
|
+
},
|
|
5881
|
+
typescript: {
|
|
5882
|
+
method: 'client.beta.retrieval.read',
|
|
5883
|
+
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);",
|
|
5884
|
+
},
|
|
5885
|
+
http: {
|
|
5886
|
+
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 }\'',
|
|
5887
|
+
},
|
|
5888
|
+
cli: {
|
|
5889
|
+
method: 'retrieval read',
|
|
5890
|
+
example: "llp beta:retrieval read \\\n --api-key 'My API Key' \\\n --file-id file_id \\\n --index-id idx-abc123",
|
|
5891
|
+
},
|
|
5892
|
+
},
|
|
5893
|
+
},
|
|
5894
|
+
{
|
|
5895
|
+
name: 'list',
|
|
5896
|
+
endpoint: '/api/v1/chat',
|
|
5897
|
+
httpMethod: 'get',
|
|
5898
|
+
summary: 'List Sessions',
|
|
5899
|
+
description: 'List all chat sessions for the current project.',
|
|
5900
|
+
stainlessPath: '(resource) beta.chat > (method) list',
|
|
5901
|
+
qualified: 'client.beta.chat.list',
|
|
5902
|
+
params: [
|
|
5903
|
+
'organization_id?: string;',
|
|
5904
|
+
'page_size?: number;',
|
|
5905
|
+
'page_token?: string;',
|
|
5906
|
+
'project_id?: string;',
|
|
5907
|
+
],
|
|
5908
|
+
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; }; }",
|
|
5909
|
+
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```",
|
|
5910
|
+
perLanguage: {
|
|
5911
|
+
python: {
|
|
5912
|
+
method: 'beta.chat.list',
|
|
5913
|
+
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)',
|
|
5914
|
+
},
|
|
5915
|
+
go: {
|
|
5916
|
+
method: 'client.Beta.Chat.List',
|
|
5917
|
+
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',
|
|
5918
|
+
},
|
|
5919
|
+
java: {
|
|
5920
|
+
method: 'beta().chat().list',
|
|
5921
|
+
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}',
|
|
5922
|
+
},
|
|
5923
|
+
csharp: {
|
|
5924
|
+
method: 'Beta.Chat.List',
|
|
5925
|
+
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}',
|
|
5926
|
+
},
|
|
5927
|
+
typescript: {
|
|
5928
|
+
method: 'client.beta.chat.list',
|
|
5929
|
+
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}",
|
|
5930
|
+
},
|
|
5931
|
+
http: {
|
|
5932
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5933
|
+
},
|
|
5934
|
+
cli: {
|
|
5935
|
+
method: 'chat list',
|
|
5936
|
+
example: "llp beta:chat list \\\n --api-key 'My API Key'",
|
|
5937
|
+
},
|
|
5938
|
+
},
|
|
5939
|
+
},
|
|
5940
|
+
{
|
|
5941
|
+
name: 'create',
|
|
5942
|
+
endpoint: '/api/v1/chat',
|
|
5943
|
+
httpMethod: 'post',
|
|
5944
|
+
summary: 'Create Session',
|
|
5945
|
+
description: 'Create a chat session, optionally bound to indexes (locked after the first message).',
|
|
5946
|
+
stainlessPath: '(resource) beta.chat > (method) create',
|
|
5947
|
+
qualified: 'client.beta.chat.create',
|
|
5948
|
+
params: [
|
|
5949
|
+
'organization_id?: string;',
|
|
5950
|
+
'project_id?: string;',
|
|
5951
|
+
'index_ids?: string[];',
|
|
5952
|
+
"shared_access?: 'query' | 'read_only';",
|
|
5953
|
+
],
|
|
5954
|
+
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; }; }",
|
|
5955
|
+
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```",
|
|
5956
|
+
perLanguage: {
|
|
5957
|
+
python: {
|
|
5958
|
+
method: 'beta.chat.create',
|
|
5959
|
+
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)',
|
|
5960
|
+
},
|
|
5961
|
+
go: {
|
|
5962
|
+
method: 'client.Beta.Chat.New',
|
|
5963
|
+
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',
|
|
5964
|
+
},
|
|
5965
|
+
java: {
|
|
5966
|
+
method: 'beta().chat().create',
|
|
5967
|
+
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}',
|
|
5968
|
+
},
|
|
5969
|
+
csharp: {
|
|
5970
|
+
method: 'Beta.Chat.Create',
|
|
5971
|
+
example: 'ChatCreateParams parameters = new();\n\nvar chat = await client.Beta.Chat.Create(parameters);\n\nConsole.WriteLine(chat);',
|
|
5972
|
+
},
|
|
5973
|
+
typescript: {
|
|
5974
|
+
method: 'client.beta.chat.create',
|
|
5975
|
+
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);",
|
|
5976
|
+
},
|
|
5977
|
+
http: {
|
|
5978
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
5979
|
+
},
|
|
5980
|
+
cli: {
|
|
5981
|
+
method: 'chat create',
|
|
5982
|
+
example: "llp beta:chat create \\\n --api-key 'My API Key'",
|
|
5983
|
+
},
|
|
5984
|
+
},
|
|
5985
|
+
},
|
|
5986
|
+
{
|
|
5987
|
+
name: 'retrieve',
|
|
5988
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
5989
|
+
httpMethod: 'get',
|
|
5990
|
+
summary: 'Get Full Session',
|
|
5991
|
+
description: 'Retrieve a full session by ID, including its event history.',
|
|
5992
|
+
stainlessPath: '(resource) beta.chat > (method) retrieve',
|
|
5993
|
+
qualified: 'client.beta.chat.retrieve',
|
|
5994
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
5995
|
+
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; }; }",
|
|
5996
|
+
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```",
|
|
5997
|
+
perLanguage: {
|
|
5998
|
+
python: {
|
|
5999
|
+
method: 'beta.chat.retrieve',
|
|
6000
|
+
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)',
|
|
6001
|
+
},
|
|
6002
|
+
go: {
|
|
6003
|
+
method: 'client.Beta.Chat.Get',
|
|
6004
|
+
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',
|
|
6005
|
+
},
|
|
6006
|
+
java: {
|
|
6007
|
+
method: 'beta().chat().retrieve',
|
|
6008
|
+
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}',
|
|
6009
|
+
},
|
|
6010
|
+
csharp: {
|
|
6011
|
+
method: 'Beta.Chat.Retrieve',
|
|
6012
|
+
example: 'ChatRetrieveParams parameters = new() { SessionID = "session_id" };\n\nvar chat = await client.Beta.Chat.Retrieve(parameters);\n\nConsole.WriteLine(chat);',
|
|
6013
|
+
},
|
|
6014
|
+
typescript: {
|
|
6015
|
+
method: 'client.beta.chat.retrieve',
|
|
6016
|
+
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);",
|
|
6017
|
+
},
|
|
6018
|
+
http: {
|
|
6019
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6020
|
+
},
|
|
6021
|
+
cli: {
|
|
6022
|
+
method: 'chat retrieve',
|
|
6023
|
+
example: "llp beta:chat retrieve \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6024
|
+
},
|
|
6025
|
+
},
|
|
6026
|
+
},
|
|
6027
|
+
{
|
|
6028
|
+
name: 'delete',
|
|
6029
|
+
endpoint: '/api/v1/chat/{session_id}',
|
|
6030
|
+
httpMethod: 'delete',
|
|
6031
|
+
summary: 'Delete Session',
|
|
6032
|
+
description: 'Delete a session.',
|
|
6033
|
+
stainlessPath: '(resource) beta.chat > (method) delete',
|
|
6034
|
+
qualified: 'client.beta.chat.delete',
|
|
6035
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6036
|
+
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```",
|
|
6037
|
+
perLanguage: {
|
|
6038
|
+
python: {
|
|
6039
|
+
method: 'beta.chat.delete',
|
|
6040
|
+
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)',
|
|
6041
|
+
},
|
|
6042
|
+
go: {
|
|
6043
|
+
method: 'client.Beta.Chat.Delete',
|
|
6044
|
+
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',
|
|
6045
|
+
},
|
|
6046
|
+
java: {
|
|
6047
|
+
method: 'beta().chat().delete',
|
|
6048
|
+
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}',
|
|
6049
|
+
},
|
|
6050
|
+
csharp: {
|
|
6051
|
+
method: 'Beta.Chat.Delete',
|
|
6052
|
+
example: 'ChatDeleteParams parameters = new() { SessionID = "session_id" };\n\nawait client.Beta.Chat.Delete(parameters);',
|
|
6053
|
+
},
|
|
6054
|
+
typescript: {
|
|
6055
|
+
method: 'client.beta.chat.delete',
|
|
6056
|
+
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');",
|
|
6057
|
+
},
|
|
6058
|
+
http: {
|
|
6059
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID \\\n -X DELETE \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6060
|
+
},
|
|
6061
|
+
cli: {
|
|
6062
|
+
method: 'chat delete',
|
|
6063
|
+
example: "llp beta:chat delete \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6064
|
+
},
|
|
6065
|
+
},
|
|
6066
|
+
},
|
|
6067
|
+
{
|
|
6068
|
+
name: 'get_summary',
|
|
6069
|
+
endpoint: '/api/v1/chat/{session_id}/summary',
|
|
6070
|
+
httpMethod: 'get',
|
|
6071
|
+
summary: 'Get Session Summary',
|
|
6072
|
+
description: 'Retrieve a session summary by ID.',
|
|
6073
|
+
stainlessPath: '(resource) beta.chat > (method) get_summary',
|
|
6074
|
+
qualified: 'client.beta.chat.getSummary',
|
|
6075
|
+
params: ['session_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
6076
|
+
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; }; }",
|
|
6077
|
+
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```",
|
|
6078
|
+
perLanguage: {
|
|
6079
|
+
python: {
|
|
6080
|
+
method: 'beta.chat.get_summary',
|
|
6081
|
+
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)',
|
|
6082
|
+
},
|
|
6083
|
+
go: {
|
|
6084
|
+
method: 'client.Beta.Chat.GetSummary',
|
|
6085
|
+
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',
|
|
6086
|
+
},
|
|
6087
|
+
java: {
|
|
6088
|
+
method: 'beta().chat().getSummary',
|
|
6089
|
+
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}',
|
|
6090
|
+
},
|
|
6091
|
+
csharp: {
|
|
6092
|
+
method: 'Beta.Chat.GetSummary',
|
|
6093
|
+
example: 'ChatGetSummaryParams parameters = new() { SessionID = "session_id" };\n\nvar response = await client.Beta.Chat.GetSummary(parameters);\n\nConsole.WriteLine(response);',
|
|
6094
|
+
},
|
|
6095
|
+
typescript: {
|
|
6096
|
+
method: 'client.beta.chat.getSummary',
|
|
6097
|
+
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);",
|
|
6098
|
+
},
|
|
6099
|
+
http: {
|
|
6100
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/v1/chat/$SESSION_ID/summary \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
6101
|
+
},
|
|
6102
|
+
cli: {
|
|
6103
|
+
method: 'chat get_summary',
|
|
6104
|
+
example: "llp beta:chat get-summary \\\n --api-key 'My API Key' \\\n --session-id session_id",
|
|
6105
|
+
},
|
|
6106
|
+
},
|
|
6107
|
+
},
|
|
6108
|
+
{
|
|
6109
|
+
name: 'stream',
|
|
6110
|
+
endpoint: '/api/v1/chat/{session_id}/messages/stream',
|
|
6111
|
+
httpMethod: 'post',
|
|
6112
|
+
summary: 'Stream Messages',
|
|
6113
|
+
description: 'Stream agent events for a chat turn as Server-Sent Events.',
|
|
6114
|
+
stainlessPath: '(resource) beta.chat > (method) stream',
|
|
6115
|
+
qualified: 'client.beta.chat.stream',
|
|
6116
|
+
params: [
|
|
6117
|
+
'session_id: string;',
|
|
6118
|
+
'index_ids: string[];',
|
|
6119
|
+
'prompt: string;',
|
|
6120
|
+
'organization_id?: string;',
|
|
6121
|
+
'project_id?: string;',
|
|
6122
|
+
'require_all_indexes?: boolean;',
|
|
6123
|
+
],
|
|
6124
|
+
response: 'object',
|
|
6125
|
+
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```",
|
|
6126
|
+
perLanguage: {
|
|
6127
|
+
python: {
|
|
6128
|
+
method: 'beta.chat.stream',
|
|
6129
|
+
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)',
|
|
6130
|
+
},
|
|
6131
|
+
go: {
|
|
6132
|
+
method: 'client.Beta.Chat.Stream',
|
|
6133
|
+
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',
|
|
6134
|
+
},
|
|
6135
|
+
java: {
|
|
6136
|
+
method: 'beta().chat().stream',
|
|
6137
|
+
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}',
|
|
6138
|
+
},
|
|
6139
|
+
csharp: {
|
|
6140
|
+
method: 'Beta.Chat.Stream',
|
|
6141
|
+
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);',
|
|
6142
|
+
},
|
|
6143
|
+
typescript: {
|
|
6144
|
+
method: 'client.beta.chat.stream',
|
|
6145
|
+
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);",
|
|
6146
|
+
},
|
|
6147
|
+
http: {
|
|
6148
|
+
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 }\'',
|
|
6149
|
+
},
|
|
6150
|
+
cli: {
|
|
6151
|
+
method: 'chat stream',
|
|
6152
|
+
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?'",
|
|
6153
|
+
},
|
|
6154
|
+
},
|
|
6155
|
+
},
|
|
6156
|
+
{
|
|
6157
|
+
name: 'list',
|
|
6158
|
+
endpoint: '/api/v1/beta/attachments',
|
|
6159
|
+
httpMethod: 'get',
|
|
6160
|
+
summary: 'List Attachments',
|
|
6161
|
+
description: 'List the attachments associated with a file (e.g. per-page screenshots).',
|
|
6162
|
+
stainlessPath: '(resource) beta.attachments > (method) list',
|
|
6163
|
+
qualified: 'client.beta.attachments.list',
|
|
6164
|
+
params: [
|
|
6165
|
+
'source_id: string;',
|
|
6166
|
+
'organization_id?: string;',
|
|
6167
|
+
'page_size?: number;',
|
|
6168
|
+
'page_token?: string;',
|
|
6169
|
+
'project_id?: string;',
|
|
6170
|
+
],
|
|
6171
|
+
response: '{ name: string; size: number; last_modified?: string; }',
|
|
6172
|
+
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```",
|
|
5439
6173
|
perLanguage: {
|
|
5440
6174
|
python: {
|
|
5441
6175
|
method: 'beta.attachments.list',
|
|
@@ -6496,6 +7230,229 @@ const EMBEDDED_METHODS = [
|
|
|
6496
7230
|
},
|
|
6497
7231
|
},
|
|
6498
7232
|
},
|
|
7233
|
+
{
|
|
7234
|
+
name: 'list',
|
|
7235
|
+
endpoint: '/api/alpha/verify',
|
|
7236
|
+
httpMethod: 'get',
|
|
7237
|
+
summary: 'List Verify Jobs',
|
|
7238
|
+
description: 'List Verify jobs with optional filtering and pagination.\n\nFilter by `status`, specific `job_ids`, or creation date range.',
|
|
7239
|
+
stainlessPath: '(resource) alpha.verify > (method) list',
|
|
7240
|
+
qualified: 'client.alpha.verify.list',
|
|
7241
|
+
params: [
|
|
7242
|
+
'created_at_on_or_after?: string;',
|
|
7243
|
+
'created_at_on_or_before?: string;',
|
|
7244
|
+
'expand?: string[];',
|
|
7245
|
+
'job_ids?: string[];',
|
|
7246
|
+
'organization_id?: string;',
|
|
7247
|
+
'page_size?: number;',
|
|
7248
|
+
'page_token?: string;',
|
|
7249
|
+
'project_id?: string;',
|
|
7250
|
+
"status?: 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PENDING' | 'RUNNING';",
|
|
7251
|
+
],
|
|
7252
|
+
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; }",
|
|
7253
|
+
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```",
|
|
7254
|
+
perLanguage: {
|
|
7255
|
+
python: {
|
|
7256
|
+
method: 'alpha.verify.list',
|
|
7257
|
+
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)',
|
|
7258
|
+
},
|
|
7259
|
+
go: {
|
|
7260
|
+
method: 'client.Alpha.Verify.List',
|
|
7261
|
+
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',
|
|
7262
|
+
},
|
|
7263
|
+
java: {
|
|
7264
|
+
method: 'alpha().verify().list',
|
|
7265
|
+
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}',
|
|
7266
|
+
},
|
|
7267
|
+
csharp: {
|
|
7268
|
+
method: 'Alpha.Verify.List',
|
|
7269
|
+
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}',
|
|
7270
|
+
},
|
|
7271
|
+
typescript: {
|
|
7272
|
+
method: 'client.alpha.verify.list',
|
|
7273
|
+
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}",
|
|
7274
|
+
},
|
|
7275
|
+
http: {
|
|
7276
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7277
|
+
},
|
|
7278
|
+
cli: {
|
|
7279
|
+
method: 'verify list',
|
|
7280
|
+
example: "llp alpha:verify list \\\n --api-key 'My API Key'",
|
|
7281
|
+
},
|
|
7282
|
+
},
|
|
7283
|
+
},
|
|
7284
|
+
{
|
|
7285
|
+
name: 'create',
|
|
7286
|
+
endpoint: '/api/alpha/verify',
|
|
7287
|
+
httpMethod: 'post',
|
|
7288
|
+
summary: 'Create Verify Job',
|
|
7289
|
+
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.',
|
|
7290
|
+
stainlessPath: '(resource) alpha.verify > (method) create',
|
|
7291
|
+
qualified: 'client.alpha.verify.create',
|
|
7292
|
+
params: [
|
|
7293
|
+
'file_input: string;',
|
|
7294
|
+
'organization_id?: string;',
|
|
7295
|
+
'project_id?: string;',
|
|
7296
|
+
"configuration?: { target_pages?: string; tier?: 'agentic' | 'fast'; };",
|
|
7297
|
+
'transaction_id?: string;',
|
|
7298
|
+
'webhook_configuration_ids?: string[];',
|
|
7299
|
+
'webhook_configurations?: { webhook_events?: string[]; webhook_headers?: object; webhook_output_format?: string; webhook_signing_secret?: string; webhook_url?: string; }[];',
|
|
7300
|
+
],
|
|
7301
|
+
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; }",
|
|
7302
|
+
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```",
|
|
7303
|
+
perLanguage: {
|
|
7304
|
+
python: {
|
|
7305
|
+
method: 'alpha.verify.create',
|
|
7306
|
+
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)',
|
|
7307
|
+
},
|
|
7308
|
+
go: {
|
|
7309
|
+
method: 'client.Alpha.Verify.New',
|
|
7310
|
+
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',
|
|
7311
|
+
},
|
|
7312
|
+
java: {
|
|
7313
|
+
method: 'alpha().verify().create',
|
|
7314
|
+
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}',
|
|
7315
|
+
},
|
|
7316
|
+
csharp: {
|
|
7317
|
+
method: 'Alpha.Verify.Create',
|
|
7318
|
+
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);',
|
|
7319
|
+
},
|
|
7320
|
+
typescript: {
|
|
7321
|
+
method: 'client.alpha.verify.create',
|
|
7322
|
+
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);",
|
|
7323
|
+
},
|
|
7324
|
+
http: {
|
|
7325
|
+
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 }\'',
|
|
7326
|
+
},
|
|
7327
|
+
cli: {
|
|
7328
|
+
method: 'verify create',
|
|
7329
|
+
example: "llp alpha:verify create \\\n --api-key 'My API Key' \\\n --file-input dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
|
|
7330
|
+
},
|
|
7331
|
+
},
|
|
7332
|
+
},
|
|
7333
|
+
{
|
|
7334
|
+
name: 'get',
|
|
7335
|
+
endpoint: '/api/alpha/verify/{job_id}',
|
|
7336
|
+
httpMethod: 'get',
|
|
7337
|
+
summary: 'Get Verify Job',
|
|
7338
|
+
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`.',
|
|
7339
|
+
stainlessPath: '(resource) alpha.verify > (method) get',
|
|
7340
|
+
qualified: 'client.alpha.verify.get',
|
|
7341
|
+
params: ['job_id: string;', 'expand?: string[];', 'organization_id?: string;', 'project_id?: string;'],
|
|
7342
|
+
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; }",
|
|
7343
|
+
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```",
|
|
7344
|
+
perLanguage: {
|
|
7345
|
+
python: {
|
|
7346
|
+
method: 'alpha.verify.get',
|
|
7347
|
+
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)',
|
|
7348
|
+
},
|
|
7349
|
+
go: {
|
|
7350
|
+
method: 'client.Alpha.Verify.Get',
|
|
7351
|
+
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',
|
|
7352
|
+
},
|
|
7353
|
+
java: {
|
|
7354
|
+
method: 'alpha().verify().get',
|
|
7355
|
+
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}',
|
|
7356
|
+
},
|
|
7357
|
+
csharp: {
|
|
7358
|
+
method: 'Alpha.Verify.Get',
|
|
7359
|
+
example: 'VerifyGetParams parameters = new() { JobID = "job_id" };\n\nvar verify = await client.Alpha.Verify.Get(parameters);\n\nConsole.WriteLine(verify);',
|
|
7360
|
+
},
|
|
7361
|
+
typescript: {
|
|
7362
|
+
method: 'client.alpha.verify.get',
|
|
7363
|
+
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);",
|
|
7364
|
+
},
|
|
7365
|
+
http: {
|
|
7366
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7367
|
+
},
|
|
7368
|
+
cli: {
|
|
7369
|
+
method: 'verify get',
|
|
7370
|
+
example: "llp alpha:verify get \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7371
|
+
},
|
|
7372
|
+
},
|
|
7373
|
+
},
|
|
7374
|
+
{
|
|
7375
|
+
name: 'cancel',
|
|
7376
|
+
endpoint: '/api/alpha/verify/{job_id}/cancel',
|
|
7377
|
+
httpMethod: 'post',
|
|
7378
|
+
summary: 'Cancel Verify Job',
|
|
7379
|
+
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.',
|
|
7380
|
+
stainlessPath: '(resource) alpha.verify > (method) cancel',
|
|
7381
|
+
qualified: 'client.alpha.verify.cancel',
|
|
7382
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7383
|
+
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; }",
|
|
7384
|
+
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```",
|
|
7385
|
+
perLanguage: {
|
|
7386
|
+
python: {
|
|
7387
|
+
method: 'alpha.verify.cancel',
|
|
7388
|
+
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)',
|
|
7389
|
+
},
|
|
7390
|
+
go: {
|
|
7391
|
+
method: 'client.Alpha.Verify.Cancel',
|
|
7392
|
+
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',
|
|
7393
|
+
},
|
|
7394
|
+
java: {
|
|
7395
|
+
method: 'alpha().verify().cancel',
|
|
7396
|
+
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}',
|
|
7397
|
+
},
|
|
7398
|
+
csharp: {
|
|
7399
|
+
method: 'Alpha.Verify.Cancel',
|
|
7400
|
+
example: 'VerifyCancelParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.Cancel(parameters);\n\nConsole.WriteLine(response);',
|
|
7401
|
+
},
|
|
7402
|
+
typescript: {
|
|
7403
|
+
method: 'client.alpha.verify.cancel',
|
|
7404
|
+
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);",
|
|
7405
|
+
},
|
|
7406
|
+
http: {
|
|
7407
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/cancel \\\n -X POST \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7408
|
+
},
|
|
7409
|
+
cli: {
|
|
7410
|
+
method: 'verify cancel',
|
|
7411
|
+
example: "llp alpha:verify cancel \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7412
|
+
},
|
|
7413
|
+
},
|
|
7414
|
+
},
|
|
7415
|
+
{
|
|
7416
|
+
name: 'get_details',
|
|
7417
|
+
endpoint: '/api/alpha/verify/{job_id}/details',
|
|
7418
|
+
httpMethod: 'get',
|
|
7419
|
+
summary: 'Get Verify Job Details',
|
|
7420
|
+
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).',
|
|
7421
|
+
stainlessPath: '(resource) alpha.verify > (method) get_details',
|
|
7422
|
+
qualified: 'client.alpha.verify.getDetails',
|
|
7423
|
+
params: ['job_id: string;', 'organization_id?: string;', 'project_id?: string;'],
|
|
7424
|
+
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; }',
|
|
7425
|
+
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```",
|
|
7426
|
+
perLanguage: {
|
|
7427
|
+
python: {
|
|
7428
|
+
method: 'alpha.verify.get_details',
|
|
7429
|
+
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)',
|
|
7430
|
+
},
|
|
7431
|
+
go: {
|
|
7432
|
+
method: 'client.Alpha.Verify.GetDetails',
|
|
7433
|
+
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',
|
|
7434
|
+
},
|
|
7435
|
+
java: {
|
|
7436
|
+
method: 'alpha().verify().getDetails',
|
|
7437
|
+
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}',
|
|
7438
|
+
},
|
|
7439
|
+
csharp: {
|
|
7440
|
+
method: 'Alpha.Verify.GetDetails',
|
|
7441
|
+
example: 'VerifyGetDetailsParams parameters = new() { JobID = "job_id" };\n\nvar response = await client.Alpha.Verify.GetDetails(parameters);\n\nConsole.WriteLine(response);',
|
|
7442
|
+
},
|
|
7443
|
+
typescript: {
|
|
7444
|
+
method: 'client.alpha.verify.getDetails',
|
|
7445
|
+
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);",
|
|
7446
|
+
},
|
|
7447
|
+
http: {
|
|
7448
|
+
example: 'curl https://api.cloud.llamaindex.ai/api/alpha/verify/$JOB_ID/details \\\n -H "Authorization: Bearer $LLAMA_CLOUD_API_KEY"',
|
|
7449
|
+
},
|
|
7450
|
+
cli: {
|
|
7451
|
+
method: 'verify get_details',
|
|
7452
|
+
example: "llp alpha:verify get-details \\\n --api-key 'My API Key' \\\n --job-id job_id",
|
|
7453
|
+
},
|
|
7454
|
+
},
|
|
7455
|
+
},
|
|
6499
7456
|
{
|
|
6500
7457
|
name: 'run_search',
|
|
6501
7458
|
endpoint: '/api/v1/pipelines/{pipeline_id}/retrieve',
|
|
@@ -6534,15 +7491,15 @@ const EMBEDDED_METHODS = [
|
|
|
6534
7491
|
const EMBEDDED_READMES = [
|
|
6535
7492
|
{
|
|
6536
7493
|
language: 'python',
|
|
6537
|
-
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',
|
|
7494
|
+
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',
|
|
6538
7495
|
},
|
|
6539
7496
|
{
|
|
6540
7497
|
language: 'go',
|
|
6541
|
-
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',
|
|
7498
|
+
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',
|
|
6542
7499
|
},
|
|
6543
7500
|
{
|
|
6544
7501
|
language: 'java',
|
|
6545
|
-
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',
|
|
7502
|
+
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',
|
|
6546
7503
|
},
|
|
6547
7504
|
{
|
|
6548
7505
|
language: 'csharp',
|
|
@@ -6550,7 +7507,7 @@ const EMBEDDED_READMES = [
|
|
|
6550
7507
|
},
|
|
6551
7508
|
{
|
|
6552
7509
|
language: 'typescript',
|
|
6553
|
-
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",
|
|
7510
|
+
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",
|
|
6554
7511
|
},
|
|
6555
7512
|
{
|
|
6556
7513
|
language: 'cli',
|