Own Your LLM Spend: Bring Your Own Model Keys
The largest and least predictable line in an agent platform bill is usually the model calls. Where that spend lands comes down to one architectural choice: whether the platform calls the provider under its own account or under yours.
Modulo calls the provider under your account. You add a model backend with your own Anthropic, OpenAI, Azure OpenAI, AWS Bedrock, Google Vertex AI, or IBM watsonx credentials, and Modulo routes each agent to the backend you bind. The provider bills you at the rate you negotiated.
Modulo does not resell model access and takes no share of your provider spend. There is no per-token or per-run meter on the platform side.
Your keys, encrypted in your environment
A model backend stores the provider, the model identifier, the endpoint, and the credential. Credentials are encrypted at rest with Fernet symmetric encryption keyed by FERNET_KEY in your own environment, decrypted once at run start into a run-scoped object, and used for the call. They do not enter agent state, checkpoints, logs, or telemetry spans. The setup flow hands you a one-time URL to enter the key directly.
Because the backend holds your credential, your existing provider agreement applies: committed-spend rates, enterprise discounts, and regional data handling terms stay on the contract you already have.
Token accounting on every run
Each run records total_tokens, total_cost_usd, a cost breakdown by component, and per-node token usage. The breakdown is written on the same path that finalizes the run, so the total equals the sum of its parts. Tokens are attributed to the node that spent them, which turns model selection into a measured decision.
Limits, reports, anomaly detection
Admins set daily spend limits at the organization level and the team level. A run that would exceed a limit is rejected before it starts. Cost reports aggregate spend by team or organization across a day, week, month, or year, export to CSV, and can be scheduled to email recipients. A day's spend is flagged as anomalous when it exceeds twice the rolling seven-day average.
Local models stay on your network
The backend list includes the OpenAI-compatible servers teams run themselves: Ollama, vLLM, TGI, LM Studio, LocalAI, and llama.cpp. When a step classifies, summarizes, or drafts with a local model, the inference stays on your network and the hosted-provider spend for that step is zero.
Numbers you can reconcile
The spend data lives in your Postgres database. You can query a month of spend, export it, and reconcile it against the same month on the provider's invoice. When a pipeline's cost changes, the run history shows which node, which model, and which version produced the change.
Related use cases
Self-Hosted Agent Governance
What self-hosted agent governance is, why regulated teams keep the control plane on their own infrastructure, and how Modulo is deployed.
Agent Governance for Government and Defense Teams
How Modulo deploys inside an isolated environment, keeps agent execution on your own engine, and records agent activity in your own database.
Agent Governance for Financial Services Teams
How Modulo gives financial services engineering teams an approval record, a model record, and an audit trail for every agent change.