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

> ## Agent Instructions
> DualMind Arena API base URL: https://api.dualmindlab.tech. Public endpoints only; admin routes are not part of this API.
> Authenticate with the access token from an Arena session (a Supabase JWT) as `Authorization: Bearer <token>`. There are no API keys yet; never invent one.
> For battles call POST /api/arena/dualchat, then vote with POST /api/arena/model-vote using the returned comparisonId. Keep model names hidden from voters until they vote.
> GET /api/arena/model-stats (leaderboard) and GET /health need no token.

# API status

> Check the DualMind API from your browser, and set up your own uptime monitoring.

export const ApiStatus = ({endpoint = "https://api.dualmindlab.tech/health", title = "DualMind API"}) => {
  const [state, setState] = useState({
    status: "checking"
  });
  const check = useCallback(async () => {
    setState(s => ({
      ...s,
      status: "checking"
    }));
    const started = performance.now();
    const ctrl = new AbortController();
    const timer = setTimeout(() => ctrl.abort(), 10000);
    try {
      const res = await fetch(endpoint, {
        signal: ctrl.signal,
        cache: "no-store"
      });
      const ms = Math.round(performance.now() - started);
      const body = await res.json().catch(() => ({}));
      const healthy = res.ok && body.status === "healthy";
      setState({
        status: healthy ? "up" : "degraded",
        ms,
        code: res.status,
        version: body.version,
        instance: typeof body.instanceId === "string" ? body.instanceId.slice(0, 8) : undefined,
        checkedAt: new Date()
      });
    } catch (err) {
      setState({
        status: "down",
        checkedAt: new Date()
      });
    } finally {
      clearTimeout(timer);
    }
  }, [endpoint]);
  useEffect(() => {
    check();
  }, [check]);
  const label = ({
    checking: "Checking…",
    up: "Operational",
    degraded: "Degraded",
    down: "Unreachable"
  })[state.status];
  const dot = ({
    checking: "",
    up: "dm-dot-up",
    degraded: "dm-dot-warn",
    down: "dm-dot-down"
  })[state.status];
  return <div className="dm-widget not-prose" role="group" aria-label={`${title} status`}>
      <div className="dm-widget-head">
        <div>
          <span className="dm-label">Live status</span>
          <p className="dm-widget-title">{title}</p>
        </div>
        <button type="button" className="dm-ctl" onClick={check} disabled={state.status === "checking"}>
          Check again
        </button>
      </div>
      <div style={{
    display: "flex",
    flexWrap: "wrap",
    gap: "0.6rem",
    alignItems: "center"
  }} aria-live="polite">
        <span className="dm-pill">
          <span className={`dm-dot ${dot}`} aria-hidden="true" />
          {label}
        </span>
        {state.ms !== undefined && <span className="dm-pill">{state.ms} ms round trip</span>}
        {state.version && <span className="dm-pill">v{state.version}</span>}
        {state.instance && <span className="dm-pill dm-hide-sm">instance {state.instance}</span>}
      </div>
      <p className="dm-muted" style={{
    margin: "0.85rem 0 0",
    fontSize: "0.8rem"
  }}>
        {state.checkedAt ? `Checked from your browser at ${state.checkedAt.toLocaleTimeString()} with GET ${endpoint.replace("https://", "")}.` : `Calling GET ${endpoint.replace("https://", "")} from your browser…`}
      </p>
    </div>;
};

<ApiStatus />

This widget calls the public health endpoint, [`GET /health`](/api-reference/utilities/health), straight from your browser. A green **Operational** pill means the API answered `200` with `"status": "healthy"`.

## Monitor it yourself

<Steps>
  <Step title="Point a monitor at the health endpoint">
    Use any HTTP uptime service and check `https://api.dualmindlab.tech/health` every minute or so. No token is needed.
  </Step>

  <Step title="Assert on the body, not just the status code">
    Check that the JSON contains `"status": "healthy"`:

    ```bash check-dualmind.sh icon="terminal" theme={null}
    curl -fsS --max-time 10 https://api.dualmindlab.tech/health | grep -q '"status":"healthy"' \
      && echo "DualMind API is up" || echo "DualMind API is DOWN"
    ```
  </Step>

  <Step title="Watch latency">
    Health checks normally answer in well under a second. Battles take longer because they wait for two models; see [Latency and speed](/concepts/latency-measurement).
  </Step>
</Steps>

## If something looks wrong

<AccordionGroup>
  <Accordion title="Health is green but battles fail" icon="swords">
    The API is up but a model provider may be having trouble. Battles still return `200`; the affected side is answered by a fallback model and starts with a **\[System Note]**. Try again or pick different models in Side by Side.
  </Accordion>

  <Accordion title="Every call returns 401" icon="key-round">
    Your access token has expired. Copy a fresh one from the Arena; see [Authentication](/api-reference/authentication).
  </Accordion>

  <Accordion title="Health is red or unreachable" icon="circle-alert">
    Check your own network first, then email [support@dualmindlab.tech](mailto:support@dualmindlab.tech) with the time and any `X-Correlation-Id` headers you have.
  </Accordion>
</AccordionGroup>

<Card title="Changelog" icon="history" href="/changelog" horizontal>
  Infrastructure changes and fixes are announced in the changelog, which also has an RSS feed.
</Card>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.