API
Call AI Regulation from your own code.
Base URL
Every path below hangs off this address.
https://api.factagora.comAPI key
This key stands for this collection. There are no ids in the paths below because the key already says which collection you mean. Treat it like a password.
header
Authorization: Bearer <your-key>Quick start
Search this collection and print the matching passages.
curl -X POST 'https://api.factagora.com/api/v1/collections/search' \
-H 'Authorization: Bearer <your-key>' \
-H 'Content-Type: application/json' \
-d '{"query": "quarterly revenue", "limit": 5}'Search this collection
Returns matching passages with their source file and page.
POST
https://api.factagora.com/api/v1/collections/searchcurl -X POST 'https://api.factagora.com/api/v1/collections/search' \
-H 'Authorization: Bearer <your-key>' \
-H 'Content-Type: application/json' \
-d '{"query": "quarterly revenue", "limit": 5}'Errors
A missing, expired or revoked token all return 401. The response does not say which.
json
{
"error": { "message": "..." }
}