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ę.

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

KodHTTPRozliczenieDziałanie
40003
Nie ponawiaj bez zmian
400Bez 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.
40101
Nie ponawiaj bez zmian
401Bez 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.
40201
Nie ponawiaj bez zmian
402Bez 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.
40202
Nie ponawiaj bez zmian
402Bez 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.
40301
Nie ponawiaj bez zmian
403Bez 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.
40302
Nie ponawiaj bez zmian
403Bez opłaty
Client IP address is not on this API key’s IP allowlist.
Add your outbound server IP/CIDR in Console → API Keys.
40303
Nie ponawiaj bez zmian
403Bez opłaty
Service is not available in the request or account region.
Verify deployment region eligibility against the Terms of Service.
40901
Nie ponawiaj bez zmian
409Bez 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.
42901
Można ponowić
429Bez 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.
50301
Można ponowić
503Bez opłaty
Model temporarily unavailable or maintenance window in progress.
Retry with exponential backoff using the same Idempotency-Key or switch model.
invalid_request
Nie 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_combination
Nie 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_rejected
Nie 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_limited
Moż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_unavailable
Można ponowić
200 (task)Blokada zwrócona
Model execution service was temporarily unreachable.
Wait and retry with POST /api/v1/jobs/retry.
generation_failed
Można ponowić
200 (task)Blokada zwrócona
Model failed to finish producing an output file.
Retry once or shorten duration / lower resolution.
timeout
Moż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_asset
Nie 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_failed
Moż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.