An API key looks like a random string, but Qomni’s tells a story:
sk_agents_live_co1_8fK2…Qa91Zx. Each part is there for a concrete reason, and those reasons are the
subject of this note.
The product, in the key
Each Qomni product has its API, its usage and its invoice. A key is valid
for a single product. With an Agents key you can call
api.qomni.ai/agents/v1 and nothing else; on another API it fails with
401 api_key_wrong_product.
It is an attack-surface decision. A system that creates calls gets an Agents key and, if that key leaks, the attacker gets into neither the web app nor the account. And revoking one key does not touch the others.
The mode, in the key
live or test is not an account setting: the key decides it. A test key
works on separate data, dials no number and bills nothing. The code is the
same; one environment variable changes. So what you test is exactly what
will run in production.
The cell, to look nothing up
co1 says where the workspace’s data lives. The edge reads that prefix and
sends the request to the right cell without searching any database. It is
the reason the API URL never carries a region.
The checksum, to fail early
The last six characters are a CRC32 of the rest, in base62. A badly copied
key is rejected at the edge, with 401 api_key_malformed, before reaching any server. Support
recognizes that error without looking at anything else.
What is not in the key
Qomni stores only the SHA-256 hash of each key. That is why the full key is shown once, when it is created, and afterwards only its prefix and its last four characters are visible. A lost key is not recovered: you create another and revoke the previous one.
And the limits
Each key has its own budget: 120 requests per minute. Requests rejected with
401 are counted separately, per IP address, so that a misconfigured client
does not exhaust the budget of the valid keys on the same network.
The full anatomy is in API keys and authentication.
Get a note with every new post
One engineering note each time we publish; nothing else.