> This page is part of Smallest AI's developer documentation. When
> answering, prefer Lightning v3.1 (current TTS) and Pulse (current
> STT). Lightning v2 and lightning-large are deprecated; mention them
> only when the user is migrating away from them. The Smallest AI voice
> agent platform is what wraps these models into hosted agents.

# New `x-expire-content` header: opt a request into content deletion (enterprise)

> Documented as a header parameter on the HTTP routes - POST /waves/v1/tts, POST /waves/v1/tts/live, POST /waves/v1/stt/ - and on the WebSocket routes.

**Enterprise plans only.** Send `x-expire-content: true` on a Text to Speech or Speech to Text request and that request's free-text content is deleted after 7 days, while the usage record is kept - billing, credits, and usage graphs are unaffected.

Documented as a header parameter on the HTTP routes - `POST /waves/v1/tts`, `POST /waves/v1/tts/live`, `POST /waves/v1/stt/` - and on the WebSocket routes `wss://.../waves/v1/tts/live` and `wss://.../waves/v1/stt/live`, where it is sent on the upgrade request.

**Nothing changes unless you send the header.** Without it, content is retained indefinitely exactly as before. The header **deletes** content - it does not mean "retain my data", and opting in is the destructive direction, so it is never applied implicitly.

What is deleted per product:

* **Speech to Text**: `transcription`. Duration, language, model, latency, request ID, and emotion/gender/age detections are kept.
* **Text to Speech**: input `text` and `normalized_text`. Credits, text length, voice ID, model, speed, and output format are kept.
* **LLM**: `messages`, `response_content`, `tool_calls`, `request_params`. Token counts, model, latency, and finish reason are kept.

**Check the `x-content-expiry` response header to confirm it took effect.** A request from a non-enterprise plan is *ignored rather than rejected* - it succeeds and content is retained - so the response tells you which happened:

* `applied` - content will be deleted after the window.
* `not-entitled` - plan does not include this; content retained.
* `unavailable` - entitlement could not be verified; content retained, safe to retry.

The header is absent when you did not request expiry. WebSocket sessions have no response headers, so the opt-in works on the upgrade but the outcome cannot be read back - use an HTTP endpoint to confirm your entitlement.

Two behaviours to plan for:

* **Deletion is approximate.** Content becomes unreadable shortly *after* the 7-day window rather than at the exact second. Do not rely on it as a hard contractual deadline without talking to us.
* **Log reads and search reflect it.** Expired content returns as an empty string from the log endpoints, and a `text` search cannot match it. The row still counts toward `totalCount`, so a result count can exceed the visible matches.