A developer-friendly API for analyzing text bias, tone, emotion & clarity – powered by OpenAI + Perspective.
All requests are POST:
https://claritylensai.com/api/
Content-Type must be application/x-www-form-urlencoded
Free: no key (limit = 10/day)
Pro: pass your API key as key
in request body.
{
"text": "Your text here",
"key": "paid_api_key"
}
Returns emotional tone + clarity score
{
"success": true,
"data": {
"insight": "Core Emotion: Frustration\nClarity Score: 86/100"
}
}
Returns toxicity, threat, insult, profanity etc using Perspective API
{
"success": true,
"data": {
"TOXICITY": 26.3,
"INSULT": 10.1
}
}
Returns reworded version with reduced bias or harshness
{
"original": "You're stupid",
"rephrased": "I think there's a misunderstanding we can clear up"
}
Returns AI judgment on emotional tone & risk
{
"insight": "The message contains confrontational language and passive aggression."
}
Master API = Insight + Bias Score + Rewrite
{
"success": true,
"data": {
"original": "You're trash",
"rephrased": "That wasn't helpful and I expected better",
"bias_comparison": {
"TOXICITY": {
"original": 92.5,
"rephrased": 6.3
}
}
}
}
Need help? Email hello@claritylensai.com