Developer platform
Build with brAIAIn.
Bring the intelligence of one paid sentence to your own product. The API is generally available, to the extent that anything is. It speaks the request format your tools already use.
Checking whether the live endpoint is switched on...
Quickstart
Send a chat request. No API key is needed, because we could not think of anything to protect.
curl https://API_BASE/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "braiain-latest",
"messages": [{"role": "user", "content": "What is the meaning of life?"}]
}'
Response:
{
"id": "chatcmpl-braiain-1730250000000",
"object": "chat.completion",
"model": "brAIAIn-0",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Thou shalt repeat thyself."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 7, "completion_tokens": 3, "total_tokens": 10}
}
Python
import requests
r = requests.post("https://API_BASE/v1/chat/completions", json={
"model": "braiain-latest",
"messages": [{"role": "user", "content": "Should I quit my job?"}],
})
print(r.json()["choices"][0]["message"]["content"])
Endpoints
| Method | Path | What it does |
|---|---|---|
| POST | /v1/chat/completions | Answers the last user message. Earlier messages are ignored, because the model has no memory. Neither do we. |
| GET | /v1/models | Lists every model version. |
Parameters
| Name | Type | Notes |
|---|---|---|
| model | string | braiain-latest, or a version such as brAIAIn-3. |
| messages | array | Chat messages. Only the last one is read. |
| max_tokens | integer | Up to 80 words. Respected. |
| temperature | number | Accepted. Ignored. The model only has one temperature, and it is room temperature. |
| stream | boolean | Not supported. The whole answer arrives at once, like a thought. |
Download the weights
brAIAIn is open weights. The current model is a single file of word counts.
GET https://www.braiain.com/models/latest.json
Every version can be rebuilt from the public training data in /data/corpus.json, /data/versions.json and /data/training.json. Instructions are in the source of /assets/braiain.js.
Pricing
| Item | Price |
|---|---|
| Input tokens | Free |
| Output tokens | Free, and priced accordingly |
| Training tokens | $5 per sentence |
| Fine-tuning | Included. Your sentence is counted four times. |
| Enterprise | Contact sales. There is no sales. |
Rate limits
Please be reasonable. We will define reasonable after you are not.
Uptime
See status.