1. Agent tools
Spicy API: NSFW AI Image and Video Generation API Docs
  • Core
    • List Models
      GET
    • Get Account
      GET
  • Images
    • Create Image
      POST
    • Edit Image
      POST
    • List Images
      GET
  • Moderation
    • Check a Prompt
      POST
  • Video
    • Create Video
      POST
    • Get Video Task
      GET
  • Chat
    • Create Chat Completion
      POST
  • Agent tools
    • List every agent tool with its argument schema, whether it is guarded (needs approval_token) and whether it works with no balance.
      GET
    • List models
      POST
    • Estimate cost
      POST
    • Get account
      POST
    • List images
      POST
    • Generate image
      POST
    • Edit image
      POST
    • Generate video
      POST
    • Get job
      POST
    • List jobs
      POST
    • Get usage
      POST
    • Create API key
      POST
    • Revoke API key
      POST
    • Get top-up link
      POST
    • Set spend limit
      POST
    • Read acceptable use policy
      POST
  1. Agent tools

Edit image

POST
https://api.spicyapi.com/api/v1/tools/edit_image
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).

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/json

Examples

Responses

🟢200
The tool's JSON result (same payload the MCP tool returns).
This response does not have a body.
🟠400
🟠401
🟠402
🟠403
🟠429
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.spicyapi.com/api/v1/tools/edit_image' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "string",
    "prompt": "string",
    "image_urls": [
        "http://example.com"
    ],
    "negative_prompt": "string",
    "size": "string",
    "seed": -9007199254740991,
    "approval_token": "string"
}'
Modified at 2026-09-21 21:07:45
Previous
Generate image
Next
Generate video
Built with