v1/proxy/chat/completionsProxy 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
AuthorizationRequiredBearer <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/jsonRequiredSee the OpenAI docs for details.
bodyRequirednull
Proxy response (supports both streaming and non-streaming formats)
v1/proxy/completionsProxy completions
Proxy a completions request to the specified model, converting its format as needed. Will cache if temperature=0 or seed is set.
Authorization
AuthorizationRequiredBearer <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/jsonRequiredSee the OpenAI docs for details.
bodyRequirednull
Proxy response (supports both streaming and non-streaming formats)
v1/proxy/autoProxy 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
AuthorizationRequiredBearer <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/jsonRequiredThe chat/completions or completions payload (depending on the model)
bodyRequirednull
Proxy response (supports both streaming and non-streaming formats)
v1/proxy/embeddingsProxy embeddings
Proxy an embeddings request to the specified model, converting its format as needed. Will cache automatically.
Authorization
AuthorizationRequiredBearer <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/jsonRequiredSee the OpenAI docs for details.
bodyRequirednull
Proxy response (supports both streaming and non-streaming formats)
v1/proxy/credentialsCreate 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
AuthorizationRequiredBearer <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/jsonRequiredThe temporary credential will be restricted according to the request body.
modelstring | null
Granted model name. Null/undefined to grant usage of all models.
ttl_secondsnumber
TTL of the temporary credential. 10 minutes by default.
600Maximum: 86400loggingobject | 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
AuthorizationRequiredBearer <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/jsonRequiredThe request body
bodyRequirednull
Path Parameters
path+Requiredarray<string>
The path to proxy
Proxy response (supports both streaming and non-streaming formats)