> ## 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 a Finished Transcript

> Create a Form filling session with input_type transcript, submit finished text on the shared endpoint, and retrieve structured data

Quick summary

Use this guide when your product already has finished transcript text and you want Form filling APIs to fill forms from that text.

Create with `input_type` `transcript`, seed at least one template or schema, submit `raw_text` or `segments` once, then poll status and retrieve structured data. Do not call end session. Recording returns 404.

Last updated:
November 2026

Use Form filling APIs with `input_type` set to `transcript` when your application already has a completed transcript from an external speech recognition service, scribe workflow, or another upstream system.

First, authenticate, create a Form filling session, and provide at least one template or partner schema.

Then, submit the completed transcript once to the shared [transcript-input](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md) endpoint using your Form filling `ambient_session_id`. You do not need to open `/ws/stream` or upload a WAV file. Suki processes the submitted text directly and skips speech recognition.

> [!NOTE]
>
> **Important:**
>
> * Do not call the end session endpoint for this flow.
> * Recording is unavailable because no source audio is provided. Requests to retrieve the recording return **404**.

For a comparison of finished transcript input across Ambient and Form filling, refer to:

* [Submit a finished transcript](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/submit-finished-transcript)
* [Provide a finished transcript](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/finished-transcript-input.md)

> [!NOTE]
>
> **Applies to:** [Form filling APIs](https://developer.suki.ai/form-filling-api-reference/overview.md).
>
> * Create with `input_type` `transcript` before you call transcript-input.
> * Seed at least one form in `form_filling.values` before processing starts.
> * Submit once on the shared [Submit transcript input](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md) endpoint with this Form filling `ambient_session_id`.
> * Do not open `/ws/stream`, do not call end session, and do not expect a recording.

> [!NOTE]
>
> Both Form filling and [Ambient clinical note sessions](https://developer.suki.ai/api-reference/ambient-sessions/create.md) use the parameter name **`ambient_session_id`**. Those identifiers refer to **different** sessions. Use only the ID returned from Form filling [Create Form filling session](https://developer.suki.ai/form-filling-api-reference/form-filling-sessions/create.md) for Form filling REST calls and for the shared transcript-input endpoint.

The typical Form filling `transcript` flow is:

![Flowchart: Create transcript, Seed form context, POST transcript-input, Poll status, Retrieve structured data.](https://mintcdn.com/suki-1e08f176/F6oSi3VCowSu657Q/documentation/assets/diagrams/how-to-form-filling-submit-finished-transcript-1-light.svg?fit=max\&auto=format\&n=F6oSi3VCowSu657Q\&q=85\&s=bb389ac0bed5caff15863f4e9ece4406)

```mermaid actions={false} theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
%%{init: {'theme':'base', 'themeVariables': { 'primaryColor':'#FFF394','primaryTextColor':'#111827','primaryBorderColor':'#FFE148','lineColor':'#FFE148','secondaryColor':'#FFF394','tertiaryColor':'#FFFADE','mainBkg':'#FFF394','secondBkg':'#FFFADE','tertiaryBorderColor':'#FFE148','border1':'#FFE148','border2':'#FFE148','arrowheadColor':'#FFE148','fontFamily':'Inter, system-ui, sans-serif','fontSize':'14px','nodeBorder':'#FFE148','edgeLabelBackground':'#FFE148','clusterBkg':'#FFFADE','clusterBorder':'#FFE148','defaultLinkColor':'#FFE148','titleColor':'#111827','nodeTextColor':'#111827'}}}%%
flowchart LR
    A["Create<br/>transcript"] --> B["Seed form<br/>context"]
    B --> C["POST<br/>transcript-input"]
    C --> D["Poll<br/>status"]
    D --> E["Retrieve<br/>structured data"]

    style A fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#111827
    style B fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#111827
    style C fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#111827
    style D fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#111827
    style E fill:#FFF394,stroke:#FFE148,stroke-width:2px,color:#111827
```

**Form filling transcript rules (agents):**

* Create on `/api/v1/form-filling/session/create` with `input_type` `transcript`. Store the returned `ambient_session_id` (Form filling session id).
* Seed `form_filling.values` with at least one `form_template_id` or partner `schema` before processing starts.
* POST `/api/v1/ambient/session/{ambient_session_id}/transcript-input` once with `raw_text` or well-formed `segments`. One of the two is required.
* Do not call end session. Do not open `/ws/stream`. Do not reuse an Ambient clinical-note session id. Recording returns 404.
* Poll Form filling status, then retrieve structured data.

## Prerequisites

* A valid Suki Token. Refer to [Partner authentication](https://developer.suki.ai/documentation/how-to/partner-authentication.md) and [Form filling authentication](https://developer.suki.ai/form-filling-api-reference/authentication.md).
* Finished transcript text as one string or as segments with optional word timings.
* At least one Form filling template ID or partner schema to seed before processing starts.

## Build the transcript submit flow

Your application should connect create, form context, transcript submit, and structured-data retrieval in this order.

**1. Create the Form Filling Session with Transcript Input**

Call POST [Create Form filling session](https://developer.suki.ai/form-filling-api-reference/form-filling-sessions/create.md) with `input_type` set to `transcript`. Store the returned `ambient_session_id`.

```bash theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
curl --request POST \
  --url https://sdp.suki-stage.com/api/v1/form-filling/session/create \
  --header 'Content-Type: application/json' \
  --header 'sdp_suki_token: <sdp_suki_token>' \
  --header 'sdp_provider_id: <sdp_provider_id>' \
  --data '{
    "input_type": "transcript"
  }'
```

`input_type` is fixed for the life of the session. Create a new session if you need `stream` or `audio_file` instead.

**2. Seed Form Filling Session Context**

Seed at least one template or partner schema before processing starts. Each object in `form_filling.values` must use exactly one of `form_template_id` or `schema`.

```bash theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
curl --request POST \
  --url https://sdp.suki-stage.com/api/v1/form-filling/session/<ambient_session_id>/context \
  --header 'Content-Type: application/json' \
  --header 'sdp_suki_token: <sdp_suki_token>' \
  --header 'sdp_provider_id: <sdp_provider_id>' \
  --data '{
    "form_filling": {
      "values": [
        {
          "form_template_id": "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0"
        }
      ]
    }
  }'
```

Refer to [Form filling basic usage](https://developer.suki.ai/documentation/how-to/form-filling/form-filling-basic-usage.md) and [Seed Form filling with a Suki template](https://developer.suki.ai/documentation/cookbooks/seed-form-filling-template-context.md).

**3. Submit the Transcript Once**

Call POST [Submit transcript input](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md) with the **Form filling** session id from create.

Provide **`raw_text`** or **`segments`**. One of the two is required.

```bash theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
curl --request POST \
  --url https://sdp.suki-stage.com/api/v1/ambient/session/<ambient_session_id>/transcript-input \
  --header 'Content-Type: application/json' \
  --header 'sdp_suki_token: <sdp_suki_token>' \
  --header 'sdp_provider_id: <sdp_provider_id>' \
  --data '{
    "raw_text": "Good afternoon, doctor. The patient has fever and cough."
  }'
```

> [!WARNING]
>
> Skip end session for this path. Processing starts when the submit succeeds, and a second submit returns `ING_SDK_006`.

**4. Wait for Processing, Then Retrieve Structured Data**

Poll [Form filling session status](https://developer.suki.ai/form-filling-api-reference/form-filling-sessions/status.md) or wait for your webhook. Then retrieve [structured data](https://developer.suki.ai/form-filling-api-reference/form-filling-sessions/structured-data.md) when status is **`completed`**.

Do not expect a recording. Recording returns **404** for transcript sessions.

## Handle the session status

After the transcript submit succeeds, structured form output is not ready yet. Poll Form filling status until Suki returns a final outcome, or wait for your configured webhook.

| Status | What your application should do |
| :- | :- |
| **`completed`** | Retrieve structured data and review `generated_values`. |
| **`skipped`** | Treat the session as having no form output this time. |
| **`failed`** | Show that processing failed and offer retry or support. |
| **`aborted`** | Treat the session as cancelled. |

## Complete staging scripts

Use these scripts on staging after you replace partner credentials and set a real `FORM_TEMPLATE_ID`. Do not call end session. Do not reuse an Ambient clinical-note session id. Recording returns 404.

**Language tabs (agents):** Equivalent code samples are available in: TypeScript, Python. Humans see one language at a time. Use the variant that matches the user's stack; behavior is the same across tabs.

> [tab] TypeScript
>
> ```typescript Form filling transcript expandable theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> // form_filling_transcript_staging.ts
> // Flow: login → FF create (transcript) → context → POST transcript-input → poll structured-data
> // Node 18+: npx tsx form_filling_transcript_staging.ts
>
> const BASE_URL = "https://sdp.suki-stage.com";
> const PARTNER_ID = "your-partner-id";
> const PARTNER_TOKEN = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...";
> const PROVIDER_ID = "provider-123";
> const SDP_PROVIDER_ID = "";
> const FORM_TEMPLATE_ID = "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0"; // Real Suki template UUID
> const RAW_TEXT = "Good afternoon, doctor. The patient has fever and cough.";
>
> function restHeaders(sukiToken: string): Record<string, string> {
>   const headers: Record<string, string> = {
>     sdp_suki_token: sukiToken,
>     "Content-Type": "application/json",
>   };
>   if (SDP_PROVIDER_ID) headers.sdp_provider_id = SDP_PROVIDER_ID;
>   return headers;
> }
>
> async function expectStatus(response: Response, url: string, want: number): Promise<void> {
>   if (response.status === want) return;
>   throw new Error(`HTTP ${response.status} ${url}: ${(await response.text()).slice(0, 500)}`);
> }
>
> async function login(partnerId: string, partnerToken: string, providerId?: string): Promise<string> {
>   const url = `${BASE_URL}/api/v1/auth/login`;
>   const body: Record<string, string> = { partner_id: partnerId, partner_token: partnerToken };
>   if (providerId) body.provider_id = providerId;
>   const response = await fetch(url, {
>     method: "POST",
>     headers: { "Content-Type": "application/json" },
>     body: JSON.stringify(body),
>   });
>   await expectStatus(response, url, 200);
>   const data = (await response.json()) as { suki_token?: string };
>   if (!data.suki_token) throw new Error("login response missing suki_token");
>   return data.suki_token;
> }
>
> async function main() {
>   const sukiToken = await login(PARTNER_ID, PARTNER_TOKEN, PROVIDER_ID);
>
>   const createUrl = `${BASE_URL}/api/v1/form-filling/session/create`;
>   const createdRes = await fetch(createUrl, {
>     method: "POST",
>     headers: restHeaders(sukiToken),
>     body: JSON.stringify({ input_type: "transcript" }),
>   });
>   await expectStatus(createdRes, createUrl, 201);
>   const created = (await createdRes.json()) as { ambient_session_id: string };
>   const ambientSessionId = created.ambient_session_id;
>   console.log("form filling ambient_session_id:", ambientSessionId);
>
>   const contextUrl = `${BASE_URL}/api/v1/form-filling/session/${ambientSessionId}/context`;
>   const contextRes = await fetch(contextUrl, {
>     method: "POST",
>     headers: restHeaders(sukiToken),
>     body: JSON.stringify({
>       form_filling: {
>         values: [{ form_template_id: FORM_TEMPLATE_ID }],
>       },
>     }),
>   });
>   await expectStatus(contextRes, contextUrl, 200);
>
>   const transcriptUrl = `${BASE_URL}/api/v1/ambient/session/${ambientSessionId}/transcript-input`;
>   const transcriptRes = await fetch(transcriptUrl, {
>     method: "POST",
>     headers: restHeaders(sukiToken),
>     body: JSON.stringify({ raw_text: RAW_TEXT }),
>   });
>   await expectStatus(transcriptRes, transcriptUrl, 200);
>   console.log("Transcript submitted. Do not call end session.");
>
>   for (;;) {
>     const statusUrl = `${BASE_URL}/api/v1/form-filling/session/${ambientSessionId}/status`;
>     const statusRes = await fetch(statusUrl, { headers: restHeaders(sukiToken) });
>     await expectStatus(statusRes, statusUrl, 200);
>     const status = ((await statusRes.json()) as { status: string }).status;
>     console.log("status:", status);
>     if (status === "completed") {
>       const dataUrl = `${BASE_URL}/api/v1/form-filling/session/${ambientSessionId}/structured-data`;
>       const dataRes = await fetch(dataUrl, { headers: restHeaders(sukiToken) });
>       await expectStatus(dataRes, dataUrl, 200);
>       console.log(JSON.stringify(await dataRes.json(), null, 2));
>       break;
>     }
>     if (status === "failed" || status === "skipped" || status === "aborted") {
>       throw new Error(`Terminal status: ${status}`);
>     }
>     await new Promise((r) => setTimeout(r, 2000));
>   }
> }
>
> main().catch((err) => {
>   console.error(err);
>   process.exit(1);
> });
> ```

> [tab] Python
>
> ```python Form filling transcript expandable theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> # form_filling_transcript_staging.py
> # Flow: login → FF create (transcript) → context → POST transcript-input → poll structured-data
> # pip install requests
>
> import json
> import time
> from typing import Any, Optional
>
> import requests
>
> BASE_URL = "https://sdp.suki-stage.com"
> PARTNER_ID = "your-partner-id"
> PARTNER_TOKEN = "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9..."
> PROVIDER_ID = "provider-123"
> SDP_PROVIDER_ID = ""
> FORM_TEMPLATE_ID = "019d4cdc-9319-7d81-ae2e-fd6de7f1b4f0"  # Real Suki template UUID
> RAW_TEXT = "Good afternoon, doctor. The patient has fever and cough."
>
>
> def rest_headers(suki_token: str) -> dict[str, str]:
>     headers = {"sdp_suki_token": suki_token, "Content-Type": "application/json"}
>     if SDP_PROVIDER_ID:
>         headers["sdp_provider_id"] = SDP_PROVIDER_ID
>     return headers
>
>
> def expect_status(response: requests.Response, url: str, want: int) -> None:
>     if response.status_code == want:
>         return
>     raise RuntimeError(f"HTTP {response.status_code} {url}: {(response.text or '')[:500]}")
>
>
> def login(partner_id: str, partner_token: str, provider_id: Optional[str] = None) -> str:
>     url = f"{BASE_URL}/api/v1/auth/login"
>     payload: dict[str, Any] = {"partner_id": partner_id, "partner_token": partner_token}
>     if provider_id:
>         payload["provider_id"] = provider_id
>     r = requests.post(url, json=payload, timeout=60)
>     expect_status(r, url, 200)
>     token = r.json().get("suki_token")
>     if not token:
>         raise RuntimeError("login response missing suki_token")
>     return token
>
>
> if __name__ == "__main__":
>     suki_token = login(PARTNER_ID, PARTNER_TOKEN, PROVIDER_ID)
>
>     create_url = f"{BASE_URL}/api/v1/form-filling/session/create"
>     created_res = requests.post(
>         create_url,
>         headers=rest_headers(suki_token),
>         json={"input_type": "transcript"},
>         timeout=60,
>     )
>     expect_status(created_res, create_url, 201)
>     ambient_session_id = created_res.json()["ambient_session_id"]
>     print("form filling ambient_session_id:", ambient_session_id)
>
>     context_url = f"{BASE_URL}/api/v1/form-filling/session/{ambient_session_id}/context"
>     context_res = requests.post(
>         context_url,
>         headers=rest_headers(suki_token),
>         json={
>             "form_filling": {
>                 "values": [{"form_template_id": FORM_TEMPLATE_ID}],
>             }
>         },
>         timeout=60,
>     )
>     expect_status(context_res, context_url, 200)
>
>     transcript_url = f"{BASE_URL}/api/v1/ambient/session/{ambient_session_id}/transcript-input"
>     transcript_res = requests.post(
>         transcript_url,
>         headers=rest_headers(suki_token),
>         json={"raw_text": RAW_TEXT},
>         timeout=60,
>     )
>     expect_status(transcript_res, transcript_url, 200)
>     print("Transcript submitted. Do not call end session.")
>
>     while True:
>         status_url = f"{BASE_URL}/api/v1/form-filling/session/{ambient_session_id}/status"
>         status_res = requests.get(status_url, headers=rest_headers(suki_token), timeout=60)
>         expect_status(status_res, status_url, 200)
>         status = status_res.json()["status"]
>         print("status:", status)
>         if status == "completed":
>             data_url = f"{BASE_URL}/api/v1/form-filling/session/{ambient_session_id}/structured-data"
>             data_res = requests.get(data_url, headers=rest_headers(suki_token), timeout=60)
>             expect_status(data_res, data_url, 200)
>             print(json.dumps(data_res.json(), indent=2))
>             break
>         if status in ("failed", "skipped", "aborted"):
>             raise RuntimeError(f"Terminal status: {status}")
>         time.sleep(2)
> ```

## Troubleshooting

Transcript submit usually fails when the session was not created as `transcript`, when form context is missing, or when you submit twice.

> [accordion] ING\_SDK\_004 Invalid Payload
>
> Provide `raw_text` or a well-formed `segments` array. Each segment must include `text`. If you include word timings, each word's `end_time` must be greater than or equal to its `start_time`, and timings must not overlap across segments.

> [accordion] ING\_SDK\_005 When Submitting the Transcript
>
> The session was not created with `input_type` `transcript`. Create a new Form filling session with that value, then submit again.

> [accordion] ING\_SDK\_006 Transcript Already Submitted
>
> You can submit the transcript only once per session. Create a new session if you need to send different text.

> [accordion] No Structured Form Output
>
> Seed at least one `form_template_id` or partner `schema` in `form_filling.values` before the submit succeeds. Empty context does not produce filled forms.

> [accordion] Recording Returns 404
>
> Expected for `transcript` sessions. There is no source audio. Retrieve structured data instead of the recording.

These cases come from the transcript contract and Form filling context rules on this page.

| Problem | What to do |
| :- | :- |
| `ING_SDK_004` | Provide `raw_text` or well-formed `segments`. |
| `ING_SDK_005` | Create with `input_type` `transcript` before submit. |
| `ING_SDK_006` | Submit once per session. Create a new session for different text. |
| Empty structured data | Seed `form_filling.values` before submit. |
| Recording 404 | Expected. Retrieve structured data instead. |
| End session after submit | Do not call end. Processing starts on successful submit. |

## Available cookbooks

Form Filling
API

### [Submit Form Filling Finished Transcript](https://developer.suki.ai/documentation/cookbooks/submit-finished-transcript-form-filling.md)

Create with transcript, seed a template, submit raw\_text once, and skip end session.

10 min

Form Filling
API

### [Seed Form Filling with a Suki Template](https://developer.suki.ai/documentation/cookbooks/seed-form-filling-template-context.md)

Bind a Medical form template before processing starts.

5 min

## Next steps

&#x20;**[Submit transcript input](https://developer.suki.ai/api-reference/ambient-sessions/transcript-input.md)** - Shared request fields and error ids.

&#x20;**[Upload pre-recorded audio](https://developer.suki.ai/documentation/how-to/form-filling/upload-prerecorded-audio.md)** - Use when you have a WAV recording instead of text.

&#x20;**[Form filling basic usage](https://developer.suki.ai/documentation/how-to/form-filling/form-filling-basic-usage.md)** - Create, context, stream, and retrieve for the live path.

&#x20;**[Session input types](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/session-input-types.md)** - Compare live stream, audio file, and transcript.


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