LlamaParse Parse API
The Parse API from LlamaParse — 5 operation(s) for parse.
The Parse API from LlamaParse — 5 operation(s) for parse.
openapi: 3.0.3
info:
title: Llama Platform Agent Data Parse API
version: 0.1.0
tags:
- name: Parse
paths:
/api/v2/parse/upload:
post:
tags:
- Parse
summary: Upload File Multipart
description: 'Upload and parse a file using multipart/form-data.
Send the file as a `file` field and parsing configuration as a
`configuration` JSON string field.
The job runs asynchronously. Poll `GET /parse/{job_id}` with
`expand` to retrieve results.'
operationId: upload_file_multipart_api_v2_parse_upload_post
security:
- HTTPBearer: []
parameters:
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
- name: organization_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Organization Id
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseJobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/parse:
post:
tags:
- Parse
summary: Parse File
description: '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.'
operationId: parse_file_api_v2_parse_post
security:
- HTTPBearer: []
parameters:
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
- name: organization_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Organization Id
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ParseRequestConfiguration'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseJobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- Parse
summary: List Parse Jobs
description: 'List parse jobs for the current project.
Filter by `status` or creation date range. Results are
paginated — use `page_token` from the response to fetch
subsequent pages.'
operationId: list_parse_jobs_api_v2_parse_get
security:
- HTTPBearer: []
parameters:
- name: page_size
in: query
required: false
schema:
anyOf:
- type: integer
- type: 'null'
description: Number of items per page
title: Page Size
description: Number of items per page
- name: page_token
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Token for pagination
title: Page Token
description: Token for pagination
- name: status
in: query
required: false
schema:
anyOf:
- enum:
- PENDING
- RUNNING
- COMPLETED
- FAILED
- CANCELLED
type: string
- type: 'null'
description: Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
title: Status
description: Filter by job status (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED)
- name: job_ids
in: query
required: false
schema:
anyOf:
- type: array
items:
type: string
- type: 'null'
description: Filter by specific job IDs
title: Job Ids
description: Filter by specific job IDs
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
- name: organization_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Organization Id
- name: created_at_on_or_after
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Include items created at or after this timestamp (inclusive)
title: Created At On Or After
description: Include items created at or after this timestamp (inclusive)
- name: created_at_on_or_before
in: query
required: false
schema:
anyOf:
- type: string
format: date-time
- type: 'null'
description: Include items created at or before this timestamp (inclusive)
title: Created At On Or Before
description: Include items created at or before this timestamp (inclusive)
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseJobQueryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/parse/versions:
get:
tags:
- Parse
summary: List Parse Versions
description: List the parse versions accepted by each tier.
operationId: list_parse_versions_api_v2_parse_versions_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseVersionsResponse'
/api/v2/parse/{job_id}:
get:
tags:
- Parse
summary: Get Parse Job
description: 'Retrieve a parse job with optional expanded content.
By default returns job metadata only. Use `expand` to include
parsed content:
- `text` — plain text output
- `markdown` — markdown output
- `items` — structured page-by-page output
- `job_metadata` — usage and processing details
Content metadata fields (e.g. `text_content_metadata`) return
presigned URLs for downloading large results.'
operationId: get_parse_job_api_v2_parse__job_id__get
security:
- HTTPBearer: []
parameters:
- name: job_id
in: path
required: true
schema:
type: string
title: Job Id
- name: expand
in: query
required: false
schema:
type: array
items:
type: string
description: 'Fields to include: text, markdown, items, metadata, job_metadata, text_content_metadata, markdown_content_metadata, items_content_metadata, metadata_content_metadata, raw_words_content_metadata, xlsx_content_metadata, output_pdf_content_metadata, images_content_metadata. Metadata fields include presigned URLs.'
title: Expand
description: 'Fields to include: text, markdown, items, metadata, job_metadata, text_content_metadata, markdown_content_metadata, items_content_metadata, metadata_content_metadata, raw_words_content_metadata, xlsx_content_metadata, output_pdf_content_metadata, images_content_metadata. Metadata fields include presigned URLs.'
- name: image_filenames
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Filter to specific image filenames (optional). Example: image_0.png,image_1.jpg'
title: Image Filenames
description: 'Filter to specific image filenames (optional). Example: image_0.png,image_1.jpg'
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
- name: organization_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Organization Id
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseResultResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/parse/{job_id}/cancel:
post:
tags:
- Parse
summary: Cancel Parse Job
description: 'Cancel a running parse job.
Stops processing and marks the job as CANCELLED. Returns the updated job. Jobs already in a terminal state (COMPLETED, FAILED, CANCELLED) cannot be cancelled.'
operationId: cancel_parse_job_api_v2_parse__job_id__cancel_post
security:
- HTTPBearer: []
parameters:
- name: job_id
in: path
required: true
schema:
type: string
title: Job Id
- name: project_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Project Id
- name: organization_id
in: query
required: false
schema:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Organization Id
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ParseJobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
MetadataResultPage:
properties:
page_number:
type: integer
title: Page Number
description: Page number of the document
confidence:
anyOf:
- type: number
- type: 'null'
title: Confidence
description: Confidence score for the page parsing (0-1)
speaker_notes:
anyOf:
- type: string
- type: 'null'
title: Speaker Notes
description: Speaker notes from presentation slides
slide_section_name:
anyOf:
- type: string
- type: 'null'
title: Slide Section Name
description: Section name from presentation slides
printed_page_number:
anyOf:
- type: string
- type: 'null'
title: Printed Page Number
description: Printed page number as it appears in the document
original_orientation_angle:
anyOf:
- type: integer
- type: 'null'
title: Original Orientation Angle
description: Original orientation angle of the page in degrees
cost_optimized:
anyOf:
- type: boolean
- type: 'null'
title: Cost Optimized
description: Whether cost-optimized parsing was used for the page
triggered_auto_mode:
anyOf:
- type: boolean
- type: 'null'
title: Triggered Auto Mode
description: Whether auto mode was triggered for the page
type: object
required:
- page_number
title: MetadataResultPage
description: Page-level metadata including confidence scores and presentation-specific data.
ResultTypeMetadata:
properties:
size_bytes:
type: integer
title: Size Bytes
description: Size of the result file in bytes
exists:
type: boolean
title: Exists
description: Whether the result file exists in S3
default: true
presigned_url:
anyOf:
- type: string
- type: 'null'
title: Presigned Url
description: Presigned URL to download the result file
type: object
required:
- size_bytes
title: ResultTypeMetadata
description: Metadata about a specific result type stored in S3.
MarkdownResultPage:
properties:
page_number:
type: integer
title: Page Number
description: Page number of the document
markdown:
type: string
title: Markdown
description: Markdown content of the page
header:
anyOf:
- type: string
- type: 'null'
title: Header
description: Header of the page in markdown
footer:
anyOf:
- type: string
- type: 'null'
title: Footer
description: Footer of the page in markdown
success:
type: boolean
const: true
title: Success
description: Success indicator
type: object
required:
- page_number
- markdown
- success
title: MarkdownResultPage
LlamaParseSpatialTextOptions:
properties:
preserve_layout_alignment_across_pages:
anyOf:
- type: boolean
- type: 'null'
title: Preserve Layout Alignment Across Pages
description: Maintain consistent text column alignment across page boundaries. Automatically enabled for document-level parsing modes
preserve_very_small_text:
anyOf:
- type: boolean
- type: 'null'
title: Preserve Very Small Text
description: Include text below the normal size threshold. Useful for footnotes, watermarks, or fine print that might otherwise be filtered out
do_not_unroll_columns:
anyOf:
- type: boolean
- type: 'null'
title: Do Not Unroll Columns
description: Keep multi-column layouts intact instead of linearizing columns into sequential text. Automatically enabled for non-fast tiers
additionalProperties: false
type: object
title: LlamaParseSpatialTextOptions
description: 'Spatial text output options for preserving document layout.
Spatial text maintains the visual positioning of text elements, useful for
documents where layout conveys meaning (forms, tables, multi-column layouts).'
HeadingItem:
properties:
type:
type: string
const: heading
title: Type
description: Heading item type
default: heading
md:
type: string
title: Md
description: Markdown representation preserving formatting
bbox:
anyOf:
- items:
$ref: '#/components/schemas/BBox'
type: array
- type: 'null'
title: Bbox
description: List of bounding boxes
level:
type: integer
title: Level
description: Heading level (1-6)
value:
type: string
title: Value
description: Heading text content
type: object
required:
- md
- level
- value
title: HeadingItem
LlamaParseProcessingControl:
properties:
timeouts:
$ref: '#/components/schemas/LlamaParseTimeouts'
description: Timeout settings for job execution. Increase for large or complex documents
job_failure_conditions:
$ref: '#/components/schemas/LlamaParseJobFailureConditions'
description: Quality thresholds that determine when a job should fail vs complete with partial results
additionalProperties: false
type: object
title: LlamaParseProcessingControl
description: Job processing controls for timeouts and failure handling.
LlamaParseFastOptions:
properties: {}
additionalProperties: false
type: object
title: LlamaParseFastOptions
description: '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.'
LlamaParseInputOptions:
properties:
html:
$ref: '#/components/schemas/LlamaParseHtmlOptions'
description: HTML/web page parsing options (applies to .html, .htm files)
pdf:
$ref: '#/components/schemas/LlamaParsePdfOptions'
description: PDF-specific parsing options (applies to .pdf files)
spreadsheet:
$ref: '#/components/schemas/LlamaParseSpreadsheetOptions'
description: Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
presentation:
$ref: '#/components/schemas/LlamaParsePresentationOptions'
description: Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
additionalProperties: false
type: object
title: LlamaParseInputOptions
description: 'Input format-specific parsing options.
These options only apply when parsing documents of the corresponding format.
LlamaParse automatically detects the input format based on file extension and content.'
TextResult:
properties:
pages:
items:
$ref: '#/components/schemas/TextResultPage'
type: array
title: Pages
description: List of text pages
type: object
required:
- pages
title: TextResult
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CodeItem:
properties:
type:
type: string
const: code
title: Type
description: Code block item type
default: code
md:
type: string
title: Md
description: Markdown representation preserving formatting
bbox:
anyOf:
- items:
$ref: '#/components/schemas/BBox'
type: array
- type: 'null'
title: Bbox
description: List of bounding boxes
value:
type: string
title: Value
description: Code content
language:
anyOf:
- type: string
- type: 'null'
title: Language
description: Programming language identifier
type: object
required:
- md
- value
title: CodeItem
LlamaParseTables:
properties:
compact_markdown_tables:
anyOf:
- type: boolean
- type: 'null'
title: Compact Markdown Tables
description: Remove extra whitespace padding in markdown table cells for more compact output
output_tables_as_markdown:
anyOf:
- type: boolean
- type: 'null'
title: Output Tables As Markdown
description: Output tables as markdown pipe tables instead of HTML <table> tags. Markdown tables are simpler but cannot represent complex structures like merged cells
markdown_table_multiline_separator:
anyOf:
- type: string
- type: 'null'
title: Markdown Table Multiline Separator
description: 'Separator string for multiline cell content in markdown tables. Example: ''<br>'' to preserve line breaks, '' '' to join with spaces'
merge_continued_tables:
anyOf:
- type: boolean
- type: 'null'
title: Merge Continued Tables
description: Automatically merge tables that span multiple pages into a single table. The merged table appears on the first page with merged_from_pages metadata
additionalProperties: false
type: object
title: LlamaParseTables
description: Table formatting options for markdown output.
LlamaParsePresentationOptions:
properties:
out_of_bounds_content:
anyOf:
- type: boolean
- type: 'null'
title: Out Of Bounds Content
description: Extract content positioned outside the visible slide area. Some presentations have hidden notes or content that extends beyond slide boundaries
skip_embedded_data:
anyOf:
- type: boolean
- type: 'null'
title: Skip Embedded Data
description: Skip extraction of embedded chart data tables. When true, only the visual representation of charts is captured, not the underlying data
additionalProperties: false
type: object
title: LlamaParsePresentationOptions
description: Presentation (PowerPoint, Keynote, ODP) parsing options.
LlamaParsePdfOptions:
properties: {}
additionalProperties: false
type: object
title: LlamaParsePdfOptions
LlamaParseJobFailureConditions:
properties:
allowed_page_failure_ratio:
anyOf:
- type: number
maximum: 1.0
exclusiveMinimum: 0.0
- type: 'null'
title: Allowed Page Failure Ratio
description: '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%)'
fail_on_image_extraction_error:
anyOf:
- type: boolean
- type: 'null'
title: Fail On Image Extraction Error
description: Fail the entire job if any embedded image cannot be extracted. By default, image extraction errors are logged but don't fail the job
fail_on_image_ocr_error:
anyOf:
- type: boolean
- type: 'null'
title: Fail On Image Ocr Error
description: Fail the entire job if OCR fails on any image. By default, OCR errors result in empty text for that image
fail_on_markdown_reconstruction_error:
anyOf:
- type: boolean
- type: 'null'
title: Fail On Markdown Reconstruction Error
description: Fail the entire job if markdown cannot be reconstructed for any page. By default, failed pages use fallback text extraction
fail_on_buggy_font:
anyOf:
- type: boolean
- type: 'null'
title: Fail On Buggy Font
description: Fail the job if a problematic font is detected that may cause incorrect text extraction. Buggy fonts can produce garbled or missing characters
additionalProperties: false
type: object
title: LlamaParseJobFailureConditions
description: 'Conditions that determine when a parsing job should fail vs complete with partial results.
By default, jobs complete successfully even if some pages fail to parse.
Use these settings to enforce stricter quality requirements.'
ImagesContentMetadata:
properties:
total_count:
type: integer
title: Total Count
description: Total number of extracted images
images:
items:
$ref: '#/components/schemas/ImageMetadata'
type: array
title: Images
description: List of image metadata with presigned URLs
type: object
required:
- total_count
- images
title: ImagesContentMetadata
description: Metadata for all extracted images.
ImageMetadata:
properties:
index:
type: integer
title: Index
description: Index of the image in the extraction order
filename:
type: string
title: Filename
description: Image filename (e.g., 'image_0.png')
content_type:
anyOf:
- type: string
- type: 'null'
title: Content Type
description: MIME type of the image
size_bytes:
anyOf:
- type: integer
- type: 'null'
title: Size Bytes
description: 'Deprecated: always returns None. Will be removed in a future release.'
deprecated: true
presigned_url:
anyOf:
- type: string
- type: 'null'
title: Presigned Url
description: Presigned URL to download the image
category:
anyOf:
- type: string
enum:
- screenshot
- embedded
- layout
- type: 'null'
title: Category
description: 'Image category: ''screenshot'' (full page), ''embedded'' (images in document), or ''layout'' (cropped from layout detection)'
bbox:
anyOf:
- $ref: '#/components/schemas/ImageMetadataBBox'
- type: 'null'
description: Bounding box of the image on its page
type: object
required:
- index
- filename
title: ImageMetadata
description: Metadata for a single extracted image.
ParseResultResponse:
properties:
job:
$ref: '#/components/schemas/ParseJobResponse'
description: Parse job status and metadata
result_content_metadata:
anyOf:
- additionalProperties:
$ref: '#/components/schemas/ResultTypeMetadata'
type: object
- type: 'null'
title: Result Content Metadata
description: Metadata including size, existence, and presigned URLs for result files
text:
anyOf:
- $ref: '#/components/schemas/TextResult'
- type: 'null'
description: Plain text result (if requested)
markdown:
anyOf:
- $ref: '#/components/schemas/MarkdownResult'
- type: 'null'
description: Markdown result (if requested)
items:
anyOf:
- $ref: '#/components/schemas/StructuredResult'
- type: 'null'
description: Structured JSON result (if requested)
metadata:
anyOf:
- $ref: '#/components/schemas/MetadataResult'
- type: 'null'
description: Page-level metadata including confidence scores and presentation data (if requested)
markdown_full:
anyOf:
- type: string
- type: 'null'
title: Markdown Full
description: Full raw markdown content (if requested)
text_full:
anyOf:
- type: string
- type: 'null'
title: Text Full
description: Full raw text content (if requested)
images_content_metadata:
anyOf:
- $ref: '#/components/schemas/ImagesContentMetadata'
- type: 'null'
description: Metadata for all extracted images with presigned URLs (if requested)
job_metadata:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Job Metadata
description: Job execution metadata (if requested)
raw_parameters:
anyOf:
- additionalProperties: true
type: object
- type: 'null'
title: Raw Parameters
type: object
required:
- job
title: ParseResultResponse
description: 'Parse result response with job status and optional content or metadata.
The job field is always included. Other fields are included based on expand parameters.'
FooterItem:
properties:
type:
type: string
const: footer
title: Type
description: Page footer container
default: footer
md:
type: string
title: Md
description: Markdown representation preserving formatting
bbox:
anyOf:
- items:
$ref: '#/components/schemas/BBox'
type: array
- type: 'null'
title: Bbox
description: List of bounding boxes
items:
items:
oneOf:
- $ref: '#/components/schemas/TextItem'
- $ref: '#/components/schemas/HeadingItem'
- $ref: '#/components/schemas/ListItem'
- $ref: '#/components/schemas/CodeItem'
- $ref: '#/components/schemas/TableItem'
- $ref: '#/components/schemas/ImageItem'
- $ref: '#/components/schemas/LinkItem'
discriminator:
propertyName: type
mapping:
code: '#/components/schemas/CodeItem'
heading: '#/components/schemas/HeadingItem'
image: '#/components/schemas/ImageItem'
link: '#/components/schemas/LinkItem'
list: '#/components/schemas/ListItem'
table: '#/components/schemas/TableItem'
text: '#/components/schemas/TextItem'
type: array
title: Items
description: List of items within the footer
type: object
required:
- md
- items
title: FooterItem
MarkdownResult:
properties:
pages:
items:
anyOf:
- $ref: '#/components/schemas/MarkdownResultPage'
- $ref: '#/components/schemas/FailedMarkdownPage'
type: array
title: Pages
description: List of markdown pages or failed page entries
type: object
required:
- pages
title: MarkdownResult
LlamaParseOcrParameters:
properties:
languages:
anyOf:
- items:
$ref: '#/components/schemas/ParserLanguages'
type: array
- type: 'null'
title: Languages
description: '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'
additionalProperties: false
type: object
title: LlamaParseOcrParameters
description: OCR (Optical Character Recognition) configuration parameters.
AutoModePresentationOptions:
properties:
out_of_bounds_c
# --- truncated at 32 KB (91 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/llamaparse/refs/heads/main/openapi/llamaparse-parse-api-openapi.yml