# Router IA

OpenRouter keys in the company's name, with usage charged to the ArduMaker balance and automatic pause on negative balance.

Source: https://ardumaker.com/en/docs/router-ia/

- Category: AI and agents
- Status: Available
- Requirements: A company with an active payment method; Enough positive balance (see [AI keys](https://ardumaker.com/en/docs/claves-ia)); To create, revoke or reactivate keys: being a company admin
- MCP tools (Read only): `listar_claves_router_ia`, `ver_clave_router_ia`
- MCP tools (Write or modify): `crear_clave_router_ia`, `revocar_clave_router_ia`, `reactivar_clave_router_ia`

## What can you do with it?

- Use the models available on OpenRouter with a key in the company's name, without an OpenRouter account of your own.
- Pay for usage from the ArduMaker balance, together with the rest of the services.
- See each key's spending: total, daily, weekly and monthly.
- Let other ArduMaker features use the company key: transcription and summaries of recorded meetings, and WhatsApp audio transcription.

## When should you use it?

- A company app or bot needs a language model and you do not want separate billing.
- To enable meeting or WhatsApp audio transcription: without an active key, those features stay blocked.

## How does it work in ArduMaker?

1. An admin creates a key (see [AI keys](https://ardumaker.com/en/docs/claves-ia)). ArduMaker creates it on OpenRouter with its spending cap and returns the token **only once**.
2. The application calls the OpenRouter API with that token, like any OpenRouter key.
3. ArduMaker periodically syncs each key's usage with OpenRouter (and also when a key is viewed).
4. Each usage increase is recorded as consumption in the company history: the USD amount plus the company commission, converted to EUR at the configured rate.
5. If the balance drops below the negative amount allowed for the company, the key is paused on OpenRouter. When the balance recovers, it is reactivated automatically. If someone reactivates it elsewhere while still negative, it is paused again.

```bash
curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $ROUTER_IA_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "google/gemini-2.5-flash-lite", "messages": [{"role": "user", "content": "Hola"}]}'
```

### Uses inside ArduMaker

- **Recorded meetings**: audio is transcribed and summarized with the key of the company that owns the recording; the meeting text is treated as data, not as instructions. Without an active key, the recording is still stored and played, but not transcribed.
- **WhatsApp audio**: transcribed with the company's first active key; with none, transcription fails.
- Spending from those uses goes to the same account and under the same caps as everything else.

## What actually changes?

- On OpenRouter: one key per key created, with its name, cap and cap reset.
- In ArduMaker: the key linked to a company service and consumption entries in its history as it is used.
- If the company is pending identity verification, its active keys are paused on OpenRouter until it is verified.

## Diagram

**From request to balance**

```text
Your app (Router IA token)
  ↓
OpenRouter (chosen model; applies the key cap)
  ↓
ArduMaker sync (reads the key usage)
  ↓
Company balance (consumption in EUR with commission; pause past the allowed negative)
```

## Expected result

- `listar_claves_router_ia` shows the company keys, never the token.
- `ver_clave_router_ia` syncs on the spot and returns usage, cap and remaining; detailed spending is only shown to an admin.
- Consumption shows in the company's payment history and period usage.

## Errors and troubleshooting

| Symptom | Cause | What to do |
| --- | --- | --- |
| OpenRouter rejects the key | The key is paused (balance, verification or revoked) or reached its cap | Top up the balance, complete verification or wait for the cap reset |
| Meetings are not transcribed | The company has no active key | Create or reactivate one |
| Error creating on OpenRouter | OpenRouter did not answer or rejected the request | Retry later |

Errors when creating, revoking and reactivating are in [AI keys](https://ardumaker.com/en/docs/claves-ia).

## MCP access

Yes, in the `/mcp` and `/mcp/infra` profiles: `listar_claves_router_ia` and `ver_clave_router_ia` (read, they never return the token), `crear_clave_router_ia` (write, admin only; the only moment the token is shown), `revocar_clave_router_ia` (destructive but reversible) and `reactivar_clave_router_ia`. Reference at [/mcp/docs](https://ardumaker.com/en/mcp/docs) and examples at [/mcp/ia](https://ardumaker.com/en/mcp/ia).

## Related features

- [AI keys](https://ardumaker.com/en/docs/claves-ia/)
- [Search API](https://ardumaker.com/en/docs/search-api/)
- [Transcription](https://ardumaker.com/en/docs/transcripcion/)
- [Balance per company](https://ardumaker.com/en/docs/saldo-por-empresa/)
- [Service usage](https://ardumaker.com/en/docs/consumo-de-servicios/)
