Skip to main content
The Orchata API is a RESTful API that provides full access to all platform features. Use it to build applications that create, search, and manage knowledge bases.

Base URL

Authentication

All API endpoints (except health checks) require authentication via the Oai-Api-Key header.
Get your API key from the Orchata dashboard → Settings → API Keys.
You can also use standard Bearer token authentication:

Response Format

All responses are JSON. Successful responses return the requested data directly:

Error Handling

Errors return appropriate HTTP status codes with a JSON body:

Common Status Codes

Pagination

List endpoints support pagination via query parameters:
integer
default:"1"
Page number (1-indexed)
integer
default:"10"
Items per page (max: 100)
Example:
Paginated Response:

Metadata Filtering

List endpoints for spaces and documents support filtering by custom metadata. Pass a JSON-encoded object as the metadata query parameter:
Metadata filtering uses partial matching (the JSONB @> containment operator) - the resource’s metadata must contain all the key-value pairs you specify, but may also have additional keys.

API Endpoints Overview

Spaces

Documents

Queries

Rate Limiting

The API implements rate limiting to ensure fair usage: Rate limit headers are included in all responses:
When rate limited, you’ll receive a 429 Too Many Requests response. Wait until X-RateLimit-Reset before retrying.

SDK & Tools

MCP Server

Connect AI assistants via Model Context Protocol.

TypeScript SDK

Type-safe SDK for Node.js, Deno, Bun, and browsers with AI SDK integration.

Interactive API Reference

Explore the full API with our interactive documentation below. You can test endpoints directly from your browser.
Click on any endpoint to see request/response examples and try it out.