Get a speech session
Reads a speech session's state and, once it ended, why and what it cost.
statusisactivewhile the session is reserved or connected, thencompletedorfailed.connectedAtis when billing started,endsAtwhen the session's time runs out, andendRequestedAtwhen you ended it with a connection open.- Once it ended,
endReasonsays why, andbilledSecondsandchargedMicrocreditswhat it cost (100 microcredits = 1 credit).
X-Api-Key<token>Your secret API key (sk_atmee_...; older keys start sk_live_),
sent as X-Api-Key. Keep it on your server and never send it to a
browser.
session_id*stringThe speech session's id, as POST /v1/speech_sessions returned it.
uuidThe session's durable state.
application/json- response
sessionId*stringuuidstatus*string"pending""active""completed""failed"avatarId?stringuuidlanguage?stringactualDurationSeconds*integerThe length granted.
createdAt?stringdate-timeconnectedAt?stringWhen billing started (the speech server's first usage report); null until then.
date-timeendsAt*stringWhen the session's time runs out (the reservation plus actualDurationSeconds).
date-timeendRequestedAt?stringWhen you ended the session while a connection was open; it settles at the connection's next usage report (within 30 s).
date-timeendedAt?stringdate-timeendReason?stringWhy it ended (user_left, max_duration, balance_exhausted, ended_by_api, error, ...; see AvatarSessionStatusResponse.endReason); null while it is live.
failureCode?stringbillingMode?stringDeprecatedDeprecated; always metered for a billed session (see EmbedSessionStartResponse.billingMode).
"reserve""metered"billedSeconds?integerchargedMicrocredits?integercurl -X GET 'https://api.atmanity.us/v1/speech_sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08'{ "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459", "status": "pending", "avatarId": "ac572b6e-802b-4b9e-a602-0786d4441e67", "language": "string", "actualDurationSeconds": 0, "createdAt": "2019-08-24T14:15:22Z", "connectedAt": "2019-08-24T14:15:22Z", "endsAt": "2019-08-24T14:15:22Z", "endRequestedAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "endReason": "string", "failureCode": "string", "billingMode": "reserve", "billedSeconds": 0, "chargedMicrocredits": 0}
