Make your first API call in 30 seconds.

Use one short request to check the key, route, response shape, and request ledger.

Four steps. One small request.

Create a key

Sign in, open API Keys, choose Create key, and copy it once. AIWave does not send reusable keys by email.

Set the environment variable

Put the value in AIWAVE_API_KEY. Keep it out of browser code, screenshots, logs, and source control.

Run one short request

Use a current model ID and a small output. The first request should prove the route before it tests a large workload.

Check the response and charge

Save the model ID, status, usage fields, request record, and dated rate. Do not infer the invoice from characters alone.

curl

Copy-ready request

curl https://aiwave.live/v1/chat/completions \
  -H "Authorization: Bearer $AIWAVE_API_KEY" -H "Content-Type: application/json" \
  -d '{"model":"deepseek-flash","messages":[{"role":"user","content":"Reply with OK"}]}'

Python

OpenAI Python client

import os
import os
from openai import OpenAI
client = OpenAI(api_key=os.environ["AIWAVE_API_KEY"], base_url="https://aiwave.live/v1")
print(client.chat.completions.create(model="deepseek-flash", messages=[{"role":"user","content":"Reply with OK"}]).choices[0].message.content)

If the request fails

SignalMeaningNext action
401Key missing or invalidFix Authorization; do not retry unchanged
402Payment action, if this status is emittedCheck balance; do not retry unchanged
403 + insufficient_user_quotaObserved balance branchCheck balance or reduce request cost
Other 403Route or permission deniedCheck model access; do not show a funding prompt
429Rate limitHonor Retry-After when present; cap retries
5xxGateway or provider failureBounded backoff; save the request ID

Questions developers ask first

What is AIWave?

AIWave provides one OpenAI-compatible endpoint and one USD billing surface for routes across nine Chinese AI provider families.

Where do I get an API key?

Sign in, open API Keys in Console, create a key, and copy it into a server-side environment variable.

Can I use the OpenAI SDK?

Yes. Set the base URL to https://aiwave.live/v1 and keep the OpenAI client request shape.

Why did my first request return 401?

The Authorization header is missing, malformed, revoked, or contains the wrong key. Do not retry until the key is corrected.

Where can I verify the price?

Use the dated public snapshot at https://aiwave.live/api/v1/pricing and confirm the account charge in the request ledger.