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. No Chinese phone number, real-name verification or Alipay account is required — that is the entire reason this gateway exists. Keys are issued instantly and draw on a single USD balance shared across every model.

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 →