---
title: "Run Job On File"
method: POST
path: "/api/v1/extraction/jobs/file"
tags: ["LlamaExtract"]
---

# Run Job On File

`POST /api/v1/extraction/jobs/file`

## Query parameters

- `from_ui` boolean

## Cookies

- `session` string, nullable

## 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)
