🚀 HarmCheck™ is featured alongside AI giants in Forbes! Read the latest article on AI-enhanced communication.
This API reference describes the RESTful API you can use to interact with the HarmCheck platform. The REST API is usable via HTTP in any environment that supports HTTP requests.
The HarmCheck API uses API keys for authentication. Create, manage, and learn more about API keys by contacting the HarmCheck team
Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). API keys should be securely loaded from an environment variable or key management service on the server.
API keys should be provided via HTTP Bearer authentication.
Authorization: Bearer OPENAI_API_KEY
Usage from these API requests counts as usage for the specified organization and project.
Description
Submit a sentence or a list of sentences and receive classifier-based reflections for each one. This endpoint supports batch processing of input text and returns classifier responses including sentiment, threat detection, profanity analysis, and named entity recognition.
HTTP Request
POST https://reflect-web-prod-ejhmhadydbdsawbw.eastus2-01.azurewebsites.net/api/v1/reflections
Headers
Required
Yes
Yes (if auth enforced)
Description
Application/json
Bearer token for authenticated access
Header
Content-Type
Authorization
Request Body
{
"sentence": "I think he's too old for the job"
}
Description
A sentence to be analyzed
Type
string[]
Field
Sentence
Response
{
"label": "ds_ageist",
"labelType": "unlawful",
"prompt": "Age discrimination?",
"sentence": "I think he's too old for the job",
"dismissed": false
}
Success Response
200 OK – Returns the classifier results for each input sentence.
Error Responses
Description
Invalid request payload
Unauthorized access
Internal server error
Status code
400
401
500
Request Body
{
"sentences": [
"I think he's too old for the job",
"Stop being such a fucktard"
]
}
Response
[
{
"label": "ds_ageist",
"labelType": "unlawful",
"prompt": "Age discrimination?",
"sentence": "I think he's too old for the job",
"dismissed": false
},
{
"label\"": "profane",
"labelType\"": "harmful",
"prompt\"": "Profane",
"sentence\"": "Stop being such a fucktard",
"dismissed\"": false
}
]
HarmCheck is committed to providing stability to API users by avoiding breaking changes in major API versions whenever reasonably possible.