Docs Authentication

Authentication

All WaveSpeedAI API requests require authentication via API key. Include your key in the Authorization header as a Bearer token.

Get Your API Key

API Keys Page

  1. Go to API Keys
  2. Enter a name and click Generate
  3. Copy and store your key securely

Important: API keys require a top-up to activate. Keys generated without a top-up will not work.

Usage

Add your API key to the Authorization header:

Authorization: Bearer YOUR_API_KEY

curl -X POST "https://api.wavespeed.ai/api/v3/google/nano-banana-pro" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A cat wearing a space suit, cinematic lighting"}'

Security Best Practices

PracticeDescription
Never share your keyKeep it confidential, don’t commit to version control
Use environment variablesDon’t hardcode keys in source code
Rotate regularlyGenerate new keys and revoke old ones periodically
Server-side onlyNever expose keys in frontend/client-side code

Troubleshooting

ProblemSolution
401 UnauthorizedCheck that your key is correct and has been activated with a top-up
403 ForbiddenYour account may be suspended — contact support@wavespeed.ai
429 Too Many RequestsYou’ve hit your account’s rate limit — wait or upgrade your account level
Insufficient creditsTop up your account at wavespeed.ai/top-up
Key not workingEnsure you’ve made at least one top-up to activate API access
© 2025 WaveSpeedAI. All rights reserved.