
Using Claude Code with PayPerQ
Learn how to integrate Claude Code, Anthropic's official AI coding CLI, with PayPerQ to access premium AI models.
What is Claude Code?
Claude Code is Anthropic's mega-popular command-line interface (CLI) and VS Code extension for AI-assisted coding. It's an agentic coding tool that lives in your codebase and helps you code faster through natural language commands.
Why Use PayPerQ with Claude Code?
Claude Code is normally accessed through a credit card subscription. By using PPQ's API key, you can avoid that and pay per use via crypto. Additionally, Claude code normally restricts you to Anthropic models only. With PPQ, you can use any one of our hundreds of models inside of Claude Code!
This guide contains two setup methods:
- 🖥️ CLI Setup Guide
- 📝 VS Code Extension Setup Guide
Step by Step Set Up for Claude Code CLI
1. Install Claude Code
First, install Claude Code using npm:
npm install -g @anthropic-ai/claude-code
For more installation information, visit the Claude Code documentation.
2. Get Your PayPerQ API Key
Navigate to ppq.ai/api-docs and copy your API key.
3. Configure Claude Code with PayPerQ
Add these variables to your shell configuration file (.bashrc, .zshrc, etc.) to make them persistent.
export ANTHROPIC_BASE_URL="https://api.ppq.ai"
export ANTHROPIC_AUTH_TOKEN="YOUR_PPQ_API_KEY_HERE" # Replace with your own key, it starts with sk-
export ANTHROPIC_API_KEY=""
Important: Replace sk-YOUR_API_KEY_HERE with your actual PayPerQ API key from ppq.ai/api-docs.
Tip: Once you have saved the new environment variables, make sure to restart the terminal that you are working from to reflect the changes.
4. Launch Claude Code
Navigate to your directory and run this command:
claude
Claude Code will analyze your codebase and be ready to assist with your coding tasks.
5. Verify Your Setup
Once you start using Claude Code with PayPerQ, you can verify that requests are being processed by checking your usage history at ppq.ai/account-activity.
Step by Step Set Up for VS Code
1. Install the Claude Code Extension
Open VS Code and navigate to the Extensions marketplace. Search for "Claude Code" and install the official extension from Anthropic.

2. Open Extension Settings
After installing the extension, click on the gear icon next to the Claude Code extension and select "Extension Settings" to configure it.

3. Configure Environment Variables
In the settings, locate the "Env" section. Here you'll add two environment variables to point Claude Code to PayPerQ's API:

Add the following variables:
- ANTHROPIC_BASE_URL:
https://api.ppq.ai - ANTHROPIC_API_KEY:
sk-YOUR_API_KEY_HERE
Important: Replace sk-YOUR_API_KEY_HERE with your actual PayPerQ API key from ppq.ai/api-docs.
4. Save Your Settings
Your settings file should look similar to this:

Once configured, Claude Code will now use PayPerQ's API for all requests, giving you access to multiple AI models with pay-per-use pricing.
5. Verify Your Setup
Start using Claude Code in VS Code and check your usage history at ppq.ai/account-activity to verify that requests are being processed through PayPerQ.
Some good non-Anthropic Models
We recommend using the default Anthropic models for this tool though, but here are some other good options as well:
- MiMo-V2-Flash - Xiaomi's free coding model
- Devstral 2 2512 - Mistral AI's development model
- KAT-Coder-Pro V1 - Kwaipilot's professional coding model
- Gemini 3 Flash Preview - Google's latest multimodal AI
- GLM 4.7 - Z-AI's powerful model
- MiniMax M2.1 - MiniMax's advanced model
- Grok Code Fast 1 - X.AI's rapid coding model
- And many more premium models
Get the Most Recent Models
Want to see all available models? You can fetch the most up-to-date list directly from PayPerQ's API:
curl https://api.ppq.ai/v1/models
This endpoint returns a JSON list of all currently available models on PayPerQ.
Tips for Best Results
- Choose the right model: Use specialized coding models for programming tasks
- Monitor your usage: Check your PayPerQ dashboard to track API usage and costs
- Experiment: Different models excel at different tasks—try a few to find your favorite
Problems?
Please contact us through the customer communication chatbot in the bottom right or in our telegram channel!