Aller au contenu principal
Velqa

Velqa API authentication — sk-... key and Bearer header

Every request to the Velqa API authenticates with an API key of the form sk-..., passed in the Authorization: Bearer HTTP header. That's the only secret the API needs: your account (email/OAuth) is only for the dashboard and billing.

Base URL

https://api.velqa.dev/v1

The Anthropic-compatible endpoint is https://api.velqa.dev/v1/messages (see Anthropic API).

The auth header

Every request must include your key:

Authorization: Bearer sk-...

Example with curl:

curl https://api.velqa.dev/v1/chat/completions \
  -H "Authorization: Bearer sk-..." \
  -H "Content-Type: application/json" \
  -d '{"model":"kimi-k2.6","messages":[{"role":"user","content":"Hello"}]}'

With the OpenAI SDK, the key is passed as the api_key argument:

from openai import OpenAI

client = OpenAI(base_url="https://api.velqa.dev/v1", api_key="sk-...")

Create a key

  1. Sign up at velqa.dev (email/password or Google/GitHub).
  2. Verify your email — required before you can create a key or top up.
  3. In the dashboard, under API Keys, click "New key".
  4. Copy the key: it is shown only once. Store it in a secrets manager or an environment variable.

Best practices

  • Never commit a key to a Git repository. Use an environment variable (VELQA_API_KEY) or a .env file ignored by Git.
  • Use multiple keys: one per machine, project or environment, so you can revoke one without breaking the rest.
  • Rotate your keys regularly and revoke any exposed key immediately from the dashboard.
export VELQA_API_KEY="sk-..."
curl https://api.velqa.dev/v1/chat/completions \
  -H "Authorization: Bearer $VELQA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"glm-4.7-flash","messages":[{"role":"user","content":"ping"}]}'

Key scoping

A Velqa key can be restricted when you create it: an allow-list of models, a maximum budget, and rate limits (RPM / TPM). Handy for giving a key to an app or a teammate without exposing your whole balance or every model. Details and setup: API Keys.

Common auth errors

  • 401 / "Authentication Error": key missing, malformed or revoked. Check the Authorization: Bearer sk-... header (full key, no spaces).
  • 403 / "key not allowed to access model": the requested model isn't in the key's scope or your plan. See models and plans.