Quickstart
Submit your first moderation request in under five minutes
This guide walks you through authenticating, submitting a moderation request, and checking the result.
The Omnifence agent skill works with any coding agent. It teaches the agent to find every place your app handles content and to wire the moderation calls for you.
Prerequisites#
- A Omnifence account. Sign up at the dashboard. Your organization is provisioned automatically on first signup.
- An API key. Create one from the API Keys page in the dashboard. The raw value is shown once at creation, so copy it immediately.
- cURL or any HTTP client.
Steps#
1. Authenticate
Include your API key as a Bearer token in the Authorization header with every request.
export OMNIFENCE_API_KEY="your_api_key_here"
2. Submit an image moderation request
Send an image URL for moderation. The API returns a job ID immediately. Use
POST /api/v1/moderate/text to moderate text instead, or
POST /api/v1/moderate/video for a video URL, or POST /api/v1/moderate/audio for an audio clip.
curl -X POST https://api.omnifence.ai/api/v1/moderate/image \
-H "Authorization: Bearer $OMNIFENCE_API_KEY" \
-F "image=https://example.com/photo.jpg"
{
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "queued"
}
3. Check job status
Poll the job endpoint with the returned job_id.
curl https://api.omnifence.ai/api/v1/job/a1b2c3d4-e5f6-7890-abcd-ef1234567890 \
-H "Authorization: Bearer $OMNIFENCE_API_KEY"
{
"is_prohibited": false,
"nsfw": false,
"job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "image",
"status": "completed",
"created_at": "2026-05-19T12:00:00.000Z",
"completed_at": "2026-05-19T12:00:05.000Z"
}
A rejected job adds a reason that names the policy or custom category that tripped.
{
"is_prohibited": true,
"reason": "The image contains references to coffee and coffee beans (coffee).",
"nsfw": false,
"job_id": "0cc5a7aa-aeb5-4395-9fa0-324611ec34c3",
"type": "image",
"status": "completed",
"created_at": "2026-08-10T16:40:41.352Z",
"completed_at": "2026-08-10T16:40:44.146Z"
}
4. Set up a webhook (optional)
Instead of polling, register a webhook to receive results automatically.
curl -X POST https://api.omnifence.ai/api/v1/webhook/register \
-H "Authorization: Bearer $OMNIFENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://your-app.com/webhooks/omnifence"}'
{
"message": "Webhook URL registered successfully",
"url": "https://your-app.com/webhooks/omnifence"
}
When the job completes, the API POSTs the result to your URL. The payload carries the same
decision fields as the job endpoint, plus a delivery_id for deduplication. It carries no type
and no created_at.
{
"is_prohibited": true,
"nsfw": false,
"reason": "The image contains references to coffee and coffee beans (coffee).",
"job_id": "8298ed3d-b2e9-409d-9084-bb481934476a",
"status": "completed",
"completed_at": "2026-08-10T16:42:49.655Z",
"delivery_id": "wh_8298ed3d-b2e9-409d-9084-bb481934476a"
}
Every callback is signed with your account's signing secret, following the Standard Webhooks specification. Verify the signature before you act on a payload — find your secret in the dashboard under Account → Webhooks.
See webhooks for verification, the full field list and the retry behaviour.
Next steps#
Learn how API keys work and how to manage them.
Content moderationUnderstand how moderation works across each content type.
Error recoveryRecover in-flight jobs after a restart or a missed webhook.
Handle a rejectionUnderstand decision logic and what to do when a job is rejected.
Webhook reliabilityBuild reliable webhook handling with fallback polling.
API referenceFull endpoint reference with request and response schemas.