End a speech session
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.
X-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_....
session_id*stringThe speech session's id, as POST /v1/speech_sessions returned it.
uuidThe session is ended or its end is requested (or it already was ended).
application/json- response
sessionId*stringuuidstatus*stringactive when a connection is open: the end is requested (endRequestedAt) and settles at its next usage report.
"active""completed""failed"alreadyEnded*booleanTrue when the session was settled before this call.
endRequestedAt?stringWhen the end was first requested, while a connection is open; null once settled at this call or before.
date-timeendedAt?stringdate-timeendReason?stringcurl -X POST 'https://api.atmanity.us/v1/speech_sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/end'{ "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459", "status": "active", "alreadyEnded": true, "endRequestedAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "endReason": "string"}
