Documentazione per sviluppatori SpicyAPI
Tutti i modelli generativi.
Un’unica API.
La generazione di immagini e video funziona ad attività: ricevi subito un ID e il risultato arriva via webhook. I modelli di testo rispondono tramite endpoint compatibili con OpenAI, Anthropic e Gemini. Gli input seguono lo schema di ciascun modello e le attività fallite o scadute rilasciano l’intero importo accantonato, salvo quando la pagina del modello indica esplicitamente l’addebito per rifiuto.
curl "https://api.spicyapi.ai/console/v1/catalog/models?locale=it"
# Nessun account o chiave API richiesta: tutti i modelli pubblici e i loro prezzi.
# Per chiamare un modello, ottieni il suo ID esatto da GET /api/v1/models con la tua chiave.Strumenti senza accesso
Diagnostica API interattiva e verifica pre-invio
Controlla i codici di errore, verifica le firme HMAC-SHA256 dei webhook v2 nel browser e valida formati e limiti di upload prima di scrivere codice.
| Codice | HTTP | Fatturazione | Azione |
|---|---|---|---|
40003Non ripetere invariato | 400 | Nessun addebito | Schema validation failed (unknown key, missing required field, or out-of-range value). Fetch GET /api/v1/models/{slug} and send only keys declared in inputSchema. |
40101Non ripetere invariato | 401 | Nessun addebito | Missing, revoked, expired, or malformed API key (must start with sk-spicy-). Issue a fresh Bearer key in Console → API Keys and verify Authorization header. |
40201Non ripetere invariato | 402 | Nessun addebito | Available USD balance cannot cover the estimated pre-submission hold (affected by resolution, duration, or generate_audio tiers). Top up USD balance or call POST /api/v1/jobs/quote first — the accepted hold acts as your hard charge ceiling. |
40202Non ripetere invariato | 402 | Nessun addebito | API key or workspace spend cap (daily, monthly, or lifetime) was reached. Raise the key cap in Console → API Keys or wait for 00:00 UTC / 1st-of-month reset. |
40301Non ripetere invariato | 403 | Nessun addebito | This API key is scoped to a subset of models that excludes the requested model. Add the model to the key scope or use an unscoped key. |
40302Non ripetere invariato | 403 | Nessun addebito | Client IP address is not on this API key’s IP allowlist. Add your outbound server IP/CIDR in Console → API Keys. |
40303Non ripetere invariato | 403 | Nessun addebito | Service is not available in the request or account region. Verify deployment region eligibility against the Terms of Service. |
40901Non ripetere invariato | 409 | Nessun addebito | Idempotency-Key reused with a different request body, or quoted price changed. Generate a new UUID Idempotency-Key for distinct inputs or refresh the quote. |
42901Ripetibile | 429 | Nessun addebito | Rate limit exceeded (default 1,000 requests / 10 s per account; polling counts). Respect Retry-After header and prefer callBackUrl webhooks over tight polling. |
50301Ripetibile | 503 | Nessun addebito | Model temporarily unavailable or maintenance window in progress. Retry with exponential backoff using the same Idempotency-Key or switch model. |
invalid_requestNon ripetere invariato | 200 (task) | Importo rilasciato | Task rejected due to invalid parameter value after intake. Inspect message, fix input parameters, and submit a new task. |
unsupported_combinationNon ripetere invariato | 200 (task) | Importo rilasciato | Selected combination of resolution, duration, aspect ratio, or audio is unsupported. Adjust combination to a supported tier shown in the model inputSchema. |
content_rejectedNon ripetere invariato | 200 (task) | Rilasciato salvo rifiuto fatturabile indicato | The selected model declined the prompt or reference media under its own limits (e.g. real-face likeness, copyright, or safety checks). Do not retry unchanged — branch separately from timeout/upstream_unavailable, check settled & cost, then adjust input or switch models. |
rate_limitedRipetibile | 200 (task) | Importo rilasciato | Temporary execution concurrency limit reached during task run. Wait briefly and call POST /api/v1/jobs/retry. |
upstream_unavailableRipetibile | 200 (task) | Importo rilasciato | Model execution service was temporarily unreachable. Wait and retry with POST /api/v1/jobs/retry. |
generation_failedRipetibile | 200 (task) | Importo rilasciato | Model failed to finish producing an output file. Retry once or shorten duration / lower resolution. |
timeoutRipetibile | 200 (task) | Importo rilasciato | Task exceeded maximum execution window before returning output. Retry with POST /api/v1/jobs/retry or use a faster tier. |
invalid_assetNon ripetere invariato | 200 (task) | Importo rilasciato | Input URL was unreachable, expired (>1 day upload), or unreadable format. Re-upload through /api/v1/common/upload-url + /api/v1/files/{fileId}/commit and submit a new task with the fresh spicy:// URI. |
upstream_failedRipetibile | 200 (task) | Importo rilasciato | Unexpected execution failure normalized into the closed 9-code public set. Retry with backoff and include request_id / taskId if contacting support. |
Eseguito 100% localmente tramite Web Crypto API. I segreti non lasciano il browser.Specifica firme webhook →
Entro i limiti documentati (max 10 MiB)
MIME:
image/jpeg, image/png, image/webp, image/gifUp to 8192×8192 px and 8,388,608 px per image (up to 16 images / 2 MiB JSON body for inline Base64; model caps apply in inputSchema).
Nessun addestramento sui tuoi dati. Conservazione: upload 1 giorno · risultati fino a 14 giorni · prompt cancellati entro 30 giorni (riducibile con X-Spicy-Retention o distruzione immediata via POST /api/v1/jobs/purge).