> ## Documentation Index
> Fetch the complete documentation index at: https://wiz-myvocal.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Finish a real-time session

> Flush the tail, settle once and complete the task.

<sub>**Speech to Text · Real-time** · Workflow: [Real-time quickstart](/guides/stt-realtime-quickstart) · [Real-time SDKs](/sdks/stt-realtime/overview)</sub>

Finishes a session: the server stops accepting new audio, flushes the trailing segment, waits for the
final result, settles the charge once and completes the task. A repeated finish returns the same task
and never charges twice.

The response arrives when the result is closed; you do not have to guess a waiting time. After the
last final line, finish also waits, line by line, for the supplements you requested (alignment
unless `includeAlignment` is `false`, `entityCategories`, `rewriteInstruction`, and the detected
language when `includeDetectedLanguage` is `true`) and returns as soon as none is outstanding, at
most about **8 seconds**, and never past the session's recovery window.
A requested supplement that has not arrived by then is reported, not waited for indefinitely: the
session gets a `SUPPLEMENT_NOT_RECEIVED` notice listing `supplements` and the affected `lineIds`
(lines missing the same kinds share a notice), and an edit that never arrived makes the task's
`revisionStatus` `FAILED` with `revisionErrorCode` `REVISION_NOT_RECEIVED`. An entities result with
no entities counts as arrived; on the socket it is a `transcript.entities` event with an empty list.
The audio outcome and the charge do not depend on supplements.

### Path

<ParamField path="sessionId" type="string" required>
  The session to finish.
</ParamField>

### Header

<ParamField header="accessKey" type="string" required>
  Your API key. See [Authentication](/api-reference/authentication).
</ParamField>

### Body

<ParamField body="capturedSamples" type="string | number">
  The client's confirmed capture length in samples. The decimal string form is the contract form; a
  JSON number is accepted for convenience. It marks a transport gap when it exceeds what the server
  received and never changes the charge.
</ParamField>

### Response

The same session view as [Get a real-time session](/api-reference/stt/getSession), with the terminal
`status` and the final `usage`. The task is now in the shared History.

<Note>
  A plain disconnect is not a successful finish. Use this endpoint (or the `session.finish` event) so
  the tail is committed and the task completes.
</Note>


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