Skip to main content
POST
/
v1
/
insert
Cross-object insert
curl --request POST \
  --url https://api.braintrust.dev/v1/insert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "experiment": {},
  "dataset": {},
  "project_logs": {}
}'
{
  "experiment": {},
  "dataset": {},
  "project_logs": {}
}

Authorizations

Authorization
string
header
required

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.

Body

application/json

A mapping from event object type -> object id -> events to insert

experiment
object | null

A mapping from experiment id to a set of log events and feedback items to insert

dataset
object | null

A mapping from dataset id to a set of log events and feedback items to insert

project_logs
object | null

A mapping from project id to a set of log events and feedback items to insert

Response

Returns the inserted row ids for the events on each individual object

experiment
object | null

A mapping from experiment id to row ids for inserted events

dataset
object | null

A mapping from dataset id to row ids for inserted events

project_logs
object | null

A mapping from project id to row ids for inserted events