AIWave API

Authentication

The AIWave API authenticates with a bearer token in the Authorization header — the same scheme the OpenAI API uses. Any OpenAI-compatible client library therefore authenticates correctly with no code change beyond the base URL.

Getting an API key

Create an account in the console using email or GitHub. OpenAI-compatible setup number, use a shared USD balance across supported models — that is the entire reason this gateway exists. Keys are issued instantly and draw on a single USD balance shared across each listed route.

Sending the header

curl https://aiwave.live/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-YOUR_KEY" \
  -d '{
    "model": "deepseek-v4-pro",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

With the official SDKs

The openai-python and openai-node SDKs both accept the key and base URL as constructor arguments.

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["AIWAVE_API_KEY"],
    base_url="https://aiwave.live/v1",
)
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.AIWAVE_API_KEY,
  baseURL: "https://aiwave.live/v1",
});

Keeping keys safe

What a failed auth looks like

A missing or invalid key returns 401; a valid key without access to the requested model returns 403. Both use the standard error envelope described in error codes.

{
  "error": {
    "message": "Invalid API key",
    "type": "invalid_request_error",
    "code": "invalid_api_key"
  }
}

Related documentation

Get an API key →All docs →

One endpoint covers Chinese AI routes from 9 Chinese AI providers; verify the live catalog before production.

limited content retention. AIWave's documented design limits routine prompt and completion retention; review the current policy and upstream route terms.