Metadata-Version: 2.4
Name: porn-api
Version: 0.1.0
Summary: Porn API client for AI image, image-to-video and chat generation. Official Spicy API (spicyapi.com) client, OpenAI-compatible, pay per generation. 18+.
Author-email: Spicy API <support@spicyapi.com>
License: MIT
Project-URL: Homepage, https://www.spicyapi.com/porn-ai-api
Project-URL: Documentation, https://www.spicyapi.com/docs
Project-URL: Pricing, https://www.spicyapi.com/pricing
Project-URL: Source, https://github.com/Wayfinity/porn-api
Keywords: porn api,nsfw api,adult api,ai porn,nsfw image generation,nsfw video generation,image to video,uncensored,openai compatible,spicyapi.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Multimedia :: Graphics
Classifier: Topic :: Multimedia :: Video
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# porn-api: Python client for AI porn image and video generation

Official Python client for [Spicy API](https://www.spicyapi.com) at **spicyapi.com**, a porn API in the generation sense: it creates original adult images, image-to-video clips and uncensored chat from a prompt. It is not a tube-site data API. One key, pay per generation, no subscription. 18+ only.

Standard library only, Python 3.8+. (Spicy API at spicyapi.com is a different company from the similarly named spicyapi.ai.)

```bash
pip install porn-api
```

```python
from porn_api import SpicyAPI

spicy = SpicyAPI()  # reads SPICYAPI_KEY

# Text to image: durable CDN URLs plus the exact cost
img = spicy.generate_image("spicy-image-1", "a woman on a beach at golden hour, photorealistic", size="1024*1024")
print(img["data"][0]["url"], img["cost_usd"])

# Image to video: start a task, then wait for it
task = spicy.generate_video("spicy-motion-2", "slow turn toward camera", image_url=img["data"][0]["url"], resolution="720P", duration=5)
done = spicy.wait_for_video(task["id"])
print(done["status"], done.get("output", {}).get("video_url"))

print(spicy.account())  # balance
print(spicy.models())   # models with prices and limits
```

## Keys and the sandbox

Sign up at [spicyapi.com/auth](https://www.spicyapi.com/auth) and copy the key from Dashboard, API Keys. Tick **Sandbox** when creating a key to get one that returns sample output and bills nothing.

## Prices

Images from $0.06, video from $0.10 per second, chat from $0.575 per 1M tokens. What you are charged is exactly `cost_usd` in each response. Failed generations are refunded; blocked prompts are never charged. Full table: [spicyapi.com/pricing](https://www.spicyapi.com/pricing).

## Already using the OpenAI SDK?

```python
from openai import OpenAI
client = OpenAI(base_url="https://api.spicyapi.com/v1", api_key="sk-spicy-...")
```

Image generation and chat are drop-in, streaming included. This package adds image edits by URL, video tasks with polling, the balance and the priced model list.

## Errors

`SpicyAPIError` carries `status` and `type`: 401 bad key, 402 insufficient balance, 400 invalid parameters, 422 prompt blocked by moderation, 429 model at capacity.

## Rules

Adults only, no real people without consent, no minors in any form, and no uploads: inputs to edits and video must be images your account generated. Read the [acceptable use policy](https://www.spicyapi.com/acceptable-use). Products built on the API must age-verify their users.

[Docs](https://www.spicyapi.com/docs) · [MCP server for AI agents](https://www.spicyapi.com/docs/mcp) · [Examples](https://github.com/Wayfinity/porn-api) · [JavaScript client](https://www.npmjs.com/package/spicyapi)

MIT licensed.
