nocensor.ai NSFW AI API: A Developer Integration Guide
Chris · · 10 min read

Mainstream AI APIs draw a hard line at explicit content. OpenAI's image generation API, Stability AI's cloud endpoints, and Google's Imagen API all apply content filters that reject adult or explicit requests before generation begins. For developers building adult content platforms, NSFW companion apps, or explicit creative tools, those restrictions make the most popular APIs unusable before a single line of integration code is written.
nocensor.ai's REST API was built for that segment. It provides a complete NSFW AI API for generating images, video, face swaps, and chained enhancement pipelines without content filters — delivered through a standard HTTP interface with Bearer token authentication, webhook notifications, and credit-based billing.
This guide covers the full API surface: authentication and scopes, generation endpoints, multi-stage pipelines, webhook subscriptions, rate limiting, and how nocensor.ai compares to filtered alternatives.
What Developers Can Build with nocensor.ai's NSFW AI API

The core capability is unrestricted AI content generation over HTTP. That opens use cases that are structurally blocked by mainstream AI APIs:
Adult content platforms can use the /generate endpoint with full explicit prompt support. Custom LoRA models define consistent character identities across generated scenes, removing the need for per-request prompt engineering to maintain visual consistency.
NSFW companion applications can chain operations using the pipeline API. A single API call dispatches a multi-step workflow — generate a character image, apply a face swap from a stored face model, then upscale the result — with all stages tracked under one pipeline identifier.
Animated content tools gain access to image-to-video and text-to-video endpoints, with LoRA injection for character consistency across animated frames. These endpoints share the same async dispatch pattern as image generation.
Batch processing pipelines benefit from webhook delivery: job completion events are pushed to a registered HTTPS endpoint as each job finishes, eliminating polling loops in high-throughput systems.
In each case, the differentiating factor is generation that would fail a content filter on any mainstream AI API. nocensor.ai's NSFW AI API treats unrestricted generation as the primary design constraint, not a compliance exception.
API Keys, Scopes, and Authentication

Authentication uses Bearer tokens in the Authorization header:
Authorization: Bearer nc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
API keys use the prefix nc_live_ followed by 44 base64url characters. Keys are created in account settings and displayed once at creation — nocensor.ai stores only a cryptographic hash of each key, so the plaintext is not recoverable after the initial display.
Each key carries scopes that gate access to different endpoint groups:
| Scope | Routes covered |
|---|---|
generation | /generate, /video, /face-swap, /enhance, /undress, /pipelines |
mgmt | /jobs, /account, /credits, /payments, /models, read webhooks |
webhooks | Webhook CRUD (/webhooks/*) |
Content generation requires a key with the generation scope. Polling job status, reading the account, or querying credits requires mgmt. Managing webhook subscriptions requires webhooks.
Error semantics differ between key and account states: 401 UNAUTHORIZED indicates a missing or invalid key. 403 INSUFFICIENT_SCOPE means the key is valid but lacks the required scope for that route. 403 FORBIDDEN means the account is suspended. These three distinct codes make it straightforward to handle each failure mode differently in integration code.
Accounts support up to five active API keys simultaneously. Revocation takes effect immediately.
Generating Images and Videos with a Single POST Request

Image generation submits to POST /api/v1/generate:
{
"prompt": "full body portrait, dramatic cinematic lighting",
"model": "realistic",
"width": 1024,
"height": 1024,
"loras": [
{ "id": "lora-uuid", "strength": 0.85 }
]
}
The endpoint returns 202 Accepted with a job identifier and a poll URL:
{
"data": {
"id": "a1b2c3d4-...",
"status": "pending"
},
"meta": {
"poll_url": "/api/v1/jobs/a1b2c3d4-...",
"credits_remaining": 92,
"request_id": "req_..."
}
}
Generation is asynchronous. GET /api/v1/jobs/{id} returns the current status (pending, processing, completed, failed) and, on completion, a time-limited output URL. Job poll responses include a Retry-After: 5 header while work is in progress, signaling the recommended polling interval without requiring hardcoded sleep timers in client code.
The same pattern applies to video (POST /api/v1/video), face swap (POST /api/v1/face-swap), and image enhancement (POST /api/v1/enhance). All generation routes return 202 and route through the same job polling mechanism.
The loras field accepts up to two LoRA models for image jobs and one for video. LoRAs must match the base model of the target endpoint — injecting a video-trained LoRA into an image request returns 400 LORA_INCOMPATIBLE. Strength is clamped to [0.1, 1.0], defaulting to 0.8 when omitted.
Previous job outputs can be referenced directly in subsequent requests using the job_<uuid> source format, avoiding the need to download and re-upload outputs between steps.
Multi-Stage Pipelines: Chain AI Operations in a Single Request

The /pipelines endpoint accepts an ordered sequence of up to five operations and handles full orchestration — cost calculation, dispatch, and stage chaining — as a single unit.
{
"stages": [
{
"op": "generate",
"prompt": "full body portrait, cinematic lighting",
"model": "realistic"
},
{
"op": "upscale",
"scale": 2
},
{
"op": "face-swap",
"face_model_id": "face-model-uuid",
"biometric_consent": true
}
]
}
The response is 202 Accepted with a pipeline_<uuid> identifier. GET /api/v1/pipelines/{id} returns aggregate status across all stages — the pipeline reports completed only when every stage finishes successfully.
Available stage operations: generate, undress, face-swap, upscale, face-restore, bg-replace, attach-object, animate, redress.
The API validates stage ordering before dispatch. Image-only operations (upscale, face-restore, face-swap, etc.) cannot follow an animate stage because animated output is video, not an image. Submitting that combination returns 400 PIPELINE_INVALID_STAGE_ORDER immediately, before any credits are deducted.
Dry-run mode (?dry_run=true) returns the credit cost breakdown per stage without dispatching or charging credits. The response includes stages[].credit_cost and total_cost — useful for building pricing UIs that show users what a pipeline configuration will cost before they commit to running it.
The undress and animate stages are premium-gated: they require a prior real purchase on the account. Promotional grants do not qualify. The validation returns 402 PURCHASE_REQUIRED when this condition is not met, before any dispatch occurs.
Webhook Subscriptions: Real-Time Job Completion Events

For production systems handling significant job volume, polling individual jobs adds overhead that compounds at scale. Webhook subscriptions push events to a registered HTTPS endpoint as each job completes or fails.
{
"url": "https://yourapp.com/hooks/nocensor",
"events": ["job.completed", "job.failed"],
"description": "Production job handler"
}
The response includes a secret value shown once at creation. nocensor.ai signs all outgoing webhook payloads with HMAC-SHA256 using that secret and includes the signature in the X-Nocensor-Signature header. Verifying the signature on every incoming request rejects forged payloads without inspecting their contents.
Registered URLs must use HTTPS. Requests to RFC1918 addresses, loopback, and link-local ranges are rejected at webhook creation time to prevent server-side request forgery vulnerabilities from being introduced via the API.
Delivery retries happen automatically after failures. Once an endpoint accumulates five consecutive failed deliveries, the subscription is automatically disabled to stop retrying a dead endpoint. Delivery history is available at GET /api/v1/webhooks/{id}/deliveries, including response codes and timing per attempt.
Secret rotation works via PATCH /api/v1/webhooks/{id}?rotate_secret=true. A 24-hour grace period means nocensor.ai accepts both the old and new secrets during the transition, enabling zero-downtime rotation in production deployments without dropped events.
The POST /api/v1/webhooks/{id}/test endpoint delivers a synthetic webhook.test event synchronously — the fastest way to confirm an endpoint is correctly receiving and verifying payloads before routing live job events.
Each account supports up to 10 active webhook subscriptions.
Rate Limits, Credit Billing, and Cost Estimation

Rate limits are applied per class rather than as a single global counter. Each request falls into one of three classes, and exhausting one does not affect the others:
| Rate class | Limit | Routes |
|---|---|---|
generation | 10 RPM | /generate, /video, /face-swap, /enhance, /undress, /pipelines |
mgmt | 60 RPM | /jobs, /account, /credits, /models, /payments, webhook reads |
webhook-mgmt | 10 RPM | Webhook CRUD |
Every authenticated response includes X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers for the class of the current request. Rate-limited responses return 429 with a Retry-After header showing the exact reset time.
Credit billing is atomic: credits are deducted when a job is dispatched and automatically refunded if the job fails. For pipelines, the full multi-stage cost is deducted upfront at submission time. Stages that never execute because an earlier stage failed are refunded to the account.
The current credit balance is readable at GET /api/v1/credits, which returns the running balance alongside lifetime purchased and consumed totals. GET /api/v1/payments provides paginated payment history.
Cost estimation uses the ?dry_run=true parameter on POST /api/v1/pipelines. Each stage's credit cost is returned without dispatching or deducting credits. This makes it practical to build cost-display UIs that run a dry-run request whenever the pipeline configuration changes, surfacing the exact cost before the user submits the actual run.
nocensor.ai API vs. Mainstream AI APIs

The gap between nocensor.ai's NSFW AI API and mainstream alternatives is a policy decision, not a capability one. OpenAI's image generation API, Stability AI's cloud API, and Google's Imagen API all apply content filters that block explicit requests before generation runs. Attempting adult content through those APIs produces policy violations, silent quality degradation, or account flags. No configuration changes that outcome — the restriction is enforced at the platform level and is non-negotiable regardless of use case.
nocensor.ai applies no content filter to generation requests. The prompt safety layer handles a narrow set of prohibited categories and passes everything else through as submitted. Adult content, explicit scenes, and NSFW character generation all execute normally, with the same latency and output quality as non-explicit requests.
The billing model is also structured for developer clarity. Mainstream APIs typically charge per image or per token through tiered subscription plans where per-request cost is indirect. nocensor.ai uses per-operation credit pricing with costs defined per workflow type. The dry-run API makes that pricing fully transparent: before submitting a pipeline, a dry-run call returns the exact credit cost per stage, which developers can surface directly to end users as a line-item preview.
For developers who need a stable NSFW AI API to build on — without content policies that shift, generation quality that silently degrades on certain prompts, or accounts flagged for legitimate adult platform use — nocensor.ai's API provides a consistent and well-documented interface.
The full nocensor.ai developer documentation covers endpoint schemas, error codes, request and response examples, and webhook payload formats for every available operation.
Building Unrestricted AI Applications
nocensor.ai's public REST API delivers a complete NSFW AI API with a consistent interface: scoped API keys, async job dispatch with poll URLs, multi-stage pipeline chaining with upfront cost calculation, webhook delivery for production workloads, and per-class rate limiting. Each endpoint returns standard error codes that distinguish key validity, scope mismatches, account state, and content policy in distinct response shapes.
For developers building adult content platforms, NSFW companion applications, or explicit creative tools at scale, the API provides a stable foundation that does not impose restrictions on the content being generated.
Getting started requires creating an API key and sending a single POST /api/v1/generate request. The developer documentation includes endpoint references, integration quickstarts, and error code definitions for every available operation.