Seal accepts the OpenAI chat-completions shape. Use the standard OpenAI SDK and change its base URL. There is no separate Aqta SDK.
Packages
Call the action boundary over HTTP, as below, and use the standard OpenAI SDK for model calls. The Seal SDKs (@aqta/sdk for TypeScript, aqta for Python) are not published: any package with those names on npm or PyPI is not ours, so do not install it.
Authorise an action before it runs
The action boundary is POST /v1/actions/authorize. A refusal is a result, not an error: outcome is BLOCKED, reason names the rule, and record is still a signed ACTION-v1 record, because a refusal is evidence too.
bashcurl -s -X POST https://api.aqta.ai/v1/actions/authorize \ -H "Authorization: Bearer $SEAL_API_KEY" \ -H "Content-Type: application/json" \ -d '{"tool":"github.merge_pull_request","agent":"claude-code/2.1","args":{"repo":"acme/payments","pr":4821}}'
tool is required; args, agent (asserted by the caller, not checked) and aqta_session_id are optional. Send aqta_session_id only for a session Seal already holds: an unknown id is a 404, and Seal Sandbox refuses the field.
Try it with no account
POST /v1/public/demo/action takes the same body and returns a record signed with a demo key, not the issuer key. The response carries the key as demo.public_key, with demo.key_id (beginning aqta-demo-). The record verifies only against that key: it shows the record was not altered, not that Aqta issued it. It carries org_id: "demo-public", is not stored, and is not written to the transparency log.
bashcurl -s -X POST https://api.aqta.ai/v1/public/demo/action \ -H "Content-Type: application/json" \ -d '{"tool":"deploy.production","args":{},"agent":"my-agent"}'
The published key
aqta.publicKey() / client.public_key() return GET /v1/attestation/public-key, which is the only authority for the key. Verify records against what it returns.
Python
bashpip install openai
pythonimport 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 support case in one sentence."}], ) completion = raw.parse() receipt = raw.http_response.json()["aqta"]["attestation"] print(completion.choices[0].message.content) print(receipt["outcome"])
Use with_raw_response when you need the signed receipt. The SDK model may not expose unknown top-level response fields.
TypeScript / Node.js
bashnpm install openai
typescriptimport 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 support case in one sentence.' }], }); console.log(response.choices[0].message.content);
If your verification flow needs the receipt, use an HTTP client or the SDK's raw-response facility so you retain the full JSON body.
Streaming
Responses return as a single JSON body that includes the signed receipt, so the receipt always covers the complete response. Streaming is not supported through the gateway.
Setting stream: true returns 400 with a message naming the flag. Leave streaming disabled in your client configuration.
Environment variables
bashSEAL_API_KEY=aqta_your_key
Never place a gateway key in client-side JavaScript or commit it to a repository.
Verifying a receipt
Install the published verifier independently of your application client:
bashpip install aqta-verify-receipt
Then verify aqta.attestation against a trusted, pinned copy of the published Ed25519 key. See Quick Start for the minimal example.