Dokumentacja SpicyAPI dla deweloperów
Wszystkie modele generatywne.
Jedno API.
Obrazy i wideo generujesz jako zadania: ID dostajesz od razu, a wynik przychodzi webhookiem. Modele tekstowe odpowiadają przez endpointy zgodne z OpenAI, Anthropic i Gemini. Dane wejściowe są zgodne ze schematem danego modelu, a zadania nieudane lub wygasłe zwalniają całą blokadę środków, chyba że strona modelu wyraźnie wskazuje opłatę za odmowę.
curl "https://api.spicyapi.ai/console/v1/catalog/models?locale=pl"
# Bez konta i klucza API: wszystkie publiczne modele wraz z cenami.
# Aby wywołać model, pobierz jego dokładne ID z GET /api/v1/models używając swojego klucza.Narzędzia bez logowania
Interaktywna diagnostyka API i weryfikator
Sprawdź kody błędów, zweryfikuj lokalnie podpisy HMAC-SHA256 webhooków v2 i skontroluj limity formatów przed napisaniem kodu.
| Kod | HTTP | Rozliczenie | Działanie |
|---|---|---|---|
40003Nie ponawiaj bez zmian | 400 | Bez opłaty | 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. |
40101Nie ponawiaj bez zmian | 401 | Bez opłaty | 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. |
40201Nie ponawiaj bez zmian | 402 | Bez opłaty | 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. |
40202Nie ponawiaj bez zmian | 402 | Bez opłaty | 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. |
40301Nie ponawiaj bez zmian | 403 | Bez opłaty | 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. |
40302Nie ponawiaj bez zmian | 403 | Bez opłaty | Client IP address is not on this API key’s IP allowlist. Add your outbound server IP/CIDR in Console → API Keys. |
40303Nie ponawiaj bez zmian | 403 | Bez opłaty | Service is not available in the request or account region. Verify deployment region eligibility against the Terms of Service. |
40901Nie ponawiaj bez zmian | 409 | Bez opłaty | 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. |
42901Można ponowić | 429 | Bez opłaty | Rate limit exceeded (default 1,000 requests / 10 s per account; polling counts). Respect Retry-After header and prefer callBackUrl webhooks over tight polling. |
50301Można ponowić | 503 | Bez opłaty | Model temporarily unavailable or maintenance window in progress. Retry with exponential backoff using the same Idempotency-Key or switch model. |
invalid_requestNie ponawiaj bez zmian | 200 (task) | Blokada zwrócona | Task rejected due to invalid parameter value after intake. Inspect message, fix input parameters, and submit a new task. |
unsupported_combinationNie ponawiaj bez zmian | 200 (task) | Blokada zwrócona | Selected combination of resolution, duration, aspect ratio, or audio is unsupported. Adjust combination to a supported tier shown in the model inputSchema. |
content_rejectedNie ponawiaj bez zmian | 200 (task) | Zwrot, chyba że wskazano opłatę za odmowę | 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_limitedMożna ponowić | 200 (task) | Blokada zwrócona | Temporary execution concurrency limit reached during task run. Wait briefly and call POST /api/v1/jobs/retry. |
upstream_unavailableMożna ponowić | 200 (task) | Blokada zwrócona | Model execution service was temporarily unreachable. Wait and retry with POST /api/v1/jobs/retry. |
generation_failedMożna ponowić | 200 (task) | Blokada zwrócona | Model failed to finish producing an output file. Retry once or shorten duration / lower resolution. |
timeoutMożna ponowić | 200 (task) | Blokada zwrócona | Task exceeded maximum execution window before returning output. Retry with POST /api/v1/jobs/retry or use a faster tier. |
invalid_assetNie ponawiaj bez zmian | 200 (task) | Blokada zwrócona | 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_failedMożna ponowić | 200 (task) | Blokada zwrócona | Unexpected execution failure normalized into the closed 9-code public set. Retry with backoff and include request_id / taskId if contacting support. |
Działa w 100% lokalnie przez Web Crypto API. Sekrety nie opuszczają przeglądarki.Specyfikacja podpisu webhooka →
W granicach udokumentowanych limitów (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).
Bez trenowania na Twoich danych. Retencja: pliki wejściowe 1 dzień · wyniki do 14 dni · prompty usuwane w ciągu 30 dni (skróć przez X-Spicy-Retention lub usuń od razu przez POST /api/v1/jobs/purge).