Authentication

Users need to have an account with API access in Replica Studios to use the API.

We currently offer two authentication methods with different use cases in mind.

  • API Keys - ideal for quick and easy workflow integrations.

  • Bearer Tokens (JWT) - more complex but more secure and powerful.

API Key AuthenticationCopied!

This is a quick and easy way to get started with the API, or to use Replica in with 3rd party integrations.

Users can retrieve their API key from the General tab of their Account settings.

These keys can be used to generate text-to-speech, speech-to-speech, and retrieve this list of voices. These keys should be kept private, as they can be used to exhaust the credits in your account.

API Keys cannot be used to access sensitive account information, list history, etc.

API Key Enabled EndpointsCopied!

The following endpoints can be used with API Keys:

  • /userinfo/credits

  • /library/voices

  • /library/voices/{uuid}

  • /speech/{uuid}

  • /speech/download

  • /speech/tts

  • /speech/tts/submit

  • /speech/sts

  • /speech/sts/{uuid}/start

  • /speech/ptts

  • speech/psts

Bearer Token AuthenticationCopied!

Bearer Tokens can be vended from the API by first creating a Personal Token from our Account settings.

The client_id and secret of the Personal Token can be used in conjunction with the /auth API to generate an access_token and a refresh token. The access_token can be used to make API requests. It will expire after a time, but can be refreshed using the refresh_token and the /auth/refresh endpoint. The access_token is a JWT formatted token.

These tokens are necessary to perform certain sensitive actions and can access all endpoints, including all endpoints available to API Keys.