Skip to main content
Claude Code reads two env vars to decide which Anthropic-compatible endpoint to use. Set them, and every Claude Code session in that shell routes through qlaud.

Setup

export ANTHROPIC_BASE_URL=https://api.qlaud.ai
export ANTHROPIC_API_KEY=qlk_live_...     # any qlaud key, master or standard
claude
That’s it. claude --print "what's 2+2" now hits qlaud → AIG → Anthropic.

What works

  • claude interactive sessions
  • claude --print non-interactive
  • --model accepts any qlaud catalog slug — even non-Anthropic ones like gpt-5.4, gemini-3-pro-preview, qwen-coder-plus, kimi-k2.6 — Claude Code’s UI is generic
  • ✅ Tool use (Bash, Read, Edit, …) — full agentic loop
  • cache_control: ephemeral markers — preserved verbatim, ~75% input cost reduction kept
  • ✅ Image content blocks (screenshots) — preserved
  • ✅ Thinking blocks — preserved

Mint a key per developer

If your team is using Claude Code internally, mint one qlaud key per developer + cap their monthly spend:
curl https://api.qlaud.ai/v1/keys \
  -H "x-api-key: $QLAUD_MASTER_KEY" \
  -H "content-type: application/json" \
  -d '{"name":"alice","max_spend_usd":50}'
# → distribute the qlk_live_... to alice
End of month, pull per-developer spend:
curl https://api.qlaud.ai/v1/usage -H "x-api-key: $QLAUD_MASTER_KEY"
The by_key field gives you spend per developer, broken out by model.

CLAUDE.md snippet for multi-modal

Drop this in ~/.claude/CLAUDE.md so every session knows about qlaud’s non-chat endpoints:
# qlaud — multi-modal AI in one URL
Base URL: https://api.qlaud.ai
Auth header: Authorization: Bearer $QLAUD_API_KEY
Endpoints:
- /v1/messages              chat (Anthropic shape, all frontier text models)
- /v1/chat/completions      chat (OpenAI shape, same models)
- /v1/images/generations    image (gpt-image-1)
- /v1/videos                video (sora-2 / sora-2-pro)
- /v1/audio/speech          text-to-speech (gpt-4o-mini-tts)
- /v1/audio/transcriptions  speech-to-text (whisper-1)
- /v1/embeddings            vectors (text-embedding-3-large)
- /elevenlabs/*             ElevenLabs native (custom voices)
- /deepgram/*               Deepgram native (real-time STT)
- /perplexity/*             Perplexity native (web-grounded search)
Once dropped, you can prompt Claude Code with things like “generate a picture of a corgi via qlaud and save to ./corgi.png” and it’ll write the curl + base64 decode itself.