---
title: "Draft Agnai integration"
description: "Unverified draft settings for using Agnai with minirouter."
canonical_url: "https://minirouter.sh/integrations/agnai"
markdown_url: "https://minirouter.sh/integrations/agnai.md"
last_updated: "2026-08-04"
---

# Agnai + minirouter

Verification status: UNVERIFIED DRAFT
Confirm the current client fields and run the verification request before relying on this configuration.

Draft configuration for Agnai's third-party OpenAI-compatible preset, self-hosted or on agnai.chat.

Base URL: https://api.minirouter.sh/v1
Get a key: https://minirouter.sh/key

## Settings

Settings → AI Settings → third-party / OpenAI-compatible preset

1. Service: Third Party / OpenAI compatible
2. Third Party URL: https://api.minirouter.sh/v1
   Never append /chat/completions — Agnai adds the path itself.
3. Third Party Key / Password: mr-live-… (your key)
4. Model: meta/llama-3.3-70b

## Draft configuration

Verify outside Agnai first — one request, literal values

```
curl https://api.minirouter.sh/v1/chat/completions \
  -H "Authorization: Bearer $MINIROUTER_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"meta/llama-3.3-70b","messages":[{"role":"user","content":"ping"}]}'
```

## Recommended models

Only use a model after confirming it appears in the live model catalog at https://minirouter.sh/api/v1/models.

- nousresearch/hermes-4-70b: Instruction-following candidate that holds a persona across a long thread.
- sao10k/l3.3-euryale-70b: Prose-oriented candidate. Single upstream — see the note on the roleplay facet.
- meta/llama-3.3-70b: General-purpose prose candidate.
- mistral/mistral-small-3.2: Smaller-model candidate for frequent regeneration.

## Troubleshooting

### 404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error reference: https://minirouter.sh/docs/errors#invalid_request

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error reference: https://minirouter.sh/docs/errors#invalid_api_key

### Works self-hosted, fails on the hosted instance

The hosted app makes the request from its own servers. Nothing on our side distinguishes the two — check the preset is actually selected for the character you are chatting with, since Agnai stores a preset per character.

### Response stops mid-sentence with a credits message

Balance hit $0 mid-stream. The stream ends with a terminal error naming the exact charge for tokens delivered — never a silent close.

Error reference: https://minirouter.sh/docs/errors#insufficient_credits
