WaveSpeed LLM API Quick Start: Endpoint, API Key, and OpenAI-Compatible Setup

Three questions every new WaveSpeed LLM user asks: what endpoint, what API key, what protocol? This guide answers all three with copy-paste code for Python, Node.js, and curl.

By WaveSpeedAI 5 min read
WaveSpeed LLM API Quick Start: Endpoint, API Key, and OpenAI-Compatible Setup

Browse 90+ LLMs on WaveSpeedAI — Claude, GPT, Gemini, Qwen, DeepSeek, Llama, Grok, Mistral, and more behind one OpenAI-compatible endpoint. LLM Catalog → · Playground →

The Three Fields You Need to Fill In

When you plug a new LLM provider into a chat app, an SDK, or an IDE, you’re almost always asked for the same three things:

  1. Endpoint / Base URL — where the API lives.
  2. API Key — how the provider knows it’s you.
  3. Chat protocol — OpenAI Chat Completions, Anthropic Messages, or something else.

For WaveSpeed LLM, the answers are simple:

FieldValue
Base URLhttps://llm.wavespeed.ai/v1
API KeyYour WaveSpeed API key (from the dashboard)
ProtocolOpenAI Chat Completions (drop-in compatible with OpenAI SDKs)

That’s it. If a tool supports “custom OpenAI-compatible endpoint”, WaveSpeed LLM works.

What is WaveSpeed LLM?

WaveSpeed LLM is a unified API that gives you access to 90+ language models from 30+ providers through a single OpenAI-compatible endpoint — Claude Opus 4.6, GPT-5.2, Gemini 3, DeepSeek, Llama 4, Qwen 3, Grok 4, Mistral, and more. One API key, one base URL, one request format.

No cold starts. Pay per token. No subscriptions. Free tier to start.

Step 1: Get Your API Key

  1. Go to wavespeed.ai and sign in (Google/email).
  2. Open the dashboard and find the API Keys section.
  3. Create a new key — it looks like a long random string. Copy it immediately and store it as a secret.

Treat this key like a password. Don’t commit it to git, don’t paste it in screenshots.

Step 2: Set the Base URL

The LLM API lives at:

https://llm.wavespeed.ai/v1

The Chat Completions endpoint is therefore:

https://llm.wavespeed.ai/v1/chat/completions

Anywhere a tool asks for “OpenAI Base URL”, “API Endpoint”, or “Custom Server URL”, paste https://llm.wavespeed.ai/v1.

Step 3: Pick a Model

Model IDs use the vendor/model format. A few popular ones:

Model IDNotes
deepseek/deepseek-v4-flashOpen weights, strong coding

Browse the full catalog at wavespeed.ai/llm.

Step 4: Make Your First Call

Python (OpenAI SDK)

import os
from openai import OpenAI, OpenAIError

api_key = os.getenv("WAVESPEED_API_KEY")
if not api_key:
    raise RuntimeError("Set WAVESPEED_API_KEY before running this example")

client = OpenAI(
    base_url="https://llm.wavespeed.ai/v1",
    api_key=api_key,
    timeout=120.0,
    max_retries=2,
)

# The SDK sends this request to https://llm.wavespeed.ai/v1/chat/completions.
try:
    response = client.chat.completions.create(
        model="deepseek/deepseek-v4-flash",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content or "")
except OpenAIError as exc:
    raise SystemExit(f"LLM request failed: {exc}") from exc

Node.js (OpenAI SDK)

import OpenAI from 'openai';

if (!process.env.WAVESPEED_API_KEY) throw new Error('Set WAVESPEED_API_KEY');

const client = new OpenAI({
  apiKey: process.env.WAVESPEED_API_KEY,
  baseURL: 'https://llm.wavespeed.ai/v1',
  timeout: 120_000,
  maxRetries: 2
});

try {
  const response = await client.chat.completions.create({
    model: 'deepseek/deepseek-v4-flash',
    messages: [{ role: 'user', content: 'Hello!' }]
  });
  console.log(response.choices[0]?.message?.content ?? '');
} catch (error) {
  console.error('LLM request failed:', error);
  process.exitCode = 1;
}

curl

curl --fail-with-body --connect-timeout 10 --max-time 120 --retry 2 --retry-all-errors \
  https://llm.wavespeed.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
  -d '{
    "model": "deepseek/deepseek-v4-flash",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Notice the only differences from calling OpenAI directly: the base_url and the model string. Your existing OpenAI code works unchanged otherwise.

Streaming, Tools, and Vision

Everything you use on OpenAI’s Chat Completions endpoint works on WaveSpeed LLM:

  • stream: true for server-sent events streaming.
  • tools and tool_choice for function calling (on models that support it).
  • response_format: { type: "json_object" } for JSON mode.
  • Image input via content: [{ type: "image_url", image_url: { url: "..." } }] on vision-capable models.

Because the protocol is identical, any library or framework built on OpenAI — LangChain, LlamaIndex, Vercel AI SDK, Haystack — works by swapping the base URL.

Troubleshooting

“Invalid API key” / 401 errors Double-check you’re using the API key from the WaveSpeed dashboard, not from OpenAI or another provider. The header must be Authorization: Bearer <key>.

“Model not found” / 404 on model Model IDs are case-sensitive and must include the vendor prefix. Use deepseek/deepseek-v4-flash, not claude-opus-4.6 and not Claude-Opus-4.6.

“Wrong protocol” If a tool asks you to pick between “OpenAI”, “Anthropic”, “Gemini”, or similar — always pick OpenAI. WaveSpeed LLM speaks OpenAI Chat Completions for every model, including Claude and Gemini models. The vendor prefix in the model ID selects the upstream model; the request format stays OpenAI-compatible.

Network / connectivity issues The endpoint is https://llm.wavespeed.ai/v1 — note the llm. subdomain (not api.). If your firewall blocks custom subdomains, allowlist llm.wavespeed.ai.

Why WaveSpeed LLM

  • OpenAI-compatible. Works with every OpenAI SDK, LangChain, Vercel AI SDK, and any tool that accepts a custom base URL.
  • No cold starts, no subscriptions. Pay only for what you use, with transparent per-token pricing.
  • Free tier. Start building without a credit card.

Start Building Today

Three fields — base URL, API key, OpenAI protocol — and you’re in.

Get your API key at wavespeed.ai/llm and make your first call in under five minutes.