REST API
A JSON API over HTTPS for document-grounded chat, ingestion, and everything the dashboard does.
Every endpoint is JSON over HTTPS, authenticated by a key you issue per project or by a dashboard session. Nothing is versioned in the body — the version is in the path, and /v1 is the only version there has been.
QuickstartA working chat call in five minutes, before you ingest anything.AuthenticationWhich credential each endpoint accepts, and which header carries it.Integration APIEvery endpoint your API key can call, in one page. The set to build against.Full endpoint referenceBoth halves, including the dashboard routes the web app uses.JavaScript SDKThe typed client and the chat widget, if you are working in JS.
The shape of everything
| Aspect | Answer |
|---|---|
| Base URL | https://api.dev.oprag.ai — per environment |
| Auth header | X-Oprag-Key, or Authorization: Bearer <key> — details |
| Content type | application/json on every request with a body |
| Errors | { "error": "message" } — errors |
| Pagination | cursor in, nextCursor out — pagination |
| Versioning | In the path — versioning |
Words this documentation uses
| Term | Means |
|---|---|
| Workspace | Your account and everyone in it. The API resource is called company, and retrieval attributes call it tenant_id. |
| Project | One bot: its documents, its settings, its keys. |
| Deploy | Publishing a project's configuration. A verb, never a noun. |
| Integration key | sk_*. A workspace secret for server-to-server calls. Not an "API key", not a "project API key". |
| Embed key | embed_*. Public, origin-locked, for browsers. |
Ready to ship?
Get started free