Skip to content

Risk Check API

Check Risk

Check text content for potential risks and get detailed analysis.

Request

Request Structure

const response = await fetch('https://api.xstereotype.com/api/bias/check-bias', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Api-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
text: "His handwriting is like a asian boy"
})
});

Headers

HeaderRequiredDescription
X-Api-KeyYesYour API authentication key
Content-TypeYesMust be application/json

Response

{
"data": {
"content_id": "aa3b8b64-71eb-41d2-8e19-e4f8239bbf5c",
"bias_Label": "race",
"explanation": "The query \"His handwriting is like an asian boy\" perpetuates a stereotype based on race by suggesting that handwriting can be categorized by ethnicity. This aligns with the \"race\" label found in several retrieved results that associate characteristics with specific racial groups.",
"recommendation": "Rephrase the query to focus on the characteristics of the handwriting itself, avoiding racial generalizations. For example, try \"His handwriting is neat and precise\" or \"His handwriting is small and delicate.\"",
"bias_score": 61.71,
"detail": "Successfully checked risk."
},
"message": "Operation successful",
"isSuccess": true
}

Response Fields

FieldTypeDescription
content_idstringUnique identifier for the analyzed content
bias_LabelstringCategory of detected bias (e.g., race, gender)
explanationstringDetailed explanation of the detected risk
recommendationstringSuggestions for removing or reducing risk
bias_scorenumberNumerical score indicating risk severity (0-100)
detailstringAdditional processing information
messagestringOperation status message
isSuccessbooleanIndicates if the operation was successful

Bias Score Ranges

RangeDescription
0-30Low risk
31-70Moderate risk
71-100High risk