Discrimination Detection API
Detect protected-class discrimination signals in text.
The Discrimination Detection API classifies submitted text against 200 indicators across 6 discrimination groups in 16 supported languages.
Use the results to enrich HR compliance, platform moderation, housing, education, and trust & safety workflows.
POST /v1/analyze · REST · JSON · Bearer authentication
Scope
Sentiqra analyzes discrimination signals contained in the text you submit. It does not independently investigate cases, verify factual claims, determine legal liability, or replace human review by qualified compliance or legal personnel.
Make your first request
curl -X POST https://sentiqra.tech/v1/analyze \
-H "Authorization: Bearer $SENTIQRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "We should reject applicants from that ethnic group because they do not fit our culture.",
"language": "en",
"analyzers": [
"discrimination"
]
}'
Example response:
{
"language": "en",
"language_source": "declared",
"signals": [
{
"analyzer": "discrimination",
"code": "protected_class_bias",
"label": "Protected Class Bias",
"score": 0.93,
"level": "category"
},
{
"analyzer": "discrimination",
"code": "ethnic_exclusion",
"label": "Ethnic Exclusion",
"score": 0.91,
"level": "label",
"parent": "protected_class_bias"
}
],
"meta": {
"analyzers": [
{
"name": "discrimination",
"status": "completed",
"applicability": "analyzable",
"assessment": "signals_detected",
"signal_count": 2,
"billed": true
}
]
},
"usage": {
"analyzer_runs": 1
},
"verification": {
"configuration": "sqcfg_5DDA6HPF",
"fingerprint": "fp_8a72...19f",
"input_commitment": "ic_31bd...a42",
"signature": "sig_ed25519_4c1f...e2a",
"key_id": "edk_af4f218e"
}
}
Don't have an API key? Generate one from the API Keys page in your dashboard.
Endpoint
/v1/analyze
Classifies discrimination-related signals in submitted text and returns ranked groups and indicators.
Request
{
"text": "We should reject applicants from that ethnic group because they do not fit our culture.",
"language": "en",
"analyzers": [
"discrimination"
]
}
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| text | string | Yes | - | Text to analyze |
| language | string | No | "en" | Supported language code |
Advanced parameters →
Related endpoints
GET /v1/meta/domains/discrimination
Identifier, availability, and endpoint for this analyzer. Send a Bearer API key for taxonomy summary and supported languages.
GET /v1/meta/domains
Lists all analyzers with identifiers, status, and endpoints - no authentication required. Send a Bearer API key for taxonomy size and language counts.
What the API can classify from text
Sentiqra can identify language associated with documented discrimination mechanisms such as:
Can classify from text
- • Racial and ethnic slurs or stereotypes
- • National origin discrimination
- • Religious discrimination
- • Sex and gender discrimination
- • Sexual orientation discrimination
- • Gender identity discrimination
- • Disability and health discrimination
- • Age discrimination
- • Employment, housing, and education discrimination
- • Harassment and hostile environment language
- • Coded and indirect bias
Requires external evidence
- • Legal liability determination
- • Investigation findings
- • Witness testimony
- • Pattern-or-practice evidence
- • Comparator data
- • Statistical disparity evidence
- • Intent vs. impact analysis
- • Jurisdictional legal standards
These are classification signals, not legal determinations. For cases requiring external evidence, Sentiqra can provide one textual evidence layer for your broader investigation.
What requires additional evidence
Some discrimination conclusions cannot be established from an isolated text item.
Legal liability
Determining legal liability requires investigation, evidence, and review by qualified personnel.
Pattern or practice
Establishing a pattern of discrimination requires multiple incidents, comparator data, and statistical evidence.
Intent vs. impact
Distinguishing discriminatory intent from disparate impact may require contextual and historical evidence.
Jurisdictional standards
Legal standards vary by jurisdiction. Sentiqra does not apply jurisdiction-specific legal tests.
Investigation findings
Formal investigations require witness testimony, documents, and procedures that Sentiqra does not perform.
Classification is not enforcement
A typical compliance workflow looks like:
Content
↓
Sentiqra discrimination signals
↓
Context / policy / jurisdiction / comparator evidence
↓
Human or legal review
↓
Customer-defined decision
Sentiqra supplies structured classification evidence. Your organization determines whether additional investigation, labeling, escalation, enforcement, or no action is appropriate.
"Other" fallback for non-discriminatory text
When no discrimination indicator is detected above threshold, Sentiqra returns the other group as a fallback. This reduces false positives on benign text and lets your workflow distinguish "no discrimination detected" from "low-confidence discrimination detected".
The other fallback is excluded from the published 20-group / 200-indicator counts and is distinguished from discrimination-topic signals in the response.
Use the fallback to filter benign content out of review queues.
Response structure
groups
High-level discrimination categories (level: "category").
{
"analyzer": "discrimination",
"code": "protected_class_bias",
"label": "Protected Class Bias",
"score": 0.93,
"level": "category"
}
signals
More specific indicators within each group (level: "label").
{
"analyzer": "discrimination",
"code": "ethnic_exclusion",
"label": "Ethnic Exclusion",
"score": 0.91,
"level": "label",
"parent": "protected_class_bias"
}
parent
Category slug this label-level signal belongs to. Dotted form is group.label - e.g. protected_class_bias.ethnic_exclusion means ethnic_exclusion sits under protected_class_bias.
| Field | Type | Description |
|---|---|---|
| code | string | Stable machine identifier |
| label | string | Human-readable display name |
| parent | string | Parent category code (label-level only) |
| score | float | Signal-match strength (0.0–1.0) |
Signal scores
A score expresses signal-match strength under a particular analyzer configuration. It is not a probability that the signal or a downstream action is correct. Validate action thresholds on representative labeled data.
Paid API keys receive the continuous score (profile full.v1); anonymous, playground, demo, and free-tier responses return banded scores with a confidence band (profile reduced.v1). See Understanding signals for the profile and band table.
It does not represent:
- • Probability that discrimination occurred in fact
- • Probability that a speaker is malicious
- • Legal liability
- • Intent vs. impact
- • Justification for an enforcement action
Confidence should determine evidence strength - not enforcement policy. Configure review thresholds according to indicator type, policy, context, and your own labeled evaluation data.
Your application decides what happens next.
200 indicators across 6 discrimination groups
The taxonomy is designed to describe protected-class discrimination mechanisms, rather than political viewpoints. Groups cover:
Deterministic classification
For the same normalized input evaluated against the same supported pinned configuration and output profile, Sentiqra returns the same canonical signals.
Version changes are explicit so historical and current analyzer behavior can be distinguished.
Supported languages
Discrimination Detection currently supports 16 languages.
| Code | Language | Status |
|---|---|---|
| en | English | Production |
| fr | French | Production |
| es | Spanish | Production |
| de | German | Production |
| it | Italian | Production |
| nl | Dutch | Production |
| no | Norwegian | Production |
| pl | Polish | Production |
| uk | Ukrainian | Production |
| ru | Russian | Production |
| sv | Swedish | Production |
| fi | Finnish | Production |
| lv | Latvian | Production |
| lt | Lithuanian | Production |
| pt | Portuguese | Production |
| tr | Turkish | Production |
All languages this detector supports are enabled on every plan. Custom or restricted arrangements may scope language access - check the dashboard or GET /v1/account/entitlements for account-specific availability.
Detector does not support language → 400 unsupported_language
Detector supports language but the account is not entitled (restricted/custom arrangements only - GA plans include all supported languages) → 403 language_not_in_plan
Performance
Built for real-time compliance and moderation pipelines.
Published latency targets, not measured guarantees - measured snapshot figures are on the performance dashboard. Actual latency depends on network conditions, payload size, and load.
Errors, limits, and rate controls
The Discrimination API uses standard HTTP response codes:
| Code | Description |
|---|---|
| 400 | Invalid request |
| 401 | Authentication error |
| 403 | Access unavailable |
| 413 | Input too large |
| 429 | Rate or quota exceeded |
| 500 | Internal error |
| 503 | Temporary unavailability |
For retryable responses, follow documented backoff and Retry-After behavior.
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests per second |
| X-RateLimit-Remaining | Remaining requests in current window |
| X-RateLimit-Reset | Unix timestamp when window resets |
Data handling
Sentiqra documents separately what crosses and remains within the service boundary:
Raw request content
Submitted text is processed in memory and not retained. No model training on your data.
Signal metadata
Individual signal results are not stored. Only aggregate counters are derived from them before the response is sent, apart from the bounded idempotency replay copy and webhook delivery payloads described in the retention schedule.
Operational metadata
Request status, key identifiers, latency, and billing information are logged for operational purposes.
Code examples
All examples use environment variables for API keys - do not hard-code keys in source.
curl -X POST https://sentiqra.tech/v1/analyze \
-H "Authorization: Bearer $SENTIQRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"text": "We should reject applicants from that ethnic group because they do not fit our culture.",
"language": "en",
"analyzers": [
"discrimination"
]
}'
Reading Discrimination Analysis output
What you can safely infer from a result - and what you must not.
Intended task
Flag documented exclusionary and discriminatory language patterns tied to protected classes - for human or policy review.
Input requirements
text- the only field analyzed; up to 4,096 Unicode code points. Over the limit is rejected withinput_too_long, never truncated.language- must be a language this analyzer supports. Unsupported codes are rejected with400 unsupported_language, never analyzed as a different language.analyzers- include"discrimination"; up to 2 analyzers per request, one billed run each.- No context beyond
text- no user IDs, history, profiles, or attachments are read or inferred. - Sees only the submitted text - the writer's identity, role, and the document's legal context are not inputs.
Ordinary positive
“Applicants must be under 40 and born in this country - no exceptions.”
Safe inference: The text matches documented exclusion patterns on two protected classes. Route it to review with the labels attached.
Confusing negative · Quotation
“The handbook's old rule - "applicants must be born in this country" - was struck down in 2019.”
What happens: The exclusion pattern can still match the quoted clause. Signals flag the language for review - they do not read the surrounding context that makes this a compliance document describing a repealed rule.
Why it's tricky: Audits, legal analysis, and journalism all quote discriminatory language. Ambiguous phrasing ("we need someone young and energetic") may produce weak or no signals - absence is "not detected," never clearance. Both cases are why flagged text goes to review, not to automatic verdicts.
What you can safely infer
- Which documented protected-class patterns the text matched, and at what strength.
- That the result is reproducible - the receipt ties the labels to the configuration that produced them.
What you must not infer
- ✕That unlawful discrimination occurred - legality is a determination for your counsel and jurisdiction.
- ✕The author's intent, or that a specific person was harmed.
- ✕That clean text contains no exclusionary content - a missing signal is "not detected," never "compliant."
Boundary: Discrimination signals flag exclusionary language for review - they do not determine that unlawful discrimination occurred, and they say nothing about intent.