The routing configuration endpoints allow you to manage LLM providers, tier assignments, and model overrides for your agents. Manifest routes requests to the optimal model based on request complexity.
Status
Response
Whether any active providers are configured for this agent
Get Providers
curl https://api.manifest.build/api/v1/routing/my-agent/providers \
-H "Cookie: better_auth.session_token=<token>"
[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "openai",
"is_active": true,
"has_api_key": true,
"key_prefix": "sk-proj-",
"connected_at": "2026-03-01T10:30:00.000Z"
},
{
"id": "223e4567-e89b-12d3-a456-426614174001",
"provider": "anthropic",
"is_active": true,
"has_api_key": true,
"key_prefix": "sk-ant-a",
"connected_at": "2026-03-01T11:00:00.000Z"
}
]
GET /api/v1/routing/:agentName/providers
Returns all configured providers for an agent.
Provider configuration ID
Provider name (e.g., openai, anthropic, google, deepseek)
Whether the provider is currently active
Whether an API key is configured (encrypted)
First 8 characters of the API key for identification
ISO 8601 timestamp when the provider was connected
Connect Provider
curl -X POST https://api.manifest.build/api/v1/routing/my-agent/providers \
-H "Cookie: better_auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{
"provider": "openai",
"apiKey": "sk-proj-..."
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"provider": "openai",
"is_active": true
}
POST /api/v1/routing/:agentName/providers
Connect or update a provider for an agent. API keys are encrypted with AES-256-GCM before storage.
Provider name: openai, anthropic, google, deepseek, mistral, xai, minimax, zai, ollama, or openrouter
Provider API key. Optional for Ollama (local provider). Stored encrypted.
Provider configuration ID
Whether the provider is active
Remove Provider
curl -X DELETE https://api.manifest.build/api/v1/routing/my-agent/providers/openai \
-H "Cookie: better_auth.session_token=<token>"
{
"ok": true,
"notifications": [
"gpt-4o is no longer available. Complex is back to automatic mode (claude-3-7-sonnet-20250219)."
]
}
DELETE /api/v1/routing/:agentName/providers/:provider
Remove a provider. Any tier overrides using models from this provider are automatically cleared and switched back to automatic assignment.
Messages about tier overrides that were cleared
Deactivate All Providers
POST /api/v1/routing/:agentName/providers/deactivate-all
Deactivate all providers and clear all tier overrides for an agent.
Tier Management
Get Tiers
curl https://api.manifest.build/api/v1/routing/my-agent/tiers \
-H "Cookie: better_auth.session_token=<token>"
[
{
"id": "323e4567-e89b-12d3-a456-426614174002",
"tier": "simple",
"override_model": null,
"auto_assigned_model": "gemini-1.5-flash-8b",
"user_id": "usr_123",
"agent_id": "agt_456"
},
{
"id": "423e4567-e89b-12d3-a456-426614174003",
"tier": "standard",
"override_model": null,
"auto_assigned_model": "gpt-4o-mini",
"user_id": "usr_123",
"agent_id": "agt_456"
},
{
"id": "523e4567-e89b-12d3-a456-426614174004",
"tier": "complex",
"override_model": "gpt-4o",
"auto_assigned_model": "gpt-4o",
"user_id": "usr_123",
"agent_id": "agt_456"
},
{
"id": "623e4567-e89b-12d3-a456-426614174005",
"tier": "reasoning",
"override_model": null,
"auto_assigned_model": "o3-mini",
"user_id": "usr_123",
"agent_id": "agt_456"
}
]
GET /api/v1/routing/:agentName/tiers
Get all tier assignments for an agent. Manifest uses four tiers:
- simple: Basic queries (greetings, factual questions)
- standard: General tasks (analysis, summarization)
- complex: Advanced work (complex reasoning, code generation)
- reasoning: Extended reasoning (o1, o3 models)
Tier name: simple, standard, complex, or reasoning
Manually set model for this tier (overrides automatic assignment)
Model automatically assigned based on connected providers and pricing
Set Override
curl -X PUT https://api.manifest.build/api/v1/routing/my-agent/tiers/complex \
-H "Cookie: better_auth.session_token=<token>" \
-H "Content-Type: application/json" \
-d '{"model": "gpt-4o"}'
PUT /api/v1/routing/:agentName/tiers/:tier
Manually assign a model to a tier, overriding automatic assignment.
Tier name: simple, standard, complex, or reasoning
Model name (must be from a connected, active provider)
Clear Override
DELETE /api/v1/routing/:agentName/tiers/:tier
Clear manual override and return to automatic assignment.
Reset All Overrides
POST /api/v1/routing/:agentName/tiers/reset-all
Clear all manual overrides for all tiers.
Available Models
curl https://api.manifest.build/api/v1/routing/my-agent/available-models \
-H "Cookie: better_auth.session_token=<token>"
[
{
"model_name": "gpt-4o",
"provider": "openai",
"input_price_per_token": 0.0000025,
"output_price_per_token": 0.00001,
"context_window": 128000,
"capability_reasoning": 0.95,
"capability_code": 0.9,
"quality_score": 0.95
},
{
"model_name": "claude-3-7-sonnet-20250219",
"provider": "anthropic",
"input_price_per_token": 0.000003,
"output_price_per_token": 0.000015,
"context_window": 200000,
"capability_reasoning": 0.98,
"capability_code": 0.95,
"quality_score": 0.98
}
]
GET /api/v1/routing/:agentName/available-models
Get all models available from connected, active providers with pricing and capability metadata.
Cost per input token (USD)
Cost per output token (USD)
Maximum context length (tokens)
Reasoning capability score (0-1)
Code generation capability score (0-1)
Overall quality score (0-1)
Ollama Sync
POST /api/v1/routing/ollama/sync
Sync locally available Ollama models into the model pricing database. Call this after pulling new models via ollama pull.