Claude Code in short
Claude Code is Anthropic's coding agent. It runs in your terminal, reads your project, edits files and runs commands for you. It is paid either through a Claude subscription or per use through the API. Both are charged in dollars on an international card, which blocks most developers in Tunisia.
Installation
You need Node.js 18 or newer.
npm install -g @anthropic-ai/claude-codeConnect it to Promptix
Promptix exposes an Anthropic-compatible endpoint. Three environment variables are enough, then you run claude in your project folder.
export ANTHROPIC_BASE_URL="https://promptix.tn/api"export ANTHROPIC_AUTH_TOKEN="sk_your_promptix_key"export ANTHROPIC_API_KEY=""export ANTHROPIC_MODEL="anthropic/claude-sonnet-5.5" claudeThe full setup, including the settings.json file and the model used for each tier, is in the Anthropic documentation.
Keeping the cost under control
- Pick the model for the task. Claude Sonnet suits daily work, Opus the hard problems. You can also point Claude Code at much cheaper models from the catalog.
- Prompt caching cuts the bill. Tokens already seen are billed at about a tenth of the price. Claude Code turns it on by itself.
- Set a monthly limit in TND on the key Claude Code uses.
An open-source alternative
opencode is a free coding agent that works with any model. Our setup page ships a ready-made configuration with a selection of the best price/quality models.
Frequently asked questions
Can I use Claude Code without a Claude subscription?
Yes. Claude Code accepts a custom base URL and token. With Promptix you pay per use in dinars, with no subscription.
Which models can I use with Claude Code?
Claude Sonnet, Opus and Haiku, and also any catalog model that supports tool calls, by naming it in the environment variables.
How do I avoid a surprise bill?
The balance is prepaid and each key can have a monthly limit in TND. The usage log shows the cost of every request.