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

Estimate cost

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

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/estimate_cost' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model": "string",
    "n": 1,
    "resolution": "string",
    "duration": 1,
    "tokens": 0,
    "count": 1
}'
Modified at 2026-09-21 21:07:45
Previous
List models
Next
Get account
Built with