Create temporary API key
Creates a short-lived API key for specific temporary use cases. The key will automatically expire after the specified duration. Use `single_use` and `max_session_duration_seconds` to limit how the key can be used by a client. See the [Temporary API keys guide](https://docs.soniox.com/guides/temporary-api-keys) for details.
Creates a short-lived API key for specific temporary use cases. The key will automatically expire after the specified duration.
Use single_use and max_session_duration_seconds to limit how the key can be used by a client. See the Temporary API keys guide for details.
Headers
AuthorizationRequiredBearer <SONIOX_API_KEY>Request
application/jsonRequiredusage_typeRequiredstringIntended usage of the temporary API key.
"transcribe_websocket" | "tts_rt"expires_in_secondsRequiredintegerDuration in seconds until the temporary API key expires.
1Maximum: 3600client_reference_idstringOptional tracking identifier string. Does not need to be unique.
256single_usebooleanIf true, the temporary API key can be used only once.
max_session_duration_secondsintegerMaximum connection duration in seconds for WebSocket and TTS HTTP streaming endpoints. If exceeded, the connection will be dropped. If not set, no limit is applied.
1Maximum: 18000Response
201
Created temporary API key.
api_keyRequiredstringCreated temporary API key.
expires_atRequiredstringUTC timestamp indicating when generated temporary API key will expire.
"date-time"Errors
Created temporary API key.
{
"api_key": "snx_temp_AcsDGHvigal7tHRzzzqJI7EdJ5CFwk9C0PtXN_s_cUKJ.Oo1TyosFa7b3rgAcXA2bayqBFO7667gXROEu0mH0U4vgvlNzCqVGgTzitabbXlK7FKH-sSy0F1NKI1OOJzQaAw.YPj4oA",
"expires_at": "2025-02-22T22:47:37.150Z"
}