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

# Overview

> One API key for OpenAI, Anthropic, Gemini, image and audio models.

Triw is an AI gateway. You call one endpoint with one key, and Triw routes the request to the provider that serves the model you asked for. Billing, quotas, keys and usage all live in a single console.

```bash Base URL theme={null}
https://router.triw.io
```

## What you get

> [card] [OpenAI-compatible API](https://docs.triw.io/sdks/openai.md)
>
> `POST /v1/chat/completions`, `/v1/embeddings`, `/v1/responses`, `/v1/images/generations`, audio endpoints.

> [card] [Anthropic-compatible API](https://docs.triw.io/sdks/anthropic.md)
>
> `POST /v1/messages` and `/v1/messages/count_tokens`. Point Claude Code or the Anthropic SDK at Triw.

> [card] [Gemini-compatible API](https://docs.triw.io/sdks/gemini.md)
>
> `POST /v1beta/models/{model}:generateContent` plus an OpenAI-style route at `/v1beta/openai/models`.

> [card] [One bill](https://docs.triw.io/billing.md)
>
> Every model is metered in the same quota unit, whichever provider serves it.

## How a request flows

1. You send a request to `https://router.triw.io` with an API key (`Authorization: Bearer sk-...`).
2. Triw resolves the model name to an available upstream channel for your key's group.
3. The upstream response is relayed back in the same wire format you sent.
4. Usage is metered against your balance.

You do not change your prompt or response parsing per provider — only the `model` value.

## First request

```bash theme={null}
curl https://router.triw.io/v1/chat/completions \
  -H "Authorization: Bearer $TRIW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [{"role": "user", "content": "Say hello in one sentence."}]
  }'
```

The complete route list — chat, messages, images, video, audio, embeddings, Midjourney tasks — is in [Endpoints](https://docs.triw.io/endpoints.md). Video jobs are task-based; see [Video generation](https://docs.triw.io/video.md).

New here? Read the [quickstart](https://docs.triw.io/quickstart.md). It takes about five minutes, from account to first token.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.