Skip to main content
POST
Finish a real-time session
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

string
required
The session to finish.
string
required
API key for authentication.

Body

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.

Response

The same session view as Get a real-time session, with the terminal status and the final usage. The task is now in the shared History.
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.