Quality Control

Check images, text, audio and video against the rules of each market before you publish. Set up regions, start a check, poll it, then read the decision.

Quality Control checks content before it goes out: an NSFW screen, then a check against the rules of each market you name. Every check follows the same four steps.

Set up your regions

A region is a market, such as a country, with a pass mark and a set of rules. List regions returns yours; the first call creates a default set if your organization has none. Add your own with Create a region and Add a rule, or let Suggest rules with AI propose some for you to review. Keep the id of each region you want to check against.

Start a check

Send the content with the region IDs in regionIds:

Instead of sending an image, audio file or video in a multipart form, you can put it in storage first: Get an upload URL with its kind, PUT the file to the URL, then send the uploadKey you got, with the other fields, in a JSON body. Large files upload faster this way, and the API's form size limits don't apply.

You get a jobId back straight away. Credits are charged at this point. To see the words a text check is charged on before you start it, use Count billable words.

Track it

Poll Get a check until status is succeeded or failed. Images and text take a few seconds: poll every 2 to 5 seconds. For audio and video, every 10 to 30 seconds is enough.

Read the decision

When the check has succeeded, result holds the overall verdict, the NSFW result and a score for each region and rule. Its decisionId opens the full record with Get a decision. Flagged decisions also appear in the review queue.

Verdicts

verdictMeaning
APPROVEDThe content passed every region it was checked against.
REVIEWA region flagged the content, or nothing could be scored. A person should look at it.
BLOCKEDThe NSFW screen blocked the content, or a region scored it as not acceptable.

The overall verdict is the worst region verdict. If the NSFW screen blocks an image, its regions are not checked.

Scores

Each rule is scored from 0 to 100, where 100 means the content fully meets the rule, with a rationale that says why. The region score combines its rule scores, weighted by severity: low counts once, med twice and high four times. additional_findings lists problems the model found that no rule covers, each with a suggested_rule_description you can turn into a rule.

When part of a check could not run, for example because a model was unavailable, degraded is true and degradedReasons says why. Treat a degraded verdict with care.

Checks

statusMeaning
queuedAccepted and waiting to start.
runningIn progress. For audio and video, stage shows the step: decoding, transcribing or scoring.
succeededFinished. The outcome is in result.
failedStopped with an error. error says why, and the credits are refunded.

For video, scope chooses what is checked: video checks sampled frames, audio checks the transcribed speech, and both (the default) checks both. Turn off the NSFW screen with runNsfw: false or the region check with runRegional: false; at least one must stay on.

Your organization limits how many checks of each kind it can start per minute. Read the limits with Get settings; change them in the Universe app. Over a limit, a start call returns 429 with the wait in retry_after_sec.

Review

A person can overrule the model. List the review queue returns the REVIEW and BLOCKED decisions nobody has ruled on yet, and Rule on a decision records an approve or a reject. The model's verdict is kept; the ruling is shown next to it in adjudication.

Image fixes

For a flagged image, Fix an image makes an edited version that addresses one region's concerns. Poll Get an image fix for the new image; it usually takes 15 to 60 seconds. List image fixes returns the fixes already made for a decision.

Permissions

Each endpoint page lists the permission it needs. The API key needs them on the role of the person who created it.

ResourceCoversActions used
quality_control.classificationStart checks and image fixes, and read checks, decisions and their media.create, delete, read
quality_control.regionRegions and their rules, including AI rule suggestions.create, delete, read, update
quality_control.reviewThe review queue and rulings.read, update
quality_control.settingsOrganization settings for checks.read, update

Credits

Checks are charged when they start: per image, per word of text, or per minute of audio and video. The price is corrected to what actually ran when the check finishes, and refunded in full if it fails on our side. Image fixes and AI rule suggestions are charged too. Without enough credits, a start call returns 402 and nothing is created. Current prices, from the same rate table that charges you, are on each endpoint page, such as Check an uploaded image and Check video. See Credits.

On this page