---
title: "Secure mode: a sealed conversation"
method: POST
path: "/sealed/chat"
---

# Secure mode: a sealed conversation

`POST /sealed/chat`

## Request

- Base URL: `https://secureai.one/v1`
- URL: `https://secureai.one/v1/sealed/chat`
- Auth: HTTP bearer

The body is an envelope sealed to the enclave's attested key; the answer is a stream of sealed pieces. Use the TypeScript SDK's secureChat rather than building this by hand. API subscription only. Charged a fixed price per message: the model's rate for the request's size plus 4,096 output tokens.

## Headers

- `X-Model` string, required

## Request body

- object
  - `v` 1, required
  - `k` string, required: Session key wrapped with RSA-OAEP-SHA-256, base64
  - `c` string, required: IV and AES-256-GCM ciphertext of the request, base64

## Response `200`

Sealed pieces as server-sent events

## Other responses

- `400`: Model not available in Secure mode
- `402`: Out of balance
- `403`: Needs the API subscription
- `503`: Enclave unreachable; nothing sent or charged

---

[API](https://skmtc.dev/secureai/apis/secure-ai.md) · [All operations](https://skmtc.dev/secureai/apis/secure-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/secureai/apis/secure-ai/revisions/6eefd7f53f8b?raw)
