FreeBrain AI API Documentation
Connect to FreeBrain with an API key, find your model's supported endpoint, and use the chat, image, audio, and video API reference.
Overview
FreeBrain provides an API gateway for calling AI models. Start with a FreeBrain API key and the base URL https://api.thefreebrain.com/v1 for an OpenAI-compatible client. Supported endpoints and parameters depend on the model you select in the model catalog.
Start here
-
Make your first API request: create a key, choose a chat model, and call it with cURL or Python.
-
Troubleshoot API errors: check authentication, base URLs, model access, rate limits, and streaming.
-
Compare models and pricing: check each model's endpoint and billing unit before integrating it.
-
Connect an OpenAI-compatible app: check connection settings and features before switching traffic.
-
Use the Python OpenAI SDK: run text and streaming examples with error handling.
-
Use the Node.js OpenAI SDK: configure JavaScript and read streaming responses.
AI Model APIs
These pages describe model API formats. Use the format supported by your chosen model; an endpoint in the reference does not imply that every model or account supports it.
Model List
Retrieve a list of available models.
Chat
Conversation completion interface.
Completions
Traditional text completion interface.
Embeddings
Text embedding vector generation interface.
Rerank
Document reranking interface.
Moderations
Content safety moderation interface. The content safety moderation interface is one of the compliance tools and does not replace the deployer's own safety governance obligations and upstream content policy requirements. Public-facing services should establish abuse reporting, log auditing, and handling mechanisms.
Audio
Speech recognition and speech synthesis interfaces.
Real-time Speech
Real-time audio streaming interface.
Images
AI image generation interface.
Video
AI video generation interface.
Unimplemented
Placeholder interface, not yet implemented.