Configure

Bring your own model (BYOM)

TL;DR

BYOM lets an organization run every agent's LLM calls against its own OpenAI-compatible chat endpoint instead of the built-in AI Gateway. Paste your base URL, model id and API key on the Agents page — the platform test-calls it live before saving, then every agent switches over by default. LLM tokens on your endpoint are zero-rated (you pay your provider, not platform credits); tool, browser, sandbox and media calls keep metering normally.

What BYOM changes — and what it doesn't

By default, every agent runs through the built-in AI Gateway and usage is metered in credits. BYOM replaces that routing for your organization: agent LLM calls go straight to an endpoint you already pay for, and those tokens cost $0 in platform credits.

Everything else about how the agent works stays the same — the same orchestrator, specialists, tools, approval gate and audit log. Only where the language-model call is billed and executed changes.

Compatible endpoints

  • Azure AI Foundry / Azure OpenAI deployments.
  • vLLM or any self-hosted OpenAI-compatible server running an open-weight model.
  • OpenRouter — point at any model it serves with your own key.
  • Any other OpenAI-compatible chat-completions endpoint.
Paste either the base URL (e.g. https://your-endpoint.example.com/openai/v1) or the full …/chat/completions URL from your provider's docs — both are accepted.

Set it up

  1. 1Open the Agents page and find the “Bring your own model” card.
  2. 2Enter your base URL, the model id your endpoint expects (e.g. gpt-5.6-terra), and your API key.
  3. 3Click “Test & save” — the platform makes a live 1-token chat call to confirm the URL, key and model actually answer before storing anything.
  4. 4On the first successful save, every agent switches to your model automatically. Re-pick any individual agent back to a platform model any time.
  5. 5Remove the connection later to restore each agent to whichever model it was set to before BYOM was configured.

What's zero-rated vs. still metered

Call typeBilling
LLM tokens on your BYOM endpoint$0 platform credits — billed by your provider
Web search, image/video generationMetered in credits, same as any agent
Browser sessions, Python sandboxMetered in credits, same as any agent
Platform-model agents (not switched to BYOM)Metered normally through the AI Gateway
See the credits guide for what a credit covers, and model pricing to compare platform-model cost per task.

Security

  • HTTPS-only — the endpoint URL is rejected if it isn't https.
  • Blocks localhost, private/loopback ranges and cloud metadata hosts, so a misconfigured or malicious URL can't reach internal infrastructure.
  • Your API key is encrypted at rest and never redisplayed once saved.
  • Configuration is scoped to your organization only.

When BYOM is worth it

  • You already pay for an enterprise Azure OpenAI or vLLM deployment and want agent usage to draw on it instead of platform credits.
  • You're testing a fine-tuned or self-hosted open-weight model against real ad-ops tasks.
  • Data-residency or procurement requirements mean model calls must run through infrastructure you control.
  • High agent volume where eliminating marginal per-token credit cost matters more than the convenience of the built-in gateway.

Frequently asked questions

What is BYOM (bring your own model)?
A per-organization setting that points every agent's LLM calls at your own OpenAI-compatible endpoint — Azure AI, vLLM, OpenRouter or any self-hosted model — instead of the built-in AI Gateway.
Do I still pay platform credits if I use my own model?
LLM tokens on your BYOM endpoint are zero-rated — you pay your provider directly, not platform credits. Tool calls (web search, image/video generation, browser sessions, the Python sandbox) still meter in credits as usual.
Can I use BYOM for only some agents?
Yes. The first successful save switches every agent to your model for convenience, but you can re-pick any individual agent back to a platform model any time on the Agents page.
Is my API key safe?
It's encrypted at rest, never redisplayed after saving, and scoped to your organization. The endpoint URL is also validated against SSRF risks — HTTPS-only, no localhost, private or cloud-metadata hosts.
What happens if I remove my custom model?
Every agent still pointed at your BYOM endpoint is restored to whichever model it was using before BYOM was first configured.
Which endpoints actually work?
Any OpenAI-compatible chat-completions server: Azure AI Foundry / Azure OpenAI, vLLM, OpenRouter, and self-hosted model servers that speak the same API shape.

Related