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

# Portkey Gateway

> Use TokenLab as an upstream provider in Portkey Gateway

## Overview

Portkey Gateway can route requests to TokenLab as an upstream provider. The safest default is OpenAI-compatible chat completions; use Responses when your Portkey version exposes that path for TokenLab.

<Note>
  **Type**: AI Gateway

  **Primary Paths**: OpenAI-compatible chat completions and Responses

  **Support Confidence**: Supported path
</Note>

## Provider Values

| Field         | Value                        |
| ------------- | ---------------------------- |
| Provider      | `tokenlab`                   |
| Base URL      | `https://api.tokenlab.sh/v1` |
| API key       | `sk-your-tokenlab-key`       |
| Default model | `gpt-5.4-mini`               |

## Chat Completions

Use TokenLab for OpenAI-compatible chat requests:

```bash theme={null}
curl https://your-portkey-gateway.example/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "x-portkey-provider: tokenlab" \
  -H "Authorization: Bearer sk-your-tokenlab-key" \
  -d '{
    "model": "gpt-5.4-mini",
    "messages": [{"role": "user", "content": "Say hello from TokenLab."}]
  }'
```

## Responses

If your Portkey build routes TokenLab Responses, use `gpt-5.5`, `gpt-5.4`, or `gpt-5.4-mini` with `/v1/responses`.

## Native Endpoint Note

TokenLab also exposes Anthropic Messages and Gemini-compatible endpoints directly. Whether those can be used through Portkey depends on the Portkey provider and endpoint support in your deployed version.
