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
RequiredBearer <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
application/json
RequiredSee the OpenAI docs for details.
body
Requirednull
Proxy response (supports both streaming and non-streaming formats)
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
RequiredBearer <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
application/json
RequiredSee the OpenAI docs for details.
body
Requirednull
Proxy response (supports both streaming and non-streaming formats)
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
RequiredBearer <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
application/json
RequiredThe chat/completions or completions payload (depending on the model)
body
Requirednull
Proxy response (supports both streaming and non-streaming formats)
v1
/proxy
/embeddings
Proxy embeddings
Proxy an embeddings request to the specified model, converting its format as needed. Will cache automatically.
Authorization
Authorization
RequiredBearer <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
application/json
RequiredSee the OpenAI docs for details.
body
Requirednull
Proxy response (supports both streaming and non-streaming formats)
v1
/proxy
/credentials
Create temporary credential
Create a temporary credential which can access the proxy for a limited time. The temporary credential will be allowed to make requests on behalf of the Braintrust API key (or model provider API key) provided in the Authorization
header. See docs for code examples.
Authorization
Authorization
RequiredBearer <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
application/json
RequiredThe temporary credential will be restricted according to the request body.
model
string | null
Granted model name. Null/undefined to grant usage of all models.
ttl_seconds
number
TTL of the temporary credential. 10 minutes by default.
600
Maximum: 86400
logging
object | null
If present, proxy will log requests to the given Braintrust project name.
Successfully created temporary credential
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
RequiredBearer <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
application/json
RequiredThe request body
body
Requirednull
Path Parameters
path+
Requiredarray<string>
The path to proxy
Proxy response (supports both streaming and non-streaming formats)