Presets
Saved routing configurations referenced as @preset/slug in completions.
Endpoints
| Method | Path | Auth | Description |
|---|---|---|---|
| POST | /v1/presets | API Key | Create a preset |
| GET | /v1/presets | API Key | List all presets |
| GET | /v1/presets/:slug | API Key | Get a preset |
| PUT | /v1/presets/:slug | API Key | Update a preset |
| DELETE | /v1/presets/:slug | API Key | Archive a preset |
Usage
Reference a preset in any completion by setting model to @preset/slug:
{
"model": "@preset/production",
"messages": [{ "role": "user", "content": "Hello" }]
}
Create a preset
curl -X POST https://api.brainstormrouter.com/v1/presets \
-H "Authorization: Bearer br_live_..." \
-H "Content-Type: application/json" \
-d '{
"slug": "production",
"name": "Production Config",
"model": "anthropic/claude-sonnet-4",
"strategy": "quality",
"fallbacks": ["openai/gpt-4o"],
"max_cost_usd": 0.50
}'
Request body
| Field | Type | Required | Description |
|---|---|---|---|
slug | string | Yes | URL-safe identifier (lowercase, hyphens) |
name | string | Yes | Human-readable name |
model | string | Yes | Primary model (e.g. anthropic/claude-sonnet-4) |
description | string | No | When to use this preset |
strategy | string | No | price, latency, throughput, priority, quality, cascade |
fallbacks | string[] | No | Fallback models in priority order |
provider_allow | string[] | No | Only route to these providers |
provider_deny | string[] | No | Never route to these providers |
max_cost_usd | number | No | Max cost per request (USD) |
variant | string | No | Model variant suffix (:floor, :fast, :best) |
Response
{
"preset": {
"slug": "production",
"name": "Production Config",
"model": "anthropic/claude-sonnet-4",
"strategy": "quality",
"fallbacks": ["openai/gpt-4o"],
"max_cost_usd": 0.5,
"usage": "@preset/production",
"created_at": "2025-02-20T00:00:00.000Z",
"updated_at": "2025-02-20T00:00:00.000Z"
}
}
List presets
curl https://api.brainstormrouter.com/v1/presets \
-H "Authorization: Bearer br_live_..."
Update a preset
curl -X PUT https://api.brainstormrouter.com/v1/presets/production \
-H "Authorization: Bearer br_live_..." \
-H "Content-Type: application/json" \
-d '{"strategy": "latency", "max_cost_usd": 1.00}'
Archive a preset
curl -X DELETE https://api.brainstormrouter.com/v1/presets/production \
-H "Authorization: Bearer br_live_..."