# AI use cases for Antirion (eliasbiondo/antirion)

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Use cases: 5 | Page: https://dedupedai.com/use-cases/eliasbiondo-antirion/

Antirion is an open-source AI gateway written in Rust, shipped as one binary with a built-in web console, that routes, secures, budgets and observes LLM calls across many model providers.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Send every app's LLM calls through one endpoint: https://dedupedai.com/use-cases/eliasbiondo-antirion/route-all-llm-calls-through-one-endpoint/
- Cap LLM spend per team, project or key: https://dedupedai.com/use-cases/eliasbiondo-antirion/cap-team-spend-with-budgets-and-alerts/
- Find out why an LLM call failed or cost too much: https://dedupedai.com/use-cases/eliasbiondo-antirion/trace-why-an-llm-call-failed-or-cost-too-much/
- Screen prompts for PII and prompt injection: https://dedupedai.com/use-cases/eliasbiondo-antirion/block-pii-and-prompt-injection-at-the-gateway/
- Rerun the gateway benchmark on your own AWS account: https://dedupedai.com/use-cases/eliasbiondo-antirion/reproduce-gateway-benchmark-on-own-aws/

## How to send every app's LLM calls through one endpoint with Antirion

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Difficulty: Intermediate | Time: 15 minutes | Basis: From the README

Run one gateway that forwards OpenAI-style requests to your provider keys.

**Who it is for:** A developer or small platform team whose apps call OpenAI or Anthropic directly and who wants one place to manage providers and keys.

**The problem:** Each app holds its own provider keys and code paths, so switching models or providers means changing every app.

**The outcome:** Apps call one base URL with a gateway key, and the model behind the name chat can be changed in the console.

### Steps

1. Run `docker run -p 8080:8080 -p 8081:8081 -v antirion-data:/var/lib/antirion eliasbiondo/antirion` and copy the admin token printed on the first start.
2. In the console at http://localhost:8081/ui/, open Providers, choose Add provider, paste your API key, run Test, then Add provider.
3. Open Models, choose Add model, pick a model from the provider's list, name it chat, and click Add model.
4. Open API keys, choose Create key, name it for your app, and copy the key, which is shown only once.
5. Set your SDK base URL to http://localhost:8080/v1 and send a chat request with model chat.

### Prompt to paste into your agent

```text
Using the eliasbiondo/antirion README, configure the OpenAI SDK in <project path> to use base URL http://localhost:8080/v1 and the gateway key in ANTIRION_API_KEY, then send a chat request with model chat. Expected output: a chat completion JSON response. Verify that the request appears in the Request log in the console.
```

### Caveat

The README's getting-started path needs an OpenAI or Anthropic key, and other providers are set up the same way only where the console offers them.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/eliasbiondo-antirion/route-all-llm-calls-through-one-endpoint/

## How to cap LLM spend per team, project or key with Antirion

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Set dollar or token budgets and get alerts before a budget runs out.

**Who it is for:** A team lead or finance-minded engineer who shares LLM access across teams and needs spend limits before the bill arrives.

**The problem:** Shared provider keys let one project spend far more than planned, and the cost is only visible after the invoice.

**The outcome:** Each project uses its own key with a budget, and the cost ledger shows what each model call cost.

### Steps

1. Start the gateway with `docker run -p 8080:8080 -p 8081:8081 -v antirion-data:/var/lib/antirion eliasbiondo/antirion`.
2. In the console, open API keys and choose Create key once for each project, naming each key after its project.
3. In the console, open the budget settings for the key, team or project and set a limit in dollars or tokens. (inferred, check the README)
4. Check that the Model price fields match your provider prices, since the list price applies when they are left blank.
5. Open Request log, select a request, and review its cost in the cost ledger.

### Prompt to paste into your agent

```text
Using the eliasbiondo/antirion README, create one gateway key per project and set a dollar budget on each key in the console. Expected output: a list of keys with their budgets. Verify that a test request from one key shows its cost in the cost ledger.
```

### Caveat

The README names where budgets apply but not the exact console menu, so the budget step needs to be checked in the running console.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/eliasbiondo-antirion/cap-team-spend-with-budgets-and-alerts/

## How to find out why an LLM call failed or cost too much with Antirion

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Read the route, status, tokens and cost of any request in the request log.

**Who it is for:** A developer on call when an AI feature returns errors or an unexpected bill.

**The problem:** Without per-request records, it is hard to tell which model, key or route handled a failing or expensive call.

**The outcome:** The developer finds the exact request, the route taken and the cost, and can reproduce it in the Playground.

### Steps

1. Start the gateway with `docker run -p 8080:8080 -p 8081:8081 -v antirion-data:/var/lib/antirion eliasbiondo/antirion` if it is not already running.
2. Open Request log in the console and filter or scan for the failing request by status, Model or key.
3. Select the request and read its route taken, tokens, latency and cost in the details view.
4. Open the Playground and resend a similar request to check whether the problem repeats.

### Prompt to paste into your agent

```text
Using the eliasbiondo/antirion README, find the request in the Request log that matches <request description> and report its status, Model, key, tokens, latency and cost. Expected output: a short summary of that request. Verify that the reported values match the request details in the console.
```

### Caveat

The request log only holds requests the gateway has handled, so calls that bypass the gateway will not appear.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/eliasbiondo-antirion/trace-why-an-llm-call-failed-or-cost-too-much/

## How to screen prompts for PII and prompt injection with Antirion

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Add guardrails that check requests, responses and streams before models see them.

**Who it is for:** A security or compliance owner whose apps send user text to LLMs and must keep personal data and injection attempts out.

**The problem:** User text can carry personal data or instructions that try to override the app, and each app would need its own filter.

**The outcome:** Requests with PII or injection attempts are caught at the gateway, and redaction keeps the original format.

### Steps

1. Start the gateway with `docker run -p 8080:8080 -p 8081:8081 -v antirion-data:/var/lib/antirion eliasbiondo/antirion`.
2. In the console, open the guardrail settings and enable the PII and prompt injection checks for the key or project. (inferred, check the README)
3. Send a test chat request with a made-up email address in the message using the Playground or the curl command from the getting started guide.
4. Open Request log and confirm the request shows the guardrail result.

### Prompt to paste into your agent

```text
Using the eliasbiondo/antirion README, enable the PII guardrail for the key <key name> in the console and send a test request containing a fake email address. Expected output: the request is redacted or blocked as configured. Verify the result in the Request log.
```

### Caveat

The README lists the guardrail types but the exact configuration steps are not in the excerpt, so each step must be checked against the console.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/eliasbiondo-antirion/block-pii-and-prompt-injection-at-the-gateway/

## How to rerun the gateway benchmark on your own AWS account with Antirion

Repo: [eliasbiondo/antirion](https://github.com/eliasbiondo/antirion) | Difficulty: Advanced | Time: 120 minutes | Basis: From the README

Use the bench harness to measure Antirion overhead against your own setup.

**Who it is for:** An infrastructure engineer who wants to check the published latency and throughput numbers before adopting the gateway.

**The problem:** Published benchmark numbers from a vendor are hard to trust without seeing the same test run in your own environment.

**The outcome:** The engineer has measured overhead, throughput and error rates on their own dedicated AWS machines.

### Steps

1. Read the method and validity rules in docs/benchmarks.md.
2. Open the bench/ directory in the repository to find the harness.
3. Follow the steps in docs/benchmarks.md#reproducing-the-results to create the load generator and upstream machines on your AWS account.
4. Run the harness against the gateway and compare the median results with the published table. (inferred, check the README)

### Prompt to paste into your agent

```text
Using the eliasbiondo/antirion README and docs/benchmarks.md, prepare the bench/ harness for <AWS region> following the reproduction steps. Expected output: a results summary with overhead p50 and p99 and error rate. Verify that the load generator and upstream run on separate machines as the method requires.
```

### Caveat

The published numbers come from dedicated c7i machines in a placement group, so results on other hardware will differ.

Risk, credentials: The reproduction needs your own AWS credentials and creates dedicated EC2 machines that incur AWS charges.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/eliasbiondo-antirion/reproduce-gateway-benchmark-on-own-aws/
