Secrets

Create a new encrypted secret for the authenticated user's space.

This endpoint:

  • Requires API key authentication
  • Encrypts the secret value using AWS KMS
  • Stores the encrypted value in the database
  • Returns metadata about the created secret (including id for future reference)

Args: service: Injected secrets service payload: Request containing secret_name and secret_value

Returns: Response with created secret metadata including id

Raises: 400 Bad Request: If user doesn't have an associated space 500 Internal Server Error: If encryption or storage fails

post/v1/secrets

Request

  • Base URL
    https://api.liveavatar.com
  • URL
    https://api.liveavatar.com/v1/secrets
  • Auth
    API key in header X-API-KEY

Request body

secret_namestring required

Name of the secret

secret_valuestring required

The secret value to encrypt and store

secret_type'OPENAI_API_KEY' | 'ELEVENLABS_API_KEY' | 'GEMINI_API_KEY' | 'FISH_API_KEY' | 'CARTESIA_API_KEY' required

The type of secret.

Response

Successful Response

codeinteger
messagestring

Changes

    • warning

      deleted the cookie request parameter la_session

    • info

      added the new CARTESIA_API_KEY enum value to the request property

    • info

      added the new FISH_API_KEY enum value to the request property