Skip to main content
Developer docs

Build AI workflows that are cost-aware, policy-aware and auditable.

ModelSpend gives developers a drop-in AI gateway for routing prompts to the right model, controlling spend, enforcing policy and keeping a clear record of what happened.

Route instead of hardcoding

Use the OpenAI-compatible proxy to send requests through ModelSpend and let the routing layer choose the best capable model.

Control cost before execution

Apply budgets, policy checks and provider rules before expensive or unsuitable requests reach an upstream model.

Audit every decision

Log model choice, provider, estimated cost, outcome, latency and failure conditions for reporting and governance.

How ModelSpend sits in your stack

Application ModelSpend proxy Routing + policy AI provider Audit logs

Start with the quickstart

The fastest path is to create an API key, point your existing OpenAI-compatible SDK at ModelSpend, and make one routed request.

# Server-side environment only
export OPENAI_API_KEY=msp_live_your_key_here
export OPENAI_BASE_URL=https://api.modelspend.best/proxy/v1

Open quickstart →

Core documentation