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

# theo status / theo verify

> Check Theo API connection, auth, and system health.

Two commands cover the same ground at different fidelities — `theo status` for humans, `theo verify` for scripts.

## `theo status`

```bash theme={null}
theo status
```

Human-readable connection + health check. Calls `theo.verify()` against the configured `baseUrl`, and **also probes the other host** (apex vs `www`) to catch the apex-redirect 401 trap — the #1 cause of first-time 401s.

### Sample output (healthy)

```
[theo] API key: theo_sk_live_a1b...
[theo] Base URL: https://www.hitheo.ai

[theo] ✓ Status: healthy
[theo] Version: 2026-03-28
[theo] Models available: 14
[theo] Round-trip: 186ms

[theo] ✓ Authentication OK
```

### Sample output (401 from apex redirect)

```
[theo] API key: theo_sk_live_a1b...
[theo] Base URL: https://hitheo.ai

[theo] ❌ Verification failed against https://hitheo.ai
[theo]   Reason: Theo API error 401: Invalid API key
[theo]   Hint: Authentication failed. Confirm your API key starts with `theo_sk_` …

[theo] Retrying against the canonical host https://www.hitheo.ai...
[theo] ✓ https://www.hitheo.ai responded with auth in 172ms.

[theo] ⚠  Your configured baseUrl appears to be a redirect target that drops the
[theo]    Authorization header. Update your SDK config:
[theo]      new Theo({ apiKey, baseUrl: "https://www.hitheo.ai" })
[theo]    or unset THEO_BASE_URL to use the SDK default.
```

See [401 Troubleshooting](/troubleshooting/401-errors) for the full background on why this happens.

## `theo verify`

```bash theme={null}
theo verify
```

Machine-readable version of the same diagnostic. Emits JSON and exits `1` when `authenticated` is false, so you can gate CI on it.

```json theme={null}
{
  "healthy": true,
  "authenticated": true,
  "baseUrl": "https://www.hitheo.ai",
  "latencyMs": 186,
  "modelCount": 14,
  "version": "2026-03-28"
}
```

### Scripted use

```bash theme={null}
if ! theo verify > /tmp/theo.json; then
  echo "Theo API unreachable or key invalid:"
  jq -r '.error, .hint' /tmp/theo.json
  exit 1
fi
```

Same diagnostic is available programmatically as [`theo.verify()`](/sdk-reference/client#first-run-diagnostic) in the SDK.
