Errors and rate limits

Sume returns structured public errors. Error bodies include a request id that is safe to share with Sume support.

Common API errors

StatusCodeMeaning
400invalid_request or bad_requestThe request body, query, path, or headers are not valid.
401unauthorizedThe API key is missing or not valid.
402insufficient_creditsThe balance is not sufficient for the requested generation.
404not_foundThe resource does not exist in the current workspace.
409job_not_completed, job_not_cancelable, or job_generation_already_startedThe requested job operation is not valid for the current status.
413payload_too_largeThe request body is larger than the configured API limit.
415unsupported_media_typeThe request body was not application/json (details.received_content_type).
429rate_limitedToo many requests in the current window.
429queue_fullWorkspace generation concurrency and queue capacity are both full.
503provider_not_configured, provider_capacity_exceeded, or storage configuration errorsA runtime dependency is not available or is at capacity.

Request id

The API shows the Sume request id in the response body and in the response headers. When you report an issue, include the request id. Do not include API keys, signed URLs, raw media URLs, or private workspace/user ids.

Rate-limit headers

Public API responses can include:

When you receive 429, do a backoff. If retry-after is present, use it. Do not retry unsafe submit requests without an Idempotency-Key.

queue_full is different from the usual request rate limit. It means that Sume cannot accept another paid generation job for the workspace until a current queued or processing job finishes or is canceled. Full concurrency alone is not an error. While queue capacity remains, Sume accepts valid jobs as queued. Refer to Generation admission.

Provider and worker backpressure

Generation can also return capacity or runtime errors before Sume accepts the provider work.

CodeMeaningClient behavior
provider_capacity_exceededSume's provider dispatch queue is full.Retry later with the same idempotency key.
provider_not_configuredProvider execution is not available in this runtime.Do not retry aggressively. Examine the catalog/runtime status.
job_ledger_not_configuredJob persistence is not available.Treat it as service unavailable.
image_not_fetchable, input_media_unreachable, or storage configuration errorsSume could not fetch or mirror media safely.Make sure that the input media is a public HTTPS image URL. Then retry, or contact support with the request id.

Job errors

Failed jobs show public error metadata, for example category, stage, retryability, retry-after seconds, public reason, and next action. Internal provider payloads are not public API fields.

Common job error categories include:

CategoryTypical next action
validationCorrect the input.
authExamine the API key and the workspace access.
quotaAdd funds, or decrease the request cost.
queueRetry later with the same idempotency key.
generation_unavailableRetry later.
generation_rejectedExamine the events, and correct the unsupported input.
generation_timeoutPoll the status, or retry later.
runtime_unavailableRetry later. Do not retry aggressively.
worker_timeoutPoll the status, or retry later.
internalExamine the events, and contact support with the request/job id.

Status vocabulary

ObjectValues
Job statusqueued, processing, completed, failed, canceled
Resource statusprocessing, ready, failed, canceled, archived
Webhook delivery statuspending, delivering, delivered, retrying, failed, exhausted