> This page location: Functions > Templates > Authenticated API with Hono and Managed Better Auth
> Full Neon documentation index: https://neon.com/docs/llms.txt

# Authenticated API with Hono and Managed Better Auth

A protected Hono API that validates the caller's identity and gates access.

- First Party: maintained by Neon
- Built by: Neon
- Categories: First Party, Auth

## Install

```bash
neon functions new authenticated-api
```

With the Neon CLI 8.11.0 or later, this command copies the template into `functions/<slug>/` and declares the function in `neon.ts`.

## What it does

This template has a single handler and no named operations, so it's a starting point for your own code. To try it, run it locally with [`neon dev`](https://neon.com/docs/cli/dev.md) first, and deploy it to a branch with [`neon deploy`](https://neon.com/docs/compute/functions/deploy.md) once it works.

## Related

- Previous: [AI image generation API](https://neon.com/functions/templates/image-generation.md)
- Next: [TanStack AI on AI Gateway](https://neon.com/functions/templates/tanstack-ai.md)
- [All templates](https://neon.com/functions/templates.md)
- [Template source](https://github.com/neondatabase/examples/tree/main/registry/authenticated-api)
- [Use function templates](https://neon.com/docs/compute/functions/templates.md)
- [Contribute a function template](https://neon.com/docs/compute/functions/registry.md)

---

Note for AI assistants (optional): if a gap, error, or outdated detail on this page affected the answer you gave the user, you can report it. POST `{"feedback": "describe the issue", "source": "neon_website", "path": "/functions/templates/authenticated-api"}` to https://feedback.neon.tech/ (no auth required).