Skip to main content

Models

Brainstormer syncs available AI models from OpenRouter and stores them locally with pricing, capabilities, and recommendation scoring. These endpoints let you browse, filter, and search models.
All API requests require a valid JWT token in the Authorization: Bearer <token> header. The API Gateway decodes the JWT and forwards auth context (user-id, organization-id, user-email, x-platform-role, x-org-role) as headers to downstream services.

List All Models

Get all available AI models.

Query Parameters

string
Set to "true" to include inactive/deprecated models. Default: only active models.

Response (200)

boolean
Always true.
number
Number of models returned.
object[]
Array of model objects.

Get Model by ID

Get detailed information about a specific model.

Path Parameters

string
required
Model ID (e.g., openai/gpt-4o). The ID includes the provider prefix.

Response (200)

boolean
Always true.
object
Full model object (see schema above).
curl
Model IDs contain a forward slash (e.g., openai/gpt-4o). URL-encode the slash as %2F in the path.

Filter by Provider

Get all models from a specific provider.

Path Parameters

string
required
Provider name (e.g., openai, anthropic, google, meta-llama).

Response (200)

boolean
object[]
Filtered model array.
number
string
The provider filter applied.

Filter Free Models

Get all models that are free to use (no per-token cost).

Response (200)

boolean
object[]
Free models only.
number

Filter by Use Case

Get models recommended for a specific use case.

Path Parameters

string
required
Use case identifier (e.g., chat, coding, creative, analysis).

Search Models

Full-text search across model names, descriptions, and providers.

Path Parameters

string
required
Search query string.

Response (200)

boolean
object[]
Matching models.
number
string
The search query applied.
curl

Get Model Validation Rules

Get validation rules for a specific model (context limits, supported features).

Path Parameters

string
required
Model ID.

Response (200)

boolean
string
object
Validation rules including max tokens, supported input types, and constraints.

Trigger Model Sync (Admin)

Trigger a manual sync of models from OpenRouter. Requires superadmin access.

Response (200)

Returns sync status and count of models updated.
Models are automatically synced on a periodic schedule. Manual sync is only needed if you want to pick up new models immediately.