Developer API

Build with the provider-aware generation API.

Create a scoped key in Studio, submit the same model-neutral request, and rely on idempotent credit settlement.

Hashed API keys

The full secret appears once. The database stores only a SHA-256 hash and revocation state.

Idempotent requests

Repeat a request with the same key for 24 hours and receive the original generation without another charge.

Shared private ledger

Web and API usage reserve and settle against the same account balance.

curl -X POST https://qwen-image-3.net/v1/generations \
  -H "Authorization: Bearer $QWEN_HUB_API_KEY" \
  -H "Idempotency-Key: launch-001" \
  -H "Content-Type: application/json" \
  -d '{"model":"qwen2/text-to-image","prompt":"A glass pavilion at dawn","aspect_ratio":"16:9","style":"editorial","quality":"high"}'