GET /v1/documents lists captured documents and GET /v1/documents/{file_id} returns one as structured data. What Fryri extracts, your code can consume.
List and read#
Request
curl "https://api.fryri.com/v1/documents" \
-H "Authorization: Bearer $FRYRI_API_KEY"Response
{
"count": 25,
"documents": [
{
"file_id": "file_4DKRDkce4MDwHZvG",
"name": "Acme MSA 2026.txt",
"media_type": "text/plain",
"size": 159,
"extension": "txt",
"uploaded_at": "2026-08-27T00:32:28.273335",
"preview_snippet": "MASTER SERVICE AGREEMENT between Acme Corp and Fryri Ltd, dated 12 March 2026. Either party may terminate on 30 days written notice. Fees: USD 4,000 per month.",
"source_ref": "s3://acme-docs/msa-2026.pdf"
},
...
]
}The list is newest first and includes each document's file_id, name, media type, size, upload date, preview snippet and your source_ref if you sent one. limit sets the page size. Default value is 25, range [1, 100].
view selects the shape of a single read. Default value is structured: the typed record, with the kind of document, its date, and the fields found inside (amounts, parties, reference numbers). view=text returns the extracted text instead. A download route returns the original bytes when they are stored with Fryri.
Request
curl "https://api.fryri.com/v1/documents/{file_id}" \
-H "Authorization: Bearer $FRYRI_API_KEY"Response
{
"view": "structured",
"file_id": "file_4DKRDkce4MDwHZvG",
"document_type": "master service agreement",
"summary_one_line": "Master service agreement between Acme Corp and Fryri Ltd, dated 12 March 2026, with monthly fee of USD 4,000.",
"primary_date": "2026-03-12",
"extraction_confidence": 0.95,
"extracted_at": "2026-08-27T00:32:56.971875",
"structured": {
"title": {"value": "MASTER SERVICE AGREEMENT", "confidence": 1.0, "quote": ""},
"parties": [
{"name": "Acme Corp", "role": "party", "confidence": 0.99, "quote": "between Acme Corp and Fryri Ltd"},
{"name": "Fryri Ltd", "role": "party", "confidence": 0.99, "quote": "between Acme Corp and Fryri Ltd"}
],
"monetary_values": [
{"label": "monthly fee", "amount": 4000.0, "currency": "USD", "kind": "fee", "confidence": 0.99, "quote": "Fees: USD 4,000 per month."}
],
...
},
"entities": []
}Structured facts#
GET /v1/facts returns the standing facts extracted across the whole library, and POST, PATCH and DELETE let you write and correct them. Use facts when you want durable statements ("the lease ends March 2027") rather than documents. limit sets the page size. Default value is 200, range [1, 1000].
Request
curl "https://api.fryri.com/v1/facts" \
-H "Authorization: Bearer $FRYRI_API_KEY"Response
{
"facts": [
{
"id": 114,
"predicate": "Finance",
"value": "Documented invoice chase policy in the Freelance Operations doc: reminder 3 days after the due date if unpaid, formal notice at 14 days overdue, paid receipt issued within 48 hours of payment.",
"category": "finance",
"subject": null,
"label": null,
"valid_from": "2026-08-26",
"confidence": 1.0,
"source_quote": "Reminder 3 days after due date if unpaid; formal notice at 14 days overdue",
"created_at": "2026-08-26T23:20:22.735197"
},
...
],
"total": 114,
"has_more": false
}Both endpoints accept end_user_id to read a specific end user's library; see give your app memory.