Image Operations

Detect documents in an image

Creates a task to detect document boundaries within an image.

POST
/v1/image-operations/detect-documents

Authorization

x-api-key
<token>

API Key for authentication

In: header

Request Body

application/jsonOptional
inputrequired
string

The id of the file to operate on.

Response Body

The response of the detect-documents operation

TypeScript Definitions

Use the response body type in TypeScript.

responserequired
Detect Documents Response

The response of the detect-documents operation

curl -X POST "https://api.scan-documents.com/v1/image-operations/detect-documents" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "input": "file_avyrvozb9302uwhq"
  }'
{
  "id": "task_euyrvozb9302uwhq",
  "operation": "convert",
  "parameters": {
    "input": "file_avyrvozb9302uwhq",
    "name": "Example Image",
    "target_format": "image/png"
  },
  "status": "completed",
  "result": {
    "documents": [
      {
        "vertices": [
          {
            "x": 0,
            "y": 0
          }
        ],
        "bounding_box": {
          "top": 0,
          "left": 0,
          "width": 0,
          "height": 0
        }
      }
    ]
  },
  "created_at": "2021-05-01T12:00:00Z",
  "updated_at": "2021-05-01T12:00:00Z"
}