Braintrust Proxy API

The Proxy API from Braintrust — 6 operation(s) for proxy.

GitHub OpenAPI

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1/proxy/chat/completions Proxy a chat completion to a model · Proxy chat/completions #
Ask an LLM
“How do I send a chat completion request through Braintrust and have it cached?”
“Can I proxy a chat request to a specific model and have it cached?”
Tell an agent
Proxy this chat completion request to the specified model.
Send a chat request through the proxy and cache it.
POST /v1/proxy/completions Proxy a text completion to a model · Proxy completions #
Ask an LLM
“Can I proxy a plain text completion request to a model and cache it?”
“What happens to a completions request I send through the proxy?”
Tell an agent
Proxy this completions request to the specified model.
Send a text completion request through the proxy and cache it.
POST /v1/proxy/auto Auto-proxy to chat or completions · Proxy a model to chat/completions or completions automatically #
Ask an LLM
“Can the proxy pick between chat and completions for me automatically?”
“How does the auto-proxy decide whether to route to chat/completions or completions?”
Tell an agent
Auto-proxy this request to chat/completions or completions.
Route a completion request through the proxy automatically.
POST /v1/proxy/embeddings Proxy an embeddings request · Proxy embeddings #
Ask an LLM
“How do I get embeddings for a prompt through the proxy?”
“Are embeddings requests cached automatically?”
Tell an agent
Proxy this embeddings request to the specified model.
Send an embeddings request through the proxy.
POST /v1/proxy/credentials Create a temporary credential for the proxy · Create temporary credential #
Ask an LLM
“Can I get a temporary credential to access the proxy for a limited time?”
“Can I restrict a temporary credential to one model and set how long it lasts?”
Tell an agent
Create a temporary credential that lasts {ttl_seconds} seconds.
Create a temporary credential for model {model} with logging set to {logging}.
POST /v1/proxy/{path+} Proxy any OpenAI request · Proxy any OpenAI request (fallback) #
Ask an LLM
“What happens to OpenAI requests that don't match the proxy paths?”
“Can I send an OpenAI request straight through the proxy as a fallback?”
Tell an agent
Proxy the OpenAI request at {path} through the proxy.
Send an unmatched OpenAI request to the proxy as a fallback.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/braintrust:braintrust-proxy-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

braintrust-proxy-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: Braintrust Proxy API
  description: 'API specification for the backend data server. The API is hosted globally at

    https://api.braintrust.dev or in your own environment.


    You can access the OpenAPI spec for this API at https://github.com/braintrustdata/braintrust-openapi.'
  license:
    name: Apache 2.0
servers:
- url: https://api.braintrust.dev
security:
- bearerAuth: []
- {}
tags:
- name: Proxy
paths:
  /v1/proxy/chat/completions:
    post:
      operationId: proxychatCompletions
      tags:
      - Proxy
      description: Proxy a chat/completions request to the specified model, converting its format as needed. Will cache if temperature=0 or seed is set.
      summary: Proxy chat/completions
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: See the [OpenAI docs](https://platform.openai.com/docs/api-reference/chat/create) for details.
        required: true
        content:
          application/json:
            schema:
              nullable: true
      responses:
        '200':
          description: Proxy response (supports both streaming and non-streaming formats)
          content:
            application/json:
              schema:
                nullable: true
  /v1/proxy/completions:
    post:
      operationId: proxycompletions
      tags:
      - Proxy
      description: Proxy a completions request to the specified model, converting its format as needed. Will cache if temperature=0 or seed is set.
      summary: Proxy completions
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: See the [OpenAI docs](https://platform.openai.com/docs/api-reference/completions/create) for details.
        required: true
        content:
          application/json:
            schema:
              nullable: true
      responses:
        '200':
          description: Proxy response (supports both streaming and non-streaming formats)
          content:
            application/json:
              schema:
                nullable: true
  /v1/proxy/auto:
    post:
      operationId: proxyauto
      tags:
      - Proxy
      description: Proxy a request to either chat/completions or completions automatically based on the model. Will cache if temperature=0 or seed is set.
      summary: Proxy a model to chat/completions or completions automatically
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: The chat/completions or completions payload (depending on the model)
        required: true
        content:
          application/json:
            schema:
              nullable: true
      responses:
        '200':
          description: Proxy response (supports both streaming and non-streaming formats)
          content:
            application/json:
              schema:
                nullable: true
  /v1/proxy/embeddings:
    post:
      operationId: proxyembeddings
      tags:
      - Proxy
      description: Proxy an embeddings request to the specified model, converting its format as needed. Will cache automatically.
      summary: Proxy embeddings
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: See the [OpenAI docs](https://platform.openai.com/docs/api-reference/embeddings/create) for details.
        required: true
        content:
          application/json:
            schema:
              nullable: true
      responses:
        '200':
          description: Proxy response (supports both streaming and non-streaming formats)
          content:
            application/json:
              schema:
                nullable: true
  /v1/proxy/credentials:
    post:
      operationId: proxycredentials
      tags:
      - Proxy
      description: 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.
      summary: Create temporary credential
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: The temporary credential will be restricted according to the request body.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  nullable: true
                  description: Granted model name. Null/undefined to grant usage of all models.
                ttl_seconds:
                  type: number
                  maximum: 86400
                  default: 600
                  description: TTL of the temporary credential. 10 minutes by default.
                logging:
                  type: object
                  nullable: true
                  properties:
                    project_name:
                      type: string
                    compress_audio:
                      type: boolean
                      default: true
                  required:
                  - project_name
                  description: If present, proxy will log requests to the given Braintrust project name.
              description: Payload for requesting temporary credentials.
      responses:
        '200':
          description: Successfully created temporary credential
          content:
            application/json:
              schema:
                type: object
                properties:
                  key:
                    type: string
                required:
                - key
        '400':
          description: The request was unacceptable, often due to missing a required parameter
          content:
            text/plain:
              schema:
                type: string
  /v1/proxy/{path+}:
    post:
      operationId: proxy{path+}
      tags:
      - Proxy
      description: Any requests which do not match the above paths will be proxied directly to the OpenAI API.
      summary: Proxy any OpenAI request (fallback)
      parameters:
      - name: path+
        in: path
        required: true
        schema:
          type: array
          items:
            type: string
        description: The path to proxy
      security:
      - bearerAuth: []
      - {}
      requestBody:
        description: The request body
        required: true
        content:
          application/json:
            schema:
              nullable: true
      responses:
        '200':
          description: Proxy response (supports both streaming and non-streaming formats)
          content:
            application/json:
              schema:
                nullable: true
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key or JWT
      description: '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](https://www.braintrustdata.com/app/settings?subroute=api-keys).'