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
See the openai docs for details
body
Requirednull
Status code | Description |
---|---|
200 | Proxy response (supports both streaming and non-streaming formats) |
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
See the openai docs for details
body
Requirednull
Status code | Description |
---|---|
200 | Proxy response (supports both streaming and non-streaming formats) |
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
The chat/completions or completions payload (depending on the model)
body
Requirednull
Status code | Description |
---|---|
200 | Proxy response (supports both streaming and non-streaming formats) |
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
See the openai docs for details
body
Requirednull
Status code | Description |
---|---|
200 | Proxy response (supports both streaming and non-streaming formats) |
{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
The request body
body
Requirednull
Path Parameters
path+
Requiredarray<string>
The path to proxy
Status code | Description |
---|---|
200 | Proxy response (supports both streaming and non-streaming formats) |