API reference
AIDataParser extracts structured JSON from PDFs and images. Base URL: https://aidataparser.com. Machine-readable spec at /openapi.json.
Quickstart
1. Issue an API key (50 free credits, no card)
curl -X POST https://aidataparser.com/v1/keys \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com"}'
# => 201
# {
# "object": "api_key",
# "api_key": "adp_live_xxxxxxxx", // store this now — shown once
# "credits": 50,
# "free_credits_granted": 50
# }2. Parse a document
curl -X POST https://aidataparser.com/v1/parse/document \
-H "Authorization: Bearer adp_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com/receipt.png" }'Authentication
Pass your key as a bearer token: Authorization: Bearer adp_live_... (or the x-api-key header). Keys are shown once at creation and stored only as a hash.
POST /v1/parse/document
Accepts a PDF or image via a URL, base64 payload, or multipart file. Costs 1 credit per document, charged only on success. Text-first PDFs are parsed with a pure-JS reader; images are sent to the model as vision input.
Request body (JSON)
urlstringhttp(s) URL to a PDF or image.
base64stringBase64-encoded file bytes (data-URI prefixes are stripped automatically).
media_typestringMIME type for base64 input: application/pdf, image/png, image/jpeg, image/gif, or image/webp.
schemaobject · optionalA JSON Schema describing the desired output. When provided, the data field is guaranteed to match it.
instructionsstring · optionalNatural-language guidance for the extraction.
Multipart form upload
curl -X POST https://aidataparser.com/v1/parse/document \
-H "Authorization: Bearer adp_live_xxxxxxxx" \
-F "file=@/path/to/invoice.pdf" \
-F 'schema={"type":"object","properties":{"total":{"type":"number"}}}'Base64 upload
curl -X POST https://aidataparser.com/v1/parse/document \
-H "Authorization: Bearer adp_live_xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "base64": "JVBERi0xLjc...", "media_type": "application/pdf" }'Response
dataobjectThe extracted structured JSON (matches your schema when supplied).
confidence"high" | "medium" | "low"Model's self-assessed confidence in the extraction.
review_neededbooleanTrue when the document was ambiguous or low quality — gate on this in agent workflows.
notesstring | nullOptional note about issues encountered.
credits_charged / credits_remainingintegerCredits used by this call and your remaining balance.
Errors
401unauthorizedMissing, invalid, or revoked API key.
402payment requiredInsufficient credits — top up to continue.
415unsupported media typeThe file type is not a supported PDF or image.
422unprocessableScanned/image-only PDF with no embedded text — send the page as an image instead (OCR-grade PDF support is on the roadmap).
Errors return { "error": { "message": "..." } }. Failed extractions are never charged.