## Parse File `ParsingCreateResponse parsing().create(ParsingCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none())` **post** `/api/v2/parse` Parse a file by file ID or URL. Provide either `file_id` (a previously uploaded file) or `source_url` (a publicly accessible URL). Configure parsing with options like `tier`, `target_pages`, and `lang`. ## Tiers - `fast` — rule-based, cheapest, no AI - `cost_effective` — balanced speed and quality - `agentic` — full AI-powered parsing - `agentic_plus` — premium AI with specialized features The job runs asynchronously. Poll `GET /parse/{job_id}` with `expand=text` or `expand=markdown` to retrieve results. ### Parameters - `ParsingCreateParams params` - `Optional organizationId` - `Optional projectId` - `Tier tier` Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced), 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with highest accuracy) - `FAST("fast")` - `COST_EFFECTIVE("cost_effective")` - `AGENTIC("agentic")` - `AGENTIC_PLUS("agentic_plus")` - `Version version` Version for the selected tier. Use `latest`, or pin one of that tier's dated versions. Current `latest` by tier: - `fast`: `2025-12-11` - `cost_effective`: `2026-06-05` - `agentic`: `2026-06-04` - `agentic_plus`: `2026-06-04` Full list: `GET /api/v2/parse/versions`. - `LATEST("latest")` - `_2026_06_05("2026-06-05")` - `_2026_06_04("2026-06-04")` - `_2025_12_11("2025-12-11")` - `Optional agenticOptions` Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus). These options customize how the AI processes and interprets document content. Only applicable when using non-fast tiers. - `Optional customPrompt` 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.' - `Optional clientName` Identifier for the client/application making the request. Used for analytics and debugging. Example: 'my-app-v2' - `Optional cropBox` Crop boundaries to process only a portion of each page. Values are ratios 0-1 from page edges - `Optional bottom` Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this line is excluded - `Optional left` Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this line is excluded - `Optional right` Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this line is excluded - `Optional top` Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line is excluded - `Optional disableCache` Bypass result caching and force re-parsing. Use when document content may have changed or you need fresh results - `Optional fastOptions` Options for fast tier parsing (rule-based, no AI). Fast tier uses deterministic algorithms for text extraction without AI enhancement. It's the fastest and most cost-effective option, best suited for simple documents with standard layouts. Currently has no configurable options but reserved for future expansion. - `Optional fileId` ID of an existing file in the project to parse. Mutually exclusive with source_url - `Optional httpProxy` HTTP/HTTPS proxy for fetching source_url. Ignored if using file_id - `Optional inputOptions` Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on detected input file type - `Optional html` HTML/web page parsing options (applies to .html, .htm files) - `Optional makeAllElementsVisible` Force all HTML elements to be visible by overriding CSS display/visibility properties. Useful for parsing pages with hidden content or collapsed sections - `Optional removeFixedElements` Remove fixed-position elements (headers, footers, floating buttons) that appear on every page render - `Optional removeNavigationElements` Remove navigation elements (nav bars, sidebars, menus) to focus on main content - `Optional pdf` PDF-specific parsing options (applies to .pdf files) - `Optional presentation` Presentation parsing options (applies to .pptx, .ppt, .odp, .key files) - `Optional outOfBoundsContent` Extract content positioned outside the visible slide area. Some presentations have hidden notes or content that extends beyond slide boundaries - `Optional skipEmbeddedData` Skip extraction of embedded chart data tables. When true, only the visual representation of charts is captured, not the underlying data - `Optional spreadsheet` Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files) - `Optional detectSubTablesInSheets` Detect and extract multiple tables within a single sheet. Useful when spreadsheets contain several data regions separated by blank rows/columns - `Optional forceFormulaComputationInSheets` Compute formula results instead of extracting formula text. Use when you need calculated values rather than formula definitions - `Optional includeHiddenSheets` Parse hidden sheets in addition to visible ones. By default, hidden sheets are skipped - `Optional outputOptions` Output formatting options for markdown, text, and extracted images - `Optional> additionalOutputs` 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`. - `Optional extractPrintedPageNumber` 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 - `Optional> granularBboxes` 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. - `CELL("cell")` - `LINE("line")` - `WORD("word")` - `Optional> imagesToSave` Image categories to extract and save. Options: 'screenshot' (full page renders useful for visual QA), 'embedded' (images found within the document), 'layout' (cropped regions from layout detection like figures and diagrams). Empty list saves no images - `SCREENSHOT("screenshot")` - `EMBEDDED("embedded")` - `LAYOUT("layout")` - `Optional markdown` Markdown formatting options including table styles and link annotations - `Optional annotateLinks` Add link annotations to markdown output in the format [text](url). When false, only the link text is included - `Optional inlineImages` Embed images directly in markdown as base64 data URIs instead of extracting them as separate files. Useful for self-contained markdown output - `Optional tables` Table formatting options including markdown vs HTML format and merging behavior - `Optional compactMarkdownTables` Remove extra whitespace padding in markdown table cells for more compact output - `Optional markdownTableMultilineSeparator` Separator string for multiline cell content in markdown tables. Example: '
' to preserve line breaks, ' ' to join with spaces - `Optional mergeContinuedTables` Automatically merge tables that span multiple pages into a single table. The merged table appears on the first page with merged_from_pages metadata - `Optional outputTablesAsMarkdown` Output tables as markdown pipe tables instead of HTML tags. Markdown tables are simpler but cannot represent complex structures like merged cells - `Optional spatialText` Spatial text output options for preserving document layout structure - `Optional doNotUnrollColumns` Keep multi-column layouts intact instead of linearizing columns into sequential text. Automatically enabled for non-fast tiers - `Optional preserveLayoutAlignmentAcrossPages` Maintain consistent text column alignment across page boundaries. Automatically enabled for document-level parsing modes - `Optional preserveVerySmallText` Include text below the normal size threshold. Useful for footnotes, watermarks, or fine print that might otherwise be filtered out - `Optional tablesAsSpreadsheet` Options for exporting tables as XLSX spreadsheets - `Optional enable` Whether this option is enabled - `Optional guessSheetName` Automatically generate descriptive sheet names from table context (headers, surrounding text) instead of using generic names like 'Table_1' - `Optional pageRanges` Page selection: limit total pages or specify exact pages to process - `Optional maxPages` 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 - `Optional targetPages` 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 - `Optional processingControl` Job execution controls including timeouts and failure thresholds - `Optional jobFailureConditions` Quality thresholds that determine when a job should fail vs complete with partial results - `Optional allowedPageFailureRatio` Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1 means job fails if more than 10% of pages fail. Default is 0.05 (5%) - `Optional failOnBuggyFont` Fail the job if a problematic font is detected that may cause incorrect text extraction. Buggy fonts can produce garbled or missing characters - `Optional failOnImageExtractionError` Fail the entire job if any embedded image cannot be extracted. By default, image extraction errors are logged but don't fail the job - `Optional failOnImageOcrError` Fail the entire job if OCR fails on any image. By default, OCR errors result in empty text for that image - `Optional failOnMarkdownReconstructionError` Fail the entire job if markdown cannot be reconstructed for any page. By default, failed pages use fallback text extraction - `Optional timeouts` Timeout settings for job execution. Increase for large or complex documents - `Optional baseInSeconds` Base timeout for the job in seconds (max 7200 = 2 hours). This is the minimum time allowed regardless of document size - `Optional extraTimePerPageInSeconds` Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout = base + (this value × page count) - `Optional processingOptions` Document processing options including OCR, table extraction, and chart parsing - `Optional aggressiveTableExtraction` Use aggressive heuristics to detect table boundaries, even without visible borders. Useful for documents with borderless or complex tables - `Optional> autoModeConfiguration` 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 - `ParsingConf parsingConf` Parsing configuration to apply when trigger conditions are met - `Optional adaptiveLongTable` Whether to use adaptive long table handling - `Optional aggressiveTableExtraction` Whether to use aggressive table extraction - `Optional cropBox` Crop box options for auto mode parsing configuration. - `Optional bottom` Bottom boundary of crop box as ratio (0-1) - `Optional left` Left boundary of crop box as ratio (0-1) - `Optional right` Right boundary of crop box as ratio (0-1) - `Optional top` Top boundary of crop box as ratio (0-1) - `Optional customPrompt` Custom AI instructions for matched pages. Overrides the base custom_prompt - `Optional extractLayout` Whether to extract layout information - `Optional highResOcr` Whether to use high resolution OCR - `Optional ignore` Ignore options for auto mode parsing configuration. - `Optional ignoreDiagonalText` Whether to ignore diagonal text in the document - `Optional ignoreHiddenText` Whether to ignore hidden text in the document - `Optional language` Primary language of the document - `Optional outlinedTableExtraction` Whether to use outlined table extraction - `Optional presentation` Presentation-specific options for auto mode parsing configuration. - `Optional outOfBoundsContent` Extract out of bounds content in presentation slides - `Optional skipEmbeddedData` Skip extraction of embedded data for charts in presentation slides - `Optional spatialText` Spatial text options for auto mode parsing configuration. - `Optional doNotUnrollColumns` Keep column structure intact without unrolling - `Optional preserveLayoutAlignmentAcrossPages` Preserve text alignment across page boundaries - `Optional preserveVerySmallText` Include very small text in spatial output - `Optional specializedChartParsing` Enable specialized chart parsing with the specified mode - `AGENTIC_PLUS("agentic_plus")` - `AGENTIC("agentic")` - `EFFICIENT("efficient")` - `Optional tier` Override the parsing tier for matched pages. Must be paired with version - `FAST("fast")` - `COST_EFFECTIVE("cost_effective")` - `AGENTIC("agentic")` - `AGENTIC_PLUS("agentic_plus")` - `Optional version` Version for the override tier. Required when `tier` is set. Use `latest`, or pin one of that tier's dated versions. Current `latest` by tier: - `fast`: `2025-12-11` - `cost_effective`: `2026-06-05` - `agentic`: `2026-06-04` - `agentic_plus`: `2026-06-04` Full list: `GET /api/v2/parse/versions`. - `LATEST("latest")` - `_2026_06_05("2026-06-05")` - `_2026_06_04("2026-06-04")` - `_2025_12_11("2025-12-11")` - `Optional filenameMatchGlob` Single glob pattern to match against filename - `Optional> filenameMatchGlobList` List of glob patterns to match against filename - `Optional filenameRegexp` Regex pattern to match against filename - `Optional filenameRegexpMode` Regex mode flags (e.g., 'i' for case-insensitive) - `Optional fullPageImageInPage` Trigger if page contains a full-page image (scanned page detection) - `Optional fullPageImageInPageThreshold` Threshold for full page image detection (0.0-1.0, default 0.8) - `double` - `String` - `Optional imageInPage` Trigger if page contains non-screenshot images - `Optional layoutElementInPage` Trigger if page contains this layout element type - `Optional layoutElementInPageConfidenceThreshold` Confidence threshold for layout element detection - `double` - `String` - `Optional pageContainsAtLeastNCharts` Trigger if page has more than N charts - `long` - `String` - `Optional pageContainsAtLeastNImages` Trigger if page has more than N images - `long` - `String` - `Optional pageContainsAtLeastNLayoutElements` Trigger if page has more than N layout elements - `long` - `String` - `Optional pageContainsAtLeastNLines` Trigger if page has more than N lines - `long` - `String` - `Optional pageContainsAtLeastNLinks` Trigger if page has more than N links - `long` - `String` - `Optional pageContainsAtLeastNNumbers` Trigger if page has more than N numeric words - `long` - `String` - `Optional pageContainsAtLeastNPercentNumbers` Trigger if page has more than N% numeric words - `long` - `String` - `Optional pageContainsAtLeastNTables` Trigger if page has more than N tables - `long` - `String` - `Optional pageContainsAtLeastNWords` Trigger if page has more than N words - `long` - `String` - `Optional pageContainsAtMostNCharts` Trigger if page has fewer than N charts - `long` - `String` - `Optional pageContainsAtMostNImages` Trigger if page has fewer than N images - `long` - `String` - `Optional pageContainsAtMostNLayoutElements` Trigger if page has fewer than N layout elements - `long` - `String` - `Optional pageContainsAtMostNLines` Trigger if page has fewer than N lines - `long` - `String` - `Optional pageContainsAtMostNLinks` Trigger if page has fewer than N links - `long` - `String` - `Optional pageContainsAtMostNNumbers` Trigger if page has fewer than N numeric words - `long` - `String` - `Optional pageContainsAtMostNPercentNumbers` Trigger if page has fewer than N% numeric words - `long` - `String` - `Optional pageContainsAtMostNTables` Trigger if page has fewer than N tables - `long` - `String` - `Optional pageContainsAtMostNWords` Trigger if page has fewer than N words - `long` - `String` - `Optional pageLongerThanNChars` Trigger if page has more than N characters - `long` - `String` - `Optional pageMdError` Trigger on pages with markdown extraction errors - `Optional pageShorterThanNChars` Trigger if page has fewer than N characters - `long` - `String` - `Optional regexpInPage` Regex pattern to match in page content - `Optional regexpInPageMode` Regex mode flags for regexp_in_page - `Optional tableInPage` Trigger if page contains a table - `Optional textInPage` Trigger if page text/markdown contains this string - `Optional triggerMode` How to combine multiple trigger conditions: 'and' (all conditions must match, this is the default) or 'or' (any single condition can trigger) - `Optional costOptimizer` Cost optimizer configuration for reducing parsing costs on simpler pages. When enabled, the parser analyzes each page and routes simpler pages to faster, cheaper processing while preserving quality for complex pages. Only works with 'agentic' or 'agentic_plus' tiers. - `Optional enable` Enable cost-optimized parsing. Routes simpler pages to faster processing while complex pages use full AI analysis. May reduce speed on some documents. IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers - `Optional disableHeuristics` Disable automatic heuristics including outlined table extraction and adaptive long table handling. Use when heuristics produce incorrect results - `Optional ignore` Options for ignoring specific text types (diagonal, hidden, text in images) - `Optional ignoreDiagonalText` Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring watermarks or decorative angled text - `Optional ignoreHiddenText` Skip text marked as hidden in the document structure. Some PDFs contain invisible text layers used for accessibility or search indexing - `Optional ignoreTextInImage` Skip OCR text extraction from embedded images. Use when images contain irrelevant text (watermarks, logos) that shouldn't be in the output - `Optional ocrParameters` OCR configuration including language detection settings - `Optional> languages` Languages to use for OCR text recognition. Specify multiple languages if document contains mixed-language content. Order matters - put primary language first. Example: ['en', 'es'] for English with Spanish - `AF("af")` - `AZ("az")` - `BS("bs")` - `CS("cs")` - `CY("cy")` - `DA("da")` - `DE("de")` - `EN("en")` - `ES("es")` - `ET("et")` - `FR("fr")` - `GA("ga")` - `HR("hr")` - `HU("hu")` - `ID("id")` - `IS("is")` - `IT("it")` - `KU("ku")` - `LA("la")` - `LT("lt")` - `LV("lv")` - `MI("mi")` - `MS("ms")` - `MT("mt")` - `NL("nl")` - `NO("no")` - `OC("oc")` - `PI("pi")` - `PL("pl")` - `PT("pt")` - `RO("ro")` - `RS_LATIN("rs_latin")` - `SK("sk")` - `SL("sl")` - `SQ("sq")` - `SV("sv")` - `SW("sw")` - `TL("tl")` - `TR("tr")` - `UZ("uz")` - `VI("vi")` - `AR("ar")` - `FA("fa")` - `UG("ug")` - `UR("ur")` - `BN("bn")` - `AS("as")` - `MNI("mni")` - `RU("ru")` - `RS_CYRILLIC("rs_cyrillic")` - `BE("be")` - `BG("bg")` - `UK("uk")` - `MN("mn")` - `ABQ("abq")` - `ADY("ady")` - `KBD("kbd")` - `AVA("ava")` - `DAR("dar")` - `INH("inh")` - `CHE("che")` - `LBE("lbe")` - `LEZ("lez")` - `TAB("tab")` - `TJK("tjk")` - `HI("hi")` - `MR("mr")` - `NE("ne")` - `BH("bh")` - `MAI("mai")` - `ANG("ang")` - `BHO("bho")` - `MAH("mah")` - `SCK("sck")` - `NEW("new")` - `GOM("gom")` - `SA("sa")` - `BGC("bgc")` - `TH("th")` - `CH_SIM("ch_sim")` - `CH_TRA("ch_tra")` - `JA("ja")` - `KO("ko")` - `TA("ta")` - `TE("te")` - `KN("kn")` - `Optional specializedChartParsing` 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 - `AGENTIC_PLUS("agentic_plus")` - `AGENTIC("agentic")` - `EFFICIENT("efficient")` - `Optional sourceUrl` Public URL of the document to parse. Mutually exclusive with file_id - `Optional> webhookConfigurations` Webhook endpoints for job status notifications. Multiple webhooks can be configured for different events or services - `Optional> webhookEvents` Events that trigger this webhook. Options: 'parse.success' (job completed), 'parse.error' (job failed), 'parse.partial_success' (some pages failed), 'parse.pending', 'parse.running', 'parse.cancelled'. If not specified, webhook fires for all events - `Optional webhookHeaders` Custom HTTP headers to include in webhook requests. Use for authentication tokens or custom routing. Example: {'Authorization': 'Bearer xyz'} - `Optional webhookOutputFormat` Format of the webhook payload body. 'string' (default) sends the payload as a JSON-encoded string; 'json' sends it as a JSON object. - `STRING("string")` - `JSON("json")` - `Optional webhookUrl` HTTPS URL to receive webhook POST requests. Must be publicly accessible ### Returns - `class ParsingCreateResponse:` A parse job. - `String id` Unique parse job identifier - `String projectId` Project this job belongs to - `Status status` Current job status: PENDING, RUNNING, COMPLETED, FAILED, or CANCELLED - `PENDING("PENDING")` - `RUNNING("RUNNING")` - `COMPLETED("COMPLETED")` - `FAILED("FAILED")` - `CANCELLED("CANCELLED")` - `Optional createdAt` Creation datetime - `Optional errorMessage` Error details when status is FAILED - `Optional name` Optional display name for this parse job - `Optional tier` Parsing tier used for this job - `Optional updatedAt` Update datetime ### Example ```java package com.llamacloud_prod.api.example; import com.llamacloud_prod.api.client.LlamaCloudClient; import com.llamacloud_prod.api.client.okhttp.LlamaCloudOkHttpClient; import com.llamacloud_prod.api.models.parsing.ParsingCreateParams; import com.llamacloud_prod.api.models.parsing.ParsingCreateResponse; public final class Main { private Main() {} public static void main(String[] args) { LlamaCloudClient client = LlamaCloudOkHttpClient.fromEnv(); ParsingCreateParams params = ParsingCreateParams.builder() .tier(ParsingCreateParams.Tier.FAST) .version(ParsingCreateParams.Version.LATEST) .build(); ParsingCreateResponse parsing = client.parsing().create(params); } } ``` #### Response ```json { "id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "project_id": "prj-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee", "status": "PENDING", "created_at": "2019-12-27T18:11:19.117Z", "error_message": "error_message", "name": "Q4 Financial Report", "tier": "fast", "updated_at": "2019-12-27T18:11:19.117Z" } ```