Skip to content

Integration

Use Qwen Code with Tokens

Connect Qwen Code to Tokens through its OpenAI protocol in ~/.qwen/settings.json or with three environment variables, then switch between Tokens models with /model.

Set it up in three steps

  1. 01Create an account

    Sign up, then start on a plan or top up your prepaid wallet.

    Create an account
  2. 02Create a key for Qwen Code

    Give the key its own monthly spending cap, so a runaway session stops at the cap.

    Open your keys
  3. 03Follow the guide

    Point Qwen Code at Tokens with the settings in the guide, then pick any model from the catalog.

    Read the guide

What Qwen Code connects to

OpenAI-compatible base URL
https://tokens.bd/v1
Anthropic-compatible base URL
https://tokens.bd
API key
One Tokens key (tok_live_…), with its own spending cap
Models
Any id from the model catalog

What the guide covers

5 min read

  1. 01Install Qwen Code
  2. 02Export TOKENSAPIKEY
  3. 03Option A: /.qwen/settings.json
  4. 04Option B: environment variables only
  5. 05Switch models
  6. 06Verify it works
  7. 07Troubleshooting

Ready to try Qwen Code on Tokens?

Create an account, make a key and send your first request in a couple of minutes.

Create an account