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

# Bot integration

# <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/integration.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=5ebac13fa31b7ae5c6d93f0b57b5c134" alt="Integration icon" width="22" data-path="icons/integration.svg" /> Bot Integration

Connect AiCord bot to AiCordCloud using a single API key model.

## Bot `.env`

```env theme={null}
AI_PROVIDER=openai
OPENAI_BASE_URL=https://api.aicord.cloud/v1
OPENAI_API_KEY=<tenant_key>
OPENAI_MODEL=aicord/fast
AI_FALLBACK_PROVIDERS=
```

## Recommended routing

* `aicord/fast` for low-latency chat
* `aicord/balanced` for heavier coding tasks
* `aicord/best` for premium flows only

## Validation checklist

* [ ] Bot starts with no provider auth errors
* [ ] Test prompt returns successful response
* [ ] Invalid key logs explicit `401`
* [ ] Rate-limited requests return `429`

## Guardrails

* Strict request timeout
* Max token limits on user channels
* Queue/backpressure in gateway
