OpenAI-compatible SDKs
Set OPENAI_BASE_URL to the gateway origin plus /v1, then use the gateway client key.
Point Codex, Claude Code, OpenClaw, OpenAI-compatible SDKs, and Anthropic Messages-style clients at one self-hosted gateway endpoint.
If this integration path fits your local AI tooling workflow, star the repository after evaluation so other operators can find it.
Client entry point
AI Model Gateway keeps upstream provider keys in the gateway config. Local tools and SDKs receive a gateway client key and send traffic to the data-plane listener.
Set OPENAI_BASE_URL to the gateway origin plus /v1, then use the gateway client key.
Use aigw clients print or aigw clients apply to target the local Codex config.
Route Anthropic Messages-style clients through the gateway with ANTHROPIC_BASE_URL.
Add AI Model Gateway as a provider and keep provider-specific secrets out of the tool config.
Base URL
For a default local runtime, OpenAI-compatible clients use the gateway origin plus /v1. The same gateway origin is also used for Anthropic Messages-style client base URL settings.
export OPENAI_BASE_URL="http://127.0.0.1:18080/v1"
export OPENAI_API_KEY="$GATEWAY_API_KEY"
export ANTHROPIC_BASE_URL="http://127.0.0.1:18080/v1"
export ANTHROPIC_AUTH_TOKEN="$GATEWAY_API_KEY"
Open client integration details
Safe update flow
The CLI can print snippets or apply config updates for supported tools. Start with a dry run and keep backups enabled unless another system already owns those files.
aigw clients apply -dry-run for Codex, Claude Code, or OpenClaw.
Review evidence
Try the packaged v1.4.4 runtime with checksum verification, local config, runtime directories, and supervised startup commands.
Open release install pathReview CI gates, local reproduction commands, runtime smoke checks, feature proof points, and current capability boundaries.
Open quality evidenceInspect admin auth, same-origin browser writes, provider-key handling, SSRF defenses, telemetry sensitivity, and update trust.
Open security modelNext step
Start with a local gateway and one non-production request. If the project fits your client-routing workflow, starring the repository helps other operators find it.