Features / OpenAI gateway
An OpenAI API gateway you add with one line.
Keep the official OpenAI SDK and your OpenAI account. Point the SDK's base URL at ACPpotamia and every chat completion, Responses API call and embedding request is checked against your limits, billed at list price and logged. Streaming works unchanged.
How it works.
Chat completions, Responses API, embeddings
All metered, streamed or not; usage is read from OpenAI's own response.
Your key stays yours
Your OpenAI key goes in X-Upstream-Key on each call and is never stored.
GPT-5, GPT-4.1, GPT-4o, o-series
Prices for current OpenAI models are built in, including cached input.
Python
from openai import OpenAI
client = OpenAI(
base_url="https://acp.examopotamia.com/v1",
api_key="acp_your_key",
default_headers={"X-Upstream-Key": "sk-...", "X-ControlPlane-Agent-Id": "support-bot"},
)
Questions.
Does it change OpenAI responses?
No. Responses are passed through byte for byte; only when a budget runs out mid-stream does ACPpotamia end the stream with an error event.
How much latency does it add?
Usually under 100 milliseconds: one check against your team's limits at Cloudflare's edge, before the call leaves. Each response reports the exact figure in X-ControlPlane-Overhead-Ms.
Related features.
Claude (Anthropic) gateway
A Claude API gateway for the Anthropic Messages API: budgets, rate limits, loop detection and audit logs for Claude Opus, Sonnet and Haiku. Keep the Anthropic SDK.
Budgets and cost control
Put a hard monthly budget on OpenAI and Anthropic spend. ACPpotamia reserves each AI agent call's cost before it is sent, so agents cannot overspend.
Rate limiting
Rate limit every AI agent's calls to OpenAI and Anthropic per team, at the edge. Requests over the limit get HTTP 429 with Retry-After before they cost money.