> ## 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.

# Create Ambient Session

> Initialize a new Ambient session for patient encounter documentation

**Updates**

**Updated**

* The create **response** now returns **`note_id`**. Use it with note-level Ambient APIs and store it for later re-ambient workflows. `composition_id` is deprecated. It returns the same value as `note_id` and remains available for backward compatibility, so existing integrations that still read it continue to work.
* You can now request [E/M Coding](https://developer.suki.ai/documentation/concepts/em-coding/overview.md) on an ambient visit. Pass **`artifacts: ["EM_CODES"]`**, send patient and visit details in session context, then read the recommended codes after the session completes.

Use this endpoint to create an ambient session (A single, time-bound instance of an ambient recording for a specific patient encounter that captures clinical conversations.). An ambient session is one recording for a patient encounter (One patient visit or appointment with a healthcare provider. In Suki, an encounter can group one or more ambient sessions so related recordings and notes stay tied to the same clinical visit.) (visit). One encounter can include one or more ambient sessions.

This endpoint returns an `ambient_session_id` (Unique identifier for one ambient recording session in Ambient APIs. Create ambient session returns ambient\_session\_id (you can also pass one on create). Use it for session-scoped operations such as context, streaming, status, and session content. Distinct from encounter\_id and EMR Encounter ID.) and a `note_id` (Unique identifier for an interoperable ambient note. Create ambient session returns note\_id. Pass that value to note-level ambient endpoints such as note content, note context, and note structured data.).

Use **`ambient_session_id`** for session-scoped operations such as context, streaming, status, and session content.

Store **`note_id`** from the response. Pass it as the path parameter when you call the note-level Ambient APIs:

[Get Note Content](https://developer.suki.ai/api-reference/ambient-content/note-content.md)

[Get Note Context](https://developer.suki.ai/api-reference/ambient-content/note-context.md)

[Get Note Structured Data](https://developer.suki.ai/api-reference/ambient-content/note-structured-data.md)

> [!NOTE]
>
> **`composition_id` is deprecated.** It returns the same value as `note_id` and remains available for backward compatibility, so existing integrations that still read `composition_id` continue to work. Prefer `note_id` for new integrations.

To learn how to use ambient across modalities, refer to the [Ambient interoperability](https://developer.suki.ai/documentation/concepts/ambient-clinical-notes/ambient-interoperability.md) guide.

> [!TIP]
>
> For guidance on how to design your ambient workflow, ID handling, and fields required for interoperability, refer to [Create an ambient session](https://developer.suki.ai/documentation/how-to/ambient-clinical-notes/create-ambient-session.md) guide.

## Request body fields

All request body fields are **optional**. You can create with an empty body; Suki generates `ambient_session_id` and returns `note_id`.

Use the fields below only when you need to set the session ID yourself, link the visit for interoperability, group re-ambient sessions on one note, or generate E/M codes with the ambient session.

| Field | Type | Details |
| - | - | - |
| `ambient_session_id` | string (UUID or non-UUID, at most 36 characters) | Session ID (Ambient APIs) (Unique identifier for one ambient recording session in Ambient APIs. Create ambient session returns ambient\_session\_id (you can also pass one on create). Use it for session-scoped operations such as context, streaming, status, and session content. Distinct from encounter\_id and EMR Encounter ID.). Optional. If omitted, Suki generates it and returns it in the response. |
| `emr_encounter_id` | string (UUID or non-UUID, at most 36 characters) | EMR Encounter ID (The partner EMR or EHR visit identifier (emr\_encounter\_id) that anchors interoperable ambient notes across modalities. Required for cross-modality ambient workflows. Accepts a UUID or non-UUID value, at most 36 characters. Distinct from the Ambient API encounter\_id field.). Links the session to a patient visit for cross-modality ambient workflows. |
| `encounter_id` | string (at most 255 characters) | Encounter ID (Ambient API field used to group re-ambient sessions for one note. Pass it as encounter\_id on ambient session create (up to 255 characters). Distinct from EMR Encounter ID.). Groups sessions on the same clinical note for re-ambient. Pass on the first create and reuse later, or pass the returned `note_id` as this value if the first create omitted it. Not returned in the create response. There is no separate `note_id` request field. See [How re-ambient works](#how-re-ambient-works). |
| `artifacts` | array of strings | Optional. Extra outputs to generate with the note. Pass `["EM_CODES"]` to request [E/M Coding](https://developer.suki.ai/documentation/concepts/em-coding/overview.md) for this visit. Today `EM_CODES` is the only supported value. Send patient and visit details in session context, then read codes from structured data or [Session E/M codes](https://developer.suki.ai/api-reference/ambient-content/session-em-codes.md). |

## How re-ambient works

Re-ambient lets you create a new ambient session that **continues an existing clinical note** instead of creating a new note.

When you create an ambient session, Suki returns a **`note_id`** in the response. Save this `note_id` for note-level Ambient APIs and for re-ambient when the first create did not send `encounter_id`.

### Choose the identifier for re-ambient

Create ambient session does not have a separate `note_id` request field for re-ambient. Instead, pass the re-ambient identifier in the **`encounter_id`** field.

Use the identifier based on how you created the original ambient session:

| Create ambient session request | Value to pass in `encounter_id` |
| - | - |
| Included **`encounter_id`** | Use the same **`encounter_id`** value. |
| Did not include **`encounter_id`** | Use the **`note_id`** returned when the session was created. |

> [!TIP]
>
> * When you create the re-ambient request, use **`encounter_id`**, but the value depends on whether the original create ambient session request included an `encounter_id`.
> * Also save the returned **`note_id`**: it identifies the clinical note and is the path parameter for note-level Ambient APIs.

> [!NOTE]
>
> * Record for at least **1 minute**. Shorter recordings may not contain enough information, and Suki may **skip note generation**.
> * To continue the same note across modalities, reuse the existing **`emr_encounter_id`** on create (UUID or non-UUID, at most **36 characters**).
> * Wait at least **1 second** between create requests that share the same `emr_encounter_id`. Concurrent or back-to-back creates may return a conflict.

## Code examples

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

> [tab] Python
>
> ```python expandable theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> import json
> import requests
>
> BASE_URL = "https://sdp.suki.ai"
> CREATE_SESSION_URL = f"{BASE_URL}/api/v1/ambient/session/create"
>
> # Get sdp_suki_token from Login: POST /api/v1/auth/login
> sdp_suki_token = "<sdp_suki_token>"
>
> # Required for single_auth partners
> sdp_provider_id = "<sdp_provider_id>"
>
> # Set these from your system. Omit a field by leaving the value as None.
> # All request body fields are optional. Suki generates values you omit.
> # Create body fields on this endpoint: ambient_session_id, emr_encounter_id, encounter_id only.
> # Pass emr_encounter_id for cross-modality Ambient interoperability.
> ambient_session_id = None  # Optional UUID for this Ambient session
> emr_encounter_id = None  # EMR encounter id (UUID or non-UUID, at most 36 characters)
> encounter_id = None  # Optional; reuse later for re-ambient
>
> headers = {
>     "sdp_suki_token": sdp_suki_token,
>     "sdp_provider_id": sdp_provider_id,
>     "Content-Type": "application/json",
> }
>
> payload = {}
> if ambient_session_id:
>     payload["ambient_session_id"] = ambient_session_id
> if emr_encounter_id:
>     payload["emr_encounter_id"] = emr_encounter_id
> if encounter_id:
>     payload["encounter_id"] = encounter_id
>
> response = requests.post(
>     CREATE_SESSION_URL,
>     headers=headers,
>     json=payload,
>     timeout=60,
> )
>
> print("HTTP status:", response.status_code)
>
> try:
>     response_body = response.json()
> except ValueError:
>     print("Response was not JSON:")
>     print(response.text)
>     raise SystemExit(1)
>
> print("Response body:")
> print(json.dumps(response_body, indent=2))
>
> if response.status_code == 201:
>     created_ambient_session_id = response_body["ambient_session_id"]
>     note_id = response_body["note_id"]
>
>     print("ambient_session_id:", created_ambient_session_id)
>     print("note_id:", note_id)
>     print(
>         "Use ambient_session_id for session APIs "
>         "(context, stream, status, session content)."
>     )
>     print(
>         "Use note_id for note-level Ambient APIs "
>         "(note content, note context, note structured data)."
>     )
> else:
>     print("Create Ambient session failed.")
>     if isinstance(response_body, dict):
>         print("code:", response_body.get("code"))
>         print("message:", response_body.get("message"))
> ```

> [tab] TypeScript
>
> ```typescript expandable theme={"theme":{"light":"one-light","dark":"material-theme-darker"}}
> const BASE_URL = "https://sdp.suki.ai";
> const CREATE_SESSION_URL = `${BASE_URL}/api/v1/ambient/session/create`;
>
> // Get sdp_suki_token from Login: POST /api/v1/auth/login
> const sdpSukiToken = "<sdp_suki_token>";
>
> // Required for single_auth partners
> const sdpProviderId = "<sdp_provider_id>";
>
> // Set these from your system. Omit a field by leaving the value undefined.
> // All request body fields are optional. Suki generates values you omit.
> // Create body fields on this endpoint: ambient_session_id, emr_encounter_id, encounter_id only.
> // Pass emr_encounter_id for cross-modality Ambient interoperability.
> const ambientSessionId: string | undefined = undefined; // Optional UUID for this Ambient session
> const emrEncounterId: string | undefined = undefined; // EMR encounter id (UUID or non-UUID, at most 36 characters)
> const encounterId: string | undefined = undefined; // Optional; reuse later for re-ambient
>
> type CreateAmbientSessionRequest = {
>   ambient_session_id?: string;
>   emr_encounter_id?: string;
>   encounter_id?: string;
> };
>
> type CreateAmbientSessionResponse = {
>   ambient_session_id: string;
>   note_id: string;
> };
>
> type ApiErrorResponse = {
>   code?: number;
>   message?: string;
> };
>
> const payload: CreateAmbientSessionRequest = {};
> if (ambientSessionId) {
>   payload.ambient_session_id = ambientSessionId;
> }
> if (emrEncounterId) {
>   payload.emr_encounter_id = emrEncounterId;
> }
> if (encounterId) {
>   payload.encounter_id = encounterId;
> }
>
> const response = await fetch(CREATE_SESSION_URL, {
>   method: "POST",
>   headers: {
>     sdp_suki_token: sdpSukiToken,
>     sdp_provider_id: sdpProviderId,
>     "Content-Type": "application/json",
>   },
>   body: JSON.stringify(payload),
> });
>
> const responseText = await response.text();
> let responseBody: CreateAmbientSessionResponse | ApiErrorResponse | unknown;
>
> try {
>   responseBody = responseText ? JSON.parse(responseText) : {};
> } catch {
>   console.error("Response was not JSON:");
>   console.error(responseText);
>   throw new Error("Create Ambient session returned non-JSON response");
> }
>
> console.log("HTTP status:", response.status);
> console.log("Response body:", JSON.stringify(responseBody, null, 2));
>
> if (response.status === 201) {
>   const session = responseBody as CreateAmbientSessionResponse;
>   console.log("ambient_session_id:", session.ambient_session_id);
>   console.log("note_id:", session.note_id);
>   console.log(
>     "Use ambient_session_id for session APIs (context, stream, status, session content)."
>   );
>   console.log(
>     "Use note_id for note-level Ambient APIs (note content, note context, note structured data)."
>   );
> } else {
>   const error = responseBody as ApiErrorResponse;
>   console.error("Create Ambient session failed.");
>   console.error("code:", error.code);
>   console.error("message:", error.message);
> }
> ```


## OpenAPI

````yaml POST /api/v1/ambient/session/create
openapi: 3.0.1
info:
  title: Suki Developer Platform
  description: >-
    REST and WebSocket APIs for the Suki Developer Platform. Authenticate with
    Login or Register to obtain a Suki access token, then integrate ambient
    clinical documentation, form filling, transcription, content rewrite, and
    reference metadata endpoints.
  contact: {}
  version: '1.0'
servers:
  - url: https://sdp.suki.ai
    description: >-
      Production base URL for Suki Developer Platform REST APIs. WebSocket
      endpoints use the same host with `wss://`.
security:
  - SukiTokenAuth: []
paths:
  /api/v1/ambient/session/create:
    post:
      tags:
        - /api/v1/ambient/session
      summary: Creates an ambient session.
      description: >-
        Creates a new ambient session for patient encounter documentation.
        Returns an `ambient_session_id` to use in context, streaming, status,
        and content APIs. Both request body fields are optional; Suki generates
        any values you omit.
      parameters:
        - $ref: '#/components/parameters/ProviderIdHeader'
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/controllers.CreateSessionRequest'
            example:
              ambient_session_id: 123dfg-456dfg-789dfg-012dfg
              emr_encounter_id: 123dfg-456dfg-789dfg-012dfg
              encounter_id: 123dfg-456dfg-789dfg-012dfg
      responses:
        '201':
          description: Resource created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.CreateSessionResponse'
              example:
                ambient_session_id: 123dfg-456dfg-789dfg-012dfg
                note_id: 123dfg-456dfg-789dfg-012dfg
        '400':
          description: Bad request. The request body or parameters failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.BadRequestError'
        '401':
          description: Unauthorized. The Suki access token is missing, expired, or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.AuthenticationError'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.InternalServerError'
      security:
        - SukiTokenAuth: []
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl --request POST \
              --url https://sdp.suki.ai/api/v1/ambient/session/create \
              --header 'Content-Type: application/json' \
              --header 'sdp_suki_token: <sdp_suki_token>' \
              --header 'sdp_provider_id: <sdp_provider_id>' \
              --data '{
              "ambient_session_id": "123dfg-456dfg-789dfg-012dfg",
              "encounter_id": "123dfg-456dfg-789dfg-012dfg"
            }'
components:
  parameters:
    ProviderIdHeader:
      name: sdp_provider_id
      in: header
      description: >-
        **Optional** for standard partners.


        **Required** for:


        - **Bearer authentication.** Use the same `provider_id` returned by the
        Login or Register API.

        - **Single Auth Token authentication.** Include the same `provider_id`
        on every request as `sdp_provider_id`.
      required: false
      schema:
        type: string
        example: provider-123
  schemas:
    controllers.CreateSessionRequest:
      type: object
      description: >-
        Session identifiers for Ambient session create. Pass `emr_encounter_id`
        for cross-modality interoperability and `encounter_id` to group
        re-ambient sessions for one note. If the first create omitted
        `encounter_id`, pass the returned `note_id` as the `encounter_id` value
        on later creates.
      properties:
        ambient_session_id:
          type: string
          description: >-
            **Optional** - UUID for this Ambient session. Suki generates one
            when omitted and returns it in the response.
          example: 123dfg-456dfg-789dfg-012dfg
        emr_encounter_id:
          type: string
          maxLength: 36
          description: >-
            **Optional for standalone sessions** - Visit interop key for
            interoperability. Accepts a UUID or non-UUID value, at most 36
            characters. One EMR encounter can contain multiple notes. Required
            for cross-modality Ambient workflows.
          example: 123dfg-456dfg-789dfg-012dfg
        encounter_id:
          type: string
          description: >-
            **Optional** - Groups re-ambient sessions for one note. Pass it on
            the first session and reuse the same value on later creates. If the
            first create omitted it, pass the returned `note_id` as this field's
            value for re-ambient. There is no separate `note_id` request field.
            Up to 255 characters. Create does not return this field.
          example: 123dfg-456dfg-789dfg-012dfg
        multilingual:
          type: boolean
          description: >-
            **Deprecated.** Multilingual support is enabled by default for all
            Ambient sessions.
          example: false
          deprecated: true
        artifacts:
          type: array
          description: >-
            (Optional) Extra outputs to generate with the note. Pass `EM_CODES`
            to request E/M Coding for this ambient visit.
          items:
            type: string
            enum:
              - EM_CODES
          example:
            - EM_CODES
    controllers.CreateSessionResponse:
      type: object
      description: Identifiers returned after Ambient session create.
      properties:
        ambient_session_id:
          type: string
          description: >-
            UUID for the created Ambient session. Store this for later session
            API calls.
          example: 123dfg-456dfg-789dfg-012dfg
        note_id:
          type: string
          description: >-
            ID of the clinical note for this session. Use it as the `note_id`
            path parameter on note-level Ambient APIs (note content, note
            context, note structured data). If the first create omitted
            `encounter_id`, pass this value as the `encounter_id` field on later
            creates to re-ambient the same note.
          example: 123dfg-456dfg-789dfg-012dfg
        composition_id:
          type: string
          deprecated: true
          description: >-
            This field is deprecated. It returns the same value as `note_id` and
            remains available for backward compatibility, so existing
            integrations that still read `composition_id` continue to work.
            Prefer `note_id` for new integrations.
    controllers.BadRequestError:
      description: Bad Request Response
      type: object
      properties:
        code:
          type: integer
          example: 400
        message:
          type: string
          example: invalid request
    controllers.AuthenticationError:
      description: Authentication Failure Response
      type: object
      properties:
        code:
          type: integer
          example: 401
        message:
          type: string
          example: invalid token
    controllers.InternalServerError:
      description: Internal Server Error Response
      type: object
      properties:
        code:
          type: integer
          example: 500
        message:
          type: string
          example: internal server error
  securitySchemes:
    SukiTokenAuth:
      type: apiKey
      in: header
      name: sdp_suki_token
      description: >-
        Suki access token (`suki_token`) from Login or Register. Expires after
        one hour.

````

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