Skip to content

Authentication

Every request to Qevron is authenticated with an API key. This page explains how to obtain and send one.

What is an API key?

An API key is a secret string that proves a request is made on your behalf, starting with sk-. Each key belongs to a group; the group determines which models the key can access and its quota (see API Keys & Quota).

Creating a key

  1. Sign in to the Qevron admin dashboard.
  2. Go to the Keys / Tokens section.
  3. Click Create new key; give it a name and (if applicable) select the model set / group it can access.
  4. Copy the generated sk-... value immediately — the key is shown in full only once.
  5. Store the key in an environment variable (see below).

TIP

Create separate keys for different apps/environments (development, production). That way revoking one doesn't affect the others.

Storing the key in an environment variable

bash
export QEVRON_API_KEY="sk-..."
# add it to ~/.bashrc or ~/.zshrc to make it persistent
powershell
$Env:QEVRON_API_KEY = "sk-..."
# persistent: [Environment]::SetEnvironmentVariable("QEVRON_API_KEY","sk-...","User")
bash
# .env  — ADD this file to .gitignore
QEVRON_API_KEY=sk-...

Reading it in code: Python os.environ["QEVRON_API_KEY"], Node.js process.env.QEVRON_API_KEY.

Sending the key

The standard way is the Authorization header with the Bearer prefix:

bash
Authorization: Bearer sk-aBcD1234...

For compatibility, Qevron also accepts a few alternative headers:

HeaderFormatUse
AuthorizationBearer sk-...Recommended. OpenAI/Anthropic standard.
Authorizationsk-...Works without the Bearer prefix too.
x-api-keysk-...Anthropic SDK compatibility.
x-goog-api-keysk-...Google Gemini SDK compatibility.

TIP

Most SDKs (Python/JS openai, anthropic) send the right header automatically; you only set the key and base_url.

Forcing a specific provider (optional)

By default Qevron picks the best channel for your model. To force a specific channel, add the Qevron-Channel header:

bash
curl https://app.qevron.ai/v1/chat/completions \
  -H "Authorization: Bearer $QEVRON_API_KEY" \
  -H "Qevron-Channel: openai" \
  -H "Content-Type: application/json" \
  -d '{ "model": "verinova", "messages": [{"role":"user","content":"hi"}] }'

The value can be the channel name or its numeric ID.

Response headers

On successful requests Qevron returns informative headers:

HeaderMeaning
GroupID of the group that processed the request.
X-RateLimit-Limit-RequestsAllowed requests per period.
X-RateLimit-Remaining-RequestsRemaining requests.
X-RateLimit-Reset-RequestsWhen the limit resets (Unix).
X-RateLimit-Limit-Tokens / -Remaining-Tokens / -Reset-TokensToken-based limits.

Security

WARNING

  • Don't embed the key in client-side code (browser, mobile app) — anyone can read it. Proxy requests through your own server.
  • Store the key in an environment variable; never commit it.
  • If you suspect a leak, revoke the key in the dashboard and create a new one.

A missing or invalid key returns 401 Unauthorized. See Errors for details.

Qevron — AI gateway. Arpanet / OpenAI / Anthropic / Gemini compatible.