Complete API reference for Mindex — an AI-powered knowledge base for developers.
# Install the CLI
curl -fsSL https://raw.githubusercontent.com/usemindex/cli/main/install.sh | sh
# Authenticate
mindex auth
# Get context from your knowledge base
mindex context "how does authentication work?"CLI docs: github.com/usemindex/cli
| Environment | URL |
|---|---|
| API | https://api.usemindex.dev |
| MCP Server | https://mcp.usemindex.dev |
Mindex supports two authentication methods:
| Method | Use Case | Header |
|---|---|---|
| JWT | Dashboard / Web apps | Authorization: Bearer <jwt> |
| API Key | Scripts / MCP / Integrations | Authorization: sk-xxxxx |
# Register
curl -X POST https://api.usemindex.dev/auth/register \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your-password", "password_confirmation": "your-password"}'
# Login
curl -X POST https://api.usemindex.dev/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your-password"}'
# Returns: { "jwt": "eyJ...", "refresh_token": "abc123..." }Create an API key from the dashboard at Settings > API Keys, or via the API:
curl -X POST https://api.usemindex.dev/orgs/your-org/api_keys \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{"name": "my-key"}'
# Returns: { "id": "...", "name": "my-key", "key": "sk-abc123...", "key_prefix": "sk-abc1" }- Authentication
- Organizations
- Namespaces
- Documents
- Search
- Members
- API Keys
- Billing
- MCP (Model Context Protocol)
| Plan | Requests/min |
|---|---|
| Free | 30 |
| Personal | 60 |
| Team | 300 |
| Enterprise | Custom — contact sales |
Rate limit headers are included in every response:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: 1700000000
All errors follow this format:
{
"error": "Human-readable error message"
}Limit exceeded errors include additional fields:
{
"error": "Document limit reached",
"limit_type": "documents",
"current": 5000,
"max": 5000,
"plan": "personal",
"upgrade_url": "/billing/plans"
}| Code | Meaning |
|---|---|
| 200 | Success |
| 201 | Created |
| 202 | Accepted (async ingest) |
| 204 | No Content (deleted) |
| 400 | Bad Request |
| 401 | Unauthorized |
| 402 | Payment Required (plan limit reached or subscription canceled) |
| 403 | Forbidden |
| 404 | Not Found |
| 413 | Payload Too Large (converted text exceeds plan cap) |
| 422 | Validation Error |
| 429 | Rate Limited |
| 502 | Engine Unavailable |
When a document upload fails — either as a per-file rejection inside a batch (enqueue_errors[]) or as a top-level 4xx response for single-file uploads — the error body includes a machine-readable code field:
| Code | HTTP | Description | Recommended action |
|---|---|---|---|
MARKDOWN_TOO_LARGE |
413 / 202 with errors |
The converted text of this document exceeds your plan's per-document limit | Split the document into smaller logical units, or upgrade your plan |
DOCUMENT_EXISTS |
422 |
A document with the same key already exists in this namespace | Use PUT to overwrite, rename the key, or upload to a different namespace |
INVALID |
422 |
The document failed validation (unsupported format, invalid encoding, etc.) | Check the file type and encoding before retrying |
In batch uploads, files that hit DOCUMENT_EXISTS or INVALID are listed in enqueue_errors[] and do not block the rest of the batch from processing. Files that hit MARKDOWN_TOO_LARGE (text size over plan limit) are reported in enqueue_errors[] as well — other files in the batch continue normally.
| Format | Extension | Quality |
|---|---|---|
| Markdown | .md, .txt, .markdown |
Native (no conversion) |
| Word | .docx |
Excellent |
| PowerPoint | .pptx |
Good |
| Excel | .xlsx |
Good |
.pdf |
Good | |
| HTML | .html, .htm |
Excellent |
| CSV | .csv |
Good |
| JSON | .json |
Good |
| XML | .xml |
Good |
Non-Markdown files are automatically converted to text (Markdown format) before processing.