Infrared documentation
Infrared screens the text and images your users post. One API call returns a verdict, a score for every policy and a recommendation your backend acts on.
Start here
- QuickstartCreate an API key, send one request and read the verdict. It works on the Free plan, in a project where nothing is configured yet.
- How Infrared worksOne request goes through admission, validation, screening and a decision. What each stage does, what uses a check and what happens after the answer.
- Core conceptsThe words Infrared uses, from the request you send to the decision your team makes, and how each one relates to the others.
The whole integration is one call
Your backend sends what a person just submitted: a listing, a review, a comment, a profile photo. It needs an API key and nothing else. A request that names no template runs the project's built-in basic check, which every plan includes.
curl https://api.useinfrared.com/v1/moderations \
-H "Authorization: Bearer $INFRARED_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"input": "Worst seller ever. You are a complete idiot."
}'const response = await fetch("https://api.useinfrared.com/v1/moderations", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.INFRARED_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
type: "text",
input: "Worst seller ever. You are a complete idiot.",
}),
});
const moderation = await response.json();import os
import requests
response = requests.post(
"https://api.useinfrared.com/v1/moderations",
headers={"Authorization": f"Bearer {os.environ['INFRARED_KEY']}"},
json={
"type": "text",
"input": "Worst seller ever. You are a complete idiot.",
},
)
moderation = response.json(){
"id": "mod_41RdNecZ5qkb9qsBisl5Pf",
"status": "completed",
"flagged": true,
"recommendation": "reject",
"policies": {
"toxicity": 0.98,
"hate_speech": 0,
"profanity": 0
},
"triggered": ["toxicity"],
"reasons": ["trigger:toxicity:flag", "triage:reject"]
}Your code branches on recommendation. The Quickstart goes from a new account to this response, and The moderation object explains every field of it.
What happens around that call
Infrared is a moderation API with a dashboard behind it. What your rules cannot decide lands in a review queue for your team, and every decision made there is reported to your backend by a signed webhook. Your product stays the place where content is published or removed.
- Your backend to Infrared: POST /
v1/ moderationsa listing someone just submitted - Infrared: Scores every policythen your content rules decide
- Infrared to Your backend: recommendation: "review"allow, review or reject
- Your backend: Holds the listingit acts on the recommendation
- Infrared to Your team: A review queue itemwith the evidence
- Your team to Infrared: A moderator decidesReject
- Infrared to Your backend: queue_
item. rejecteda signed webhook - Your backend: Removes the listing
What the docs cover
- Get started
What Infrared is, your first request and how a check runs.
- Moderate
Send text, images and whole forms, and read what comes back.
- Configure
Templates, policies and the rules that turn scores into decisions.
- Operate
The review queue, authors, actions and the webhooks that report them.
- Account
Projects, people, keys, plans, usage and what is stored.
- API reference
Every endpoint, parameter, object and error of the REST API.
What is in development
Everything else on these pages is what the API and the dashboard do today. Requests and responses are ones the API accepts and returns, and the dashboard captures come from a demonstration organisation called Acme Corp.
Something missing or unclear on this page? Write to support@useinfrared.com.