BlinkLMDocument intelligence API
API Guide
BlinkLM API guide
BlinkLM is built around a short loop: upload documents, store the returned IDs, and send questions against the files you want to search.
1. Upload a document
- Send a file to BlinkLM and we index it as a searchable document.
- Store the returned document ID so you can query or delete the file later.
- Best results come from text-heavy files like PDF, DOCX, TXT, MD, CSV, and JSON.
POST /api/upload
curl -X POST "https://blinklm.com/api/upload" \ -H "Authorization: Bearer $BLINKLM_API_KEY" \ -F "file=@your-document.pdf"
2. Ask a question
- Send a question with one or more document IDs.
- BlinkLM retrieves relevant chunks, generates an answer, and returns citations.
- Use this for internal search, support copilots, summarization, and knowledge tools.
POST /api/query
curl -X POST "https://blinklm.com/api/query" \
-H "Authorization: Bearer $BLINKLM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"question": "What changed in our vendor security policy?",
"documentIds": ["doc_q4_brief"]
}'3. List your documents
- Fetch every uploaded document associated with the API key owner.
- Use this before querying, previewing, or deleting documents in production.
GET /api/documents
curl "https://blinklm.com/api/documents" \ -H "Authorization: Bearer $BLINKLM_API_KEY"
4. Delete a document
- Remove the uploaded file and its indexed chunks in one request.
- Only documents owned by the authenticated workspace can be deleted.
DELETE /api/documents/:id
curl -X DELETE "https://blinklm.com/api/documents/doc_q4_brief" \ -H "Authorization: Bearer $BLINKLM_API_KEY"