POST
/
v1
/
validate
/
spam_check
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.validate.spamcheck({
  "text": "Congratulations! You've won a free iPhone! Click here to claim now!"
})
{
  "success": true,
  "check": {
        "score": 0.95,
        "is_spam": true
  },
  "_usage": {
        "input_tokens": 20,
        "output_tokens": 14,
        "inference_time_tokens": 513,
        "total_tokens": 547
  }
}

Body

text
string | array<string>
required
The text to check for spam.
x-api-key
string
required
Your JigsawStack API key

Response

success
boolean
Indicates whether the call was successful.
_usage
object
Usage information for the API call.
check
object | array<object>
When text is a string, returns an object. When text is an array, returns an array of objects.
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.validate.spamcheck({
  "text": "Congratulations! You've won a free iPhone! Click here to claim now!"
})
{
  "success": true,
  "check": {
        "score": 0.95,
        "is_spam": true
  },
  "_usage": {
        "input_tokens": 20,
        "output_tokens": 14,
        "inference_time_tokens": 513,
        "total_tokens": 547
  }
}