# Grodmir — Codex CLI gateway for the Responses API

> Connect Codex CLI to a self-hosted Grodmir model provider for inspection of requests sent through the Responses API. Review virtual-key configuration, repository rules and the limits of gateway coverage.

Grodmir is an AI gateway for data protection and AI usage governance in organisations.

## How does Codex use the AI gateway?

Grodmir is an AI gateway for Codex through a configured model provider using the Responses API and a virtual key in AIGUARD_KEY. Merge the repository configuration template into your local Codex configuration.

[Answer source](https://grodmir.com/en/integrations/codex#how-does-codex-use-the-ai-gateway)

## What has been verified?

Codex CLI was tested against a live gateway, including gateway-side repository rules. No Codex file-access hook is shipped. The model destination must support Responses; direct provider configuration bypasses this gateway.

[Answer source](https://grodmir.com/en/integrations/codex#what-has-been-verified)

## Which Codex provider settings route requests through Grodmir?

Merge the repository configuration template into the local Codex configuration, select the Grodmir model provider and set its base_url to the customer gateway API endpoint. The provider uses wire_api set to responses and env_key set to AIGUARD_KEY; keep the Grodmir virtual key in that environment variable. The selected model destination must support the Responses API. Choosing another provider or endpoint can bypass this connection.

[Answer source](https://grodmir.com/en/integrations/codex#provider-setup)

## Does the Codex gateway prevent local file access or direct MCP calls?

No Codex file-access hook is shipped. Gateway-side repository rules evaluate the requests that actually reach Grodmir; they do not prevent a local command from reading a file. Pass repository headers for the intended project so its markers and excluded paths can be checked at the gateway. Direct MCP connections are a separate channel and need their own Grodmir MCP proxy or central gateway configuration.

[Answer source](https://grodmir.com/en/integrations/codex#file-and-mcp-coverage)

- [Grodmir — self-hosted AI gateway](https://grodmir.com/en/ai-gateway)
- [Grodmir — Prompt DLP for sensitive AI data](https://grodmir.com/en/prompt-dlp)
- [Grodmir — MCP proxy for tool data protection](https://grodmir.com/en/mcp-proxy)
- [Grodmir — self-hosted MCP gateway with SSO and tool policies](https://grodmir.com/en/mcp-proxy/gateway)
- [What do the Grodmir categories mean?](https://grodmir.com/en/glossary)
- [Grodmir — AI gateway selection criteria](https://grodmir.com/en/how-to-choose-an-ai-gateway)

## How can you verify this behaviour?

- [codex (EN)](https://grodmir.com/dokumentacja/zrodla/codex.md)
- [repo-rules (EN)](https://grodmir.com/dokumentacja/zrodla/repo-rules.md)

Content updated: 2026-11-13

Protection covers connected-channel traffic only; detection can miss data and raise false alarms. [Grodmir — AI gateway protection limits](https://grodmir.com/en/limitations)

Source: https://grodmir.com/en/integrations/codex
