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.

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.