LlamaParse V2 API
The V2 API from LlamaParse — 19 operation(s) for v2.
The V2 API from LlamaParse — 19 operation(s) for v2.
openapi: 3.0.3
info:
title: Llama Platform Agent Data V2 API
version: 0.1.0
tags:
- name: V2
paths:
/api/v2/parse/upload:
post:
tags:
- V2
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:
- V2
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:
- V2
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:
- V2
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:
- V2
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:
- V2
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'
/api/v2/classify:
post:
tags:
- V2
summary: Create Classify Job
description: 'Create a classify job.
Classifies a document against a set of rules. Set `file_input`
to a file ID (`dfl-...`) or parse job ID (`pjb-...`), and provide
either inline `configuration` with rules or a `configuration_id`
referencing a saved preset.
Each rule has a `type` (the label to assign) and a `description`
(natural language criteria). The classifier returns the best
matching rule with a confidence score.
The job runs asynchronously. Poll `GET /classify/{job_id}` to
check status and retrieve results.'
operationId: create_classify_job_api_v2_classify_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/ClassifyV2JobCreateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ClassifyV2JobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- V2
summary: List Classify Jobs
description: 'List classify jobs with optional filtering and pagination.
Filter by `status`, `configuration_id`, specific `job_ids`,
or creation date range.'
operationId: list_classify_jobs_api_v2_classify_get
security:
- HTTPBearer: []
parameters:
- name: page_size
in: query
required: false
schema:
anyOf:
- type: integer
maximum: 100
minimum: 1
- 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
type: string
- type: 'null'
description: Filter by job status
title: Status
description: Filter by job status
- 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: configuration_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by configuration ID
examples:
- cfg-11111111-2222-3333-4444-555555555555
title: Configuration Id
description: Filter by configuration 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/ClassifyV2JobQueryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/classify/{job_id}:
get:
tags:
- V2
summary: Get Classify Job
description: 'Get a classify job by ID.
Returns the job status, configuration, and classify result
when complete. The result includes the matched document type,
confidence score, and reasoning.'
operationId: get_classify_job_api_v2_classify__job_id__get
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/ClassifyV2JobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/classify/{job_id}/cancel:
post:
tags:
- V2
summary: Cancel Classify Job
description: 'Cancel a running classify 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_classify_job_api_v2_classify__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/ClassifyV2JobResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/extract/schema/validation:
post:
tags:
- V2
summary: Validate Extraction Schema
description: Validate a JSON schema for extraction.
operationId: validate_extraction_schema_api_v2_extract_schema_validation_post
security:
- HTTPBearer: []
parameters:
- name: session
in: cookie
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Session
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ExtractV2SchemaValidateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExtractV2SchemaValidateResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/extract/schema/generate:
post:
tags:
- V2
summary: Generate Extraction Schema
description: Generate a JSON schema and return a product configuration request.
operationId: generate_extraction_schema_api_v2_extract_schema_generate_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/ExtractV2SchemaGenerateRequest'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ConfigurationCreateRequest'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/extract:
post:
tags:
- V2
summary: Create Extract Job
description: 'Create an extraction job.
Extracts structured data from a document using either a saved
configuration or an inline JSON Schema.
## Input
Provide exactly one of:
- `configuration_id` — reference a saved extraction config
- `configuration` — inline configuration with a `data_schema`
## Document input
Set `file_input` to a file ID (`dfl-...`) or a
completed parse job ID (`pjb-...`).
The job runs asynchronously. Poll `GET /extract/{job_id}` or
register a webhook to monitor completion.'
operationId: create_extract_job_api_v2_extract_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/ExtractV2JobCreate'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExtractV2Job'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
get:
tags:
- V2
summary: List Extract Jobs
description: 'List extraction jobs with optional filtering and pagination.
Filter by `configuration_id`, `status`, `file_input`,
or creation date range. Results are returned newest-first.
Use `expand=configuration` to include the full configuration used,
and `expand=extract_metadata` for per-field metadata.'
operationId: list_extract_jobs_api_v2_extract_get
security:
- HTTPBearer: []
parameters:
- name: document_input_type
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by document input type (file_id or parse_job_id)
title: Document Input Type
description: Filter by document input type (file_id or parse_job_id)
- name: file_input
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by file input value
title: File Input
description: Filter by file input value
- name: document_input_value
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: 'Deprecated: use file_input instead'
deprecated: true
title: Document Input Value
description: 'Deprecated: use file_input instead'
deprecated: true
- name: status
in: query
required: false
schema:
anyOf:
- enum:
- PENDING
- THROTTLED
- RUNNING
- COMPLETED
- FAILED
- CANCELLED
type: string
- type: 'null'
description: Filter by status
title: Status
description: Filter by status
- 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: 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: expand
in: query
required: false
schema:
type: array
items:
type: string
description: 'Additional fields to include: configuration, extract_metadata'
title: Expand
description: 'Additional fields to include: configuration, extract_metadata'
- 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: configuration_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Filter by configuration ID
examples:
- cfg-11111111-2222-3333-4444-555555555555
title: Configuration Id
description: Filter by configuration 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/ExtractV2JobQueryResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v2/extract/{job_id}:
get:
tags:
- V2
summary: Get Extract Job
description: 'Get a single extraction job by ID.
Returns the job status and results when complete.
Use `expand=configuration` to include the full configuration used,
and `expand=extract_metadata` for per-field metadata.'
operationId: get_extract_job_api_v2_extract__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: 'Additional fields to include: configuration, extract_metadata'
title: Expand
description: 'Additional fields to include: configuration, extract_metadata'
- 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/ExtractV2Job'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/co
# --- truncated at 32 KB (180 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/llamaparse/refs/heads/main/openapi/llamaparse-v2-api-openapi.yml