---
title: "Realtime Session"
method: POST
path: "/v1/realtime/session"
---

# Realtime Session

`POST /v1/realtime/session`

## Request

- Base URL: `https://api.scriptseen.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.scriptseen.com/v1/realtime/session`
- Auth: none declared

Create one browser-to-OpenAI WebRTC Scout or rehearsal call.

The offer passes through this API so the long-lived OpenAI key stays
server-side. Media does not pass through ScriptSeen after the SDP
handshake.

## Request body

- RealtimeCoachBody
  - `sdp` string, required
  - `mode` 'practice' | 'studio_brief' | 'journey'
  - `line` string
  - `delivery_note` string
  - `punches` string[]
  - `target_seconds` number
  - `feedback_language` string
  - `context` RealtimeScriptContext: Bounded story context that helps the coach understand one selected line.
    - `title` string
    - `full_script` string
    - `previous_line` string
    - `next_line` string
    - `line_number` integer, nullable
    - `total_lines` integer, nullable
    - `narrative_role` string
    - `speaker` string
    - `topic` string
    - `audience` string
    - `platform` string
    - `tone` string
    - `total_target_seconds` integer, nullable
    - `delivery_style` string
    - `story_intent` string
  - `brief` RealtimeStudioBrief: The editable Studio fields shared with Scout at session start.
    - `topic` string
    - `audience` string
    - `platform` 'tiktok' | 'reels' | 'youtube-shorts'
    - `duration` integer
    - `confirmed_fields` string[]
  - `script_id` string, nullable
  - `practice_session_id` string, uuid, nullable
  - `attempt_id` string, uuid, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/scriptseen/apis/scriptseen-api.md) · [All operations](https://skmtc.dev/scriptseen/apis/scriptseen-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scriptseen/apis/scriptseen-api/revisions/234ca7365a93?raw)
