# Spicy API: NSFW AI Image and Video Generation API Docs ## API Docs - Core [List Models](https://ystqtqzq30.apidog.io/list-models-43965261e0.md): List every model available to your account. Returns the live catalogue: ids, pricing, limits, and, for our own fine-tunes, the trigger word the gateway injects for you. - Core [Get Account](https://ystqtqzq30.apidog.io/get-account-43965262e0.md): Read your balance and account status. - Images [Create Image](https://ystqtqzq30.apidog.io/create-image-43965263e0.md): Generate one or more images from a text prompt. Billed per output image. Prompts are screened before anything is charged, and every request is steered to depict adults only. - Images [Edit Image](https://ystqtqzq30.apidog.io/edit-image-43965264e0.md): Edit an image you generated earlier, guided by a prompt. Every `image_url` must be an image your own account generated. Uploads and external URLs are rejected before you are charged. - Images [List Images](https://ystqtqzq30.apidog.io/list-images-43965265e0.md): List the images your account has generated. These are exactly the URLs accepted as inputs elsewhere in the API. Use this to look up what you can edit or animate. - Moderation [Check a Prompt](https://ystqtqzq30.apidog.io/check-a-prompt-43965266e0.md): Run a prompt or conversation through the same screen the generation endpoints use, without generating. Use it to check your end users' prompts before you spend credits, or to power a live indicator in your own UI. Blocked prompts are never charged at generation time either; this endpoint exists so you can tell users *why* before they hit submit. Flat price of $0.001 per call. Free when called from the SpicyAPI playground. The screen runs three layers: a keyword blocklist, contextual pattern rules, and a semantic classifier that returns per-category probabilities. `outcome` is `allow`, `review` (uncertain; would be declined at generation with a request to reword) or `block`. - Video [Create Video](https://ystqtqzq30.apidog.io/create-video-43965267e0.md): Start a video generation. Returns a task to poll. Video is asynchronous: this call returns immediately with a task id, and you poll `GET /v1/videos/tasks/{id}` until it succeeds or fails. Image-to-video models need an `image_url` your account generated. Failed generations are refunded automatically. - Video [Get Video Task](https://ystqtqzq30.apidog.io/get-video-task-43965268e0.md): Check a video task and collect the finished clip. Poll every 10 to 15 seconds. When `status` is `succeeded`, `output.video_url` holds a durable CDN URL. - Chat [Create Chat Completion](https://ystqtqzq30.apidog.io/create-chat-completion-43965269e0.md): OpenAI-compatible uncensored chat, with streaming. Drop-in compatible with the OpenAI SDK: point `baseURL` at `https://api.spicyapi.com/v1` and pass your SpicyAPI key. Billed on total tokens. - Agent tools [List every agent tool with its argument schema, whether it is guarded (needs approval_token) and whether it works with no balance.](https://ystqtqzq30.apidog.io/list-every-agent-tool-with-its-argument-schema-whether-it-is-guarded-needs-approval-token-and-whether-it-works-with-no-balance-43965270e0.md): - Agent tools [List models](https://ystqtqzq30.apidog.io/list-models-43965271e0.md): Every model with its kind (image, image-edit, video, chat), USD price (per image, per second by resolution, or per 1M tokens), limits (sizes, resolutions, 2 to 30 seconds, outputs per call), whether it needs or accepts an input image, and example clips. Prices here are exactly what the API bills. Works with a $0 balance. Works with a $0 balance. - Agent tools [Estimate cost](https://ystqtqzq30.apidog.io/estimate-cost-43965272e0.md): USD cost of a request before making it, from the same price table the gateway bills: images by count, video by seconds and resolution, chat by tokens. Use it to quote the user and to check against get_account before a spend. Works with a $0 balance. Works with a $0 balance. - Agent tools [Get account](https://ystqtqzq30.apidog.io/get-account-43965273e0.md): Balance in USD, spend this calendar month, the monthly spend limit if set, whether approvals are skipped for agents, whether the account has ever topped up, the webhook URL, and whether this key is a sandbox key. Call it first and before any spend. Works with a $0 balance. - Agent tools [List images](https://ystqtqzq30.apidog.io/list-images-43965274e0.md): The account's generated images, newest first. These are the only URLs accepted as image_url by edit_image and generate_video (no uploads, no third-party URLs). Use it to pick a first frame to animate. Works with a $0 balance. - Agent tools [Generate image](https://ystqtqzq30.apidog.io/generate-image-43965275e0.md): Text to image, synchronous (10 to 30 seconds), returns durable CDN URLs reusable as image_url for edits and video. Billed per image at the model's rate; the exact amount is cost_usd in the result. Prompts are screened first; blocked prompts cost nothing. Every request depicts adults only. Guarded: without approval_token it returns {error: "approval_required", summary, approval_token}; show the summary (it carries the cost), get the user's yes, call again with the token. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Edit image](https://ystqtqzq30.apidog.io/edit-image-43965276e0.md): Prompt-driven edit of one to three images the account generated (list_images), for outfit, pose and scene changes. Synchronous; returns a durable CDN URL. Billed per edit. Guarded: without approval_token it returns {error: "approval_required", summary, approval_token}; show the summary (it carries the cost), get the user's yes, call again with the token. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Generate video](https://ystqtqzq30.apidog.io/generate-video-43965277e0.md): Image to video (or text to video on spicy-motion-3 and spicy-motion-3-fast). Asynchronous: returns a task id at once with the price already debited; poll get_job every 10 to 15 seconds until succeeded (output.video_url) or failed (refunded). image_url must be one of the account's own generated images. Price = seconds x the per-second rate for the resolution. Our POV fine-tunes (spicy-pov-*) need a first frame already in position. Guarded: without approval_token it returns {error: "approval_required", summary, approval_token}; show the summary (it carries the cost), get the user's yes, call again with the token. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Get job](https://ystqtqzq30.apidog.io/get-job-43965278e0.md): Status of a video task (queued, processing, finalizing, succeeded with output.video_url, or failed and refunded) or of a logged image or chat request by id. Works with a $0 balance. - Agent tools [List jobs](https://ystqtqzq30.apidog.io/list-jobs-43965279e0.md): Recent requests on the account (images, edits, video tasks, chat), newest first: id, type, model, status, cost_usd, output URL when finished, error when failed, and whether it came from the playground, the API or an agent. Works with a $0 balance. - Agent tools [Get usage](https://ystqtqzq30.apidog.io/get-usage-43965280e0.md): Spend and request counts over the last N days, totalled and broken down by model, type and source (playground, api, agent), with the error count. Reads the account's request log. Works with a $0 balance. - Agent tools [Create API key](https://ystqtqzq30.apidog.io/create-api-key-43965281e0.md): Mint a new key for this account (plaintext returned once, stored hashed; at most 20 active keys). sandbox: true makes a key that answers everything from fixtures and bills nothing. Keys made with a sandbox key are always sandbox keys. Keep keys in environment variables, never in chat. Guarded: without approval_token it returns {error: "approval_required", summary, approval_token}; show the summary (it carries the cost), get the user's yes, call again with the token. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Revoke API key](https://ystqtqzq30.apidog.io/revoke-api-key-43965282e0.md): Permanently revoke a key by id (the id is returned by create_api_key and shown on the API keys page). Applications using it stop working at once. Guarded: without approval_token it returns {error: "approval_required", summary, approval_token}; show the summary (it carries the cost), get the user's yes, call again with the token. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Get top-up link](https://ystqtqzq30.apidog.io/get-top-up-link-43965283e0.md): Checkout URL to add funds by card (hosted checkout) or crypto for a preset amount ($50, $100, $250, $500, $1000; minimum $50). The USER opens it and pays in the browser; never enter payment details yourself. The balance is credited by the payment webhook; call get_account afterwards. Works with a $0 balance. Works with a $0 balance. - Agent tools [Set spend limit](https://ystqtqzq30.apidog.io/set-spend-limit-43965284e0.md): Cap what this account can spend per calendar month (UTC), enforced at debit time on every surface: requests past the cap return 402 without charging. Lowering or setting a limit never needs approval; raising or removing one does. null removes the limit. GUARDED: without approval_token it returns {error: 'approval_required', summary, approval_token}; show the summary to the user, get a yes, call again with the token (or the account turns approvals off in the dashboard). - Agent tools [Read acceptable use policy](https://ystqtqzq30.apidog.io/read-acceptable-use-policy-43965285e0.md): The acceptable use policy as markdown: prohibited content (minors in any form, real people without consent, non-consensual scenarios and the rest), age-verification duties for the customer's product, enforcement. Read it before the first generation and tell the user what their product must do. Works with a $0 balance. Works with a $0 balance.