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

# tai openapi

> Emit the OpenAPI 3.1 specification for the `/api/*` surface.

Emit the OpenAPI 3.1 specification for the `/api/*` surface.

Builds the spec offline from the app's registered routes — no database,
Redis, or live config services required. `--check` validates the spec
against the OpenAPI 3.1 schema (for CI / pre-deploy) and writes nothing.

```console theme={null}
$ tai openapi [OPTIONS]
```

| Option                 | Description                                                                                                        |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------ |
| `--out` `PATH`         | Write the spec to PATH instead of stdout.                                                                          |
| `--check`              | Validate the spec against the OpenAPI 3.1 schema and exit non-zero if invalid; write nothing. *(default: `False`)* |
| `--json` / `--no-json` | Emit raw JSON instead of human tables.                                                                             |
