Skip to main content
Velqa

Velqa's Anthropic-compatible API — /v1/messages endpoint

On top of the OpenAI-compatible API, Velqa exposes an Anthropic-compatible endpoint: https://api.velqa.dev/v1/messages. Tools and SDKs built for Anthropic (including Claude Code) then work natively with Velqa's open-weight models (DeepSeek, MiniMax, GLM…), with no Anthropic account.

Environment variables

Most Anthropic tools are configured via three variables:

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

Note: ANTHROPIC_BASE_URL points at the root https://api.velqa.dev (without /v1) — the tool appends the /v1/messages path itself. Authentication uses your Velqa sk-... key (see authentication).

Direct call (curl)

curl https://api.velqa.dev/v1/messages \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "minimax-m3",
    "max_tokens": 256,
    "messages": [
      {"role": "user", "content": "Hello, introduce yourself in one sentence."}
    ]
  }'

The request and response format follow the Anthropic Messages protocol (content as blocks, stop_reason, etc.).

Which endpoint should you use?

  • OpenAI-compatible (/v1/chat/completions): for the openai SDK, LangChain, most libraries and tools. See chat overview.
  • Anthropic-compatible (/v1/messages): for tools that natively speak the Anthropic protocol, like Claude Code or the anthropic SDK.

Both endpoints share the same models (list) and the same key.

Step-by-step tool setup

  • Claude Code — full configuration, recommended models and troubleshooting.

See also: authentication, models.