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.

GET /console/v1/catalog/models
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.

CodiceHTTPFatturazioneAzione
40003
Non ripetere invariato
400Nessun 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.
40101
Non ripetere invariato
401Nessun 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.
40201
Non ripetere invariato
402Nessun 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.
40202
Non ripetere invariato
402Nessun 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.
40301
Non ripetere invariato
403Nessun 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.
40302
Non ripetere invariato
403Nessun addebito
Client IP address is not on this API key’s IP allowlist.
Add your outbound server IP/CIDR in Console → API Keys.
40303
Non ripetere invariato
403Nessun addebito
Service is not available in the request or account region.
Verify deployment region eligibility against the Terms of Service.
40901
Non ripetere invariato
409Nessun 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.
42901
Ripetibile
429Nessun 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.
50301
Ripetibile
503Nessun addebito
Model temporarily unavailable or maintenance window in progress.
Retry with exponential backoff using the same Idempotency-Key or switch model.
invalid_request
Non 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_combination
Non 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_rejected
Non 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_limited
Ripetibile
200 (task)Importo rilasciato
Temporary execution concurrency limit reached during task run.
Wait briefly and call POST /api/v1/jobs/retry.
upstream_unavailable
Ripetibile
200 (task)Importo rilasciato
Model execution service was temporarily unreachable.
Wait and retry with POST /api/v1/jobs/retry.
generation_failed
Ripetibile
200 (task)Importo rilasciato
Model failed to finish producing an output file.
Retry once or shorten duration / lower resolution.
timeout
Ripetibile
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_asset
Non 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_failed
Ripetibile
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.