---
title: "Create Batch Job"
method: POST
path: "/api/v1/beta/batch-processing"
tags: ["Beta", "Batch Processing"]
---

# Create Batch Job

`POST /api/v1/beta/batch-processing`

Create a batch processing job.

Processes files from a directory or a specific list of item IDs.
Supports batch parsing and classification operations.

Provide either `directory_id` to process all files in a directory,
or `item_ids` for specific items. The job runs asynchronously —
poll `GET /batch/{job_id}` for progress.

## Query parameters

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

## Headers

- `temporal-namespace` string, nullable

## Cookies

- `session` string, nullable

## Request body

- BatchJobCreateRequest — Request to create a batch processing job. Supports two modes: 1. Directory mode: Process all files in a directory (use directory_id) 2. Item list mode: Process specific items (use item_ids). Project must be provided via validate_project dependency.
  - `directory_id` string, nullable — ID of the directory containing files to process
  - `item_ids` string[], nullable — List of specific item IDs to process. Either this or directory_id must be provided.
  - `job_config` union, required — Job configuration — either a parse or classify config
    - BatchParseJobRecordCreate — Batch-specific parse job record for batch processing. This model contains the metadata and configuration for a batch parse job, but excludes file-specific information. It's used as input to the batch parent workflow and combined with DirectoryFile data to create full ParseJobRecordCreate instances for each file. Attributes: job_name: Must be PARSE_RAW_FILE partitions: Partitions for job output location parameters: Generic parse configuration (BatchParseJobConfig) session_id: Upstream request ID for tracking correlation_id: Correlation ID for cross-service tracking parent_job_execution_id: Parent job execution ID if nested user_id: User who created the job project_id: Project this job belongs to webhook_url: Optional webhook URL for job completion notifications
      - `job_name` 'parse_raw_file_job'
      - `partitions` object — The partitions for this execution. Used for determining where to save job output.
      - `parameters` BatchParseJobConfig — Generic parse job configuration for batch processing. This model contains the parsing configuration that applies to all files in a batch, but excludes file-specific fields like file_name, file_id, etc. Those file-specific fields are populated from DirectoryFile data when creating individual ParseJobRecordCreate instances for each file. The fields in this model should be generic settings that apply uniformly to all files being processed in the batch.
        - `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'
        - `priority` 'low' | 'medium' | 'high' | 'critical', nullable — The priority for the request. This field may be ignored or overwritten depending on the organization tier.
        - `custom_metadata` object, nullable — The custom metadata to attach to the documents.
        - `resource_info` object, nullable — The resource info about the file
        - `languages` ParserLanguages[]
        - `parsing_instruction` string, nullable
        - `disable_ocr` boolean, nullable
        - `annotate_links` boolean, nullable
        - `adaptive_long_table` boolean, nullable
        - `compact_markdown_table` boolean, nullable
        - `disable_reconstruction` boolean, nullable
        - `disable_image_extraction` boolean, nullable
        - `invalidate_cache` boolean, nullable
        - `outlined_table_extraction` boolean, nullable
        - `aggressive_table_extraction` boolean, nullable
        - `merge_tables_across_pages_in_markdown` boolean, nullable
        - `output_pdf_of_document` boolean, nullable
        - `do_not_cache` boolean, nullable
        - `fast_mode` boolean, nullable
        - `skip_diagonal_text` boolean, nullable
        - `preserve_layout_alignment_across_pages` boolean, nullable
        - `preserve_very_small_text` boolean, nullable
        - `gpt4o_mode` boolean, nullable
        - `gpt4o_api_key` string, nullable
        - `do_not_unroll_columns` boolean, nullable
        - `extract_layout` boolean, nullable
        - `high_res_ocr` boolean, nullable
        - `html_make_all_elements_visible` boolean, nullable
        - `layout_aware` boolean, nullable
        - `specialized_chart_parsing_agentic` boolean, nullable
        - `specialized_chart_parsing_plus` boolean, nullable
        - `specialized_chart_parsing_efficient` boolean, nullable
        - `specialized_image_parsing` boolean, nullable
        - `precise_bounding_box` boolean, nullable
        - `line_level_bounding_box` boolean, nullable
        - `html_remove_navigation_elements` boolean, nullable
        - `html_remove_fixed_elements` boolean, nullable
        - `guess_xlsx_sheet_name` boolean, nullable
        - `page_separator` string, nullable
        - `bounding_box` string, nullable
        - `bbox_top` number, nullable
        - `bbox_right` number, nullable
        - `bbox_bottom` number, nullable
        - `bbox_left` number, nullable
        - `target_pages` string, nullable
        - `use_vendor_multimodal_model` boolean, nullable
        - `vendor_multimodal_model_name` string, nullable
        - `model` string, nullable
        - `vendor_multimodal_api_key` string, nullable
        - `page_prefix` string, nullable
        - `page_suffix` string, nullable
        - `webhook_url` string, nullable
        - `preset` string, nullable
        - `take_screenshot` boolean, nullable
        - `is_formatting_instruction` boolean, nullable
        - `premium_mode` boolean, nullable
        - `continuous_mode` boolean, nullable
        - `input_s3_path` string, nullable
        - `input_s3_region` string, nullable — The region for the input S3 bucket.
        - `output_s3_path_prefix` string, nullable — If specified, llamaParse will save the output to the specified path. All output file will use this 'prefix' should be a valid s3:// url
        - `output_s3_region` string, nullable — The region for the output S3 bucket.
        - `project_id` string, nullable
        - `azure_openai_deployment_name` string, nullable
        - `azure_openai_endpoint` string, nullable
        - `azure_openai_api_version` string, nullable
        - `azure_openai_key` string, nullable
        - `input_url` string, nullable
        - `http_proxy` string, nullable
        - `auto_mode` boolean, nullable
        - `auto_mode_trigger_on_regexp_in_page` string, nullable
        - `auto_mode_trigger_on_text_in_page` string, nullable
        - `auto_mode_trigger_on_table_in_page` boolean, nullable
        - `auto_mode_trigger_on_image_in_page` boolean, nullable
        - `auto_mode_configuration_json` string, nullable
        - `structured_output` boolean, nullable
        - `structured_output_json_schema` string, nullable
        - `structured_output_json_schema_name` string, nullable
        - `max_pages` integer, nullable
        - `max_pages_enforced` integer, nullable
        - `extract_charts` boolean, nullable
        - `formatting_instruction` string, nullable
        - `complemental_formatting_instruction` string, nullable
        - `content_guideline_instruction` string, nullable
        - `spreadsheet_extract_sub_tables` boolean, nullable
        - `spreadsheet_force_formula_computation` boolean, nullable
        - `spreadsheet_include_hidden_sheets` boolean, nullable
        - `inline_images_in_markdown` boolean, nullable
        - `job_timeout_in_seconds` number, nullable
        - `job_timeout_extra_time_per_page_in_seconds` number, nullable
        - `strict_mode_image_extraction` boolean, nullable
        - `strict_mode_image_ocr` boolean, nullable
        - `strict_mode_reconstruction` boolean, nullable
        - `strict_mode_buggy_font` boolean, nullable
        - `save_images` boolean, nullable
        - `images_to_save` string[], nullable
        - `hide_headers` boolean, nullable
        - `hide_footers` boolean, nullable
        - `page_header_prefix` string, nullable
        - `page_header_suffix` string, nullable
        - `page_footer_prefix` string, nullable
        - `page_footer_suffix` string, nullable
        - `remove_hidden_text` boolean, nullable
        - `keep_page_separator_when_merging_tables` boolean, nullable
        - `ignore_document_elements_for_layout_detection` boolean, nullable
        - `output_tables_as_HTML` boolean, nullable
        - `internal_is_screenshot_job` boolean, nullable
        - `parse_mode` 'parse_page_without_llm' | 'parse_page_with_llm' | 'parse_page_with_lvm' | 'parse_page_with_agent' | 'parse_page_with_layout_agent' | 'parse_document_with_llm' | 'parse_document_with_lvm' | 'parse_document_with_agent' — Enum for representing the mode of parsing to be used.
        - `system_prompt` string, nullable
        - `system_prompt_append` string, nullable
        - `user_prompt` string, nullable
        - `page_error_tolerance` number, nullable
        - `replace_failed_page_mode` 'raw_text' | 'blank_page' | 'error_message' — Enum for representing the different available page error handling modes.
        - `replace_failed_page_with_error_message_prefix` string, nullable
        - `replace_failed_page_with_error_message_suffix` string, nullable
        - `markdown_table_multiline_header_separator` string, nullable
        - `presentation_out_of_bounds_content` boolean, nullable
        - `presentation_skip_embedded_data` boolean, nullable
        - `tier` string, nullable
        - `version` string, nullable
        - `extract_printed_page_number` boolean, nullable
        - `enable_cost_optimizer` boolean, nullable
        - `type` 'parse'
        - `lang` string — The language.
        - `outputBucket` string, nullable — The output bucket.
        - `pipeline_id` string, nullable — The pipeline ID.
      - `session_id` string, uuid, nullable — The upstream request ID that created this job. Used for tracking the job across services.
      - `correlation_id` string, uuid, nullable — The correlation ID for this job. Used for tracking the job across services.
      - `parent_job_execution_id` string, uuid, nullable — The ID of the parent job execution.
      - `user_id` string, nullable — The ID of the user that created this job
      - `project_id` string, uuid, nullable — The ID of the project this job belongs to.
      - `webhook_url` string, nullable — The URL that needs to be called at the end of the parsing job.
    - ClassifyJob — A classify job.
      - `status` 'PENDING' | 'SUCCESS' | 'ERROR' | 'PARTIAL_SUCCESS' | 'CANCELLED', required — Enum for representing the status of a job
      - `effective_at` string, date-time
      - `job_record_id` string, nullable — The job record ID associated with this status, if any.
      - `error_message` string, nullable — Error message for the latest job attempt, if any.
      - `id` string, uuid, required — Unique identifier
      - `created_at` string, date-time, nullable — Creation datetime
      - `updated_at` string, date-time, nullable — Update datetime
      - `rules` ClassifierRule[], required — The rules to classify the files
        - `type` string, required — The document type to assign when this rule matches (e.g., 'invoice', 'receipt', 'contract')
        - `description` string, required — Natural language description of what to classify. Be specific about the content characteristics that identify this document type.
      - `user_id` string, required — The ID of the user
      - `project_id` string, uuid, required — The ID of the project
      - `mode` 'FAST' | 'MULTIMODAL' — Supported classification execution modes.
      - `parsing_configuration` ClassifyParsingConfiguration — Parsing configuration for a classify job.
        - `lang` 'af' | 'az' | 'bs' | 'cs' | 'cy' | 'da' | 'de' | 'en' | 'es' | 'et' | 'fr' | 'ga' | 'hr' | 'hu' | 'id' | 'is' | 'it' | 'ku' | 'la' | 'lt' | 'lv' | 'mi' | 'ms' | 'mt' | 'nl' | 'no' | 'oc' | 'pi' | 'pl' | 'pt' | 'ro' | 'rs_latin' | 'sk' | 'sl' | 'sq' | 'sv' | 'sw' | 'tl' | 'tr' | 'uz' | 'vi' | 'ar' | 'fa' | 'ug' | 'ur' | 'bn' | 'as' | 'mni' | 'ru' | 'rs_cyrillic' | 'be' | 'bg' | 'uk' | 'mn' | 'abq' | 'ady' | 'kbd' | 'ava' | 'dar' | 'inh' | 'che' | 'lbe' | 'lez' | 'tab' | 'tjk' | 'hi' | 'mr' | 'ne' | 'bh' | 'mai' | 'ang' | 'bho' | 'mah' | 'sck' | 'new' | 'gom' | 'sa' | 'bgc' | 'th' | 'ch_sim' | 'ch_tra' | 'ja' | 'ko' | 'ta' | 'te' | 'kn' — Enum for representing the languages supported by the parser.
        - `max_pages` integer, nullable — The maximum number of pages to parse
        - `target_pages` integer[], nullable — The pages to target for parsing (0-indexed, so first page is at 0)
  - `page_size` integer — Number of files to process per batch when using directory mode
  - `continue_as_new_threshold` integer, nullable — Maximum files to process per execution cycle in directory mode. Defaults to page_size.

## Response `201`

Successful Response

- BatchJobResponse — Response schema for a batch processing job.
  - `status` 'pending' | 'running' | 'dispatched' | 'completed' | 'failed' | 'cancelled', required — Status of a batch processing job.
  - `effective_at` string, date-time
  - `job_record_id` string, nullable — The job record ID associated with this status, if any.
  - `error_message` string, nullable — Error message for the latest job attempt, if any.
  - `id` string, required — Unique identifier for the batch job
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `project_id` string, required — Project this job belongs to
  - `directory_id` string, nullable — Directory being processed
  - `job_type` 'parse' | 'extract' | 'classify', required — Type of batch processing operation.
  - `total_items` integer, required — Total number of items in the job
  - `processed_items` integer — Number of items processed so far
  - `failed_items` integer — Number of items that failed processing
  - `skipped_items` integer — Number of items skipped (already processed or size limit)
  - `workflow_id` string, nullable — Async job tracking ID
  - `started_at` string, date-time, nullable — Timestamp when job processing started
  - `completed_at` string, date-time, nullable — Timestamp when job completed

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