---
title: "Extract Stateless"
method: POST
path: "/api/v1/extraction/run"
tags: ["LlamaExtract"]
---

# Extract Stateless

`POST /api/v1/extraction/run`

Stateless extraction using a default agent in the user's default project; requires `data_schema`, `config`, and one of `file_id` / `text` / base64 file data.

## Query parameters

- `project_id` string, uuid, nullable
- `organization_id` string, uuid, nullable

## Cookies

- `session` string, nullable

## Request body

- ExtractStatelessRequest — Schema for stateless extraction requests.
  - `webhook_configurations` WebhookConfiguration[], nullable — Outbound webhook endpoints to notify on job status changes
    - `webhook_url` string, nullable — URL to receive webhook POST notifications
    - `webhook_headers` object, nullable — Custom HTTP headers sent with each webhook request (e.g. auth tokens)
    - `webhook_events` string[], nullable — Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all events are delivered.
    - `webhook_output_format` string, nullable — Response format sent to the webhook: 'string' (default) or 'json'
  - `data_schema` union, required — The schema of the data to extract
    - object
    - string
  - `config` ExtractConfig, required — Configuration parameters for the extraction agent.
    - `priority` 'low' | 'medium' | 'high' | 'critical', nullable — The priority for the request. This field may be ignored or overwritten depending on the organization tier.
    - `extraction_target` 'PER_DOC' | 'PER_PAGE' | 'PER_TABLE_ROW' — Defines the extraction target scope.
    - `extraction_mode` 'FAST' | 'BALANCED' | 'PREMIUM' | 'MULTIMODAL' — Extraction mode options.
    - `parse_model` 'openai-gpt-4o' | 'openai-gpt-4o-mini' | 'openai-gpt-4-1' | 'openai-gpt-4-1-mini' | 'openai-gpt-4-1-nano' | 'openai-gpt-5' | 'openai-gpt-5-mini' | 'openai-gpt-5-nano' | 'openai-text-embedding-3-large' | 'openai-text-embedding-3-small' | 'openai-whisper-1' | 'anthropic-sonnet-3.5' | 'anthropic-sonnet-3.5-v2' | 'anthropic-sonnet-3.7' | 'anthropic-sonnet-4.0' | 'anthropic-sonnet-4.5' | 'anthropic-haiku-3.5' | 'anthropic-haiku-4.5' | 'gemini-2.5-flash' | 'gemini-3.0-pro' | 'gemini-3.1-pro' | 'gemini-2.5-pro' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.5-flash-lite' — Public model names.
    - `extract_model` union — The extract model to use for data extraction. If not provided, uses the default for the extraction mode.
      - 'openai-gpt-4-1' | 'openai-gpt-4-1-mini' | 'openai-gpt-4-1-nano' | 'openai-gpt-5' | 'openai-gpt-5-mini' | 'gemini-2.0-flash' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-2.5-pro' | 'openai-gpt-4o' | 'openai-gpt-4o-mini' — Extract model options.
      - string
    - `multimodal_fast_mode` boolean — DEPRECATED: Whether to use fast mode for multimodal extraction.
    - `system_prompt` string, nullable — The system prompt to use for the extraction.
    - `use_reasoning` boolean — Whether to use reasoning for the extraction.
    - `cite_sources` boolean — Whether to cite sources for the extraction.
    - `citation_bbox` boolean — Whether to fetch citation bounding boxes for the extraction. Only available in PREMIUM mode. Deprecated: this is now synonymous with cite_sources.
    - `confidence_scores` boolean — Whether to fetch confidence scores for the extraction.
    - `chunk_mode` 'PAGE' | 'SECTION' — How to chunk documents.
    - `high_resolution_mode` boolean — Whether to use high resolution mode for the extraction.
    - `invalidate_cache` boolean — Whether to invalidate the cache for the extraction.
    - `num_pages_context` integer, nullable — Number of pages to pass as context on long document extraction.
    - `page_range` string, nullable — Comma-separated list of page numbers or ranges to extract from (1-based, e.g., '1,3,5-7,9' or '1-3,8-10').
  - `file_id` string, uuid, nullable — The ID of the file to extract from
  - `text` string, nullable — The text content to extract from
  - `file` FileData — Schema for file data with base64 content and MIME type.
    - `data` string, required — The file content as base64-encoded string
    - `mime_type` string, required — The MIME type of the file (e.g., 'application/pdf', 'text/plain')

## Response `200`

Successful Response

- ExtractJob — Schema for an extraction job.
  - `id` string, uuid, required — The id of the extraction job
  - `extraction_agent` ExtractAgent, required — Schema and configuration for an extraction agent.
    - `id` string, uuid, required — The id of the extraction agent.
    - `name` string, required — The name of the extraction agent.
    - `project_id` string, uuid, required — The ID of the project that the extraction agent belongs to.
    - `data_schema` object, required — The schema of the data.
    - `config` ExtractConfig, required — Configuration parameters for the extraction agent.
      - `priority` 'low' | 'medium' | 'high' | 'critical', nullable — The priority for the request. This field may be ignored or overwritten depending on the organization tier.
      - `extraction_target` 'PER_DOC' | 'PER_PAGE' | 'PER_TABLE_ROW' — Defines the extraction target scope.
      - `extraction_mode` 'FAST' | 'BALANCED' | 'PREMIUM' | 'MULTIMODAL' — Extraction mode options.
      - `parse_model` 'openai-gpt-4o' | 'openai-gpt-4o-mini' | 'openai-gpt-4-1' | 'openai-gpt-4-1-mini' | 'openai-gpt-4-1-nano' | 'openai-gpt-5' | 'openai-gpt-5-mini' | 'openai-gpt-5-nano' | 'openai-text-embedding-3-large' | 'openai-text-embedding-3-small' | 'openai-whisper-1' | 'anthropic-sonnet-3.5' | 'anthropic-sonnet-3.5-v2' | 'anthropic-sonnet-3.7' | 'anthropic-sonnet-4.0' | 'anthropic-sonnet-4.5' | 'anthropic-haiku-3.5' | 'anthropic-haiku-4.5' | 'gemini-2.5-flash' | 'gemini-3.0-pro' | 'gemini-3.1-pro' | 'gemini-2.5-pro' | 'gemini-2.0-flash' | 'gemini-2.0-flash-lite' | 'gemini-2.5-flash-lite' — Public model names.
      - `extract_model` union — The extract model to use for data extraction. If not provided, uses the default for the extraction mode.
        - 'openai-gpt-4-1' | 'openai-gpt-4-1-mini' | 'openai-gpt-4-1-nano' | 'openai-gpt-5' | 'openai-gpt-5-mini' | 'gemini-2.0-flash' | 'gemini-2.5-flash' | 'gemini-2.5-flash-lite' | 'gemini-2.5-pro' | 'openai-gpt-4o' | 'openai-gpt-4o-mini' — Extract model options.
        - string
      - `multimodal_fast_mode` boolean — DEPRECATED: Whether to use fast mode for multimodal extraction.
      - `system_prompt` string, nullable — The system prompt to use for the extraction.
      - `use_reasoning` boolean — Whether to use reasoning for the extraction.
      - `cite_sources` boolean — Whether to cite sources for the extraction.
      - `citation_bbox` boolean — Whether to fetch citation bounding boxes for the extraction. Only available in PREMIUM mode. Deprecated: this is now synonymous with cite_sources.
      - `confidence_scores` boolean — Whether to fetch confidence scores for the extraction.
      - `chunk_mode` 'PAGE' | 'SECTION' — How to chunk documents.
      - `high_resolution_mode` boolean — Whether to use high resolution mode for the extraction.
      - `invalidate_cache` boolean — Whether to invalidate the cache for the extraction.
      - `num_pages_context` integer, nullable — Number of pages to pass as context on long document extraction.
      - `page_range` string, nullable — Comma-separated list of page numbers or ranges to extract from (1-based, e.g., '1,3,5-7,9' or '1-3,8-10').
    - `custom_configuration` 'default', nullable — Custom configuration type for the extraction agent. Currently supports 'default'.
    - `created_at` string, date-time, nullable — The creation time of the extraction agent.
    - `updated_at` string, date-time, nullable — The last update time of the extraction agent.
  - `status` 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED', required — The status of the extraction job
  - `error` string, nullable — The error that occurred during extraction
  - `file_id` string, uuid, nullable — The id of the file that the extract was extracted from
  - `file` File — Schema for a file.
    - `id` string, uuid, required — Unique identifier
    - `created_at` string, date-time, nullable — Creation datetime
    - `updated_at` string, date-time, nullable — Update datetime
    - `name` string, required
    - `external_file_id` string, nullable — The ID of the file in the external system
    - `file_size` integer, nullable — Size of the file in bytes
    - `file_type` string, nullable — File type (e.g. pdf, docx, etc.)
    - `project_id` string, uuid, required — The ID of the project that the file belongs to
    - `last_modified_at` string, date-time, nullable — The last modified time of the file
    - `resource_info` object, nullable — Resource information for the file
    - `permission_info` object, nullable — Permission information for the file
    - `data_source_id` string, uuid, nullable — The ID of the data source that the file belongs to
    - `expires_at` string, date-time, nullable — The expiration date for the file. Files past this date can be deleted.
    - `purpose` string, nullable — The intended purpose of the file (e.g., 'user_data', 'parse', 'extract', 'split', 'classify')

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/run-llama/apis/llama-platform.md) · [All operations](https://skmtc.net/run-llama/apis/llama-platform/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/run-llama/llama-platform/versions/b17341164de9/schema)
