Introduction
A REST API for uploading documents and asking questions that are answered from them, with citations.
The Daneshyar API lets you upload documents into a workspace and then ask questions that are answered from those documents — with citations pointing back to the passage each claim came from. It is the same retrieval engine the Daneshyar console runs on, exposed for your own product.
Every request is authenticated with a single API key that identifies one of your apps. There is no app id in any URL: the key already names the app, so paths start at the workspace.
What you can build
The API is deliberately small. With four endpoints you can:
- Answer support questions from your own help centre, with a link to the source article.
- Give each customer, patient or student their own workspace, so answers never cross between them.
- Build an internal assistant over policy documents, contracts or research that never leaves your account.
- Add a grounded question box to a product you already have, without building retrieval yourself.
How the pieces fit
Four objects, in a strict hierarchy:
- App — Your integration. It owns exactly one API key, and every workspace below it. You create apps in the console, not through this API.
- Workspace — A collection of documents that get answered together. This is the unit of separation — a question asked in one workspace can never retrieve from another.
- Resource — One uploaded document. It goes through an ingestion pipeline that extracts its text, splits it and embeds it before it can be answered from.
- Chat — A question against one workspace. The server retrieves the closest passages from that workspace's ready resources, answers from them, and returns the citations.
The shape of your workspaces is the most important design decision you will make with this API — one per customer, per team, or per topic. Read the concepts page before you commit to one.
Base URL
Every path in this reference is relative to this base. It is the same host the console talks to, on a separate versioned namespace:
https://api.daneshyar.info/api/v1Paths carry a trailing slash. The server redirects the slashless form, which turns a POST into a GET and silently drops your body — so always include it.
/v1/workspaces/ already means “the workspaces of the app this key belongs to”.Where to go next
There is also a generated OpenAPI schema at /api/v1/schema/, with Swagger UI at /api/v1/docs/. It is authoritative on field types; this site is where the reasoning lives.