Braintrust
Braintrust is an enterprise-grade AI observability and evaluation platform for teams building LLM applications. It provides experiment tracking, dataset management, production tracing, prompt versioning, online and offline scoring, and human review workflows. Customers include AI-native startups and large enterprises that need to compare models, iterate on prompts, catch regressions, and leverage real user data to continuously improve their AI features. Braintrust offers a SaaS platform, plus self-hosted deployments in AWS, GCP, and Azure, and monetizes through usage-based pricing tied to spans and seats.
APIs
Braintrust API
The Braintrust REST API provides programmatic access to projects, experiments, datasets, prompts, functions, logs, and organization resources. It supports both US (api.braintrus...
Collections
Braintrust API
OPENPricing Plans
Rate Limits
FinOps
Braintrust Finops
FINOPSResources
Sources
opencollection: 1.0.0
info:
name: Braintrust API
version: 1.0.0
request:
auth:
type: bearer
token: '{{bearerToken}}'
items:
- info:
name: Projects
type: folder
items:
- info:
name: List projects
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/project
params:
- name: limit
value: ''
type: query
description: Limit the number of objects to return
- name: starting_after
value: ''
type: query
description: 'Pagination cursor id.
For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch
the next page. Note: you may only pass one of `starting_after` and `ending_before`'
- name: ending_before
value: ''
type: query
description: 'Pagination cursor id.
For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch
the previous page. Note: you may only pass one of `starting_after` and `ending_before`'
- name: ids
value: ''
type: query
description: Filter search results to a particular set of object IDs. To specify a list of IDs, include the query
param multiple times
- name: project_name
value: ''
type: query
description: Name of the project to search for
- name: org_name
value: ''
type: query
description: Filter search results to within a particular organization
auth:
type: bearer
token: '{{bearerToken}}'
docs: List out all projects. The projects are sorted by creation date, with the most recently-created projects coming
first
- info:
name: Create project
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/project
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Create a new project. If there is an existing project with the same name as the one specified in the request, will
return the existing project unmodified
- info:
name: Get project
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/project/:project_id
params:
- name: project_id
value: ''
type: path
description: Project id
auth:
type: bearer
token: '{{bearerToken}}'
docs: Get a project object by its id
- info:
name: Partially update project
type: http
http:
method: PATCH
url: https://api.braintrust.dev/v1/project/:project_id
params:
- name: project_id
value: ''
type: path
description: Project id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Partially update a project object. Specify the fields to update in the payload. Any object-type fields will be deep-merged
with existing content. Currently we do not support removing fields or setting them to null.
- info:
name: Delete project
type: http
http:
method: DELETE
url: https://api.braintrust.dev/v1/project/:project_id
params:
- name: project_id
value: ''
type: path
description: Project id
auth:
type: bearer
token: '{{bearerToken}}'
docs: Delete a project object by its id
- info:
name: CORS
type: folder
items:
- info:
name: Enable CORS (`/v1/project`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project/{project_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project/:project_id
params:
- name: project_id
value: ''
type: path
description: Project id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_logs/{project_id}/insert`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_logs/:project_id/insert
params:
- name: project_id
value: ''
type: path
description: Project id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_logs/{project_id}/fetch`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_logs/:project_id/fetch
params:
- name: project_id
value: ''
type: path
description: Project id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_logs/{project_id}/feedback`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_logs/:project_id/feedback
params:
- name: project_id
value: ''
type: path
description: Project id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment/{experiment_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment/:experiment_id
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment/{experiment_id}/insert`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment/:experiment_id/insert
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment/{experiment_id}/fetch`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment/:experiment_id/fetch
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment/{experiment_id}/feedback`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment/:experiment_id/feedback
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/experiment/{experiment_id}/summarize`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/experiment/:experiment_id/summarize
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset/{dataset_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset/:dataset_id
params:
- name: dataset_id
value: ''
type: path
description: Dataset id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset/{dataset_id}/insert`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset/:dataset_id/insert
params:
- name: dataset_id
value: ''
type: path
description: Dataset id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset/{dataset_id}/fetch`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset/:dataset_id/fetch
params:
- name: dataset_id
value: ''
type: path
description: Dataset id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset/{dataset_id}/feedback`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset/:dataset_id/feedback
params:
- name: dataset_id
value: ''
type: path
description: Dataset id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset/{dataset_id}/summarize`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset/:dataset_id/summarize
params:
- name: dataset_id
value: ''
type: path
description: Dataset id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/prompt`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/prompt
docs: Enable CORS
- info:
name: Enable CORS (`/v1/prompt/{prompt_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/prompt/:prompt_id
params:
- name: prompt_id
value: ''
type: path
description: Prompt id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/role`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/role
docs: Enable CORS
- info:
name: Enable CORS (`/v1/role/{role_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/role/:role_id
params:
- name: role_id
value: ''
type: path
description: Role id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/group`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/group
docs: Enable CORS
- info:
name: Enable CORS (`/v1/group/{group_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/group/:group_id
params:
- name: group_id
value: ''
type: path
description: Group id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/acl`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/acl
docs: Enable CORS
- info:
name: Enable CORS (`/v1/acl/{acl_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/acl/:acl_id
params:
- name: acl_id
value: ''
type: path
description: Acl id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/acl/list_org`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/acl/list_org
docs: Enable CORS
- info:
name: Enable CORS (`/v1/acl/acl/batch_update`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/acl/acl/batch_update
docs: Enable CORS
- info:
name: Enable CORS (`/v1/user`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/user
docs: Enable CORS
- info:
name: Enable CORS (`/v1/user/{user_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/user/:user_id
params:
- name: user_id
value: ''
type: path
description: User id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_automation`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_automation
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_automation/{project_automation_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_automation/:project_automation_id
params:
- name: project_automation_id
value: ''
type: path
description: ProjectAutomation id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_score`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_score
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_score/{project_score_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_score/:project_score_id
params:
- name: project_score_id
value: ''
type: path
description: ProjectScore id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_tag`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_tag
docs: Enable CORS
- info:
name: Enable CORS (`/v1/project_tag/{project_tag_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/project_tag/:project_tag_id
params:
- name: project_tag_id
value: ''
type: path
description: ProjectTag id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/span_iframe`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/span_iframe
docs: Enable CORS
- info:
name: Enable CORS (`/v1/span_iframe/{span_iframe_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/span_iframe/:span_iframe_id
params:
- name: span_iframe_id
value: ''
type: path
description: SpanIframe id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/function`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/function
docs: Enable CORS
- info:
name: Enable CORS (`/v1/function/{function_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/function/:function_id
params:
- name: function_id
value: ''
type: path
description: Function id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/function/{function_id}/invoke`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/function/:function_id/invoke
params:
- name: function_id
value: ''
type: path
description: Function id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/view`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/view
docs: Enable CORS
- info:
name: Enable CORS (`/v1/view/{view_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/view/:view_id
params:
- name: view_id
value: ''
type: path
description: View id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/organization`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/organization
docs: Enable CORS
- info:
name: Enable CORS (`/v1/organization/{organization_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/organization/:organization_id
params:
- name: organization_id
value: ''
type: path
description: Organization id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/organization/members`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/organization/members
docs: Enable CORS
- info:
name: Enable CORS (`/v1/api_key`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/api_key
docs: Enable CORS
- info:
name: Enable CORS (`/v1/api_key/{api_key_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/api_key/:api_key_id
params:
- name: api_key_id
value: ''
type: path
description: ApiKey id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/service_token`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/service_token
docs: Enable CORS
- info:
name: Enable CORS (`/v1/service_token/{service_token_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/service_token/:service_token_id
params:
- name: service_token_id
value: ''
type: path
description: ServiceToken id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/ai_secret`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/ai_secret
docs: Enable CORS
- info:
name: Enable CORS (`/v1/ai_secret/{ai_secret_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/ai_secret/:ai_secret_id
params:
- name: ai_secret_id
value: ''
type: path
description: AiSecret id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/env_var`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/env_var
docs: Enable CORS
- info:
name: Enable CORS (`/v1/env_var/{env_var_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/env_var/:env_var_id
params:
- name: env_var_id
value: ''
type: path
description: EnvVar id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/mcp_server`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/mcp_server
docs: Enable CORS
- info:
name: Enable CORS (`/v1/mcp_server/{mcp_server_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/mcp_server/:mcp_server_id
params:
- name: mcp_server_id
value: ''
type: path
description: McpServer id
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset_snapshot`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset_snapshot
docs: Enable CORS
- info:
name: Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/dataset_snapshot/:dataset_snapshot_id
params:
- name: dataset_snapshot_id
value: ''
type: path
description: DatasetSnapshot id
docs: Enable CORS
- info:
name: Enable CORS (`/v1`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1
docs: Enable CORS
- info:
name: Enable CORS (`/v1/insert`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/insert
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/chat/completions`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/chat/completions
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/completions`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/completions
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/auto`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/auto
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/embeddings`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/embeddings
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/credentials`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/credentials
docs: Enable CORS
- info:
name: Enable CORS (`/v1/proxy/{path+}`)
type: http
http:
method: OPTIONS
url: https://api.braintrust.dev/v1/proxy/:path+
params:
- name: path+
value: ''
type: path
description: The path to proxy
docs: Enable CORS
- info:
name: Logs
type: folder
items:
- info:
name: Insert project logs events
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/project_logs/:project_id/insert
params:
- name: project_id
value: ''
type: path
description: Project id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Insert a set of events into the project logs
- info:
name: Fetch project logs (GET form)
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/project_logs/:project_id/fetch
params:
- name: project_id
value: ''
type: path
description: Project id
- name: limit
value: ''
type: query
description: 'limit the number of traces fetched
Fetch queries may be paginated if the total result size is expected to be large (e.g. project_logs which accumulate
over a long time). Note that fetch queries only support pagination in descending time order (from latest to earliest
`_xact_id`. Furthermore, later pages may return rows which showed up in earlier pages, except with an earlier `_xact_id`.
This happens because pagination occurs over the whole version history of the event log. You will most likely want
to exclude any such duplicate, outdated rows (by `id`) from your combined result set.
The `limit` parameter controls the number of full traces to return. So you may end up with more individual rows
than the specified limit if you are fetching events containing traces.'
- name: max_xact_id
value: ''
type: query
description: 'DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit
''cursor'' returned by object fetch requests. Please prefer the ''cursor'' argument going forwards.
Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can
be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation
of `limit` for an overview of paginating fetch queries.'
- name: max_root_span_id
value: ''
type: query
description: 'DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit
''cursor'' returned by object fetch requests. Please prefer the ''cursor'' argument going forwards.
Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can
be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation
of `limit` for an overview of paginating fetch queries.'
- name: version
value: ''
type: query
description: 'Retrieve a snapshot of events from a past time
The version id is essentially a filter on the latest event transaction id. You can use the `max_xact_id` returned
by a past fetch as the version to reproduce that exact fetch.'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Fetch the events in a project logs. Equivalent to the POST form of the same path, but with the parameters in the
URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.
- info:
name: Fetch project logs (POST form)
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/project_logs/:project_id/fetch
params:
- name: project_id
value: ''
type: path
description: Project id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Fetch the events in a project logs. Equivalent to the GET form of the same path, but with the parameters in the
request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.
- info:
name: Feedback for project logs events
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/project_logs/:project_id/feedback
params:
- name: project_id
value: ''
type: path
description: Project id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Log feedback for a set of project logs events
- info:
name: Experiments
type: folder
items:
- info:
name: List experiments
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/experiment
params:
- name: limit
value: ''
type: query
description: Limit the number of objects to return
- name: starting_after
value: ''
type: query
description: 'Pagination cursor id.
For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch
the next page. Note: you may only pass one of `starting_after` and `ending_before`'
- name: ending_before
value: ''
type: query
description: 'Pagination cursor id.
For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch
the previous page. Note: you may only pass one of `starting_after` and `ending_before`'
- name: ids
value: ''
type: query
description: Filter search results to a particular set of object IDs. To specify a list of IDs, include the query
param multiple times
- name: experiment_name
value: ''
type: query
description: Name of the experiment to search for
- name: project_name
value: ''
type: query
description: Name of the project to search for
- name: project_id
value: ''
type: query
description: Project id
- name: org_name
value: ''
type: query
description: Filter search results to within a particular organization
auth:
type: bearer
token: '{{bearerToken}}'
docs: List out all experiments. The experiments are sorted by creation date, with the most recently-created experiments
coming first
- info:
name: Create experiment
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/experiment
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Create a new experiment. If there is an existing experiment in the project with the same name as the one specified
in the request, will return the existing experiment unmodified
- info:
name: Get experiment
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/experiment/:experiment_id
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
auth:
type: bearer
token: '{{bearerToken}}'
docs: Get an experiment object by its id
- info:
name: Partially update experiment
type: http
http:
method: PATCH
url: https://api.braintrust.dev/v1/experiment/:experiment_id
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Partially update an experiment object. Specify the fields to update in the payload. Any object-type fields will
be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
- info:
name: Delete experiment
type: http
http:
method: DELETE
url: https://api.braintrust.dev/v1/experiment/:experiment_id
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
auth:
type: bearer
token: '{{bearerToken}}'
docs: Delete an experiment object by its id
- info:
name: Insert experiment events
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/experiment/:experiment_id/insert
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Insert a set of events into the experiment
- info:
name: Fetch experiment (GET form)
type: http
http:
method: GET
url: https://api.braintrust.dev/v1/experiment/:experiment_id/fetch
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
- name: limit
value: ''
type: query
description: 'limit the number of traces fetched
Fetch queries may be paginated if the total result size is expected to be large (e.g. project_logs which accumulate
over a long time). Note that fetch queries only support pagination in descending time order (from latest to earliest
`_xact_id`. Furthermore, later pages may return rows which showed up in earlier pages, except with an earlier `_xact_id`.
This happens because pagination occurs over the whole version history of the event log. You will most likely want
to exclude any such duplicate, outdated rows (by `id`) from your combined result set.
The `limit` parameter controls the number of full traces to return. So you may end up with more individual rows
than the specified limit if you are fetching events containing traces.'
- name: max_xact_id
value: ''
type: query
description: 'DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit
''cursor'' returned by object fetch requests. Please prefer the ''cursor'' argument going forwards.
Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can
be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation
of `limit` for an overview of paginating fetch queries.'
- name: max_root_span_id
value: ''
type: query
description: 'DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit
''cursor'' returned by object fetch requests. Please prefer the ''cursor'' argument going forwards.
Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can
be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation
of `limit` for an overview of paginating fetch queries.'
- name: version
value: ''
type: query
description: 'Retrieve a snapshot of events from a past time
The version id is essentially a filter on the latest event transaction id. You can use the `max_xact_id` returned
by a past fetch as the version to reproduce that exact fetch.'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Fetch the events in an experiment. Equivalent to the POST form of the same path, but with the parameters in the
URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.
- info:
name: Fetch experiment (POST form)
type: http
http:
method: POST
url: https://api.braintrust.dev/v1/experiment/:experiment_id/fetch
params:
- name: experiment_id
value: ''
type: path
description: Experiment id
body:
type: json
data: '{}'
auth:
type: bearer
token: '{{bearerToken}}'
docs: Fetch the events in an experiment. Equivalent to the GET form of the same path, but with the parameters in the request
body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.
- info:
name: Feedback for experiment e
# --- truncated at 32 KB (120 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/braintrust/refs/heads/main/apis.yml