Images

Create Image

Generate images from a text prompt.

Billed per output image. Prompts are screened before anything is charged, every image is screened after generation (withheld ones are refunded), and every request is steered to depict adults only.

Models: spicy-image-1 ($0.06), spicy-image-1-pro ($0.09) and spicy-image-photo-1 ($0.08, candid natural-light photo look) render 1K stills, one to six per call.

Reference images: spicy-image-reference-1 ($0.12), open to every account, takes reference_image, a picture of your own (a public https URL or a data URL, JPEG, PNG or WebP, up to 10 MB by URL), instead of a prompt. The picture is described in detail (medium, camera height and lens, where each person sits in the frame, pose, clothing, setting, light direction and colours; identifying facial features left out), its exposure, contrast, white balance and main colours are measured, and a brand new image is drawn from that description alone, in the picture's shape and style, then its overall colour balance is matched to the picture's, so it has the picture's look with new people; the picture itself is never edited or shown to the image model. The picture is screened first (anyone who may be under 18, known people); a refused picture costs nothing. The upload itself is never stored and cannot be used as an input elsewhere; the result is a normal output you can edit and animate. The response adds description, a written prompt of the picture (with the measured colours) you can edit and send as a prompt to any text-to-image model. One image per call, about 30 to 60 seconds.

Image actions: spicy-image-action-1 ($0.15) takes action (one of 68 stills from GET /v1/images/actions) and image_url of the woman, one of your own generated images, and returns her face, hair and skin tone in that scene: the act, pose, framing, room and her body come from the still. No prompt. One to four per call; a swap takes a minute or two.

POST/v1/images/generationsTry it
Create Image
cURL
curl --request POST \
  --url https://api.spicyapi.com/v1/images/generations \
  --header 'Authorization: Bearer $SPICYAPI_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "spicy-image-1",
    "prompt": "a woman on a beach at golden hour, photorealistic",
    "size": "1024*1536",
    "n": 2,
    "enhance_prompt": true
  }'
200
JSON
{
  "id": "req_8f2a91c4",
  "object": "image.generation",
  "model": "spicy-image-1",
  "created": 1755950400,
  "data": [
    { "url": "https://cdn.spicyapi.com/outputs/a1b2/req_8f2a91c4-0.png" },
    { "url": "https://cdn.spicyapi.com/outputs/a1b2/req_8f2a91c4-1.png" }
  ],
  "cost_usd": 0.12
}

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your SpicyAPI key (sk-spicy-…). Create one in the dashboard under API Keys.

Body

application/json

Outputs are persisted to the SpicyAPI CDN and returned as durable URLs. Those URLs are the only images accepted as inputs to /v1/images/edits, /v1/videos/generations, /v1/videos/edits and /v1/embeddings.

modelstringrequired

An image model id from GET /v1/models: spicy-image-1, spicy-image-1-pro, spicy-image-photo-1, spicy-image-action-1 for image actions, or spicy-image-reference-1 with reference_image.

promptstringrequired

What to generate. Up to 4000 characters. Not accepted with action or reference_image.

reference_imagestring

spicy-image-reference-1 only, and required there: the picture to recreate, as a public https URL or a data URL (data:image/jpeg;base64,...). JPEG, PNG or WebP, 256 to 8192 pixels a side; request bodies are capped at 4.5 MB, so send larger files by URL (up to 10 MB). The output keeps the picture's shape. prompt, action, character, size, style, enhance_prompt and n above 1 are a 400 with it; negative_prompt and seed are accepted. Governed by section 2.3 of the Terms of Service and section 3.5 of the Acceptable Use Policy: until the account has accepted terms version 2026.10.06 or later in the dashboard, it is a 403 reference_terms_required.

actionstring

spicy-image-action-1 only, and required there: the id of a ready-made explicit still from GET /v1/images/actions (e.g. pov-missionary, pov-blowjob-deepthroat). The still supplies the act, pose, framing, room, output size and her body; image_url (or a character) supplies her face, hair and skin tone. style picks the still's anime, 3d or cartoon version (see styles in the list) so a drawn woman lands in a drawn scene; omit it for the photo, or pass studio for the photo with a warm glamour colour grade. prompt, negative_prompt, size and enhance_prompt are a 400 with it.

image_urlstring

With action: the woman, a URL returned by /v1/images/generations or /v1/images/edits on your account (GET /v1/images lists them). Uploads and other URLs are a 400 before any charge.

negative_promptstring

What to avoid. SpicyAPI's safety terms are always appended.

enhance_promptboolean

Let the model expand the prompt with lighting, camera and detail cues before generating. Defaults to false: the prompt is sent exactly as written.

enhance_modestring

How the prompt extender works when enhance_prompt is true: direct (default) rewrites the prompt once; agent plans the shot first, then writes. Rejected with a 400 without enhance_prompt: true.

sizestring

width*height, one of the model's limits.sizes. 1024*1024, 832*1216, 1216*832, 1280*1280, 1440*1440, 1024*1536, 1536*1024, 1080*1920, 1920*1080, 1152*2048, 2048*1152, all in the same price tier. Defaults to 1024*1024. Any other value is a 400.

ninteger

How many images to return, 1 to 6. Billed per delivered image. Defaults to 1.

seedinteger

Reuse a seed to reproduce a result. Random when omitted.

characterstring

A saved character id (chr_...) from POST /v1/characters: the same person is rendered in the new scene. The request runs as an edit of the sheet and is billed at the spicy-image-edit-1 rate.

viewsstring[]

With character: the body view ids to send (cv_... from the character's views), up to 2, or [] for none. Omitted: the views that fit the prompt are picked for you (a back view for a shot from behind, a close-up for a close-up), listed in the response as character_views. No extra charge.

stylestring

An art style id from GET /v1/styles: photorealistic, studio, anime, 3d or cartoon. Adds a tuned style prompt and matching negatives; same model and price. Omit it for the model's natural look. Unknown ids are a 400. With action, photorealistic (or no style) is the photo still, studio gives the finished picture a warm glamour colour grade, and anime, 3d or cartoon pick the still's drawn version instead (same price); pass the style that matches her image.

dry_runboolean

When true, validates and screens the request and returns { object: "dry_run", cost_usd, moderation } without generating or charging. A blocked prompt still returns the normal 422.

userstring

Your own id for the end user making this request (up to 128 characters; send an opaque id, not an email). Send it if your product serves many people: declined-prompt history, strikes and suspensions are then kept per end user, so one person's behaviour never affects another's requests or your account. After 10 severe violations that user gets 403 end_user_suspended; the id is echoed back as user in every screening error so you can act on it. It is stored with the requests it was sent on, so DELETE /v1/end-users/{user} can erase that person's data.

Response

200 · application/json

Successful Response

idstringrequired

Request id, useful for support.

objectstringrequired

Always image.generation.

modelstringrequired

The model that produced the images.

createdintegerrequired

Unix timestamp.

dataImage · object[]required

One entry per generated image.

withheldinteger

How many outputs were withheld by the post-generation image screen. Those are deleted and refunded, so cost_usd covers only the images in data. Omitted when zero.

characterstring

The character id used, when one was passed.

character_viewsstring[]

The character's body views sent with this request, when any were.

descriptionstring

With reference_image: the picture written as a prompt (up to 1900 characters). Edit it and send it as prompt to spicy-image-photo-1 for more takes on the same scene.

cost_usdnumberrequired

What this request cost, in US dollars, already debited from your balance.

Was this page helpful?