POST
/
v1
/
extract
/
file
curl --request POST \
  --url https://api.aurelio.ai/v1/extract/file \
  --header 'Content-Type: multipart/form-data' \
  --header 'authorization: <api-key>' \
  --form quality=low \
  --form chunk=true \
  --form wait=30
{
  "status": "pending",
  "usage": {
    "tokens": 123,
    "pages": 123,
    "seconds": 123
  },
  "message": "<string>",
  "processing_options": {
    "chunk": true,
    "quality": "low"
  },
  "document": {
    "id": "<string>",
    "content": "<string>",
    "source": "<string>",
    "source_type": "application/pdf",
    "num_chunks": 123,
    "metadata": {},
    "chunks": []
  },
  "uploaded_urls": {
    "original_file": "<string>",
    "result_html": "<string>",
    "result_json": "<string>",
    "result_markdown": "<string>"
  }
}

Authorizations

authorization
string
header
required

Body

multipart/form-data
quality
enum<string>
required

Processing quality of the document. High quality will result in longer processing time.

Available options:
low,
high
chunk
boolean
required

Whether the document should be chunked

file
file | null

File to be processed. Leave empty to send streamed data.

wait
integer
default:
30

The wait time to keep open the connection to the client in seconds, defaults to 30 seconds, -1 means keep open connection until completion. After the wait time, the result can be retrieved from the /extract/<document_id> endpoint.

Response

200
application/json
Successful Response

Extended response payload for document processing

status
enum<string>
required

The status of the chunking process

Available options:
pending,
completed,
failed
usage
object
required

Usage

processing_options
object
required

The processing options for the document processor

document
object
required
message
string | null

Message

uploaded_urls
object | null

Uploaded URLs