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