Reference/API/Proxy
POST
/v1/proxy/chat/completions

Proxy chat/completions

Proxy a chat/completions request to the specified model, converting its format as needed. Will cache if temperature=0 or seed is set.

/v1/proxy/chat/completions

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

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.

In: header


Request Body

See the openai docs for details

body
Required
null

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
curl -X POST "https://api.braintrust.dev/v1/proxy/chat/completions" \
  -d 'null'

null

POST
/v1/proxy/completions

Proxy completions

Proxy a completions request to the specified model, converting its format as needed. Will cache if temperature=0 or seed is set.

/v1/proxy/completions

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

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.

In: header


Request Body

See the openai docs for details

body
Required
null

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
curl -X POST "https://api.braintrust.dev/v1/proxy/completions" \
  -d 'null'

null

POST
/v1/proxy/auto

Proxy a model to chat/completions or completions automatically

Proxy a request to either chat/completions or completions automatically based on the model. Will cache if temperature=0 or seed is set.

/v1/proxy/auto

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

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.

In: header


Request Body

The chat/completions or completions payload (depending on the model)

body
Required
null

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
curl -X POST "https://api.braintrust.dev/v1/proxy/auto" \
  -d 'null'

null

POST
/v1/proxy/embeddings

Proxy embeddings

Proxy an embeddings request to the specified model, converting its format as needed. Will cache automatically.

/v1/proxy/embeddings

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

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.

In: header


Request Body

See the openai docs for details

body
Required
null

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
curl -X POST "https://api.braintrust.dev/v1/proxy/embeddings" \
  -d 'null'

null

POST
/v1/proxy/{path+}

Proxy any OpenAI request (fallback)

Any requests which do not match the above paths will be proxied directly to the OpenAI API.

/v1/proxy/{path+}

The Authorization access token

Authorization

Authorization
Required
Bearer <token>

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.

In: header


Request Body

The request body

body
Required
null

Path Parameters

path+
Required
array<string>

The path to proxy

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
curl -X POST "https://api.braintrust.dev/v1/proxy/[%20%20%22string%22]" \
  -d 'null'

null