Create a key
Sign in, open API Keys, choose Create key, and copy it once. AIWave does not send reusable keys by email.
Use one short request to check the key, route, response shape, and request ledger.
Sign in, open API Keys, choose Create key, and copy it once. AIWave does not send reusable keys by email.
Put the value in AIWAVE_API_KEY. Keep it out of browser code, screenshots, logs, and source control.
Use a current model ID and a small output. The first request should prove the route before it tests a large workload.
Save the model ID, status, usage fields, request record, and dated rate. Do not infer the invoice from characters alone.
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"}]}'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)| Signal | Meaning | Next action |
|---|---|---|
| 401 | Key missing or invalid | Fix Authorization; do not retry unchanged |
| 402 | Payment action, if this status is emitted | Check balance; do not retry unchanged |
| 403 + insufficient_user_quota | Observed balance branch | Check balance or reduce request cost |
| Other 403 | Route or permission denied | Check model access; do not show a funding prompt |
| 429 | Rate limit | Honor Retry-After when present; cap retries |
| 5xx | Gateway or provider failure | Bounded backoff; save the request ID |
AIWave provides one OpenAI-compatible endpoint and one USD billing surface for routes across nine Chinese AI provider families.
Sign in, open API Keys in Console, create a key, and copy it into a server-side environment variable.
Yes. Set the base URL to https://aiwave.live/v1 and keep the OpenAI client request shape.
The Authorization header is missing, malformed, revoked, or contains the wrong key. Do not retry until the key is corrected.
Use the dated public snapshot at https://aiwave.live/api/v1/pricing and confirm the account charge in the request ledger.