Seal

Documentation

Endpoint Details

Last updated May 2026

POST /v1/chat/completions

Send an OpenAI-compatible chat-completions request through Seal.

bash
curl https://api.aqta.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer aqta_your_key" \
  -d '{
    "model": "gpt-4o",
    "messages": [
      {"role": "user", "content": "Summarise this support case in one sentence."}
    ]
  }'

Required fields

FieldTypeDescription
modelstringA model available through your configured provider credentials
messagesarrayOpenAI-compatible message objects

Additional OpenAI-compatible fields are forwarded only when supported by the configured provider and pilot configuration.

Response and receipt

The normal completion response includes an extra top-level aqta object. The aqta.attestation field is the signed ATTESTATION-v1 record for the routed decision.

When using an SDK that drops unknown fields, capture the raw HTTP body to obtain this object. The Quick Start shows one Python approach.

POST /v1/actions/authorize

Ask Seal for a decision before an agent runs a tool. The answer is a signed ACTION-v1 record, allowed or refused.

bash
curl https://api.aqta.ai/v1/actions/authorize \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SEAL_API_KEY" \
  -d '{"tool": "payments.transfer", "agent": "payables-agent", "args": {"payee": "HARBOUR-PRINT", "amount_cents": "480000", "currency": "EUR"}}'

Tool names

Every rule matches on the tool name, so a name that looks like a governed one but compares differently is refused before anything is decided or any approval is used. The answer is 422 with the code invalid_tool_name and a message naming the reason:

  • invisible characters, such as a zero-width space or a variation selector;
  • control characters, unassigned or private-use characters, and any separator other than a plain space;
  • compatibility forms that read as another name, such as fullwidth letters, ligatures and superscripts;
  • letters from two scripts that stand in for each other, such as Latin mixed with Cyrillic or Greek;
  • anything that cannot be signed, such as a lone surrogate.

Names are normalised to Unicode NFC before rules run. Letter case is left to the rules. Use one script and plain characters, for example payments.transfer.

The same intake check applies to agent and aqta_session_id: a control character or a lone surrogate in either is refused with 422 and the code invalid_declared_text.

Arguments are refused with 422 when they cannot be signed exactly. That includes an integer beyond plus or minus 9,007,199,254,740,991 (2^53 - 1), which a JSON number cannot hold exactly. Send such values, and amounts generally, as strings.

POST /v1/actions/receipt

Sign an outcome that your own system reports, for an action Seal did not decide. No policy is evaluated. To have Seal decide, use POST /v1/actions/authorize.

bash
curl https://api.aqta.ai/v1/actions/receipt \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $AQTA_ASSERT_KEY" \
  -d '{"session_id": "run-42", "agent": "ci/deployer", "action_type": "deploy", "outcome": "ALLOWED", "request_hash": "<64-character lowercase hex SHA-256 of the request>"}'

session_id, agent, action_type and request_hash are required. outcome is ALLOWED, BLOCKED or SUPPRESSED, and defaults to ALLOWED.

This route needs a key created with the assert scope (read,write,assert) or the admin scope. Any other key, including a default read,write key and an agent key, gets 403 with the code assert_scope_required.

Every receipt this route issues carries the tag caller_asserted_outcome in policy_applied, inside the signature. A reader can therefore tell a reported outcome from a decision Seal evaluated, and the tag cannot be removed without breaking the signature. The record format is unchanged: policy_applied is a list of strings, which the published verifiers already accept.

A receipt is returned only once it is stored. If it cannot be stored, the answer is 503 and no receipt is issued; retry.

Policies

GET /v1/policies lists your organisation's policies. POST /v1/policies, PUT /v1/policies/{id} and DELETE /v1/policies/{id} change them, and need a person signed in to the console or a key with the admin scope. Any other key gets 403 with the code human_session_required. See Authentication.

GET /v1/attestation/public-key

Retrieve the current public Ed25519 signing key.

bash
curl https://api.aqta.ai/v1/attestation/public-key

The response contains the encoded key, its identifier, algorithm, and format. Trust comes from pinning a verified copy of this key in your own process.

GET /v1/attestation/keys

Retrieve active and historical published key material for handling a key transition.

bash
curl https://api.aqta.ai/v1/attestation/keys

Use this endpoint to learn the issuer's declared key history. Your verifier should still enforce the keys and revocation policy it trusts.

Errors

Expect standard HTTP errors. Use bounded exponential backoff for temporary failures such as 429 or an upstream provider error. Avoid automatic retries when repeating a business action could produce a duplicate side effect.

Next steps