Skip to content

Instantly share code, notes, and snippets.

@commoddity
Last active April 30, 2026 12:06
Show Gist options
  • Select an option

  • Save commoddity/e51cf185186ec56521a583c880d3e575 to your computer and use it in GitHub Desktop.

Select an option

Save commoddity/e51cf185186ec56521a583c880d3e575 to your computer and use it in GitHub Desktop.
How to Use `thaura.ai` as the backend for Claude Code

🐆 Quickstart (<5 mins)

🛠️ Thaura Claude Code Setup Guide

🔐 1. Sign Up For thaura.ai

  • Visit https://thaura.ai/plans
  • Click View Plans -> Get Started under Pro plan
  • Enter email
  • Check email and enter verification code
  • Enter billing details
  • Open sidebar at top left, click your name at the bottom left
  • Click API -> API Keys -> Create New API Key
  • Save API key string

📦 2. Install Claude Code

💡 Prerequisites:

💾 Install Claude Code CLI using NPM:

npm install -g @anthropic-ai/claude-code

🔑 Use Thaura API Key for Claude Code

Run the following command to prompt for your Thaura API Key and create the settings file:

read -s -p "Enter your Thaura API Key: " API_KEY && \
mkdir -p ~/.claude && \
cat > ~/.claude/settings.json <<EOF
{
    "apiKeyHelper": "echo ${API_KEY}",
    "env": {
        "ANTHROPIC_BASE_URL": "https://backend.thaura.ai",
        "ANTHROPIC_API_KEY": "${API_KEY}"
    }
}
EOF
chmod 600 ~/.claude/settings.json && \
echo -e "\n✓ Settings file created at ~/.claude/settings.json with secure permissions (600)"

This command will:

  • Prompt you to enter your Thaura API Key (input will be hidden for security)
  • Create the ~/.claude directory if it doesn't exist
  • Create ~/.claude/settings.json with the correct configuration, replacing ${API_KEY} with your actual Thaura API key
  • Set secure permissions (600) on the settings file, restricting access to owner only

🚀 3. Try it Out

  • Navigate to the repo you want to use Claude Code in

  • In your terminal, run: claude

    ✅ Verify Setup

    When Claude Code starts, you should see thaura next to API Usage Billing in the header:

    
     ▐▛███▜▌   Claude Code v2.0.46
    ▝▜█████▛▘  thaura · API Usage Billing
      ▘▘ ▝▝    /Users/james_holden/test_repo
    
    ────────────────────────────────────────────────────────────────────────
    > Try "how does test_repo/test_models.py work?"
    ────────────────────────────────────────────────────────────────────────
      ? for shortcuts                          Thinking off (tab to toggle)
    

    This confirms that Claude Code is successfully using the Thaura backend instead of the default Anthropic API.

🇵🇸 About Thaura.ai

Thaura Logo

Thaura is an AI platform that combines technical excellence with ethical principles,
designed to support Palestinian liberation and mission-aligned technology development.


Ethical Principles:

  • Mission-Aligned Technology: Supports projects and organizations working towards Palestinian liberation
  • Transparent Operations: Clear documentation and open communication about platform capabilities
  • Ethical AI Development: Committed to responsible AI practices that prioritize fairness and accountability
  • Community-Driven: Built in collaboration with the Tech for Palestine community

For API documentation, see thaura.ai/api-platform

🇵🇸 Tech for Palestine

Tech for Palestine (T4P) is a coalition of founders, engineers, product marketers, investors, and other professionals working in support of Palestinian liberation.

What is Tech for Palestine?

Tech for Palestine is first and foremost an incubator for advocacy projects. They rally volunteers from across the tech world — founders, engineers, marketers, investors, and more — all committed to Palestinian liberation.

The T4P Incubator helps pro-Palestine advocates build, grow, and scale their work towards a Free Palestine. They support projects — whether collections of individuals, registered non-profits, or even companies — whose mission helps Palestine, especially advocacy groups building technical products or in the tech space.

The Incubator is free and provides:

  • 👥 Volunteers - Access to skilled professionals
  • 📢 Marketing Support - Help spreading your message
  • 🎓 Mentorship - Guidance from experienced professionals
  • 🔗 Connections - Links to the broader Palestinian advocacy ecosystem

Get Involved:

  • Volunteer your skills
  • Join their Discord
  • Start a project of your own
  • Be a mentor
  • Hire Palestinians

Learn more at techforpalestine.org

@r-fameli

Copy link
Copy Markdown

Hey @commoddity, thanks for writing this up! I think these instructions might be a little bit out of date now. I followed these setup instructions but wasn't able to get it working on my end. I'm on Windows 10 running Claude Code v2.1.76 using the npm installation.

Here's the settings.json I ended up at before I gave up trying to get it working:

{
  "autoUpdatesChannel": "latest",
  "apiKeyHelper": "echo ${API_KEY}",
  "env": {
    "ANTHROPIC_BASE_URL": "https://backend.thaura.ai/v1",
    "ANTHROPIC_API_KEY": "${API_KEY}",
    "CLAUDE_CODE_GIT_BASH_PATH": "C:\\Program Files\\Git\\bin\\bash.exe"
  },
  "model": "thaura"
}

My observations from trying to get it working:

  • The main issue is that, once I get into claude, it's not able to run anything. I try running /init and I get the message "There's an issue with the selected model (thaura). It may not exist or you may not have access to it. Run /model to pick a different model."

  • When I first set up Claude, it is able to see that I have an API key available

image
  • I had to add the model "thaura" explicitly. Otherwise, it only showed the default Claude models

  • If you have both ANTHROPIC_API_KEY and apiKeyHelper set, there is a message about an auth conflict:
    ⚠Auth conflict: Both a token (apiKeyHelper) and an API key (ANTHROPIC_API_KEY) are set. This may lead to unexpected behavior.
    • Trying to use apiKeyHelper? Unset the ANTHROPIC_API_KEY environment variable, or claude /logout then say "No" to the API key approval before login.
    • Trying to use ANTHROPIC_API_KEY? Unset the apiKeyHelper environment variable.

  • If you have only ANTHROPIC_API_KEY set, it will prompt you to log into (1) a claude account, (2) an Anthropic console account, or (3) a 3rd-party platform, but with the only options being Amazon Bedrock, Microsoft Foundry, or Vertex AI

  • If you have only apiKeyHelper set, neither of the above issues show

If you or anyone else has any ideas on how to get this working, let me know!

@commoddity

Copy link
Copy Markdown
Author

If you or anyone else has any ideas on how to get this working, let me know!

Hey @r-fameli thank you for the detailed response.

I took another look at my local setup and realized I have env.ANTHROPIC_MODEL set to thaura as well.

For example, this is my ~/.claude/settings.json:

{
  "apiKeyHelper": "echo <API KEY>",
  "env": {
    "ANTHROPIC_MODEL": "thaura",
    "ANTHROPIC_BASE_URL": "https://backend.thaura.ai/v1",
    "ANTHROPIC_API_KEY": "<API KEY>"
  }
}

Can you try that and see if perhaps it would help? If so I will update the gist.

@r-fameli

r-fameli commented Mar 16, 2026

Copy link
Copy Markdown

@commoddity What version of Claude Code are you using?

On the current(?) version, v2.1.76, I get this error:
image

I also tried the Claude Code version mentioned in your post (v2.0.46). Currently getting this with the settings you have:
image

Also, I saw that Thaura has it's own CLI (though I'm getting some issues there as well). Contacting the Thaura team too to be able to use that properly in case this doesn't work.

@commoddity

Copy link
Copy Markdown
Author

@r-fameli After a while spent debugging it appears that Claude Code no longer supports thaura as a custom backend (I get the same errors as you).

On the plus side, I tried out the Thaura CLI and it seems to work right out of the box for me - as soon as I entered my API key it worked right away.

All things considered it's fine with me since f*ck Anthropic 😅.

Are you still having issues with their CLI?

@r-fameli

r-fameli commented Mar 19, 2026

Copy link
Copy Markdown

@commoddity glad thaura's CLI is coming together and working for you. I'm getting this error every time I try to use it:
Error: Rate limit exceeded. Please wait a moment before trying again

I tried contacting the Thaura team but haven't heard back, gonna try and send them another message.

Appreciate your help debugging it on Claude Code!

EDIT: For anyone who runs into this problem, you need to buy tokens separately to use the CLI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment