Classify

Test mode

Read the Botpoison Classify docs page "Test mode": https://botpoison.com/documentation/classify/test-mode.md
The Botpoison agent skill is at https://botpoison.com/skills/botpoison/SKILL.md.
Use them to make this change in my project, on the stack it already uses. Ask me for keys or IDs rather than inventing them.

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

Forcing a result

  • SpamContent containing botpoison-test-spam, with a score of 1.
  • CleanContent containing botpoison-test-review, with a score of 0.6.
  • CleanAnything 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.

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.

What test calls skip

Never recorded, never counted

The test key belongs to no project. 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 project's secret key before you deploy. See Keys.