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

# Public API v1

> Authenticate with team API keys and manage projects, schemas, and sources through /public/v1 endpoints.

The public v1 API gives you team-scoped access to Synthbrew resources.

## Base URL

```text theme={null}
{SYNTHBREW_API_HOST}/api/public/v1
```

Local default:

```text theme={null}
http://localhost:3311/api/public/v1
```

## Authentication

Public v1 endpoints require a team API key in the `x-api-key` header.

```bash theme={null}
x-api-key: sb_api_...
```

You can issue these keys from **Settings > Team > Public API keys**.

## Scope model

* Keys are team-scoped.
* A key only accesses resources from its team.
* If `projectsScope` is set when issuing the key, the key can only access those project IDs.

## Endpoint groups

* `/projects` for project CRUD.
* `/projects/{projectId}/schemas` for schema CRUD.
* `/schema-config/validate` to validate schema configs before creating a schema.
* `/projects/{projectId}/schemas/{schemaId}/versions` for schema version inspection.
* `/projects/{projectId}/sources` for source CRUD.
* `/projects/{projectId}/sources/{sourceId}/api-keys` for source runtime API key metadata and one-time key creation.
* `/projects/{projectId}/sources/{sourceId}/runtime-docs` for machine-readable runtime API details.
* `/projects/{projectId}/sources/{sourceId}/regenerate` to trigger source regeneration.
* Generation observability:
  * `/projects/{projectId}/sources/{sourceId}/generation-jobs/{jobId}`
  * `/projects/{projectId}/sources/{sourceId}/generation-events`

## Quick start

```bash theme={null}
curl --request GET \
  --url http://localhost:3311/api/public/v1/projects \
  --header "x-api-key: sb_api_your_key_here"
```
