Ship from Vercel, bill to your subscription.
The Vercel AI SDK makes model calls easy to ship. ProxyLLM puts OpenAI calls on your ChatGPT subscription through Codex Hosted, with per-project keys, budget caps, and your API key as fallback.
$129/month SaaS. Bring your own model keys. No inference markup.
Three steps to connect.
Create an app key
Generate a ProxyLLM key per Vercel project or environment. Keep preview, staging, and production spend separated.
Use OpenAI-compatible provider
Create a provider with baseURL set to https://api.proxyllm.ai/v1 and the ProxyLLM key as apiKey.
Bill to your subscription
Behind the provider, ProxyLLM serves OpenAI calls through Codex Hosted, logs every request, and enforces the environment's cap. Codex responses arrive complete; calls on your fallback API key stream as usual.
Create an OpenAI-compatible provider.
Swap the provider endpoint. streamText streams on API-key lanes; Codex Hosted returns complete responses.
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { streamText } from "ai";
const proxyllm = createOpenAICompatible({
name: "proxyllm",
baseURL: "https://api.proxyllm.ai/v1",
apiKey: process.env.PROXYLLM_API_KEY,
});
export async function POST(req: Request) {
const { messages } = await req.json();
const result = streamText({
model: proxyllm("gpt-4o-mini"),
messages,
});
return result.toDataStreamResponse();
} Run your AI workloads on your ChatGPT subscription.
ProxyLLM runs OpenAI's Codex for you, signed in with your own ChatGPT account. Your apps call one OpenAI-compatible endpoint and the work bills to your flat plan instead of per-token API pricing.
Separate preview spend from production.
Give preview, staging, and production their own keys and caps, then read each environment's spend in the cost dashboard.