---
title: API Gateway
description: A private local API that lets other apps on this computer use TurnPanel models.
updated: 2026-09-12
canonical: https://turnpanel.com/docs/api-gateway
markdown: https://turnpanel.com/docs/api-gateway.md
llms: https://turnpanel.com/llms.txt
---

# API Gateway

A private local API that lets other apps on this computer use TurnPanel models.

## Connect a client

In Gateway, create a Local or Hybrid API key and copy it when it appears. In the other app’s OpenAI-compatible provider settings, use http://127.0.0.1:8082/v1 as the endpoint and the copied value as the API key. Only apps on this computer can connect.


### Create an API key for another app

**Context:** Gateway · API keys

The API key form asks for a client name and Local or Hybrid routing.

- **Name** [ready]: Identify the client
- **Routing profile** [active]: Choose the key’s route
- **Create key** [ready]: Reveals its secret once
- **Gateway endpoint** [local]: Shown for client configuration

## Supported routes

- Supported endpoints are POST /v1/chat/completions, POST /v1/completions, POST /v1/embeddings, and GET /v1/models.
- An unknown path returns 404, a bad key returns 401, and an unavailable model provider returns 502. TurnPanel supports the listed OpenAI-style endpoints, but not every option offered by every provider.


## Routing

A local key sends chat and text completions only to the local model engine. A hybrid key follows your routing settings and may use an online provider. Embeddings use the configured embedding model. TurnPanel records usage separately for each key.


## Rotate or disable a key

- Rotate replaces the key immediately and shows the new secret only once. Disable makes the key stop working.

### Disable or rotate a key from Gateway

**Context:** API key controls

API key controls include Disable and Rotate.

- **Enabled key** [active]: Can authenticate a request
- **Disable** [waiting]: Causes authentication failure
- **Rotate** [ready]: Shows a replacement secret once
- **Old secret** [waiting]: Invalid immediately after rotation
