> ## Documentation Index
> Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference

> Technical reference for the Braintrust API, CLI, and SQL syntax

## API

The Braintrust API provides programmatic access to all platform features through a REST interface:

<CardGroup cols={2}>
  <Card title="API overview" icon="cloud" href="/api-reference">
    Authentication, resources, and common tasks
  </Card>

  <Card title="API resources" icon="book-open" href="/api-reference/projects/list-projects">
    Complete endpoint reference with examples
  </Card>
</CardGroup>

## CLI

<CardGroup cols={2}>
  <Card title="CLI quickstart" icon="terminal" href="/reference/cli/quickstart">
    Install the bt CLI and run your first eval
  </Card>

  <Card title="CLI commands" icon="square-terminal" href="/reference/cli/overview">
    Complete command reference with flags and environment variables
  </Card>
</CardGroup>

## SQL

<CardGroup cols={2}>
  <Card title="Overview" icon="database" href="/reference/sql">
    Query logs, experiments, and datasets with SQL from the sandbox, CLI, or API
  </Card>

  <Card title="Query structure" icon="list-tree" href="/reference/sql/query-structure">
    Clauses, data sources, data shapes, aggregations, and field access
  </Card>

  <Card title="Functions and operators" icon="square-function" href="/reference/sql/functions">
    The function and operator catalog with definitions and examples
  </Card>

  <Card title="Examples" icon="clipboard-list" href="/reference/sql/examples">
    Copy-and-run queries for tokens, cost, quality, errors, and more
  </Card>

  <Card title="Best practices" icon="gauge" href="/reference/sql/best-practices">
    Write SQL queries that return correct results and run fast
  </Card>
</CardGroup>
