Classify

# Test mode

Send the secret key `test` to try your integration without real spam. The content you send decides the result.

## Forcing a result

- Spam Content containing `botpoison-test-spam`, with a score of 1.
- Clean Content containing `botpoison-test-review`, with a score of 0.6.
- Clean Anything else, with a score of 0.

The review marker answers a score between the cuts, the kind a review queue holds, so you can try that path too. See [Labels and scores](https://botpoison.com/documentation/classify/labels-and-scores/).

JavaScript

```javascript
// With the secret key "test", the content decides the result
// Every request still names its model, as it does with a real key
const SPAM = { content: "Hi botpoison-test-spam", model: "spam-standard" };
// -> { "label": "spam", "score": 1, "model": "spam-standard" }

const REVIEW = { content: "Hi botpoison-test-review", model: "spam-standard" };
// -> { "label": "clean", "score": 0.6, "model": "spam-standard" }

const CLEAN = { content: "Hi, could you send me a quote?", model: "spam-standard" };
// -> { "label": "clean", "score": 0, "model": "spam-standard" }

const UNAVAILABLE = { content: "Hi botpoison-test-unavailable", model: "spam-standard" };
// -> 503 { "ok": false, "message": "Classification is temporarily unavailable" }
```

## Forcing an outage

Content containing `botpoison-test-unavailable` returns a 503 with `Classification is temporarily unavailable`, as an outage of the model would. Use it to try your retry or fallback.

## Choosing a model

The test key requires `model` as a real key does, and the response names the model you sent. An unknown model returns the same 400. The content still decides the result. See [Models](https://botpoison.com/documentation/classify/models/).

## What test calls skip

Never recorded, never counted

The test key belongs to no configuration. Test calls are not recorded, do not appear in the dashboard and never count toward your plan.

Validation still applies: missing or empty `content` or an unknown `model` returns a 400, as it does with a real key.

Switch to your configuration's secret key before you deploy. See [Classify keys](https://botpoison.com/documentation/classify/keys/).
