spicyapi-com Chat Completions API

The Chat Completions API from spicyapi-com — 1 operation(s) for chat completions.

Operations 1

POST /v1/chat/completions Create Chat Completion #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/spicyapi-com:spicyapi-com-chat-completions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

spicyapi-com-chat-completions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Spicy Chat API
  version: 1.0.0
  description: 'Spicy API (also written SpicyAPI) is one REST API for uncensored image, image-editing, video, video-editing, speech, live voice call, transcription, embedding and chat generation, sold per generation from a prepaid US-dollar balance: no subscription, no GPUs to run. It is OpenAI-compatible (point the OpenAI SDK at https://api.spicyapi.com/v1 with a Spicy API key) and includes ready-made sex actions for video and role-play companion models. It has been at spicyapi.com since June 2025, is operated by Wayfinity Ltd, and is not affiliated with spicyapi.ai, an unrelated model aggregator. Images from $0.06, video from $0.05 per second. OPENAI-COMPATIBLE: point the OpenAI SDK at https://api.spicyapi.com/v1 with a Spicy API key; client.images.generate maps onto POST /v1/images/generations and client.chat.completions.create onto POST /v1/chat/completions (streaming included). client.embeddings.create maps onto POST /v1/embeddings and client.audio.transcriptions.create onto POST /v1/audio/transcriptions. Image edits take JSON with image_url (not the SDK''s multipart upload) and video (generations, edits, motion transfer) is a plain HTTP task you poll. Every response carries cost_usd, the exact amount debited. Prompts are screened before any charge (422, never billed); failed generations are refunded. Sandbox keys (created with sandbox: true) answer every endpoint from fixtures flagged sandbox: true and bill nothing. Machine-readable overview: https://www.spicyapi.com/llms.txt. MCP server for agents: https://www.spicyapi.com/api/mcp.'
  contact:
    name: Spicy API support
    email: contact@spicyapi.com
    url: https://www.spicyapi.com/docs
  termsOfService: https://www.spicyapi.com/terms-of-service
servers:
- url: https://api.spicyapi.com
  description: Public API host (also reachable at https://www.spicyapi.com/api).
tags:
- name: Chat Completions
paths:
  /v1/chat/completions:
    post:
      operationId: chatCompletions
      summary: Create Chat Completion
      description: 'OpenAI-compatible uncensored chat and role-play, with streaming. Drop-in compatible with the OpenAI SDK: point `baseURL` at `https://api.spicyapi.com/v1` and pass your SpicyAPI key. Billed per 1M prompt tokens and per 1M completion tokens, at the model''s rates. Models. `spicy-chat-1` ($0.80 in, $2.40 out per 1M tokens) is the general uncensored chat model. `spicy-companion-1` ($1.00 in, $2.80 out per 1M tokens) is fine-tuned for role-play and AI companions: put the persona in the system message and it stays in character, writes explicit adult scenes, handles group scenes with several characters, and returns up to 4 alternative replies with `n`. It is the recommended model for explicit role-play, which `spicy-chat-1` may decline. `spicy-companion-1-flash` ($0.10 in, $0.80 out per 1M tokens) is the same role-play behaviour priced for high-volume traffic such as NPCs. All three take the same request body. Text only, with caps: input across all messages up to about 200,000 tokens on `spicy-chat-1`, 131,072 on `spicy-companion-1` and at least 144,000 (tested) on `spicy-companion-1-flash`, `max_tokens` up to 8192 (default 4096), `n` up to 4. Requests that set `enable_thinking`, `thinking_budget`, `enable_search` or `search_options`, ask for `response_format.type: "json_schema"`, or carry non-text content parts (images, audio) are rejected with a 400 before any charge. Unknown fields are dropped silently. Function calling: `tools`, `tool_choice` and `parallel_tool_calls` work as in the OpenAI API on `spicy-chat-1` and `spicy-companion-1` (not on `spicy-companion-1-flash`, which returns a 400). The reply carries `tool_calls`; send the result back as a `tool` message with its `tool_call_id`. Tool definitions and earlier tool calls are prompt tokens, billed at the model''s input price. Billing: the balance (and any monthly spend limit) must cover the worst case before the call: the estimated prompt plus every completion at `max_tokens`, else a 402. You are then charged for the tokens actually used. Prompt tokens the provider serves from its cache (`usage.prompt_tokens_details.cached_tokens`, a repeated prefix of 1,024 tokens or more) bill at the model''s cached input price (`pricing.usd_cached_input` in `GET /v1/models`): $0.16 per 1M on `spicy-chat-1`, $0.20 on `spicy-companion-1` and $0.02 on `spicy-companion-1-flash`, a fifth of their input prices. Safety signal: self-harm is not a blocked category. When the screen reads a risk of self-harm in the conversation, the response (streamed or not) carries the header `x-spicyapi-safety: self_harm` so your app can show crisis resources (in the US 988, in the UK and Ireland Samaritans on 116 123, elsewhere findahelpline.com). The header is absent otherwise. Companion laws: New York (GBL Art 47) and California (SB 243) ask companion apps to tell users they are talking to an AI (in New York at the start of each session and at least every 3 hours) and to refer users at risk to crisis services. If your app offers companions, send `safety_mode: "companion"` to have SpicyAPI add both to the reply text.'
      tags:
      - Chat Completions
      security:
      - apiKey: []
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Completion id.
                  choices:
                    type: array
                    items:
                      type: object
                      properties:
                        index:
                          type: integer
                          description: Position in the list.
                        message:
                          type: object
                          properties:
                            role:
                              type: string
                              description: Always `assistant`.
                            content:
                              type: string
                              description: Reply text.
                          required:
                          - role
                          - content
                          description: The reply.
                        finish_reason:
                          type: string
                          description: Why generation stopped.
                      required:
                      - index
                      - message
                    description: Generated replies.
                  usage:
                    type: object
                    properties:
                      prompt_tokens:
                        type: integer
                        description: Tokens in the request.
                      completion_tokens:
                        type: integer
                        description: Tokens generated.
                      total_tokens:
                        type: integer
                        description: Sum of the two. Prompt and completion tokens are billed at their own rates.
                    required:
                    - prompt_tokens
                    - completion_tokens
                    - total_tokens
                    description: Token counts.
                  cost_usd:
                    type: number
                    description: What this request cost, in US dollars, already debited from your balance.
                required:
                - id
                - choices
                - cost_usd
              example:
                id: chatcmpl_7b3f
                object: chat.completion
                model: spicy-chat-1
                choices:
                - index: 0
                  message:
                    role: assistant
                    content: <string>
                  finish_reason: stop
                usage:
                  prompt_tokens: 12
                  completion_tokens: 84
                  total_tokens: 96
                cost_usd: 0.001
        '400':
          description: 'Invalid parameters. Body: {error: {message, type: ''invalid_request_error''}}.'
        '401':
          description: Missing or invalid API key.
        '402':
          description: Insufficient balance. Top up in the dashboard or through the get_topup_link tool; nothing was charged.
        '422':
          description: Prompt blocked by moderation (acceptable use policy). Never charged.
        '429':
          description: Rate limited or model at capacity; retry after the Retry-After header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  description: 'A chat model id: `spicy-chat-1`, `spicy-companion-1` or `spicy-companion-1-flash`.'
                messages:
                  type: array
                  items:
                    type: object
                    properties:
                      role:
                        type: string
                        description: '`system`, `user`, or `assistant`.'
                      content:
                        type: string
                        description: 'Message text. An array of `{ type: "text", text }` parts is also accepted; any other part type is a 400.'
                    required:
                    - role
                    - content
                  description: The conversation so far. The whole array, system prompt included, counts toward the 200,000-token input cap and is screened together. On the companion models the system message is the persona.
                temperature:
                  type: number
                  description: Sampling temperature, 0 to 2.
                max_tokens:
                  type: integer
                  description: Cap on generated tokens. Defaults to 4096; at most 8192.
                n:
                  type: integer
                  description: How many replies to generate, 1 to 4. Every reply's tokens are billed.
                stream:
                  type: boolean
                  description: Stream back server-sent events. Usage arrives in the final chunk.
                top_p:
                  type: number
                  description: Nucleus sampling threshold. Forwarded as is.
                top_k:
                  type: integer
                  description: Sample from the k most likely tokens. Forwarded as is.
                presence_penalty:
                  type: number
                  description: Penalise tokens already present in the text. Forwarded as is.
                frequency_penalty:
                  type: number
                  description: Penalise tokens by how often they have appeared. Forwarded as is.
                repetition_penalty:
                  type: number
                  description: Multiplicative repetition penalty (1.0 is off). Forwarded as is.
                seed:
                  type: integer
                  description: Best-effort reproducibility seed.
                stop:
                  type: array
                  items:
                    type: string
                  description: Stop sequence or sequences.
                logit_bias:
                  type: object
                  description: Token id to bias map, as in the OpenAI API.
                response_format:
                  type: object
                  description: '`{ "type": "text" }` (default) or `{ "type": "json_object" }`. For JSON mode the word "JSON" must appear in the system or user prompt, or the model returns an error; `json_schema` is not available.'
                tools:
                  type: array
                  items:
                    type: object
                  description: '`spicy-chat-1` and `spicy-companion-1` only: up to 64 functions, each `{ "type": "function", "function": { "name", "description", "parameters" } }` (JSON Schema parameters), as in the OpenAI API.'
                tool_choice:
                  type: object
                  description: '`auto` (default with `tools`), `none`, `required`, or `{ "type": "function", "function": { "name" } }` to force one function.'
                parallel_tool_calls:
                  type: boolean
                  description: Whether the model may call several functions in one reply.
                safety_mode:
                  type: string
                  description: 'Off unless set. `companion` puts a bracketed line in front of every reply choice (streamed or not, never billed): an AI notice ("You are talking to an AI, not a person...") until an `assistant` message in the conversation carries it (keep it in the history; a scripted greeting does not count) and whenever this `user` last got it 3 or more hours ago, and crisis resources on any turn flagged `self_harm`. Send `user` so the 3-hour clock runs per person; without it the clock is per account. Any other value is a 400.'
                user:
                  type: string
                  description: '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.'
              required:
              - model
              - messages
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: sk-spicy-...
      description: Per-account API key from https://www.spicyapi.com/dashboard/api-keys (shown once, stored hashed). Sandbox keys bill nothing.
x-openai-compatible:
  baseUrl: https://api.spicyapi.com/v1
  compatible:
  - /v1/chat/completions
  - /v1/images/generations
  - /v1/models
  - /v1/embeddings
  - /v1/audio/transcriptions
  notes: Image sizes use width*height (1024*1024). Speech returns JSON with a url unless stream is true. Live calls follow the OpenAI Realtime event shape over wss://api.spicyapi.com/v1/realtime after POST /v1/realtime/sessions. Edits and video are Spicy API specific.
x-mcp:
  endpoint: https://www.spicyapi.com/api/mcp
  transport: streamable-http
  auth: 'Authorization: Bearer sk-spicy-...'
  docs: https://www.spicyapi.com/docs
  llms: https://www.spicyapi.com/llms.txt
  skills: https://www.spicyapi.com/skills/index.json