Admin API
Platform admins manage the model catalog (prices, capabilities, strengths) and custom providers (whole OpenAI-compatible vendors) at runtime. Every write
takes effect on the next request — no redeploy. The web UI at /optimizer/admin drives these endpoints; they are also callable directly, which is what the bulk
catalog importer uses.
Model catalog
The catalog is the price-and-capability source of record. Routing, tiers and the savings meter all read from it; an edit reprices the ladder live.
| Route | Purpose |
|---|---|
GET /v1/admin/catalog | Every model with its full profile |
PUT /v1/admin/catalog/:model | Create or update one model |
DELETE /v1/admin/catalog/:model | Remove a model |
POST /v1/admin/catalog/:model/disabled | Toggle routing off without deleting the row |
A model profile:
{
"model": "kimi-k3",
"provider": "moonshot",
"input_per_mtok": 0.15,
"output_per_mtok": 0.60,
"cached_input_per_mtok": 0.04,
"cache_write_multiplier": 1.25,
"input_modalities": ["text", "image"],
"output_modalities": ["text"],
"tools": "full",
"structured_outputs": true,
"reasoning_efforts": [],
"context_length": 200000,
"max_output_tokens": 8192,
"search_only": false,
"moderation_only": false,
"strengths": { "code": 0.7, "reasoning": 0.6 },
"disabled": false
} Disable without deleting — keeps the row and its accumulated evidence, just drops it from routing:
curl -X POST https://rfa-labs.com/v1/admin/catalog/kimi-k3/disabled
-H "Authorization: Bearer $ADMIN_KEY"
-H "Content-Type: application/json"
-d '{ "disabled": true }' Custom providers
Register any OpenAI-compatible vendor (Moonshot, DeepSeek, Groq, …) at runtime. Models added under it route immediately and join the cross-vendor failover chain.
| Route | Purpose |
|---|---|
GET /v1/admin/providers | Registered vendors (key_set, never the key itself) |
PUT /v1/admin/providers/:name | Register or update a vendor |
DELETE /v1/admin/providers/:name | Remove a vendor |
POST /v1/admin/providers/:name/test | A live call confirming the base URL + key work |
Register a vendor — the name is a lowercase id you choose, the base URL must include the vendor’s version suffix, and the key is encrypted at rest and never returned:
curl -X PUT https://rfa-labs.com/v1/admin/providers/moonshot
-H "Authorization: Bearer $ADMIN_KEY"
-H "Content-Type: application/json"
-d '{
"base_url": "https://api.moonshot.ai/v1",
"api_key": "sk-vendor-…",
"enabled": true
}' Then confirm it works before routing real traffic:
curl -X POST https://rfa-labs.com/v1/admin/providers/moonshot/test
-H "Authorization: Bearer $ADMIN_KEY" Next
- Control plane — the tenant-facing
/v1reads and writes. - Direct API integration — the request path itself.