AiSecrets

Create or replace AI secret

Changed on

Create or replace AI secret. If there is an existing AI secret with the same name as the one specified in the request, will replace the existing AI secret with the provided fields

put/v1/ai_secret

Request

  • Base URL
    https://api.braintrust.dev
  • Auth
    • HTTP bearer
    • or none

Request body

namestring required

Name of the AI secret

typestring nullable
metadataobject nullable
secretstring nullable

Secret value. If omitted in a PUT request, the existing secret value will be left intact, not replaced with null.

org_namestring nullable

For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the AI Secret belongs in.

Response

Returns the new AI secret object

idstring uuid required

Unique identifier for the AI secret

createdstring date-time nullable

Date of AI secret creation

updated_atstring date-time nullable

Date of last AI secret update

secret_updated_atstring date-time nullable

Date of last update to the encrypted secret value itself

org_idstring uuid required

Unique identifier for the organization

namestring required

Name of the AI secret

typestring nullable
metadataobject nullable
secret_updated_by_user_idstring uuid nullable

User id of the last update to the encrypted secret value

preview_secretstring nullable

Changes

    • breaking

      the request property became not nullable

    • breaking

      the request property / became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      the request property became not nullable

    • breaking

      request body became required