# 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.

Source: https://kongapiai.com/en/docs/tools

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

1. Open the terminal you use for Claude Code.
2. Set the two environment variables below. Paste each value exactly.
3. Start Claude Code again.

```bash
export ANTHROPIC_BASE_URL="https://kongapiai.com"
export ANTHROPIC_AUTH_TOKEN="gw_live_…"
```

## Codex

1. Open the terminal you use for Codex.
2. Set the two environment variables below.
3. Start Codex again.

```bash
export OPENAI_BASE_URL="https://kongapiai.com/v1"
export OPENAI_API_KEY="gw_live_…"
```

## Cursor

1. In Cursor, open **Settings**, then **Models**.
2. Turn on **Override OpenAI Base URL** and paste `https://kongapiai.com/v1`.
3. Paste the key into **OpenAI API Key**, then choose **Verify**.
4. 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.

1. Open the settings where the tool asks for an API address and a key.
2. Paste the address `https://kongapiai.com/v1` and your key.
3. 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](https://kongapiai.com/en/docs/got-a-key) to find its models and its limit.
