> ## Documentation Index
> Fetch the complete documentation index at: https://www.edgee.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Xcode

> Route Xcode's Coding Assistant through Edgee to cut token costs and gain full observability over every session.

Xcode's Coding Assistant runs a Claude agent under the hood, and reads its endpoint and headers from a settings file. Point it at Edgee to reduce token costs with lossless compression and gain full observability over every session.

<Note>
  Xcode uses the settings-file integration below. The Edgee CLI does not provide an Xcode launch target or alias.
</Note>

## Manual setup

### Get your coding-agent key

Manual setup uses the key of your enrolled **Claude Code** agent, **not a standard API key** created for LLM Router applications.

For Xcode, enroll **Claude Code**, the agent used by its Coding Assistant.

1. Open the [Edgee Console](https://www.edgee.ai) and select your organization.
2. In the header, click **Set up coding agent** or **+**, select **Claude Code**, and click **Enroll**. If your agent is already enrolled, use its existing icon.
3. Click the agent's icon, then **Advanced settings → Advanced**.
4. Under **Edgee API key (for manual setup)**, click **Reveal key**, then the copy icon.

Use this key wherever the configuration below shows `<YOUR_CODING_AGENT_KEY>`.

### Configure Xcode

The Coding Assistant reads `ANTHROPIC_BASE_URL` and `ANTHROPIC_CUSTOM_HEADERS` from its agent settings file. Create or edit `~/Library/Developer/Xcode/CodingAssistant/ClaudeAgentConfig/settings.json`:

```json theme={"dark"}
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://edgee.io",
    "ANTHROPIC_CUSTOM_HEADERS": "x-edgee-api-key:<YOUR_CODING_AGENT_KEY>"
  }
}
```

<Note>
  Replace `<YOUR_CODING_AGENT_KEY>` with the coding-agent key copied above.
</Note>

Restart Xcode for the change to take effect. The Coding Assistant now routes through Edgee, and token compression is enabled automatically.

## Next Steps

* Learn more about the [Edgee CLI](/docs/features/cli) and its launch commands
* Set up [observability](/docs/features/observability) to monitor usage and costs
* Explore [retry and fallback](/docs/features/retry-and-fallback) for resilient routing

## Verify the connection

Send one request from the configured client, then open **Logs** in the same Edgee organization. Check the served model, provider, and key. For a CLI-launched coding agent, also inspect its session report.

If the request is missing, check that you launched through Edgee or saved the client’s gateway URL and coding-agent key. If it appears with an error, inspect the error before changing settings. See [Troubleshooting](/docs/troubleshooting) and [Gateway errors](/docs/llm-router/api-reference/errors).
