# Overview

> Connect your application to artificial intelligence providers through one gateway.

URL: https://boelabs.com/pt/docs/ai-gateway
Language: English

AI Gateway exposes OpenAI-compatible and Anthropic-compatible APIs. Your application sends requests
to AI Gateway with a **virtual key** and a **public model** name. AI Gateway selects a provider deployment,
translates the request, and tracks usage and cost.

You control the providers, routing rules, and access limits. Supported operations and parameters
depend on the deployments configured for each public model.

## Start here

<Cards>
  <Card title="Make your first request" href="https://boelabs.com/docs/ai-gateway/quickstart">
    Start a local gateway, connect OpenAI, and call it with a virtual key.
  </Card>
  <Card title="Understand the model" href="https://boelabs.com/docs/ai-gateway/concepts">
    Learn how public models, deployments, and adapters fit together.
  </Card>
</Cards>

## Connect an existing application

If an operator has already configured AI Gateway, use its base URL, a virtual key, and an available
public model name. For example, with the OpenAI Python SDK:

```python title="app.py"
from openai import OpenAI

client = OpenAI(base_url="http://localhost:4000/v1", api_key="<virtual-key>")
response = client.chat.completions.create(
    model="general",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

Here, `general` is a name configured in AI Gateway. It can route to one or more upstream models
without changing the application's request. See the [API reference](https://boelabs.com/docs/ai-gateway/api-overview) for
authentication, supported endpoints, and errors.

## Configure and operate

<Cards>
  <Card title="Connect providers" href="https://boelabs.com/docs/ai-gateway/providers">
    Choose an adapter and configure credentials, models, and supported operations.
  </Card>
  <Card title="Control routing" href="https://boelabs.com/docs/ai-gateway/routing">
    Balance traffic, set deployment limits, and configure fallback policies.
  </Card>
  <Card title="Manage access and costs" href="https://boelabs.com/docs/ai-gateway/virtual-keys">
    Give each application its own model scope, rate limits, and budget.
  </Card>
  <Card title="Deploy AI Gateway" href="https://boelabs.com/docs/ai-gateway/deployment">
    Choose a deployment platform and prepare Postgres, Redis, and secrets.
  </Card>
  <Card title="Use the dashboard" href="https://boelabs.com/docs/ai-gateway/dashboard">
    Manage the gateway and investigate requests from the operator UI.
  </Card>
  <Card title="Prepare for production" href="https://boelabs.com/docs/ai-gateway/production-checklist">
    Check security, health probes, backups, and observability before launch.
  </Card>
</Cards>

## Contribute

Read [Architecture](https://boelabs.com/docs/ai-gateway/architecture) for the request pipeline,
[Testing](https://boelabs.com/docs/ai-gateway/testing) for the test workflow, and
[Documentation development](https://boelabs.com/docs/ai-gateway/documentation) to work on these pages.

