v6

latestOpenAPI 3.1.0raw.githubusercontent.com2025-06-241833312.7 KB
Image Operations

Detect documents in an image

Creates a task to detect document boundaries within an image.

post/v1/image-operations/detect-documents

Request body

inputstring required

The id of the file or task to operate on.

callback_urlstring uri

The URL to call when the task is completed or failed. If you want to receive events, you probably prefer to use webhooks instead.

Example request

{
  "input": "file_avyrvozb9302uwhq",
  "callback_url": "https://example.com/callback"
}

Response

Task created successfully. Returns the task details.

OR
OR
OR

Example response

{
  "id": "task_euyrvozb9302uwhq",
  "operation": "convert",
  "parameters": {
    "input": "file_avyrvozb9302uwhq",
    "name": "File Name",
    "callback_url": "https://example.com/callback",
    "target_format": "image/png"
  },
  "status": "completed",
  "result": {
    "documents": [
      {
        "file_id": "file_avyrvozb9302uwhq"
      }
    ]
  },
  "callback_url": "https://example.com/callback",
  "created_at": "2021-05-01T12:00:00Z",
  "updated_at": "2021-05-01T12:00:00Z"
}