Skip to main content
POST
/
v1
/
proxy
/
credentials
Create temporary credential
curl --request POST \
  --url https://api.braintrust.dev/v1/proxy/credentials \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "ttl_seconds": 600,
  "logging": {
    "project_name": "<string>",
    "compress_audio": true
  }
}'
{
  "key": "<string>"
}

Authorizations

Authorization
string
header
required

Most Braintrust endpoints are authenticated by providing your API key as a header Authorization: Bearer [api_key] to your HTTP request. You can create an API key in the Braintrust organization settings page.

Body

application/json

The temporary credential will be restricted according to the request body.

Payload for requesting temporary credentials.

model
string | null

Granted model name. Null/undefined to grant usage of all models.

ttl_seconds
number
default:600

TTL of the temporary credential. 10 minutes by default.

Required range: x <= 86400
logging
object | null

If present, proxy will log requests to the given Braintrust project name.

Response

Successfully created temporary credential

key
string
required