Custom models and bring-your-own-key
You can register your own model deployments and API keys with Opper. Custom models appear alongside built-in models and get the same observability, routing, and fallback features.
Register a custom model
curl -X POST https://api.opper.ai/v2/custom-models \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${OPPER_API_KEY}" \
-d '{
"name": "example/my-gpt4",
"provider": "azure",
"model_id": "gpt4-production",
"api_key": "my-api-key-here",
"params": {
"api_base": "https://my-gpt4-deployment.openai.azure.com/",
"api_version": "2024-06-01"
}
}'
opper models create example/my-gpt4 azure/gpt4-production my-api-key-here \
'{"api_base": "https://my-gpt4-deployment.openai.azure.com/", "api_version": "2024-06-01"}'
Custom models are scoped to your project. The model name prefix (e.g., example/) serves as a namespace.
Model aliases
Create aliases to abstract model names, enabling zero-downtime model swaps:
curl -X POST https://api.opper.ai/v2/model-aliases \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${OPPER_API_KEY}" \
-d '{
"name": "production/main",
"model_id": "anthropic/claude-sonnet-4"
}'
Use production/main in your code, then update the alias target to switch models without changing any integration code.