API & Developers

REST API Quickstart

Get started with BrainTube's REST API — authentication, endpoints, and first call.

Access your BrainTube corpus programmatically via the REST API.

Authentication

Generate an API key from Settings → API Keys. Include it in requests:

Authorization: Bearer bt_sk_your_api_key_here

Example: Search Your Corpus

POST to the brain-api endpoint with your query and authorization header.

Available Endpoints

EndpointMethodDescription
/brain-apiPOSTMain API — search, list, manage
/brain-chatPOSTChat with a specific brain
/graph-enhanced-searchPOSTAdvanced semantic + graph search

Response Format

All responses return JSON with success, data, and meta fields.

Error Handling

StatusMeaning
200Success
401Invalid or missing API key
403Insufficient permissions
429Rate limit exceeded
500Server error
Still need help? Email support.