Class BraintrustOpenApiClient

java.lang.Object
dev.braintrust.openapi.ApiClient
dev.braintrust.api.BraintrustOpenApiClient

public class BraintrustOpenApiClient extends dev.braintrust.openapi.ApiClient
Provides the necessary API calls for the Braintrust SDK. Users of the SDK should favor using Eval or BraintrustTracing
  • Method Details

    • of

      public static BraintrustOpenApiClient of(BraintrustConfig config)
    • login

      Calls POST /api/apikey/login to retrieve organization info for the current API key. This endpoint is not in the OpenAPI spec so it is implemented here as a custom method.
    • fetchProjectUri

      public URI fetchProjectUri()
      Look up or create the project from config, resolve the org name via login, and return the Braintrust app URI for the project.
    • fetchOrgInfo

      public BraintrustOpenApiClient.OrgInfo fetchOrgInfo(String orgId)
    • fetchOrCreateProject

      public dev.braintrust.openapi.model.Project fetchOrCreateProject(BraintrustConfig config)
    • fetchOrCreateProject

      public dev.braintrust.openapi.model.Project fetchOrCreateProject(@Nullable String projectId, @Nullable String projectName)
    • btqlQuery

      Calls POST /btql to run an arbitrary BTQL query. This endpoint is not in the OpenAPI spec so it is implemented here as a custom method.