Skip to content

API Authentication

All Get3W API requests require authentication using an API key.

How It Works

Include your API key in the Authorization header as a Bearer token:

Authorization: Bearer sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

API keys use the sk_ prefix. Every request to /v1/ endpoints must include this header.

Get Your API Key

  1. Go to API Keys
  2. Enter a name and click Generate
  3. Copy and store it securely — the full key is only shown once

TIP

A new key is active as soon as it is created. What limits you is your balance, not the key: every request is priced and checked before it runs, so a 402 means you need to top up rather than that the key is inactive.

Code Examples

bash
curl -X POST "https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true" \
  -H "Authorization: Bearer $GET3W_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "A cat in space", "channel": "stable"}'
python
import os
import requests

api_key = os.environ.get("GET3W_API_KEY")

response = requests.post(
    "https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json"
    },
    json={"prompt": "A cat in space", "channel": "stable"}
)
javascript
const apiKey = process.env.GET3W_API_KEY;

fetch("https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true", {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${apiKey}`,
        "Content-Type": "application/json"
    },
    body: JSON.stringify({ prompt: "A cat in space", channel: "stable" })
})
.then(res => res.json())
.then(data => console.log(data));

Managing API Keys

Manage your keys at get3w.com/api-keys:

  • Create — Generate new keys for different projects (up to 10 active keys per account)
  • Delete — Remove keys that are no longer needed

Deleted keys stop working immediately.

Security Best Practices

PracticeWhy
Use environment variablesNever hardcode API keys in your source code
Keep keys secretDon't commit keys to Git or share them publicly
Server-side onlyNever expose keys in frontend/browser code
Use separate keysCreate different keys for different projects

Setting Environment Variables

bash
export GET3W_API_KEY="sk_your-api-key"
powershell
$env:GET3W_API_KEY="sk_your-api-key"
cmd
set GET3W_API_KEY=sk_your-api-key

Account Tiers

Your tier is calculated automatically from your cumulative top-up and unlocks per-model discounts:

TierThreshold
BronzeDefault
Silver$100+
Gold$1,000+
Platinum$10,000+

Tiers only ever go up. See What are Account Tiers.

Error Codes

All errors return {"code": <http_status>, "error": "<message>"}. See Error Codes for the full reference.

CodeErrorCause
401Missing Authorization headerNo Authorization header in the request
401Invalid Authorization formatHeader is not in Bearer <api_key> format
401Invalid or revoked API keyKey does not exist or has been deleted
402Insufficient balanceBalance is below the task's estimated cost — top up to continue
403Account suspendedThe account tied to this key has been disabled

Common Issues

API key not working?

  1. Verify the key starts with sk_
  2. Ensure the header format is exactly Authorization: Bearer sk_...
  3. Check for extra spaces or line breaks when copying the key
  4. Confirm the key hasn't been deleted at get3w.com/api-keys
  5. If you get 402 rather than 401, the key is fine — the account balance is too low for that task

Getting 402 Insufficient balance?

Each task is priced before it runs and rejected if your balance cannot cover it. Video and digital-human tasks cost substantially more than images, so a balance that works for one may not cover the other. Check your balance with GET /v1/balance.

Next Steps

Released under the MIT License.