Skip to main content
POST
Extract Data

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.

schema
object
required

JSON Schema defining the data to extract from the document.

system_prompt
string

Custom system prompt for the extraction model.

parsing
object

Configuration for the parsing step. Ignored when using jobid:// input.

Response

Successful extraction

job_id
string
required
result
object
required

Extracted data matching the provided schema.

duration
number
usage
object