Aller au contenu principal
Velqa

Use Claude Code with Kimi K2.6 or DeepSeek in Morocco — velqa.dev

Configure Claude Code to use Kimi K2.6, DeepSeek or MiniMax M3 through velqa.dev, payable in Moroccan dirhams (MAD). No international Visa card required.

Velqa exposes an Anthropic-compatible API (/v1/messages) in addition to the OpenAI-compatible API: Claude Code therefore works natively, with no plugin or local proxy.

Prerequisites

  • Claude Code installed (npm install -g @anthropic-ai/claude-code)
  • A velqa.dev API key (see the quickstart)

Configuration

Claude Code reads two environment variables to point at an alternative endpoint. Add them to your ~/.bashrc or ~/.zshrc:

export ANTHROPIC_BASE_URL="https://api.velqa.dev"
export ANTHROPIC_AUTH_TOKEN="sk-..."   # your velqa.dev key

Then choose the Velqa model to use:

export ANTHROPIC_MODEL="kimi-k2.6"
export ANTHROPIC_SMALL_FAST_MODEL="glm-4.7-flash"
export CLAUDE_CODE_MAX_OUTPUT_TOKENS="16384"

ANTHROPIC_SMALL_FAST_MODEL is used by Claude Code for fast internal tasks (summaries, titles) — pointing it at the cheapest model noticeably reduces your consumption.

CLAUDE_CODE_MAX_OUTPUT_TOKENS caps the output at the model's real limit (16384 for most, 8192 for deepseek-v4-flash). Without it, a large completion plus the prompt can exceed the window of a small-context model and trigger Trop de tokens demandés. Reessaie plus tard.

Context window: nothing to set (native auto-compaction)

Unlike Cline / opencode / Roo / Kilo, Claude Code has no "Context Window" field to fill in: it automatically compacts the context (autoCompactEnabled, on by default) when the session approaches the limit. The only size-side safeguard you add is therefore CLAUDE_CODE_MAX_OUTPUT_TOKENS above, for the output.

Caveat: Claude Code doesn't know the exact window of a non-Claude model and assumes a large value. On large-window models (deepseek-v4-pro / qwen3.7-max 1M, hy3 / mimo-v2.5 262k, kimi-k2.6 131k) auto-compaction lands right. On deepseek-v4-flash (64k), prefer a tool where you set the window by hand (opencode, Cline) or reserve Claude Code for large-window models.

Alternatively, without global variables, you can configure per project in .claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.velqa.dev",
    "ANTHROPIC_MODEL": "kimi-k2.6",
    "ANTHROPIC_SMALL_FAST_MODEL": "glm-4.7-flash"
  }
}

(The key stays in ANTHROPIC_AUTH_TOKEN as an environment variable — never put it in a version-controlled file.)

Quick test

claude "explain this repo in 3 sentences"

If a response comes back, the connection works. You can check the active model in Claude Code with /status.

Recommended models

ModelUse caseMinimum plan
kimi-k2.6Complex coding agent, long sessionsDev (199 MAD)
hy3General-purpose and agentic, excellent perf/price ratioStarter (99 MAD)
minimax-m3Agentic reasoning, best perf/price ratioDev (199 MAD)
glm-4.7-flashFast tasks, small/fast model — the most responsiveStarter (99 MAD)
deepseek-v4-flashHigh-volume economical, light code reviewStarter (99 MAD)
glm-4.7General chat, good in FR / ARStarter (99 MAD)

Troubleshooting

"Please run /login · API Error: 403 ..."

The "Please run /login" prefix is added by Claude Code itself: as soon as it receives a 401 or 403 error, it assumes a connection problem and offers to reconnect. Do not run `/login` — with Velqa there is no Anthropic account to connect. Instead, read the rest of the message, which contains the real cause:

  • `key not allowed to access model ... Tried to access <name>`: the requested model name doesn't exist or isn't included in your key. Check ANTHROPIC_MODEL and ANTHROPIC_SMALL_FAST_MODEL — a typo in the ID (e.g. kimi-k2.66 instead of kimi-k2.6) is enough. The list of valid IDs is at velqa.dev/models.
  • `Authentication Error` or rejected key: check ANTHROPIC_AUTH_TOKEN (full key, no spaces) and that the key hasn't been revoked in the dashboard.
  • The model is valid but still rejected: your plan may not include it (see the table above) — or your key predates a model addition; regenerate it from the dashboard or contact support.

Known limitations

  • Features specific to Anthropic's Claude models (vision on some models, native Anthropic prompt caching) depend on the open-weight model chosen behind it — caching is handled on the Velqa side when the provider supports it.
  • If a tool sends unsupported anthropic-beta headers, they are cleanly ignored by the gateway.

Pricing in MAD

See velqa.dev/models for up-to-date prices in MAD per million tokens. Boost top-up rates are shown in dirhams directly in the dashboard.