v34

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-09194386949.7 KB
V2
Classify

Create Classify Job

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.

post/api/v2/classify

Query parameters

project_idstring uuid nullable
organization_idstring uuid nullable

Cookies

sessionstring nullable

Request body

configuration_idstring nullable

Saved configuration ID

file_inputstring nullable

File ID or parse job ID to classify

file_idstring nullable

Deprecated: use file_input instead

parse_job_idstring nullable

Deprecated: use file_input instead

transaction_idstring nullable

Idempotency key scoped to the project

Example request

{
  "webhook_configurations": [
    {
      "webhook_url": "https://example.com/webhooks/llamacloud",
      "webhook_headers": {
        "Authorization": "Bearer sk-..."
      },
      "webhook_events": [
        "parse.success",
        "parse.error"
      ],
      "webhook_output_format": "json"
    }
  ],
  "configuration_id": "cfg-11111111-2222-3333-4444-555555555555",
  "configuration": {
    "rules": [
      {
        "type": "invoice",
        "description": "contains invoice number, line items, and total amount"
      }
    ],
    "parsing_configuration": {
      "lang": "en",
      "target_pages": "1,3,5-7",
      "max_pages": 10
    }
  },
  "file_input": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "file_id": "dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "parse_job_id": "pjb-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
  "transaction_id": "tx-unique-idempotency-key"
}

Response

Successful Response

created_atstring date-time nullable

Creation datetime

updated_atstring date-time nullable

Update datetime

file_inputstring required

ID of the input file or parse job

project_idstring required

Project this job belongs to

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

error_messagestring nullable

Error message if job failed

configuration_idstring nullable

Product configuration ID

transaction_idstring nullable

Idempotency key

parse_job_idstring nullable

Associated parse job ID

Example response

{
  "configuration": {
    "rules": [
      {
        "type": "invoice",
        "description": "contains invoice number, line items, and total amount"
      }
    ],
    "parsing_configuration": {
      "lang": "en",
      "target_pages": "1,3,5-7",
      "max_pages": 10
    }
  }
}