Skip to main content

Endpoint

Authentication

This endpoint requires API key authentication via the Authorization header:

Path Parameters

string
required
The unique identifier of the task to update

Requirements

  • Task must have status Succeeded or Failed
  • New configuration must be different from the current configuration
  • Task must not be expired

Request Body

The request body is JSON with optional configuration fields. Any fields not provided will retain their values from the original task configuration.
enum
Controls the Optical Character Recognition (OCR) strategy:
  • All: Processes all pages with OCR
  • Auto: Selectively applies OCR only to pages with missing or low-quality text
enum
Controls the segmentation strategy:
  • LayoutAnalysis: Analyzes pages for layout elements
  • Page: Treats each page as a single segment
boolean
Whether to use high-resolution images for cropping and post-processing
integer
The number of seconds until task is deleted
enum
Controls how errors are handled:
  • Fail: Stops processing on any error
  • Continue: Attempts to continue despite non-critical errors
object
Controls the settings for chunking and post-processing.
object
Controls the post-processing of each segment type. Each segment type can be configured independently.
object
Controls the LLM used for the task.

Response

The response is identical to the Create Task response, with the task in Starting or Processing state.
string
The same task ID (tasks are updated in place)
enum
Will typically be Starting or Processing after update
string
Original creation timestamp (unchanged)
string
New start timestamp for the reprocessing
string
Will be null while reprocessing
object
Updated configuration with new settings merged with existing ones
string
Status message about the update

Status Codes

  • 200: Task updated and reprocessing started successfully
  • 400: Bad request (task cannot be updated, invalid configuration, task in wrong state)
  • 404: Task not found
  • 429: Usage limit exceeded
  • 500: Internal server error

Examples

Behavior Notes

  1. Partial Updates: Only specify the fields you want to change. All other configuration values will be preserved from the original task.
  2. Status Requirements: The task must be in Succeeded or Failed state. Tasks that are Starting, Processing, or Cancelled cannot be updated.
  3. Reprocessing: The update triggers a complete reprocessing of the document with the new configuration. The original input file is reused.
  4. Same Task ID: The task keeps the same ID - it’s updated in place rather than creating a new task.
  5. Configuration Validation: If the LLM processing configuration is outdated or invalid, you’ll receive an error asking you to update it.
  6. Cost Implications: Updating a task counts toward your usage limits as it reprocesses the entire document.

Common Error Messages

  • "Task not found" - Task ID doesn’t exist or has expired
  • "Task cannot be updated" - Task is not in Succeeded or Failed state
  • "Usage limit exceeded" - Your account has reached its processing limit
  • "The LLM processing configuration is probably outdated" - LLM configuration needs updating