Skip to content

Govern OpenAI models and Codex CLI

WSO2 API Platform works alongside the OpenAI products you already use. Govern OpenAI model traffic, route Codex CLI through AI Gateway, and use OpenAI embeddings for semantic caching and guardrails.

End-to-end guides

A step-by-step guide for Codex CLI.

AI Gateway with OpenAI models

Route, secure, and govern traffic to OpenAI models through WSO2 AI Gateway, including traffic from Codex CLI.

OpenAI as an LLM provider

Register the OpenAI API with the gateway. The gateway keeps the API key, not your applications.

Semantic caching and guardrails

Semantic caching and the semantic prompt guard compare prompts by meaning, and can use an OpenAI embedding model that you set in the policy or gateway configuration.

Architecture and responsibility model

WSO2 API Platform and OpenAI split the work like this:

Scenario WSO2 role OpenAI role Runtime traffic
Codex CLI through AI Gateway Authenticates developers and applies guardrails, rate limits, and analytics Hosts the models and bills the API key Goes through WSO2 AI Gateway to OpenAI
Applications calling OpenAI models Proxies and governs LLM requests Hosts the models Goes through WSO2 AI Gateway to OpenAI
Semantic caching and guardrails Runs the cache or guardrail policy Returns embeddings for each prompt The gateway calls the OpenAI embeddings API alongside each request

Learn more

Related pages in the OpenAI documentation:

To browse every guide by goal, see the Guides overview.