Soniox
Docs
API reference/REST API/Auth

Create temporary API key

Creates a short-lived API key for specific temporary use cases. The key will automatically expire after the specified duration.

POST
/v1/auth/temporary-api-key

Headers

AuthorizationRequiredBearer <SONIOX_API_KEY>

Request

application/jsonRequired
usage_typeRequiredstring

Intended usage of the temporary API key. Accepted values: "transcribe_websocket".

expires_in_secondsRequiredinteger

Duration in seconds until the temporary API key expires.

Minimum: 1Maximum: 3600
client_reference_idstring

Optional tracking identifier string. Max length: 256 characters. Does not need to be unique.

Response

201

Created temporary API key.

api_keyRequiredstring

Created temporary API key.

expires_atRequiredstring

UTC timestamp indicating when generated temporary API key will expire.

Format: "date-time"

Errors

Created temporary API key.

{
  "api_key": "temp:WYJ67RBEFUWQXXPKYPD2UGXKWB",
  "expires_at": "2025-02-22T22:47:37.150Z"
}