Portal
Documentation: all sections

Ghost sessions

A Ghost is an ephemeral session: a short-lived, scoped API key plus a purge contract. While the ghost is alive it works like any other key. When it is destroyed, or when it expires, the gateway revokes the key and purges the session's metadata: its usage rows, its receipts, its sandbox records.

Temporary, not anonymous. Sable's privacy contract already means prompts, completions, and submitted code are never stored for anyone, ghost or not. What a Ghost adds is that the session's metadata (which model, when, how many tokens, at what cost) is erased too, instead of persisting in your account history. It does not hide who you are: the session belongs to your account, and billing ledger amounts remain, because money is append-only.

Quickstart

Start a one-hour ghost with a $2 spend cap:

curl https://api.buildsable.com/v1/ghost/sessions \
-H "Authorization: Bearer $SABLE_SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"duration_secs": 3600, "spend_limit_usd": 2}'
{
  "id": "ghost_7f2a…",
  "status": "active",
  "expires_at": "2026-09-03T18:00:00Z",
  "api_key": "sk-sable_…",
  "api_key_id": "key_91…",
  "what_is_temporary": ["…"],
  "what_is_not": ["…"],
  "note": "The key is shown once. Temporary, not anonymous."
}

The api_key is shown exactly once. Use it like any sk-sable_ key for chat, embeddings, and sandboxes until the session ends.

Destroy it early:

curl -X POST https://api.buildsable.com/v1/ghost/sessions/$GHOST_ID/destroy \
-H "Authorization: Bearer $SABLE_SESSION_TOKEN"

Endpoints

All session-authed (Authorization: Bearer sess_…).

MethodPathWhat it does
POST/v1/ghost/sessionsStart a ghost. Body {duration_secs?, spend_limit_usd?}. Returns the one-time api_key.
GET/v1/ghost/sessionsList your ghost sessions with status and timestamps.
GET/v1/ghost/sessions/{id}One session, including seconds_remaining.
POST/v1/ghost/sessions/{id}/extendAdd time. Body {duration_secs}. Total lifetime is capped at 24 hours.
POST/v1/ghost/sessions/{id}/destroyEnd it now: revoke the key, purge the metadata.

What is erased, and what is not

When a ghost is destroyed or expires:

A Ghost is a privacy convenience inside your own account history. It is not an identity feature: the session is created by your account, billed to your account, and subject to the same acceptable-use obligations as everything else.

Limits