Send each upload, get back pass, review or block.
Base address: https://api.2minutestore.com/nigraan/v1
Every call carries your secret key: Authorization: Bearer ngk_live_…. Keep it on your server, never in an app or web page. Ask us to revoke a key at once if it leaks.
ngk_live_…) give real decisions and count toward your plan.ngk_test_…) cost nothing and never learn. They pass everything, unless the text contains nigraan:review or nigraan:block; then you get that answer, so you can build every path.POST https://api.2minutestore.com/nigraan/v1/checks?wait=8
Authorization: Bearer ngk_live_…
Idempotency-Key: item-123-v2
Content-Type: application/json
{
"ref": "item-123",
"title": "Blue lamp",
"text": "A desk lamp with a warm LED.",
"images": ["https://cdn.example.com/lamp-front.jpg"],
"media": [{ "type": "video", "url": "https://cdn.example.com/lamp.mp4" }]
}pending at once and the decision follows by webhook.HTTP 200 (202 while pending)
{
"object": "check",
"id": "cmx…",
"mode": "live",
"ref": "item-123",
"status": "done", // pending | done
"verdict": "pass", // pass | review | block
"category": null, // e.g. "adult", "counterfeit"
"reason": null, // one sentence for your reviewer
"instant": true, // answered from what was seen before
"created_at": "…",
"completed_at": "…"
}pass: show it. review: keep it hidden until your reviewer decides. block: keep it hidden; your reviewer can still clear it.
Do not keep your user on a loading screen while a check runs. The usual pattern:
POST /checks without wait. New content answers pending at once.Short text can use wait instead and usually gets the full answer in the same request.
GET https://api.2minutestore.com/nigraan/v1/checks/{id}When your reviewer clears or hides an item, send it. The same content is then decided the same way instantly, and copies of photos your reviewers hide are stopped at once. Live keys only.
POST https://api.2minutestore.com/nigraan/v1/decisions
{ "check_id": "cmx…", "decision": "hide", "category": "adult", "reason": "nude photo" }GET https://api.2minutestore.com/nigraan/v1/policy
PUT https://api.2minutestore.com/nigraan/v1/policy { "policy": { "passScore": 92, "categories": { "adult": "strict", "political": "off" } } }Levels per category: off, lenient, standard, strict. Categories that are illegal in Pakistan are never switched off (they become lenient).
Give us an https address and we POST every finished decision there: { "type": "check.completed", "created_at": "…", "data": { …the check… } }. Answer with any 2xx. If your server does not answer, we try again after 1, 5 and 30 minutes, then 2, 6 and 12 hours.
Every webhook is signed: header Nigraan-Signature: t=…,v1=…. Check it with your webhook secret before trusting the body:
import crypto from 'crypto';
// rawBody = the request body exactly as received (a string), header = req.headers['nigraan-signature']
function fromNigraan(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const t = Number(parts.t);
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false; // older than 5 minutes
const want = crypto.createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
return crypto.timingSafeEqual(Buffer.from(want, 'hex'), Buffer.from(parts.v1 || '', 'hex'));
}If Nigraan does not answer within your own time limit, follow your outage rule: hold the upload until the answer comes, or let it through and check it later.