API Reference

Complete reference documentation for the NSFWDev API. Learn how to integrate AI generation capabilities into your applications.

Authentication

All API requests require authentication using an API key. Include your key in the request headers:

Authorization: Bearer YOUR_API_KEY
🚨 Keep Your Keys Secure

Never expose your API keys in client-side code or public repositories. Use environment variables and server-side requests.

🔑

Detailed authentication guide will be added here.

Endpoints

Overview of available API endpoints:

| Method | Endpoint | Description | |--------|----------|-------------| | POST | /api/generate | Generate images from text prompts | | POST | /api/img2img | Image-to-image generation | | GET | /api/models | List available models | | GET | /api/status | Check generation status |

📡

Detailed endpoint documentation with request/response examples coming soon.

Rate Limits

API requests are subject to rate limiting to ensure fair usage:

  • Free tier: 10 requests per minute
  • Pro tier: 100 requests per minute
  • Enterprise: Custom limits available
⚠️ Rate Limit Headers

Check the X-RateLimit-Remaining and X-RateLimit-Reset headers in API responses to monitor your usage.

Error Handling

The API uses standard HTTP status codes and returns detailed error messages:

{
  "error": {
    "code": "RATE_LIMIT_EXCEEDED",
    "message": "You have exceeded the rate limit. Please wait before retrying.",
    "retry_after": 60
  }
}
⚠️

Complete error code reference will be documented here.

💡 SDK Available

We offer official SDKs for Python and JavaScript that handle authentication, retries, and error handling automatically.