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

# Public status API

> No-auth endpoints for dashboards, bots, and widgets

A small set of read-only endpoints is available **without authentication**
— useful for community dashboards, Discord bots, and status widgets.

<Note>
  These are the same endpoints the Square1 web app uses. They are stable
  in practice but not versioned — treat unknown fields as forward
  compatibility, and poll politely (they answer from caches; once per
  15–30 s is plenty). Rate limit: 60 requests/minute per IP.
</Note>

## Base URLs

| Endpoint group                   | Origin                                             |
| -------------------------------- | -------------------------------------------------- |
| `/api/stats/*`, `/api/incidents` | `https://square1.dev` (also on `dash.square1.dev`) |
| `/api/quota`                     | `https://dash.square1.dev`                         |

## Model fleet — `GET /api/stats/fleet`

Live per-model health, throughput, and the enforced input ceiling:

```bash theme={null}
curl https://square1.dev/api/stats/fleet
```

```json theme={null}
{
  "models": [
    {
      "id": "deepseek-v4-pro",
      "status": "ok",
      "sparkline": [124, 96, 110, 88, 132, 141, 120],
      "tps": 62,
      "ttfb_ms": 2100,
      "max_input_tokens": 61440
    }
  ],
  "disabled": [{ "id": "glm-5.2", "displayName": "GLM 5.2", "note": "..." }],
  "updated_at": "2026-08-29T12:00:00.000Z"
}
```

* **`status`** — `ok` · `degraded` (elevated error rate) · `down`
  (majority of recent requests failing) · `idle` (no traffic in the last
  24 h — a neutral "no signal", not a failure).
* **`sparkline`** — seven 10-minute buckets of output tokens/second,
  oldest first.
* **`ttfb_ms`** — average time-to-first-byte over the last hour
  (informational; slow ≠ unhealthy for reasoning models).
* **`max_input_tokens`** — the same live ceiling `/v1/models` reports,
  here without authentication.

## Platform quota — `GET /api/quota`

Today's shared per-model daily caps:

```bash theme={null}
curl https://dash.square1.dev/api/quota
```

```json theme={null}
{
  "global": { "used": 51200000, "limit": 160000000, "remaining": 108800000, "reset_at": "..." },
  "requests": 4210,
  "models": {
    "deepseek-v4-pro": { "used": 21000000, "limit": 50000000, "remaining": 29000000 }
  }
}
```

<Note>
  `global` is a **display sum** of the per-model rows, not an enforced
  ceiling — the real limits are the per-model entries.
</Note>

## Server stats — `GET /api/stats/server`

Aggregate platform figures: today's pooled usage (`quota`, same block as
above), active `users`, current `tps`, and `allTime`
(`requests`/`tokens`/`input`/`output`).

## Incidents — `GET /api/incidents?limit=10`

Operator-posted incident history with updates, newest first:

```json theme={null}
{
  "incidents": [
    { "id": 12, "title": "...", "status": "resolved", "updates": [ /* ... */ ] }
  ],
  "active": 0,
  "limit": 10,
  "updated_at": "2026-08-29T12:00:00.000Z"
}
```

## CORS caveat

These endpoints are served for the Square1 web properties; cross-origin
browser access from third-party pages is not guaranteed. For widgets on
your own site, proxy through your backend rather than calling from the
visitor's browser.
