Skip to main content
Hub routes return Problem Details objects with the application/problem+json media type.
Use code in application logic. Use title and detail for display. A 429 capacity_exhausted response always includes Retry-After in seconds. A 429 rate_limited response includes one too, except for the request rate limit of /api/v1/hub/decisions. A 503 generation_in_progress response always includes Retry-After: 5.

Code details

invalid_input

The request is invalid or contains an unsupported value. Correct it before retrying. The errors property maps each faulty field to its messages. For example, a video whose total duration is outside the limits declared by the model’s parameters_schema (x-fanify-media.minTotalSeconds / maxTotalSeconds) is refused with errors: { "<field>": ["…"] }, before any routing. The field gets one message per violated limit: total, each clip (minItemSeconds / maxItemSeconds), duration combined with another field (combinedWith), and conditional limits, whose message ends with the condition (« when … »). See duration zones.

unsupported_audio_format

POST /api/v1/hub/audio/transcriptions could not determine the audio format from input_audio.format, the file name extension, the part’s Content-Type, or the file content. Send a file in mp3, wav, ogg, webm, m4a, mp4, flac, or aac, with its extension or format. See Transcriptions.

unauthorized

The API key or console session is missing, invalid, or revoked.

insufficient_credits

The available balance does not cover the generation estimate.

model_not_found

The requested model does not exist or is unavailable in the Hub catalog.

generation_not_found

The requested generation does not exist for this account.

resource_not_found

The requested resource does not exist for this account.

not_cancelable

Only a generation that is still queued can be canceled.

file_expired

The file, output, or stored completion has expired or is no longer available.

payload_too_large

The uploaded file exceeds the configured limit. On POST /api/v1/hub/audio/transcriptions, the audio file is limited to 25 MB.

no_route_available

No configured route can execute the requested combination of parameters.

idempotency_conflict

The idempotency key was already used with a different request body.

missing_resource

A file referenced as sha256:<hash> is not available on the Hub. No generation is created. The missing property lists the affected hashes ([{ "sha256": "…", "kind": "…" }], kind when known): upload these files with POST /api/v1/hub/files, then resubmit the same request with the same Idempotency-Key. See Files.

input_duration_unavailable

The model is priced on the duration of an input video or audio, and the Hub could not determine the duration of at least one referenced file. No generation is created and nothing is billed. The Hub only knows the duration of a file uploaded with POST /api/v1/hub/files and referenced as sha256:<hash>: it reads it from the file headers of MP4, MOV, WebM (with a duration), WAV and MP3 files. It never downloads a URL from another site.
references lists each reference of the fields priced on duration, as you sent it, with the duration known to the Hub (null when unknown). Upload the file, reference it as sha256:<hash>, then resubmit. If the uploaded file still has no duration (duration_seconds: null in the upload response), convert it to one of the formats above.

input_duration_out_of_bounds

The duration of an input file is outside the limits accepted by every route of this model. No generation is created and nothing is billed.
bounds lists the accepted ranges in seconds (null = no limit on that side). A range on each clip carries "kind": "item"; a range on the duration plus another field carries "kind": "combined" and that field in with. Without kind, the range applies to the summed duration. Trim the media to fit one of them, upload it again, then resubmit. When both codes apply, input_duration_unavailable is returned.

rate_limited

Your API key’s request limit has been reached. Wait for the duration indicated by Retry-After, then lower your request rate.

capacity_exhausted

The Hub found no room for your chat, decision, embeddings, or transcription call within its waiting time. This happens under heavy load on your account or on the service. A transcription is also refused immediately when the Hub is already receiving too much audio at once, before your file is read.
  • Wait for the duration indicated by Retry-After, then retry.
  • Reduce the number of concurrent calls.
  • Do not try another Hub model at the same time: it will hit the same limit.
Chat, decision, embeddings, and transcription calls share their own concurrency limit, separate from media generations. Pending generations do not block chat.

generation_in_progress

A request with the same idempotency key is still running.

webhooks_not_configured

The webhook service is unavailable.

internal_error

The problem is on the FanifyHub side: provider account or infrastructure. The response does not expose internal details. Contact support if the error persists.

Errors stored with a generation

A failed generation carries an error object: { "code": "…", "message": "…" }. This object is identical in GET /api/v1/hub/generations/{id}, in the generation list, and in the data of a generation.completed webhook. error.code always belongs to the vocabulary below. Base your logic on error.code. Resubmitting means submitting a new generation with a new Idempotency-Key. The same key replays the failed generation. A generation fails with missing_resource when an input file disappears during its execution; its missing property lists the affected hashes. Upload these files again, then submit a new generation. When several providers are tried and all refuse the generation, the retained code favors a cause related to the request (content_moderated, invalid_input, file_expired, missing_resource), then provider_error, then internal_error.

error.message

error.message is display and diagnostic text. Its content is not stable: do not parse it.
  • For a media generation, it can contain the provider’s error text, cleaned: no URL, IP address, or key of the FanifyHub infrastructure, third-party URLs without query parameters, a single line, at most 500 characters.
  • Otherwise, it is the code’s standard message. This is always the case for internal_error and for an LLM generation (is_llm: true).
Standard message of internal_error: FanifyHub service error on our side. Contact support if it persists.
Most /api/v1/hub/chat/completions, /api/v1/hub/decisions, /api/v1/hub/embeddings, and /api/v1/hub/audio/transcriptions errors use an OpenAI-compatible envelope. The 401 unauthorized authentication failure occurs before the request is processed and remains a Problem Details response. A 401 or 402 from the routed model’s provider is returned as 503 with the provider_error code: a 402 therefore always means insufficient_credits, that is, your FanifyHub balance. On /api/v1/hub/decisions, /api/v1/hub/embeddings, and /api/v1/hub/audio/transcriptions, error.metadata.provider_name is present only for a provider_error from the routed model or the replay of a failed generation. See Decisions, Embeddings, and Transcriptions.