OpenAI
Responses, Chat Completions, embeddings and moderation — policed, not transparent
Fronts OpenAI’s API. Unlike the search and scraping upstreams, this route is not a plain pass-through: every request is checked against a model allowlist and a request-field policy before it reaches OpenAI, because a request body here can reference stored resources, change the price, or create state on the shared account.
Only need stateless chat completion, and want the same request body to also work against Anthropic, Grok, or Hugging Face models? /inference is a narrower, OpenAI-shaped surface over all four. Use this route directly for Responses, embeddings, moderation, Realtime, or the stateful files/vector-stores/batches/fine-tuning surface.
Endpoints
Only a fixed set of endpoints is admitted; anything else under /openai is refused with the gateway’s own 404 and never reaches OpenAI.
The model in every request body must be on the gateway’s own catalog — a model not listed there is rejected before the call reaches OpenAI, regardless of whether OpenAI itself would accept it.
Request policy
A closed set of body fields is enforced on v1/responses and v1/chat/completions:
- Forced, regardless of what you send:
storepins tofalseunless you explicitly ask forv1/responsesstate; a per-tenant identifier replaces anysafety_identifier/prompt_cache_keyyou supply, so prompt-cache partitioning and abuse attribution land on your account specifically; the output-token cap is injected at the gateway’s configured ceiling. - Denied outright (a
400in OpenAI’s own error shape, never a silent strip): referencing a prior response by id,conversation, a literalprompt,store: truewithout the explicit opt-in path,background: true, hosted tools beyondfunction/custom, a non-defaultservice_tier, and a few other fields — see the endpoint’s response for the exact rejected field when this happens. - Passed through unchanged: everything not explicitly forced or denied, including the stateless multi-turn
include: ["reasoning.encrypted_content"]channel.
Stateful resources
Files, vector stores, batches, and fine-tuning jobs you create through this route are tracked per account. An id that belongs to a different account is never reachable through yours — it answers the same 404 an id that never existed would, so nothing about another customer’s resources is revealed. GET v1/files and GET v1/vector_stores (the bare list forms) are answered locally from this ownership record rather than proxied, since the real upstream lists would enumerate the whole shared account.
Batches and fine-tuning jobs settle their real cost when OpenAI’s own completion webhook (POST /openai/webhooks) reports them done — that endpoint is called by OpenAI, authenticated by a webhook signature, and has nothing to do with your bearer token.
Billing
Metered per token from each response’s own usage (including the streaming terminal event), at the gateway’s per-model rate table. Moderation is free. An account can register its own OpenAI key; while that’s active, calls bill to that key directly instead of metering through the gateway balance.
GPT-5.6 family rates
gpt-5.6 is an alias for gpt-5.6-sol — OpenAI’s model page states that “the gpt-5.6 alias routes requests to GPT-5.6 Sol.” All three GPT-5.6 models split into a short-context and a long-context rate depending on the request’s input token count, with the boundary at 272,000 input tokens. All rates are USD per 1M tokens, Standard tier:
cache write tokens are a separate, mutually exclusive input category, not an add-on to input — a token is billed as input, cached input, or cache write, never more than one. OpenAI reports the count as cache_write_tokens inside usage.input_tokens_details (Responses API) or usage.prompt_tokens_details (Chat Completions API), alongside the existing cached_tokens count.
The async v1/batches endpoint bills at exactly 50% of every Standard rate above, across both context tiers.
Source: OpenAI’s pricing and prompt caching documentation.
Examples
Chat Completions
Embeddings
List your models
Responses arrive as OpenAI’s JSON, untouched once a request clears the checks above. Field-level request and response detail lives in OpenAI’s documentation.