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

# LLM Gateway Quick Start

> An administrator registers a model provider and issues a virtual key. A developer points an application at the gateway and sends a test request.

> [!NOTE]
>
> The LLM Gateway is in early access. Early access features are pre-production software under
> section 1.4 of the [Cloud Services Agreement](https://docs.cloud.cdata.com/en/terms-of-service.md) and are not for production
> use. To join the program, [request early access](https://www.cdata.com/ai/gateway-early-access/).

Two people usually set up the LLM Gateway: an administrator registers a model provider and issues a virtual key, and a developer points an application at the gateway with that key. The application never holds the provider's API key. This guide splits the steps the same way.

## For Administrators

Registering a provider requires the Administrator role. A Workspace Administrator can do Steps 2 to 4.

### Step 1: Register a Provider

On the [LLM Providers](https://docs.cloud.cdata.com/en/LLM-Gateway/LLM-Providers.md) page, click **+ Add Provider**, enter the provider name, type, and API key, and then select the models to use.

### Step 2: Create a Routing Rule

On the [Routing Rules](https://docs.cloud.cdata.com/en/LLM-Gateway/Routing-Rules.md) tab of the **LLM Gateway** page, click **+ Add Routing Rule**. **Single provider** sends all traffic to the provider from Step 1. If the default routing rule already suits you, skip this step.

### Step 3: Create a Project

On the [Projects](https://docs.cloud.cdata.com/en/LLM-Gateway/Projects.md) tab, click **+ Add Project**, enter a name, and assign the routing rule.

### Step 4: Issue a Virtual Key

On the **Virtual Keys** tab of the project, click **+ Issue Virtual Key**. Give the key to the developer who sets up the application. See [Virtual Keys](https://docs.cloud.cdata.com/en/LLM-Gateway/Virtual-Keys.md).

## For Developers

### Step 5: Point Your Client at the Gateway

Set your client's base URL to `https://cloud.cdata.com/gateway/v1`. This URL is complete, so do not add a suffix. Administrators can also find it under **View Endpoints** on the **Projects** tab. Send the virtual key as an `Authorization: Bearer <virtual-key>` header or an `x-api-key` header. A Connect AI personal access token does not work here.

### Step 6: Send a Test Request

Replace `<virtual-key>` with the key from your administrator:

```bash OpenAI-compatible (curl) theme={null}
curl https://cloud.cdata.com/gateway/v1/chat/completions \
  -H "Authorization: Bearer <virtual-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Hello"}]
  }'
```

```python OpenAI SDK (Python) theme={null}
from openai import OpenAI

client = OpenAI(
    base_url="https://cloud.cdata.com/gateway/v1",
    api_key="<virtual-key>",
)

response = client.chat.completions.create(
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
```

```python Anthropic SDK (Python) theme={null}
import anthropic

client = anthropic.Anthropic(
    base_url="https://cloud.cdata.com/gateway/v1",
    api_key="<virtual-key>",
)

message = client.messages.create(
    max_tokens=1024,
    messages=[{"role": "user", "content": "Hello"}],
)
print(message.content)
```

> [!TIP]
>
> **Your first request went through the gateway.** The project's routing rule chose the provider and
> model, and your application never saw the provider's API key.

## Next Steps

> [card] [Claude Code](https://docs.cloud.cdata.com/en/LLM-Clients/ClaudeCode-LLMClient.md)
>
> Route a coding tool through the gateway.

> [card] [Routing Rules](https://docs.cloud.cdata.com/en/LLM-Gateway/Routing-Rules.md)
>
> Add failover or a model allowlist.

> [card] [Projects](https://docs.cloud.cdata.com/en/LLM-Gateway/Projects.md)
>
> Set budgets and rate limits for each project.

> [card] [Context Overview](https://docs.cloud.cdata.com/en/Context.md)
>
> Add business context to prompts with Prompt Enrichment.


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