CortexDB Docs
Docs for CortexDB 0.16.1, the version running on CortexDB Cloud (api.cortexdb.ai).
Self-Hosting

Keys and Credentials

The five credentials a CortexDB pilot or customer handles, what each one is for, and where it comes from.

Start on CortexDB Cloud

We recommend starting on CortexDB Cloud: sign up on cortexdb.ai and you have an endpoint and a token in two minutes, with nothing to run. If you need CortexDB on-prem or on your own infrastructure, talk to us and we will provide a self-host license. Licensed releases then come from the customer portal, and these pages cover running them.

A self-hosted CortexDB involves five different credentials. They are not interchangeable: each one is refused where another is expected.

CredentialUsually inWhere it comes fromWhat it is for
Agent keyCORTEXDB_KEYcustomer.cortexdb.ai, Agent keys (a signed-in person makes it; see Agent keys)Downloading releases and reading the docs, CortexHelper and MCP on the portal. Never sent to your CortexDB server: a server refuses it.
Company licenseCORTEX_LICENSEThe release page's commands, or GET /api/license with an agent keyLetting your server run. Needed once; the server keeps it and renews it (Your license).
Server API keyCORTEX_API_KEYYou choose it (the installer makes one when you pick an API key)The operator credential for a networked server: Authorization: Bearer <key> on every request. Not needed on a server that only listens on its own machine with CORTEX_INSECURE_NO_AUTH=1.
Application credentialsYour application's configMinted by your server, one per application or userWhat your applications send instead of the server API key, narrowed to their scopes and capabilities (Security & Compliance).
Provider keyOPENAI_API_KEY or CORTEX_EMBEDDING_API_KEYYour embedding providerEmbeddings only. It stays on your server. Not needed with local Ollama.

Never share any of them in a chat, a ticket, a screenshot or a log. When you send diagnostics to CortexDB, replace each value with <redacted>; we never need one to help.

Downloading with scripts and agents

Any HTTP client works with the portal if it sends Authorization: Bearer <agent key>: curl, wget, Python requests, Node fetch. The portal's own answers carry the header X-CortexDB-Origin: portal, and its errors are JSON with a code to branch on:

codeMeaning
AUTH_REQUIRED (401)No key, or the key isn't valid or was revoked.
NO_ACCESS (403)The key is valid but the account's access has ended.
RETIRED (410)A release from before licenses; download a newer one.
NOT_FOUND (404), RATE_LIMITED (429), UNAVAILABLE (503)As named; UNAVAILABLE is worth retrying.

A refusal without X-CortexDB-Origin came from the network between you and the portal, not from your key. Python's urllib is the usual case: its default User-Agent is turned away. Set one that names your tool, and follow redirects (downloads answer 302 to a short-lived link):

import urllib.request

req = urllib.request.Request(
    "https://customer.cortexdb.ai/d/latest/linux-amd64",
    headers={"Authorization": f"Bearer {key}", "User-Agent": "my-agent/1.0"},
)

On this page