# SubQ (BYOK)

> Create an API key for SubQ and add it to AnyRouter.


# SubQ — Bring Your Own Key

Route requests through your own SubQ account ([BYOK](/features/byok)); no platform credits are charged. You need a API key string.

## Get your API key

1. Sign in to the SubQ console.
2. Create a new API key and copy it now; most providers show it once.

## Models

| Model | Status | Use it for | AnyRouter endpoint |
|---|---|---|---|
| `subquadratic/subq-preview` | Early access | Long-context chat, files, function calling | `POST /api/v1/chat/completions` |
| `subquadratic/subq-snap-preview` | Public preview | Fast structured decisions (yes/no, choice, score) | `POST /api/v1/decisions` |

Both models run on your SubQ key, not on platform credits.

## Decisions

`subquadratic/subq-snap-preview` returns typed answers with probabilities instead of chat text. Send the state to evaluate and one or more named questions:

```bash
curl https://anyrouter.dev/api/v1/decisions \
  -H "Authorization: Bearer $ANYROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "subquadratic/subq-snap-preview",
    "state": "Patient with asthma reports a sore throat, fever since yesterday, and shortness of breath.",
    "questions": {
      "escalate": {
        "type": "noul",
        "instructions": "Should a nurse see this chat before the patient books anything?",
        "criteria": {
          "true": "Breathing trouble, chest pain, or a flare of a known condition",
          "false": "Stable symptoms the patient can book for themselves"
        }
      }
    }
  }'
```

The response has one answer per question name. For a `noul` question, `noul` is the probability of yes, from 0 to 1.

## Add it to AnyRouter

1. Open **[Dashboard → BYOK](https://anyrouter.dev/dashboard/byok)**, find **SubQ** under **Available** and click **Add key**.
2. Paste the key.
3. Click **Save**. AnyRouter validates the key against SubQ first; on failure the dialog shows the upstream error and nothing is saved.

- Create key: [SubQ console](https://console.subq.ai)
- Default base URL (editable on the key form): `https://api.subq.ai/v1`



## Related

- [BYOK Provider Setup Guide](/docs/features/byok-providers.md)
- [Bring Your Own Key (BYOK)](/docs/features/byok.md)
