Seal

Documentation

Quick Start

Last updated 6 December 2026

Seal is the product. Aqta is the company. Same gateway, same signed receipts.

Use Seal for one real workflow first. Ask Seal before an agent's consequential action, check the signed decision yourself, and, if you want, route model calls through the same gateway.

0. Try it first, without an account

One signed record, no key, no sign-up. This is the action boundary: you propose a tool call, Seal applies a policy and signs the decision either way.

bash
curl -s -X POST https://api.aqta.ai/v1/public/demo/action \
  -H "Content-Type: application/json" \
  -d '{"tool":"git.push_production","args":{"branch":"main"},"agent":"my-agent/1.0"}'

You get back outcome: BLOCKED and a signed ACTION-v1 record. Try github.create_issue instead and you get ALLOWED. A refusal is a record in its own right, which is the part a sample file cannot show you.

The demo signs with a demo key, not Seal's issuer key. The response carries that key as demo.public_key, with its id as demo.key_id (it begins aqta-demo-). Check the record yourself, offline, against that key:

bash
# save the "record" object from the response as record.json
npx aqta-verify-receipt record.json --profile action-1 --key <demo.public_key from the response>

Change one character in the record and run it again. The signature fails.

What that shows, and what it does not: the record has not been altered since it was signed. It does not show that Aqta issued it. A demo record verifies only against the demo key in its own response, and fails against the published issuer key by design. The gateway makes the demo key in memory; it is never stored, never published as an issuer key and never trusted as one. The record carries org_id: "demo-public", is not stored, and is not written to the transparency log, so it has no inclusion proof. Real records carry your organisation's id, are signed with the published issuer key and appear in the log. The limit is 20 records an hour.

Everything below needs a key.

1. Get a key

Start with a sandbox key. Confirm your email at /try and your keys appear on the page in about a minute. No call, no card. You get two keys:

  • a sandbox key (aqta_sbx_...) for your agent: it asks for decisions and reads this sandbox's records;
  • an approver setup key (aqta_sba_...) for you: it registers the person whose signature clears a payment, and nothing else.

Sandbox records are signed with the sandbox test key, not the Seal issuer key, and are not in the public log. Limits and lifetime are in Seal Sandbox.

Pilot access, for a real workflow. Pilot access is issued for one defined workflow; start a pilot. Once access is enabled, create a key in Settings → API Keys. Pilot keys begin with aqta_.

Keep every key out of source control. The examples below read the agent's key from SEAL_API_KEY:

bash
export SEAL_API_KEY=aqta_sbx_your_key   # or your pilot key

2. Ask Seal before an action runs

One call in front of any consequential tool: a payment, a deploy, a record change. This one works with a sandbox key as it is:

bash
curl -s -X POST https://api.aqta.ai/v1/actions/authorize \
  -H "Authorization: Bearer $SEAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool":"github.create_issue","agent":"triage-agent/1.0",
       "args":{"repo":"acme/payments","title":"Invoice HP-2026-0412 is overdue"}}'

The body takes tool (required), args (a JSON object, hashed into the record and never stored), agent (the identity your agent declares, recorded as declared; send it, or records show "Agent not specified") and optionally aqta_session_id. Leave aqta_session_id out unless the session already exists in Seal (see intent-bound sessions below): an id Seal has not seen is refused with 404, and Seal Sandbox refuses the field with 422.

A decision is a 200 either way, with outcome (ALLOWED or BLOCKED), action_id, the signed ACTION-v1 record, and on a refusal a reason naming the rule. When a grant is presented, the response also carries args_bound and, for a grant with a use budget, grant_use.

A payment needs an approval

A payment carries the approval a person signed, as aqta_grant inside args:

bash
curl -s -X POST https://api.aqta.ai/v1/actions/authorize \
  -H "Authorization: Bearer $SEAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"tool":"payments.transfer","agent":"ap-agent/1.0",
       "args":{"payee":"HARBOUR-PRINT","payee_account":"IE29AIBK93115212345678",
               "amount_cents":"480000","currency":"EUR","invoice":"HP-2026-0412",
               "aqta_grant":{"v":"grant-1","...":"signed by your approver"}}}'

In the sandbox, every payments.* call needs an aqta_grant signed by the approver you registered, fixing the exact payee, account, amount and currency. Without one, or with a value that differs, the answer is a signed BLOCKED. The setup guide registers an approver, signs the grant and runs three payments for you in Python, Node or the browser; Grants sets out the record. Send amounts as decimal strings in minor units ("480000" for EUR 4,800.00) so they compare exactly.

Run the action only on ALLOWED. Treat any other answer as a refusal, including an HTTP error or no answer at all:

python
r = requests.post(url, headers=headers, json=body, timeout=10)
r.raise_for_status()          # an error from Seal means the action does not run
decision = r.json()
if decision["outcome"] != "ALLOWED":
    raise PermissionError(decision["reason"])
run_payment()

Seal fails closed on its side: rules it cannot read, or an error while deciding, give a signed BLOCKED, and a decision it cannot sign and store is a 503 with nothing issued. Seal cannot see an action that never asks it, so the check belongs in the code path that performs the action.

An approval can fix exact argument values, such as payee, amount and currency, and Seal refuses a call whose values differ without using up the approval. See Grants and Release gates.

Check the record offline

Sandbox and live records are signed with different keys. Use the one that matches the key you called with:

Your keyRecords are signed withPublic key
Sandbox key (aqta_sbx_)The sandbox test keyhttps://api.aqta.ai/v1/sandbox/public-key
Pilot key (aqta_)The Seal issuer keyhttps://api.aqta.ai/v1/attestation/public-key
bash
# save the "record" object from the response as record.json
# sandbox record:
npx aqta-verify-receipt record.json --profile action-1 \
  --key <public_key from https://api.aqta.ai/v1/sandbox/public-key>
# live (pilot) record:
npx aqta-verify-receipt record.json --profile action-1 \
  --key <public_key from https://api.aqta.ai/v1/attestation/public-key>

A sandbox record checked against the issuer key fails, and so does a live record checked against the sandbox key. That is by design.

Steps 3 to 5 route model calls and need a pilot key: the sandbox makes no model provider calls.

3. Configure a provider

Add credentials for the provider and model you plan to route through Seal in Settings → Provider keys. Model availability depends on the provider credentials configured for your organisation.

Your own model host. If you run an OpenAI-compatible server yourself or on a sovereign cloud (vLLM, an Apertus deployment, a private endpoint), add an OpenAI key with Your own endpoint set to its base URL, for example https://models.example.eu/v1. Calls to OpenAI-style models then go to your host, with the same checks and signed records. The endpoint must use https and resolve to a public address; Seal checks it when you save it and again before every call, does not follow redirects from it, and never falls back to OpenAI if the check fails. Send the model name your host serves, such as swiss-ai/Apertus-8B-Instruct-2509. If the name contains a colon, as Ollama tags do (llama3.1:8b), prefix it with openai: so Seal does not read the first part as a provider: openai:llama3.1:8b.

4. Route a call

Point your existing OpenAI client at Seal.

Python

python
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.aqta.ai/v1",
    api_key=os.environ["SEAL_API_KEY"],
)

raw = client.chat.completions.with_raw_response.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Summarise this case in three bullets."}],
)

completion = raw.parse()
body = raw.http_response.json()
receipt = body["aqta"]["attestation"]

print(completion.choices[0].message.content)
print(receipt["outcome"])

TypeScript / Node.js

typescript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.aqta.ai/v1',
  apiKey: process.env.SEAL_API_KEY,
});

const response = await client.chat.completions.create({
  model: 'gpt-4o',
  messages: [{ role: 'user', content: 'Summarise this case in three bullets.' }],
});

console.log(response.choices[0].message.content);

cURL

bash
curl https://api.aqta.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SEAL_API_KEY" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello"}]
  }'

5. Inspect the record

Each routed outcome includes an aqta.attestation envelope. It records the outcome and is signed with the active Aqta Ed25519 key. A policy denial is also recorded, so a reviewer can distinguish a blocked call from a missing event.

The dashboard is convenient for investigation. The signature is the evidence: you can check it independently.

6. Verify without Aqta

Install the public verifier:

bash
pip install aqta-verify-receipt

Pin a trusted copy of the published issuer key, then verify a live receipt locally:

python
from aqta_verify_receipt import fetch_published_public_key, verify_receipt

trusted_key = fetch_published_public_key()
result = verify_receipt(receipt, trusted_public_key=trusted_key)

if not result.valid:
    raise RuntimeError(result.reason)

An action record from step 2 uses the ACTION-v1 profile. For a live record, use the issuer key above. For a sandbox record, use the sandbox test key instead:

python
import requests
from aqta_verify_receipt import verify_action_record

# live record: trusted_key from fetch_published_public_key(), as above
# sandbox record: the sandbox test key
sandbox_key = requests.get("https://api.aqta.ai/v1/sandbox/public-key", timeout=10).json()["public_key"]

result = verify_action_record(record, trusted_public_key=sandbox_key)

Once you have pinned a trusted key, receipt verification does not need an Aqta API call.

Intent-bound sessions

An agent session can register the instruction it runs under. Pass an opaque aqta_session_id to group calls into a session, and aqta_intent on the first call (or POST /v1/sessions/{id}/intent) to register the instruction. The intent is immutable once set: a later, different aqta_intent on the same session is refused with 409.

json
{
  "model": "gpt-4o",
  "messages": [{"role": "user", "content": "Find the cheapest flight to Dublin"}],
  "aqta_session_id": "run-2026-08-18-042",
  "aqta_intent": "Book the cheapest returnable flight to Dublin under 200 EUR"
}

A policy with a require_intent rule refuses any call that does not run under a session with a registered intent. The refusal happens before the provider is reached, and the refusal itself is signed. Decisions made under a registered intent carry it in the policy snapshot served at GET /v1/receipts/{id}/rules-in-force.

What this establishes: every decision in the session ran under one recorded, immutable instruction, and refusals are independently verifiable records. It does not detect drift or manipulation, and does not claim to: whatever decides to refuse (this rule, your own policies), the signed record is what survives.

Resource-limit policies

A policy with a carbon_budget rule sets a ceiling, in grams of CO2 equivalent, on a single call. A request whose estimate exceeds the ceiling is refused before the provider is reached, and the refusal is signed with the policy named in policy_applied.

json
{
  "name": "Inference budget",
  "rules": [{"type": "carbon_budget", "value": "2.5"}]
}

The refusal message carries both real figures, the estimate and the ceiling, so the reason a call stopped is legible without opening a dashboard.

The estimate is modelled, not metered. It is derived from a static model energy profile and a regional carbon intensity figure. Seal does not measure energy at the provider and does not claim to. What the signed record establishes is that a declared constraint governed the decision, and that the request behind the estimate is bound into request_hash, so a reviewer can recompute the figure under their own factors and disagree with ours.

Two deliberate behaviours: a call with no available estimate is never blocked, and a rule with a missing or non-numeric ceiling is not recognised at all, so a policy that enforced nothing is never named on a receipt.

What Seal does in the call path

  1. Evaluates the configured policy before the provider call.
  2. Stops the provider call when policy blocks it.
  3. Signs the routed outcome as an ATTESTATION-v1 record.
  4. Returns the result and record for later review.

Next steps

Questions about a pilot workflow: hello@aqta.ai