v1
/api_key
List api_keys
List out all api_keys. The api_keys are sorted by creation date, with the most recently-created api_keys coming first
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
Query Parameters
limit
integer | null
Limit the number of objects to return
0
starting_after
string
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
"uuid"
ending_before
string
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
"uuid"
ids
Any properties in string, array<string>
Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
api_key_name
string
Name of the api_key to search for
org_name
string
Filter search results to within a particular organization
Returns a list of api_key objects
v1
/api_key
Create api_key
Create a new api_key. It is possible to have multiple API keys with the same name. There is no de-duplication
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
application/json
OptionalAny desired information about the new api_key object
name
Requiredstring
Name of the api key. Does not have to be unique
org_name
string | null
For nearly all users, this parameter should be unnecessary. But in the rare case that your API key belongs to multiple organizations, you may specify the name of the organization the API key belongs in.
Returns an object containing the raw API key. This is the only time the raw API key will be exposed
v1
/api_key
/{api_key_id}
Get api_key
Get an api_key object by its id
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
Path Parameters
api_key_id
Requiredstring
ApiKey id
"uuid"
Returns the api_key object
v1
/api_key
/{api_key_id}
Delete api_key
Delete an api_key object by its id
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
Path Parameters
api_key_id
Requiredstring
ApiKey id
"uuid"
Returns the deleted api_key object