A REST API for programmatic AI access — compatible with any OpenAI-compatible client.
The Brevy API uses an OpenAI-compatible interface. You can use any OpenAI-compatible SDK, library, or tool by pointing it to our API base URL and using your Brevy API key.
Go to your Dashboard → API Integrations → Create API Key. Your key will look like brevy-v1-xxxx....
https://brevy.brevios.com/v1
curl https://brevy.brevios.com/v1/chat/completions \
-H "Authorization: Bearer brevy-v1-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "poolside/laguna-s-2.1",
"messages": [
{"role": "user", "content": "What are channels in Go?"}
]
}'
Every request must include your API key in the Authorization header:
Authorization: Bearer brevy-v1-your-api-key
API keys are scoped to your account and respect your plan's rate limits. You can create up to 10 API keys from the dashboard.
All API endpoints are relative to this base URL.
Create a chat completion. Send messages and get AI-generated responses.
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID (see available models) |
messages | array | Yes | Array of message objects with role and content |
temperature | number | No | Sampling temperature (0-2). Default: 1 |
top_p | number | No | Nucleus sampling (0-1). Default: 1 |
stream | boolean | No | Enable streaming responses. Default: false |
thinking | boolean | No | Enable extended thinking (for supported models) |
List all available models.
The Brevy Website API provides access to the 2 dedicated models below (separate from the VS Code extension catalog). Access the model list via the GET /v1/models endpoint or check the dashboard.
| Model ID | Name | Type |
|---|---|---|
poolside/laguna-s-2.1 | Laguna S 2.1 | Free |
poolside/laguna-xs-2.1 | Laguna XS 2.1 | Free |
Lite and Pro plans unlock higher RPM, RPD, and TPM rate limits on the Website API.
API rate limits depend on your plan. Limits reset every minute (RPM / TPM) and every day (RPD).
| Plan | Requests/Min | Requests/Day | Tokens/Min |
|---|---|---|---|
| Free | 10 | 1,000 | 100,000 |
| Lite | 25 | 5,000 | 300,000 |
| Pro | 50 | 10,000 | 700,000 |
Rate limit headers are returned with every response:
X-RateLimit-Limit: 50 X-RateLimit-Remaining: 48 X-RateLimit-Reset: 60
Enable streaming by setting "stream": true in your request. The response will be delivered as Server-Sent Events (SSE).
import openai
client = openai.OpenAI(
api_key="brevy-v1-your-api-key",
base_url="https://brevy.brevios.com/v1"
)
stream = client.chat.completions.create(
model="poolside/laguna-s-2.1",
messages=[{"role": "user", "content": "What are channels in Go?"}],
stream=True
)
for chunk in stream:
if chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="")
| Status | Code | Description |
|---|---|---|
| 400 | bad_request | Invalid request parameters |
| 401 | unauthorized | Invalid or missing API key |
| 402 | insufficient_credits | Not enough credits. Buy more credits. |
| 403 | model_not_allowed | Model not available on your plan |
| 429 | rate_limit_exceeded | Too many requests. Check X-RateLimit-Reset header. |
| 500 | server_error | Internal server error. Retry after a moment. |
Use any OpenAI-compatible SDK. Just change the base URL and API key.
client = openai.OpenAI(
api_key="brevy-v1-your-key",
base_url="https://brevy.brevios.com/v1"
)
import OpenAI from 'openai';
const client = new OpenAI({
apiKey: 'brevy-v1-your-key',
baseURL: 'https://brevy.brevios.com/v1'
});
client := openai.NewClient(
"brevy-v1-your-key",
"https://brevy.brevios.com/v1",
)
Need help? Contact us at hello@brevios.com.