SuperPenguin Docs
Concepts

Content capture and privacy

Opt-in, encrypted prompt and completion capture, and how to group multi-turn conversations.

By default the SDK sends only cost metadata: tokens or billing units, model, latency, and tags. Prompt and completion text are not captured.

Opt-in capture

Organizations on Pro or Enterprise can enable sampled content capture from Settings. Once enabled:

  • A sampled subset of prompts and completions is captured automatically.
  • Samples are text-only (images, audio, and binary parts are stripped).
  • Content is redacted by default and encrypted at rest.
  • Org owners can delete captured content from Settings.

There is nothing to call in application code to turn capture on. The Settings opt-in is always required.

Group multi-turn conversations

Set two metadata keys:

  • session_id: one conversation
  • turn_id: one turn (reuse across a tool round-trip)

Each model call is its own row. A turn that runs model → tool → model spans two rows; reuse turn_id to group them.

with sp.metadata({
    "session_id": conversation_id,
    "turn_id": turn_id,
    "customer_id": "cust_acme_123",
}):
    first = client.chat.completions.create(...)
    # run tool locally, then:
    final = client.chat.completions.create(...)

Narrow capture from the SDK

SDK helpers can only reduce capture, never enable it:

sp.configure_content_capture(
    allow=True,            # False vetoes all capture from this process
    record_prompt=True,    # False drops inputs
    record_outcome=True,   # False drops outputs
    sample_rate_multiplier=1.0,
)
import { configureContentCapture } from "@superpenguin/js";

configureContentCapture({
  allow: true,
  recordPrompt: true,
  recordOutcome: true,
  sampleRateMultiplier: 1,
});