Skip to main content
POST
/
parse
Parse Document
curl --request POST \
  --url https://platform.aifano.com/parse \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "<string>",
  "enhance": {
    "agentic": [],
    "summarize_figures": true
  },
  "retrieval": {
    "chunking": {
      "chunk_mode": "disabled",
      "chunk_size": 123
    },
    "filter_blocks": [],
    "embedding_optimized": false
  },
  "formatting": {
    "add_page_markers": false,
    "table_output_format": "dynamic",
    "merge_tables": false,
    "include": []
  },
  "spreadsheet": {
    "split_large_tables": {
      "enabled": true,
      "size": 50
    },
    "clustering": "accurate"
  },
  "settings": {
    "ocr_system": "standard",
    "extraction_mode": "hybrid",
    "force_url_result": false,
    "return_ocr_data": false,
    "return_images": [],
    "page_range": {
      "start": 123,
      "end": 123
    },
    "timeout": 123,
    "document_password": "<string>"
  }
}
'
{
  "job_id": "<string>",
  "duration": 123,
  "usage": {
    "num_pages": 123,
    "credits": 123
  },
  "result": {
    "type": "full",
    "chunks": [
      {
        "content": "<string>",
        "embed": "<string>",
        "blocks": [
          {
            "type": "Header",
            "bbox": {
              "left": 123,
              "top": 123,
              "width": 123,
              "height": 123,
              "page": 123
            },
            "content": "<string>",
            "confidence": "low"
          }
        ],
        "enriched": "<string>"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

API key authentication. Use your Aifano API key (starts with ak_live_) as the Bearer token.

Body

application/json
input
required

The document to process. Accepts: (1) a public URL, (2) a presigned S3 URL, (3) an aifano://file_id from /upload, or (4) a jobid://job_id from a previous /parse call.

enhance
object
retrieval
object
formatting
object
spreadsheet
object
settings
object

Response

Successful parse response

job_id
string
required

Unique job identifier.

duration
number
required

Processing time in seconds.

usage
object
required
result
object
required

Parse result — either inline (full) or as a URL for large responses.