AIWave Python SDK
One OpenAI-compatible API for Chinese AI models and video. 97 model IDs on the public rate card, 10 Chinese families, 13 video IDs on the public rate card.
AIWave gives developers one OpenAI-compatible API route for Chinese AI model families — DeepSeek, GLM, Kimi, Qwen, MiniMax, Doubao, StepFun, MiMo — plus AI video routes (Kling, Seedance, Hailuo, Wan, Vidu).
The counts describe catalog-listed IDs, not access for a particular key or live route health. Test the exact model and operation before production use.
Get a key at aiwave.live/register.
Use this SDK when you want a Python client path to AIWave while keeping model IDs, dated USD rates, and request-level usage evidence visible during testing.
Installation
pip install aiwave
Quick start with the AIWave client
import os
from aiwave import AIWave
client = AIWave(api_key=os.environ["AIWAVE_API_KEY"])
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
print(response.usage)
Store API keys outside source control. The example above uses an environment variable and does not include a real key. The AIWave client accepts an explicit api_key or AIWAVE_API_KEY; it never takes OPENAI_API_KEY from another provider's environment.
OpenAI-compatible client path
For supported chat requests, you can also use the official OpenAI Python client with the AIWave base URL:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["AIWAVE_API_KEY"],
base_url="https://aiwave.live/v1",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.usage)
AI video
One key, video routes on Kling, Seedance, Hailuo, Wan and Vidu.
from aiwave import AIWave
client = AIWave(api_key="YOUR_API_KEY_HERE")
job = client.video.generate(
model="kling-v2-6",
prompt="A red sports car drifting through a neon-lit city at night, cinematic tracking shot",
)
print(job.task_id)
done = client.video.wait(job.task_id) # polls every 15s; 15 min deadline
print(done.status)
Video routes are experimental and need an eligible paid account group.
Completion time varies. Keep the task ID and check its status and usage before
submitting another paid job if polling times out.
The SDK does not automatically retry a video submission after a 429, 503, or
connection error: the provider may already have accepted the paid job. Check
task history and usage before deciding whether to submit again. Status polling
remains retryable.
Custom polling intervals must be 1–2,147,483.647 seconds; invalid intervals
and non-finite timeouts are rejected before a status request.
wait(timeout=...) checks its deadline before and after each status request.
An in-flight synchronous request can still outlast that deadline. Set an
appropriate per-request timeout on AIWave(...) when your application needs
a tighter wall-clock bound; custom HTTP transports may ignore request timeouts.
What to verify before production
- Confirm the current model ID in the AIWave model catalog.
- Check the dated USD rates on the AIWave pricing page.
- Run one representative workload and review the request-level usage record.
- Keep timeout, retry, privacy, and model-quality acceptance checks in your own application.
Resources
License
MIT — AIWave
Metadata
Release files for aiwave 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiwave-0.2.1.tar.gz | 9.0 kB | With provenance | Details for aiwave-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiwave-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for aiwave-0.2.1-py3-none-any.whl |
Total release size: 15.5 kB
Release files / aiwave-0.2.1.tar.gz
| Download URL | aiwave-0.2.1.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7291771534927657d2d8cff6b2ada2e95207fcdd914f32288b0f0936517943f0
|
|
BLAKE2b-256 checksum How to use checksums |
2fee6e1f68a3698cdc9675af546ba18cc2555b6b1a8abafcba541d0496bd40be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logRelease files / aiwave-0.2.1-py3-none-any.whl
| Download URL | aiwave-0.2.1-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f01c3e8e7c5e982fff36eb4f00e2af3d272614463671993730bb9cc8f74fe78
|
|
BLAKE2b-256 checksum How to use checksums |
23e0a30372dc7f7c1f7e5eaeea9ca76825cd58dbf58329a2b3d3109ca56b6572
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logSecurity for aiwave 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aiwave-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 14, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.