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

# Admin API

> The TrustGate Admin API manages gateways, registries, consumers, auth, policies, roles, and catalogs. Authenticated with a bearer admin JWT.

The **Admin API** is the open-source control plane for TrustGate. Everything the console
does, you can do over REST — create gateways, register upstreams, mint consumer keys,
attach policies. The endpoint pages in this section are generated directly from the
[TrustGate OpenAPI spec](https://github.com/NeuralTrust/TrustGate) and include a live
request builder.

## Base URL & authentication

The Admin plane listens on `:8080`. All `/v1/...` routes require a bearer **admin JWT**
(HS256), signed with the deployment's `SERVER_SECRET_KEY`:

```http theme={null}
Authorization: Bearer <admin-jwt>
```

See [Server security](/trustgate/operate/server-security#admin-authentication) for how to
mint one, and the [Quickstart](/trustgate/getting-started/quickstart) for an end-to-end walk
through.

## Resources

| Group      | Path                                                                                             | Manages                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| System     | `/healthz`, `/readyz`, `/__/version`                                                             | Probes and build info (no auth).                                                                            |
| Gateways   | `/v1/gateways`                                                                                   | [Gateways](/trustgate/concepts/gateways).                                                                   |
| Registries | `/v1/gateways/{gateway_id}/registries`                                                           | [Registries](/trustgate/concepts/registries) + test-connection, tools.                                      |
| Consumers  | `/v1/gateways/{gateway_id}/consumers`                                                            | [Consumers](/trustgate/concepts/consumers) + registry/role/auth/policy attach.                              |
| Auth       | `/v1/gateways/{gateway_id}/auths`                                                                | [Auth credentials](/trustgate/concepts/auth).                                                               |
| Policies   | `/v1/gateways/{gateway_id}/policies`                                                             | [Policies](/trustgate/policies/overview) + global, duplicate.                                               |
| Roles      | `/v1/gateways/{gateway_id}/roles`                                                                | [Roles](/trustgate/concepts/roles) + registry binding.                                                      |
| Catalogs   | `/v1/providers-catalog`, `/v1/models-catalog`, `/v1/policies-catalog`, `/v1/mcp-servers-catalog` | Read-only reference data (including the [policy](/trustgate/policies/overview) catalog + settings schemas). |
| Playground | `/v1/playground/traces/{trace_id}`                                                               | Fetch the metrics event for a single request by trace id.                                                   |

## The proxy is separate

This reference covers the **Admin** API. Runtime traffic goes to the **Proxy** plane
(`:8081`) on the format-specific routes — `POST /{consumer_slug}/v1/chat/completions`,
`/v1/messages`, `/v1/responses`, and the Gemini `/v1beta/models/{model}:generateContent` —
authenticated with the consumer's `X-AG-API-Key` (or an OAuth2/OIDC token), not the admin
JWT. See [Architecture](/trustgate/architecture) and the
[Quickstart](/trustgate/getting-started/quickstart).
