Presets

Saved routing configurations referenced as @preset/slug in completions.

Endpoints

MethodPathAuthDescription
POST/v1/presetsAPI KeyCreate a preset
GET/v1/presetsAPI KeyList all presets
GET/v1/presets/:slugAPI KeyGet a preset
PUT/v1/presets/:slugAPI KeyUpdate a preset
DELETE/v1/presets/:slugAPI KeyArchive 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

FieldTypeRequiredDescription
slugstringYesURL-safe identifier (lowercase, hyphens)
namestringYesHuman-readable name
modelstringYesPrimary model (e.g. anthropic/claude-sonnet-4)
descriptionstringNoWhen to use this preset
strategystringNoprice, latency, throughput, priority, quality, cascade
fallbacksstring[]NoFallback models in priority order
provider_allowstring[]NoOnly route to these providers
provider_denystring[]NoNever route to these providers
max_cost_usdnumberNoMax cost per request (USD)
variantstringNoModel 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_..."