SDK Reference
Seal accepts the OpenAI chat-completions shape. Use the standard OpenAI SDK and change its base URL. There is no separate Aqta SDK.
Python
bashpip install openai
pythonimport os from openai import OpenAI client = OpenAI( base_url="https://api.aqta.ai/v1", api_key=os.environ["AQTA_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.AQTA_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
Streaming is not currently supported through the gateway. Responses return as a single JSON body that includes the signed receipt, so the receipt always covers the complete response.
Setting stream: true returns 400 with a message naming the flag. The gateway used to ignore it and return a JSON body anyway, which an OpenAI client parsed as SSE: it found no data: lines, yielded zero chunks, and raised nothing, so the call looked like an empty completion rather than an unsupported option. Leave streaming disabled in your client configuration.
Environment variables
bashAQTA_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.