ReferenceAPI
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.

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)
/v1/proxy/chat/completions

curl -X POST "https://api.braintrust.dev/v1/proxy/chat/completions"

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.

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)
/v1/proxy/completions

curl -X POST "https://api.braintrust.dev/v1/proxy/completions"

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.

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)
/v1/proxy/auto

curl -X POST "https://api.braintrust.dev/v1/proxy/auto"

null

POST
/v1/proxy/embeddings

Proxy embeddings

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

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)
/v1/proxy/embeddings

curl -X POST "https://api.braintrust.dev/v1/proxy/embeddings"

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.

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

path+string

Status codeDescription
200Proxy response (supports both streaming and non-streaming formats)
/v1/proxy/{path+}

curl -X POST "https://api.braintrust.dev/v1/proxy/[%20%20%22string%22]"

null