> ## Documentation Index
> Fetch the complete documentation index at: https://developer.suki.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Submit Ambient Finished Transcript

> Create an Ambient session with input_type transcript, submit finished text once, and skip end session so ASR is not required

# Submit Ambient Finished Transcript

Create an Ambient session with `input_type` `transcript`, submit finished text once, and skip end session. Suki skips speech recognition and generates the note from the text you provide.

## Problem

Partners often already have finished transcript text from their own ASR or a scribe workflow. They then stream empty audio, call end session, or expect a recording download. Those steps belong to live `stream` sessions, not transcript input.

For Ambient `transcript` sessions, create with that `input_type`, seed visit context when your product needs it, POST transcript-input once with `raw_text` or `segments`, and skip end session. Suki skips speech recognition. Recording returns 404.

## Architecture

![Flowchart: Create transcript, Seed visit context, POST transcript-input, Poll status.](https://mintcdn.com/suki-1e08f176/Srzj30gTyAYo6M-z/documentation/assets/diagrams/cookbooks-submit-finished-transcript-ambient-1-light.svg?fit=max\&auto=format\&n=Srzj30gTyAYo6M-z\&q=85\&s=3c39fe19e2363bf0cdcd3b14f3391143)

```mermaid actions={false} theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#FFFBDE','primaryTextColor':'#1C1C1C','primaryBorderColor':'#FFD147','lineColor':'#6F5410','secondaryColor':'#FFFDF5','tertiaryColor':'#FFEB94','fontSize':'13px'}}}%%
flowchart LR
  A[Create transcript] --> B[Seed visit context] --> C[POST transcript-input] --> D[Poll status]
```

## Prerequisites

> [!TIP]
>
> Completed [Partner onboarding](https://developer.suki.ai/documentation/get-started/partner-onboarding.md) and can obtain `sdp_suki_token` from Login.

> [!TIP]
>
> Finished transcript text as `raw_text` or well-formed `segments`.

> [!TIP]
>
> `sdp_suki_token` and `sdp_provider_id` headers ready for REST calls.

## Solution

> [card] Before
>
> Have Partner credentials and finished transcript text.

> [card] This Recipe
>
> Create with `transcript`, POST transcript-input once, skip end session.

> [card] Next
>
> [Wait for Ambient before Fetch](https://developer.suki.ai/documentation/cookbooks/wait-for-status-before-retrieve.md)

Create the session with `input_type: "transcript"`, seed visit context when your product needs it, then submit `raw_text` or `segments` once. Do not call end session. Processing starts when the submit succeeds. Full Ambient staging scripts live in [Submit a finished transcript](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/submit-finished-transcript-ambient.md).

> [tab] TypeScript
>
> ```typescript theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> // submit-finished-transcript-ambient.ts
> // Flow: create (transcript) → POST transcript-input → poll status (related cookbook)
>
> const BASE_URL = process.env.SUKI_BASE_URL ?? "https://sdp.suki.ai";
> const SDP_SUKI_TOKEN = process.env.SDP_SUKI_TOKEN!; // from Login (suki_token)
> const SDP_PROVIDER_ID = process.env.SDP_PROVIDER_ID!; // required for Bearer / Single Auth
> const RAW_TEXT =
>   process.env.RAW_TEXT ??
>   "Good afternoon, doctor. The patient has fever and cough.";
>
> function restHeaders(): Record<string, string> {
>   return {
>     sdp_suki_token: SDP_SUKI_TOKEN,
>     sdp_provider_id: SDP_PROVIDER_ID,
>     "Content-Type": "application/json",
>   };
> }
>
> async function createTranscriptSession(): Promise<string> {
>   const res = await fetch(`${BASE_URL}/api/v1/ambient/session/create`, {
>     method: "POST",
>     headers: restHeaders(),
>     body: JSON.stringify({ input_type: "transcript" }),
>   });
>   if (res.status !== 201) {
>     throw new Error(`Create ambient session failed: ${res.status}`);
>   }
>   const { ambient_session_id } = (await res.json()) as {
>     ambient_session_id: string;
>   };
>   return ambient_session_id;
> }
>
> async function submitTranscriptInput(
>   ambientSessionId: string,
>   rawText: string
> ): Promise<void> {
>   const res = await fetch(
>     `${BASE_URL}/api/v1/ambient/session/${ambientSessionId}/transcript-input`,
>     {
>       method: "POST",
>       headers: restHeaders(),
>       body: JSON.stringify({ raw_text: rawText }),
>     }
>   );
>   if (!res.ok) {
>     throw new Error(`Transcript submit failed: ${res.status}`);
>   }
> }
>
> const ambientSessionId = await createTranscriptSession();
> await submitTranscriptInput(ambientSessionId, RAW_TEXT);
> console.log("Transcript submitted. Do not call end session.", ambientSessionId);
> // Next: poll status → retrieve content (see related cookbooks). Recording returns 404.
> ```

> [tab] Python
>
> ```python theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> # submit_finished_transcript_ambient.py
> # Flow: create (transcript) → POST transcript-input → poll status (related cookbook)
> # pip install requests
>
> import os
>
> import requests
>
> BASE_URL = os.environ.get("SUKI_BASE_URL", "https://sdp.suki.ai")
> SDP_SUKI_TOKEN = os.environ["SDP_SUKI_TOKEN"]  # from Login (suki_token)
> SDP_PROVIDER_ID = os.environ["SDP_PROVIDER_ID"]  # required for Bearer / Single Auth
> RAW_TEXT = os.environ.get(
>     "RAW_TEXT",
>     "Good afternoon, doctor. The patient has fever and cough.",
> )
>
>
> def rest_headers() -> dict[str, str]:
>     return {
>         "sdp_suki_token": SDP_SUKI_TOKEN,
>         "sdp_provider_id": SDP_PROVIDER_ID,
>         "Content-Type": "application/json",
>     }
>
>
> def create_transcript_session() -> str:
>     res = requests.post(
>         f"{BASE_URL}/api/v1/ambient/session/create",
>         headers=rest_headers(),
>         json={"input_type": "transcript"},
>         timeout=60,
>     )
>     if res.status_code != 201:
>         raise RuntimeError(f"Create ambient session failed: {res.status_code}")
>     return res.json()["ambient_session_id"]
>
>
> def submit_transcript_input(ambient_session_id: str, raw_text: str) -> None:
>     res = requests.post(
>         f"{BASE_URL}/api/v1/ambient/session/{ambient_session_id}/transcript-input",
>         headers=rest_headers(),
>         json={"raw_text": raw_text},
>         timeout=60,
>     )
>     res.raise_for_status()
>
>
> ambient_session_id = create_transcript_session()
> submit_transcript_input(ambient_session_id, RAW_TEXT)
> print("Transcript submitted. Do not call end session.", ambient_session_id)
> # Next: poll status → retrieve content (see related cookbooks). Recording returns 404.
> ```

**1. Create the Ambient Session with Transcript Input**

Call create with `input_type` set to `transcript`. Store `ambient_session_id` and `note_id`. Refer to [Create ambient session](https://developer.suki.ai/api-reference/ambient-sessions/create.md).

**2. Seed Visit Context When Needed**

Send patient, visit, specialty, and section context the same way you do for a live stream session. Refer to [Provide visit context](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/seed-ambient-session-context.md).

**3. Submit the Transcript Once**

`POST /api/v1/ambient/session/{ambient_session_id}/transcript-input` with `raw_text` or `segments`. Do not call end session. Refer to [Submit transcript input](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md).

**4. Poll Before Retrieving Content**

Poll session status until `completed`, then call content APIs. Recording returns 404. Use [Wait for Ambient before Fetch](https://developer.suki.ai/documentation/cookbooks/wait-for-status-before-retrieve.md) next.

## Try it

> [card]
>
> * **Create returns a transcript session**
>
>   Create with `input_type: "transcript"` returns HTTP 201 and an `ambient_session_id`. Do not open `/ws/stream` for this path.
>
> * **Submit starts processing**
>
>   A successful transcript-input call starts generation. Do not call REST end after submit.
>
> * **Recording is unavailable**
>
>   Get ambient session recording returns 404 for transcript sessions. Poll status, then retrieve content or structured data instead.

## Common mistakes

> [!WARNING]
>
> * Stream empty audio or call end session after creating a `transcript` session.
> * Submit without `raw_text` or `segments`.
> * Expect a recording download. Transcript sessions return 404 on the recording endpoint.

## Related cookbooks

Ambient
API

### [Upload Ambient Pre-Recorded Audio](https://developer.suki.ai/documentation/cookbooks/upload-prerecorded-ambient-audio.md)

Create with audio\_file, mint URL, PUT one WAV.

10 min

Ambient
API

### [Wait for Ambient before Fetch](https://developer.suki.ai/documentation/cookbooks/wait-for-status-before-retrieve.md)

Poll until status is completed.

5 min

Run This Recipe

[Open Full Tutorial](https://developer.suki.ai/documentation/tutorials/ambient-websocket-code-example.md)
[View API Reference](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md)

Step-by-step tutorial and API reference for this workflow.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.