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

# OpenAPI

> Every function automatically generates an OpenAPI 3.1 spec accessible at /openapi.json.

## Automatic endpoint

Every deployed function exposes its OpenAPI spec at:

```
https://<slug>.fn.jelou.ai/openapi.json
```

This endpoint is **always public** — no `X-Jelou-Token` required.

## Public vs protected

| Config                     | `security` in spec       |
| -------------------------- | ------------------------ |
| Default (no `public`)      | `[{ "jelouToken": [] }]` |
| `config: { public: true }` | `[]` (no security)       |

## Local testing

```bash theme={null}
jelou functions dev
curl http://localhost:3000/openapi.json | jq .
```

<Tip>
  Zod `.describe()` annotations become `description` fields in the spec, improving your auto-generated API docs.
</Tip>
