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

# Routers

> Connect Pareto to OmniRoute, 9Router, or LiteLLM.

Choose a router below. Your app uses the router endpoint and key. The router uses your Pareto endpoint and key.

## OmniRoute

Use the [OmniRoute installation guide](https://github.com/diegosouzapw/OmniRoute/wiki/User-Guide) to start the router. Get a Pareto key and prepaid credits before you continue.

### Add Pareto

1. Open **Providers** in the OmniRoute dashboard.
2. Select **Add OpenAI Compatible**.
3. Enter these values.

| Field    | Value                                |
| -------- | ------------------------------------ |
| Name     | `Pareto`                             |
| Prefix   | `pareto`                             |
| API Type | `Chat Completions`                   |
| Base URL | `https://api.paretoinference.com/v1` |

4. Keep the custom paths in **Advanced Settings** empty.
5. Select **Add**.
6. Open the new **Pareto** provider.
7. Select **Add** in **Connections**.
8. Enter a connection name.
9. Enter your Pareto key in **API Key**.
10. Enter `z-ai/glm-5.3-flash` in **Default Model**.
11. Select **Save**.
12. Add `z-ai/glm-5.3-flash` in the provider's **Models** section if it is absent.

The **API Key (for Check)** field in the first form only checks the endpoint. It does not save a provider connection.

### Connect your app

1. Create a router key in OmniRoute's **API Manager**.
2. Enter these settings in your app.

| Setting    | Value                       |
| ---------- | --------------------------- |
| API format | OpenAI Chat Completions     |
| Base URL   | `http://localhost:20128/v1` |
| API key    | Your OmniRoute key          |
| Model      | `pareto/z-ai/glm-5.3-flash` |

Use your router's address if it runs elsewhere. The `pareto/` prefix selects the provider in OmniRoute. OmniRoute sends `z-ai/glm-5.3-flash` to Pareto.

### Send a test request

Set `OMNIROUTE_API_KEY` to your router key in the shell environment. Then run this request. It uses Pareto credits.

```bash theme={"system"}
curl http://localhost:20128/v1/chat/completions \
  -H "Authorization: Bearer $OMNIROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pareto/z-ai/glm-5.3-flash",
    "messages": [{"role": "user", "content": "Say hello."}],
    "max_tokens": 128
  }'
```

Check the response for a `choices` array. For an error, check the provider key, base URL, and model ID.

Pareto returns HTTP 429 when the account has no credits for the request, or when too many requests arrive at the same time. Pareto returns HTTP 503 when it is at capacity or temporarily unavailable, and HTTP 502 when a model request fails. If you add fallback providers to an OmniRoute combo, you control those routes and pay those providers.

See [Troubleshooting](/errors) for Pareto errors.

## 9Router

Use the [9Router installation guide](https://github.com/decolua/9router#-quick-start) to start the router. Get a Pareto key and prepaid credits before you continue.

### Add Pareto

1. Open **Providers** in the 9Router dashboard.
2. Select **Add OpenAI Compatible** under **Custom Providers**.
3. Enter these values.

| Field    | Value                                |
| -------- | ------------------------------------ |
| Name     | `Pareto`                             |
| Prefix   | `pareto`                             |
| API Type | `Chat Completions`                   |
| Base URL | `https://api.paretoinference.com/v1` |

4. Select **Create**.
5. Open the new **Pareto** provider.
6. Select **Add API Key**.
7. Enter a connection name.
8. Enter your Pareto key in **API Key**.
9. Enter `z-ai/glm-5.3-flash` in **Default Model**.
10. Select **Save**.
11. Add `z-ai/glm-5.3-flash` in the provider's **Models** section if it is absent.

The **Default Model** field is required. The **API Key (for Check)** field in the first form does not save a provider connection.

### Connect your app

1. Open **Endpoint** in the 9Router dashboard.
2. Select **Create Key** in **API Keys**.
3. Enter these settings in your app.

| Setting    | Value                       |
| ---------- | --------------------------- |
| API format | OpenAI Chat Completions     |
| Base URL   | `http://localhost:20128/v1` |
| API key    | Your 9Router key            |
| Model      | `pareto/z-ai/glm-5.3-flash` |

Use your router's address if it runs elsewhere. The `pareto/` prefix selects the provider in 9Router. 9Router sends `z-ai/glm-5.3-flash` to Pareto.

### Send a test request

Set `NINEROUTER_API_KEY` to your router key in the shell environment. Then run this request. It uses Pareto credits.

```bash theme={"system"}
curl http://localhost:20128/v1/chat/completions \
  -H "Authorization: Bearer $NINEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pareto/z-ai/glm-5.3-flash",
    "messages": [{"role": "user", "content": "Say hello."}],
    "max_tokens": 128
  }'
```

Check the response for a `choices` array. For an error, check the provider key, base URL, and model ID.

Pareto returns HTTP 429 when the account has no credits for the request, or when too many requests arrive at the same time. Pareto returns HTTP 503 when it is at capacity or temporarily unavailable, and HTTP 502 when a model request fails. If you add fallback providers to a 9Router combo, you control those routes and pay those providers.

See [Troubleshooting](/errors) for Pareto errors.

## LiteLLM

Use the [LiteLLM installation guide](https://docs.litellm.ai/docs/proxy/quick_start) to install the proxy. Get a Pareto key and prepaid credits before you continue.

### Add Pareto

1. Set `PARETO_API_KEY` to your Pareto key in the server environment.
2. Set `LITELLM_MASTER_KEY` to a separate secret that starts with `sk-`.
3. Save this configuration as `config.yaml`.

```yaml theme={"system"}
model_list:
  - model_name: pareto-flash
    litellm_params:
      model: openai/z-ai/glm-5.3-flash
      api_base: https://api.paretoinference.com/v1
      api_key: os.environ/PARETO_API_KEY

general_settings:
  master_key: os.environ/LITELLM_MASTER_KEY
```

The `openai/` prefix selects the OpenAI API format in LiteLLM. LiteLLM sends the model ID `z-ai/glm-5.3-flash` to Pareto.

`PARETO_API_KEY` pays for Pareto usage. `LITELLM_MASTER_KEY` controls access to this local proxy. Keep both keys out of source control.

4. Start the proxy.

```bash theme={"system"}
litellm --config config.yaml --host 127.0.0.1 --port 4000
```

If you already use LiteLLM, add the model entry to your existing configuration. Keep your existing proxy access settings.

### Connect your app

Use these settings for the local proxy above.

| Setting    | Value                           |
| ---------- | ------------------------------- |
| API format | OpenAI Chat Completions         |
| Base URL   | `http://127.0.0.1:4000/v1`      |
| API key    | Your `LITELLM_MASTER_KEY` value |
| Model      | `pareto-flash`                  |

For a shared proxy, use a [LiteLLM virtual key](https://docs.litellm.ai/docs/proxy/virtual_keys) with access to `pareto-flash`. Keep the master key with the proxy administrator.

### Send a test request

In a second shell, set `LITELLM_API_KEY` to the key that calls your proxy. Use the master key for the local setup above. Then run this request. It uses Pareto credits.

```bash theme={"system"}
curl http://127.0.0.1:4000/v1/chat/completions \
  -H "Authorization: Bearer $LITELLM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "pareto-flash",
    "messages": [{"role": "user", "content": "Say hello."}],
    "max_tokens": 128
  }'
```

Check the response for a `choices` array. For an error, check the provider key, base URL, and model mapping.

Pareto returns HTTP 429 when the account has no credits for the request, or when too many requests arrive at the same time. Pareto returns HTTP 503 when it is at capacity or temporarily unavailable, and HTTP 502 when a model request fails. You control any [LiteLLM retry or fallback rules](https://docs.litellm.ai/docs/proxy/reliability) that you add. Other providers charge separately.
