Atmee.aiDocs
APIAPI referenceSpeech sessions

End a speech session

POST
/v1/speech_sessions/{session_id}/end

Ends the session (completed, endReason: ended_by_api). With no connection open it settles now. With a connection open, the session ends at its next usage report (within 30 s) and is billed until then: the answer is status: active with endRequestedAt set, and GET reads it completed once it settled. Idempotent: a repeat keeps the first request; ending a settled session answers alreadyEnded: true.

Authorization

headerX-Api-Key<token>

Secret embed API key (sk_atmee_...; keys minted before 2026-09 carry sk_live_...), held by the customer's own backend and never sent to a browser. Format: X-Api-Key: sk_atmee_....

Path Parameters

session_id*string

The speech session's id, as POST /v1/speech_sessions returned it.

Formatuuid

Response Body

The session is ended or its end is requested (or it already was ended).

application/json
  1. response
sessionId*string
Formatuuid
status*string

active when a connection is open: the end is requested (endRequestedAt) and settles at its next usage report.

Value in"active""completed""failed"
alreadyEnded*boolean

True when the session was settled before this call.

endRequestedAt?string

When the end was first requested, while a connection is open; null once settled at this call or before.

Formatdate-time
endedAt?string
Formatdate-time
endReason?string
Example Request
curl -X POST 'https://api.atmanity.us/v1/speech_sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/end'
Example Response
{  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459",  "status": "active",  "alreadyEnded": true,  "endRequestedAt": "2019-08-24T14:15:22Z",  "endedAt": "2019-08-24T14:15:22Z",  "endReason": "string"}
End a speech session — Atmee Docs