Skip to content
StatusSupportDashboard
Archived API versions

Classify content (2026-08-05)

Archived reference for POST /v1/content on API version 2026-08-05.

API version 2026-08-05, superseded on 2026-08-11. This shape is served to accounts pinned to 2026-08-05 and to any request sending SafetyKit-Version: 2026-08-05. See API versioning for how versions resolve, and the current reference for the latest shape.

POST https://api.safetykit.com/v1/content

Classify a piece of content synchronously. Send user-authored text, images, or both, and receive per-policy results in the response. Requests have a maximum size of 6MB.

Authentication: Authorization: Bearer <api key>.

Field Type Description
user_id string, required Your stable identifier for the user this content belongs to.
content_id string, optional Your content identifier. Echoed in the response.
text string, optional User-authored text to classify. At most 16,000 characters.
images string array, optional Images to classify, each as base64-encoded image bytes, raw or as a data URI. At most 20 images, 5MB each.
metadata object, optional Additional product context. At most 8KB when serialized.

At least one of text or images is required.

{
"user_id": "user_123",
"content_id": "post_42",
"text": "Hey, is this still available?",
"metadata": { "channel": "marketplace_dm" }
}
Field Type Description
content_id string SafetyKit identifier for the classified content.
user_id string The user_id from the request.
policies array One result per policy evaluated for your account.
policies[].policy_id string Identifier of the policy.
policies[].version string Version of the policy.
policies[].score number or null Classifier score between 0 and 1. Higher means more likely violating. Null when no classifier scored the policy.
policies[].decision string match, not_match, or review.
policies[].escalation string none, completed, or error.
reference_set_matches array Reference set matches found for the submitted content.
reference_set_matches[].set_id string Identifier of the matched reference set.
reference_set_matches[].similarity number Similarity between the submitted content and the matched entry.
{
"content_id": "post_42",
"user_id": "user_123",
"policies": [
{
"policy_id": "phishing",
"version": "v3",
"score": 0.12,
"decision": "not_match",
"escalation": "none"
}
],
"reference_set_matches": []
}
Status Meaning
400 Invalid body or images. The message names the failing field.
401 Missing or invalid API key.
413 Request body exceeds 6MB.
503 Classification temporarily unavailable. The request was not processed and is safe to retry.