---
title: "Create Classify Job"
method: POST
path: "/api/v2/classify"
tags: ["V2", "Classify"]
---

# Create Classify Job

`POST /api/v2/classify`

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.

## Query parameters

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

## Cookies

- `session` string, nullable

## Request body

- ClassifyV2JobCreateRequest — Request to create a classify job.
  - `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'
  - `configuration_id` string, nullable — Saved configuration ID
  - `configuration` ClassifyV2Configuration — Configuration for a classify job.
    - `rules` ClassifyV2Rule[], required — Classify rules to evaluate against the document (at least one required)
      - `type` string, required — Document type to assign when rule matches
      - `description` string, required — Natural language criteria for matching this rule
    - `mode` 'FAST' — Classify execution mode
    - `parsing_configuration` ClassifyV2ParsingConfiguration — Parsing configuration for classify jobs.
      - `lang` string — ISO 639-1 language code for the document
      - `target_pages` string, nullable — Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.
      - `max_pages` integer, nullable — Maximum number of pages to process. Omit for no limit.
  - `file_input` string, nullable — File ID or parse job ID to classify
  - `file_id` string, nullable — Deprecated: use file_input instead
  - `parse_job_id` string, nullable — Deprecated: use file_input instead
  - `transaction_id` string, nullable — Idempotency key scoped to the project

## Response `200`

Successful Response

- ClassifyV2JobResponse — Response for a classify job.
  - `id` union, required — Unique identifier
    - string
    - string, uuid
  - `created_at` string, date-time, nullable — Creation datetime
  - `updated_at` string, date-time, nullable — Update datetime
  - `file_input` string, required — ID of the input file or parse job
  - `project_id` string, required — Project this job belongs to
  - `user_id` string, required — User who created this job
  - `status` 'PENDING' | 'RUNNING' | 'COMPLETED' | 'FAILED', required — Current job status: PENDING, RUNNING, COMPLETED, or FAILED
  - `document_input_type` 'url' | 'file_id' | 'parse_job_id', required — Whether the input was a file or parse job (FILE or PARSE_JOB)
  - `configuration` ClassifyV2Configuration, required — Configuration for a classify job.
    - `rules` ClassifyV2Rule[], required — Classify rules to evaluate against the document (at least one required)
      - `type` string, required — Document type to assign when rule matches
      - `description` string, required — Natural language criteria for matching this rule
    - `mode` 'FAST' — Classify execution mode
    - `parsing_configuration` ClassifyV2ParsingConfiguration — Parsing configuration for classify jobs.
      - `lang` string — ISO 639-1 language code for the document
      - `target_pages` string, nullable — Comma-separated page numbers or ranges to process (1-based). Omit to process all pages.
      - `max_pages` integer, nullable — Maximum number of pages to process. Omit for no limit.
  - `result` ClassifyV2Result — Result of classifying a document.
    - `reasoning` string, required — Why the document matched (or didn't match) the returned rule
    - `confidence` number, required — Confidence score between 0.0 and 1.0
    - `type` string, nullable, required — Matched rule type, or null if no rule matched
  - `error_message` string, nullable — Error message if job failed
  - `configuration_id` string, nullable — Product configuration ID
  - `transaction_id` string, nullable — Idempotency key
  - `parse_job_id` string, nullable — Associated parse job ID

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