Skip to main content

Build with nocensor.ai

REST API for uncensored image generation, face swap, and video. API key auth, async jobs, same credit system as the UI.

API key auth

Bearer token with per-key rate limits. Max 5 keys per account.

Async jobs

202 Accepted + polling. No blocking requests. Signed URLs when complete.

Same credit system

Credits deducted on submission. Failed jobs auto-refunded by cron.

Prompt safety

Same content filter as the UI. CSAM blocked at all tiers.

Authentication

All endpoints (except /api/v1/health) require a Bearer token:

Authorization: Bearer nc_live_<your_key>

API keys are generated in Settings → API Keys. Keys are shown once at creation — store them securely.

Endpoints

MethodPathDescriptionAuth
POST/api/v1/generateImage generation (txt2img & img2img)Required
POST/api/v1/face-swapFace swapRequired
POST/api/v1/videoVideo generation (t2v & i2v)Required
GET/api/v1/jobs/{id}Poll job status + signed output URLsRequired
GET/api/v1/jobsList recent jobs (paginated)Required
GET/api/v1/accountCredit balance + usageRequired
GET/api/v1/healthService health checkNone

Quick start

Submit an image generation job and poll for the result:

1. Submit a job (202 Accepted)

curl -X POST https://nocensor.ai/api/v1/generate \
  -H "Authorization: Bearer nc_live_<your_key>" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "beautiful woman, photorealistic", "model": "realistic"}'

# 202 Accepted
# {
#   "data": { "id": "job_...", "status": "pending" },
#   "meta": { "poll_url": "/api/v1/jobs/job_...", "credits_remaining": 490 }
# }

2. Poll until complete

curl https://nocensor.ai/api/v1/jobs/<job_id> \
  -H "Authorization: Bearer nc_live_<your_key>"

# 200 OK — when done:
# {
#   "data": {
#     "id": "job_...", "status": "completed",
#     "outputs": [{ "url": "https://...", "media_type": "image", "expires_at": "..." }]
#   }
# }

Rate limits

LimitValueScope
Per-key60 rpmPer API key
Per-user aggregate300 rpmAll keys on your account
Active keys5 maxPer account

All responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers. Rate-limited responses include a Retry-After header.

Error codes

CodeHTTPTrigger
UNAUTHORIZED401Missing, invalid, or revoked API key
FORBIDDEN403Account suspended or key missing required scope
INSUFFICIENT_CREDITS402Not enough credits for the workflow
RATE_LIMITED429Per-key or per-user rate limit exceeded
VALIDATION_ERROR422Malformed request body
PROMPT_BLOCKED400Content policy filter triggered
CONSENT_REQUIRED400Face processing without biometricConsent: true
PAYLOAD_TOO_LARGE413Image exceeds 3.4MB
GPU_UNAVAILABLE503All GPU workers throttled — retry shortly
NOT_FOUND404Job does not exist or not owned by caller

Ready to build?

Create an account, get your API key, and start generating.

Get started free