Appearance
Models
The Models registry decides which models users see and which provider keys back them. It's an admin surface — the user-facing endpoints only return active models.
Endpoints
GET /api/v1/ai-models admin: list
GET /api/v1/ai-models/:id admin: fetch
POST /api/v1/ai-models admin: create
PUT /api/v1/ai-models/:id admin: update
DELETE /api/v1/ai-models/:id admin: delete
PUT /api/v1/ai-models/:id/api-key admin: set per-model API key override
GET /api/v1/ai-models/active authenticated user: list active models
(public fields: _id, name, provider, model_key, api_type)Model shape
typescript
{
id: number, // legacy sequential id
provider: string, // "qevron", "openai", "anthropic", "stability", "fal", "runway"
model_key: string, // e.g. "gpt-4", "claude-3-5-sonnet", "verinova"
name: string, // display name
category: string, // "text" | "image" | "video" (default "text")
type: string | null,
is_active: boolean, // default true
api_type: string, // "chat" (default) | "completion"
api_params: object, // default max_tokens, temperature
meta: object,
}Per-model API key override
PUT /api/v1/ai-models/:id/api-key
{ "apiKey": "..." }Stored in the Options table as ai-model-<id>_api-key. The text-generation service reads this key first; if absent, it falls back to the global QEVRON_API_KEY.
Enabling and disabling
Toggle is_active via PUT /api/v1/ai-models/:id. Disabled models disappear from the user-facing picker on the next reload. Posts already drafted against a disabled model still execute — disabling is a "future calls" gate.