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

# Overview

# Gateway

Adaline Gateway is a single SDK to interact with 300+ LLMs. It runs entirely locally — no proxy, no data leaves your environment.

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @adaline/gateway @adaline/types @adaline/openai
  ```

  ```bash yarn theme={null}
  yarn add @adaline/gateway @adaline/types @adaline/openai
  ```

  ```bash pnpm theme={null}
  pnpm add @adaline/gateway @adaline/types @adaline/openai
  ```
</CodeGroup>

## Quick Start

```typescript theme={null}
import { Gateway } from "@adaline/gateway";
import { OpenAI } from "@adaline/openai";
import { Config, MessageType } from "@adaline/types";

// Initialize gateway and model
const gateway = new Gateway();
const openai = new OpenAI();
const gpt4o = openai.chatModel({ modelName: "gpt-4o", apiKey: process.env.OPENAI_API_KEY });

// Complete a chat
const response = await gateway.completeChat({
  model: gpt4o,
  config: Config().parse({ temperature: 0.7, maxTokens: 300 }),
  messages: [{ role: "user", content: [{ modality: "text", value: "Hello!" }] }],
  tools: [],
});

console.log(response);
```

## Key Features

* **Unified interface** — One API for OpenAI, Anthropic, Google, Azure, Bedrock, Groq, Together AI, Open Router, Vertex, XAI, and custom providers
* **Fully local** — No proxy server, no data leaves your environment
* **Streaming** — First-class async generator support for streaming responses
* **Embeddings** — Generate embeddings across providers with a single interface
* **Tool calls** — Execute tool calls returned by LLMs
* **Plugins** — Pluggable cache, HTTP client, logger, and queue backends
* **Batching & retries** — Built-in configurable queues with automatic retry and exponential backoff
* **OpenTelemetry** — Native telemetry integration
* **Isomorphic** — Works in Node.js and browsers (with `dangerouslyAllowBrowser`)

## Packages

| Package                | Description                                    |
| ---------------------- | ---------------------------------------------- |
| `@adaline/gateway`     | Core gateway SDK                               |
| `@adaline/types`       | Shared types for config, messages, tools, etc. |
| `@adaline/openai`      | OpenAI provider                                |
| `@adaline/anthropic`   | Anthropic provider                             |
| `@adaline/google`      | Google provider                                |
| `@adaline/azure`       | Azure OpenAI provider                          |
| `@adaline/bedrock`     | AWS Bedrock provider                           |
| `@adaline/groq`        | Groq provider                                  |
| `@adaline/togetherai`  | Together AI provider                           |
| `@adaline/open-router` | Open Router provider                           |
| `@adaline/vertex`      | Google Vertex provider                         |
| `@adaline/xai`         | xAI provider                                   |

## API Reference

<CardGroup cols={2}>
  <Card title="Gateway Class" icon="box" href="/docs/reference/gateway/latest/classes/gateway">
    Core class for chat completions, streaming, embeddings, and tool calls.
  </Card>

  <Card title="Types" icon="braces" href="/docs/reference/gateway/latest/types/config">
    Config, messages, tools, and response types.
  </Card>

  <Card title="Examples" icon="code" href="/docs/reference/gateway/latest/examples/complete-chat">
    Practical examples for common use cases.
  </Card>
</CardGroup>
