Seal uses organisation API keys. Pilot access is configured with the team running the workflow, then keys are managed in Settings → API Keys.
Use a key
Aqta keys begin with aqta_.
httpAuthorization: Bearer aqta_your_key
pythonimport os from openai import OpenAI client = OpenAI( base_url="https://api.aqta.ai/v1", api_key=os.environ["SEAL_API_KEY"], )
typescriptimport OpenAI from 'openai'; const client = new OpenAI({ baseURL: 'https://api.aqta.ai/v1', apiKey: process.env.SEAL_API_KEY, });
Key handling
- Store keys in a server-side secret manager or environment variable.
- Do not put keys in browser code, source control, tickets, or screenshots.
- Use separate keys for separate environments where that helps you investigate a workflow safely.
- Revoke a key immediately if you believe it has been exposed.
Key scopes
Choose a scope when you create a key in Settings → API Keys. Give each holder the narrowest one that does its job.
| Scope | What it can do | Who holds it |
|---|---|---|
actions | Ask for decisions (POST /v1/actions/authorize) and make model calls | An agent |
read,write | Everything an agent key can, plus reading records and routine management | A service you run |
read,write,assert | Also signs outcomes your own system reports (POST /v1/actions/receipt) | A trusted integration |
read,write,admin | Also creates, changes and deletes policies, and creates and deletes keys | A person, never an agent |
Changing policies and keys
Policies hold the approver lists that require_grant rules check, and keys are the credentials agents hold. Changing either changes who approves, so only a person may do it:
- a person signed in to the console, or
- a key that person created with the
adminscope.
These calls are covered:
POST /v1/policies,PUT /v1/policies/{id}andDELETE /v1/policies/{id}POST /v1/api-keysandDELETE /v1/api-keys/{id}
Any other key, including a default read,write key and an agent key, gets 403 with the code human_session_required:
json{ "detail": { "code": "human_session_required", "message": "This key cannot change policies, approvers or keys. Those changes need a person signed in to the console, or a key created there with the admin scope. Agent and default keys can ask for decisions but cannot change the rules that decide them." } }
An admin key can be created only by a person signed in to the console. A key cannot create an admin key, even an admin key. Keep admin keys out of agent environments: an agent that can read one can rewrite the rule that gates it. Reading policies and keys is unchanged.
Rotate a key
- Create a replacement key in Settings → API Keys.
- Update the deployed secret.
- Confirm the workflow is using the replacement.
- Revoke the old key.
Errors
A missing, invalid, or revoked key returns 401. Check the key and its organisation before retrying. A valid key used for something its scope does not allow returns 403, with a code that names what is missing. A temporary request limit may return 429; use bounded exponential backoff rather than repeatedly sending the same request.