Get started
Set up your tool
How to put a KONG API AI key into Claude Code, Codex, Cursor and any tool that accepts an OpenAI-compatible API. Each tool needs two values.
Each tool needs exactly two values: the API address and the key. Once they are set, the tool sends its requests through KONG API AI and the usage is recorded on that key.
Claude Code
- Open the terminal you use for Claude Code.
- Set the two environment variables below. Paste each value exactly.
- Start Claude Code again.
export ANTHROPIC_BASE_URL="https://kongapiai.com"
export ANTHROPIC_AUTH_TOKEN="gw_live_…"Codex
- Open the terminal you use for Codex.
- Set the two environment variables below.
- Start Codex again.
export OPENAI_BASE_URL="https://kongapiai.com/v1"
export OPENAI_API_KEY="gw_live_…"Cursor
- In Cursor, open Settings, then Models.
- Turn on Override OpenAI Base URL and paste
https://kongapiai.com/v1. - Paste the key into OpenAI API Key, then choose Verify.
- Add the name of a model your key allows and select it.
Other tools
Any tool or SDK that accepts an OpenAI-compatible API works.
- Open the settings where the tool asks for an API address and a key.
- Paste the address
https://kongapiai.com/v1and your key. - Pick a model your key allows and send a test message.
Check which models a key allows
If you did not create the key yourself, see You were given a key to find its models and its limit.