> ## 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.

# Api reference

# <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/api.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=9033d21075517892c908d9ea4f86cba4" alt="API icon" width="22" data-path="icons/api.svg" /> API Reference (AiCordCloud)

Base URL:

```text theme={null}
https://api.aicord.cloud
```

## <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/key.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=74682e482d374d26c7c4f736b4e22e9a" alt="Key icon" width="18" data-path="icons/key.svg" /> Authentication

Use one of:

* `Authorization: Bearer <API_KEY>`
* `x-api-key: <API_KEY>`

## <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/reference.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=c6484930deda4303be5a14fbf137d3a8" alt="Reference icon" width="18" data-path="icons/reference.svg" /> Endpoints

| Method | Path                   | Description          |
| ------ | ---------------------- | -------------------- |
| `GET`  | `/`                    | Service metadata     |
| `GET`  | `/health`              | Health signal        |
| `GET`  | `/v1/models`           | Public model aliases |
| `POST` | `/v1/chat/completions` | Chat completion      |

### `GET /health` response

```json theme={null}
{"ok": true}
```

### `POST /v1/chat/completions` example

```bash theme={null}
curl https://api.aicord.cloud/v1/chat/completions \
  -H "Authorization: Bearer YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "aicord/fast",
    "messages": [
      {"role":"system","content":"You are a coding assistant."},
      {"role":"user","content":"Create a Discord slash command /ping."}
    ],
    "temperature": 0.2
  }'
```

## <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/process.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=a4d87ab86d94a2f37a841e32651c9710" alt="Headers icon" width="18" data-path="icons/process.svg" /> Response headers

* `x-aicord-tier`
* `x-aicord-model`
* `x-aicord-upstream`
* `x-aicord-latency-ms`
* `x-ratelimit-remaining`

## <img src="https://mintcdn.com/lipedevv/MuqSig17BRwFcVpd/icons/troubleshoot.svg?fit=max&auto=format&n=MuqSig17BRwFcVpd&q=85&s=bca67852c4813f210a46becbffe2680c" alt="Error icon" width="18" data-path="icons/troubleshoot.svg" /> Error format

```json theme={null}
{
  "error": {
    "message": "Unauthorized",
    "type": "authentication_error"
  }
}
```

## OpenAPI spec

* Local path: `openapi/aicordcloud.openapi.yaml`
* Validate:

```bash theme={null}
npx mintlify@latest openapi-check docs/openapi/aicordcloud.openapi.yaml
```
