Seedance 2.0 15% OFF | Create in Video Generator →
Agent setup

Connect Claude Code to WaveSpeed LLM API

Copy the recommended ~/.claude/settings.json setup for Claude Code, route requests to /v1/messages, and verify local agent calls in WaveSpeed Logs.

Config file

~/.claude/settings.json

Protocol

Anthropic Messages API

Endpoint

/v1/messages

Quick start

1

Create a WaveSpeed access key

2

Export the required key locally

3

Paste config into~/.claude/settings.json

4

Run claude and check Logs

OpenAI-compatible chat completions

Usage appears in Dashboard and Logs

Switch models without rewriting agent code

Edit ~/.claude/settings.json
// File: ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://llm.wavespeed.ai/v1",
    "ANTHROPIC_AUTH_TOKEN": "$WAVESPEED_API_KEY"
  },
  "model": "anthropic/claude-opus-4.8"
}

Agent integration guide

Use Claude Code with WaveSpeed LLM API

This guide shows how to connect Claude Code to WaveSpeed AI with ~/.claude/settings.json, Anthropic Messages API, /v1/messages, base URL https://llm.wavespeed.ai/v1, and default model anthropic/claude-opus-4.8. Copy the configuration above, export your API key, run the agent, then verify requests in Logs.

1

Create a WaveSpeed access key

2

Export the required key locally

3

Paste config into

~/.claude/settings.json
4

Run claude and check Logs

What this Claude Code setup configures

Protocol

Anthropic Messages API

Endpoint

/v1/messages

Model

anthropic/claude-opus-4.8

The copy-ready configuration above is the only Claude Code file you need to edit for the recommended setup: ~/.claude/settings.json. Keep the API key in your shell environment so it is not committed to a repository.

Troubleshooting

The API key is not being picked up

Export WAVESPEED_API_KEY in the same shell where you run Claude Code. If you use a shell profile, reload the terminal before starting the agent.

Requests fail with a protocol or endpoint error

Check that Claude Code is using Anthropic Messages API and endpoint /v1/messages. Protocol mismatches are the most common cause of 404 or payload errors.

The selected model does not work

Confirm the model id exists in WaveSpeed Models, then paste the exact id into ~/.claude/settings.json. You can start with the default model shown on this page.

No requests appear in Logs

Make sure Claude Code is using the WaveSpeed base URL and your current API key. Then send a new prompt from the local agent and refresh Logs.

Can this Claude Code guide show up in search?

Yes. This page is built as an indexable setup guide for users searching for Claude Code custom provider, OpenAI-compatible endpoint, base URL, and local agent configuration workflows.