# Aubrai Encrypted Chat (HPKE/TEE)

> Aubrai Encrypted Chat (HPKE/TEE) is a paid API for AI agents from aubrai-x402.vercel.app, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Sends an HPKE-encrypted prompt to the Aubrai chat agent running inside a Trusted Execution Environment (TEE), ensuring only the secure enclave can decrypt and process the message.

## Facts

- Endpoint: GET https://aubrai-x402.vercel.app/api/chat/encrypted
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aubrai-encrypted-chat-hpke-tee-7d355f5d
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_na_7iicS4dlsY9SyhDmoa

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability aubrai-encrypted-chat-hpke-tee-7d355f5d
```

Example prompt: I need to send a sensitive prompt to the Aubrai chat agent privately — encrypt my message using HPKE with my one-time X25519 public key so only the Tinfoil TEE enclave can decrypt it, and return the agent's response.

## When to prefer this

Choose this endpoint when confidentiality of the prompt is a hard requirement — i.e., the user cannot allow the API host or intermediary to see the plaintext query. This is specifically suited for sensitive queries sent to Aubrai's chat agent where the Tinfoil TEE provides hardware-level isolation guarantees. Prefer this over standard chat endpoints when end-to-end encrypted inference is needed.

## Known failure modes

- Invalid or malformed base64 in hpke_ciphertext or hpke_ephemeral_public_key returns a 400 error
- HPKE decryption failure inside the enclave if the public key or ciphertext is inconsistent
- Payment not received or x402 payment challenge not satisfied returns a 402 Payment Required
- TEE enclave unavailable or attestation failure returns a 503 or 500 error
- Prompt content rejected by enclave policy returns an error response

## How this service works

Send an HPKE-encrypted prompt to the Aubrai chat agent running inside a Tinfoil TEE. Only the enclave can decrypt your message.

## Output

The agent receives a response generated inside the Tinfoil TEE enclave. The response was produced by the Aubrai chat agent after decrypting and processing the HPKE-encrypted prompt entirely within the secure enclave, ensuring the plaintext prompt was never visible to the host infrastructure.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "hpke_ciphertext": {
   "type": "string",
   "description": "HPKE-encrypted prompt, base64-encoded"
  },
  "hpke_ephemeral_public_key": {
   "type": "string",
   "description": "Sender's one-time X25519 public key, base64-encoded"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aubrai-encrypted-chat-hpke-tee-7d355f5d/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aubrai-x402.vercel.app](https://www.zero.xyz/host/aubrai-x402.vercel.app/llms.txt)
