fynepdf logo
Docs menu

Ask a PDF a question

An answer from the document only, with page citations. Every quote is checked against the page text; verified: false marks one that couldn't be found. Price: 2 credits for up to 10 pages read, +1 per further 10.

POST /v1/ai/ask

Request

curl -X POST https://api.fynepdf.com/v1/ai/ask \
  -H "Authorization: Bearer $FYNEPDF_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","question":"What is the notice period in this contract?"}'

Body

ParameterTypeRequiredWhat it does
file_idstringyes
questionstringyes

Response

The answer.

FieldTypeRequiredWhat it does
object"answer"yes
answerstringyes
foundbooleanyes
citationsarray of objectyes
pages_readarray of integeryes
creditsintegeryes
testboolean

Errors

Errors are problem details (RFC 9457) with a code you can branch on and a request_id for support.