Skip to main content
The AI Gateway’s Bring Your Own LLM feature allows you to seamlessly integrate privately hosted language models into your AI infrastructure. This powerful capability enables unified management of both private and commercial LLMs through a consistent interface while leveraging the AI Gateway’s comprehensive suite of observability and reliability features.

Key Benefits

  • Unified API Access: Manage private and commercial LLMs through a single, consistent interface
  • Enhanced Reliability: Leverage the AI Gateway’s fallbacks, retries, and load balancing for your private deployments
  • Comprehensive Monitoring: Track performance, usage, and costs alongside your commercial LLM usage
  • Simplified Access Control: Manage team-specific permissions and usage limits
  • Secure Credential Management: Protect sensitive authentication details through the AI Gateway’s secure vault

Integration Options

PrerequisitesYour private LLM must implement an API specification compatible with one of the AI Gateway’s supported providers (e.g., OpenAI’s /chat/completions, Anthropic’s /messages, etc.).
The AI Gateway offers two primary methods to integrate your private LLMs:
  1. Using Model Catalog: Store your deployment details securely in the AI Gateway’s Model Catalog
  2. Direct Integration: Pass deployment details in your requests without storing them

Option 1: Using Model Catalog

Step 1: Add Your Private LLM to Model Catalog

Navigate to Model Catalog → Add Provider in Strata Cloud Manager.
  1. Click “Add Provider” and enable the “Local/Privately hosted provider” toggle
  2. Configure your deployment:
    • Select the matching provider API specification (typically OpenAI)
    • Enter your model’s base URL in the Custom Host field
    • Add required authentication headers and their values
  3. Name your provider (e.g., my-private-llm)
  4. Click “Create” to save your configuration

Step 2: Use Your Provider in Requests

After adding your provider to the Model Catalog, you can use it in your applications:

Option 2: Direct Integration Without Model Catalog

If you prefer not to store your private LLM details in the AI Gateway’s Model Catalog, you can pass them directly in your API requests:
The custom_host must include the API version path (e.g., /v1/). The AI Gateway will automatically append the endpoint path (/chat/completions, /completions, or /embeddings).
The AI Gateway blocks requests to private and reserved IP ranges by default. If your private LLM runs on an internal network IP, see Custom hosts for blocked patterns and how to allowlist specific hosts.

Securely Forwarding Sensitive Headers

For headers containing sensitive information that shouldn’t be logged or processed by the AI Gateway, use the forward_headers parameter to pass them directly to your private LLM:

Using Forward Headers in Gateway Configs

You can also specify forward_headers in your Gateway Config for consistent header forwarding:

Advanced Features

Using Private LLMs with Gateway Configs

Private LLMs work seamlessly with all AI Gateway features. Some common use cases:
  • Load Balancing: Distribute traffic across multiple private LLM instances
  • Fallbacks: Set up automatic failover between private and commercial LLMs
  • Conditional Routing: Route requests to different LLMs based on metadata
Learn more about Gateway Configs.

Monitoring and Analytics

The AI Gateway provides comprehensive observability for your private LLM deployments, just like it does for commercial providers:
  • Log Analysis: View detailed request and response logs
  • Performance Metrics: Track latency, token usage, and error rates
  • User Attribution: Associate requests with specific users via metadata

Troubleshooting

FAQs

Yes, as long as it implements an API specification compatible with one of the AI Gateway’s supported providers (OpenAI, Anthropic, etc.). The model should accept requests and return responses in the format expected by that provider.
You have two options:
  1. Create separate integration for each endpoint
  2. Use Gateway Configs with load balancing to distribute traffic across multiple endpoints
The AI Gateway itself doesn’t impose specific request volume limitations for private LLMs. Your throughput will be limited only by your private LLM deployment’s capabilities and any rate limits you configure in the AI Gateway.
Yes, you can specify different model names in your requests as long as your private LLM deployment supports them. The model name is passed through to your deployment.
Absolutely! One of the AI Gateway’s key benefits is the ability to manage both private and commercial LLMs through a unified interface. You can even set up fallbacks between them or route requests conditionally.

Next Steps

Explore these related resources to get the most out of your private LLM integration:

Universal API

Adding Metadata

Gateway Configs

Request Tracing

Last modified on September 15, 2026