Frontend Tokens.mdx

Frontend Tokens

Frontend tokens are used to authenticate requests to the API from the frontend.

How to create a frontend token

You can create a frontend token by calling the createToken method.

const token = await edgenai.createToken({options});

Options

  • model: The model to use for the token.
  • language: The language to use for the token.
  • voice: The voice to use for the token.
  • voice_id: The voice ID to use for the token.
  • end_time: The end time to use for the token, defaults to 10 minutes.