Generation admission

Sume generation APIs use queue-first admission for long-running paid work. A submit request creates a durable job when the request is valid, balance can be reserved, and the workspace still has accepted-job capacity. The job may start immediately or wait in queued until a workspace concurrency slot opens.

Concurrency is a dispatch limit, not a submit limit. If your workspace is already at its generation concurrency limit, Sume can still accept more jobs as queued while queue capacity remains. Workers later move queued jobs to processing under the per-workspace concurrency guard.

Limits at a glance

Sume separates four controls that are easy to confuse:

ControlApplies toWhat happens when full
Generation concurrencyPaid generation jobs with status processing.New valid jobs can still be accepted as queued if queue capacity remains.
Queue capacityPaid generation jobs accepted but not yet processing.New paid generation submissions fail with 429 queue_full.
Submit rate limitsRequest volume for public API submit endpoints.Requests fail with 429 rate_limited; retry with backoff and an idempotency key.
Balance and reservationSpendable USD balance for the authenticated workspace.Generation submit fails with 402 insufficient_credits before provider work starts.

Read/status/list endpoints can also have rate limits. Treat those as polling backpressure, not generation concurrency.

Tier table

Generation tiers are based on paid credits purchased in the last 28 days. Paid top-ups count. Operator grants, free quota, legacy balances, refunds, and manual credits do not increase the concurrency tier.

Paid credits purchased in last 28 daysTierProcessing concurrencyQueue capacityAccepted job capacity
Less than $10free156
$10 or moretier_1042024
$100 or moretier_10084048
$500 or moretier_500126072
$1,000 or moretier_100020100120

accepted job capacity is concurrency_limit + queued_jobs_limit. It is the maximum number of paid generation jobs that can be processing or queued for the workspace at the same time.

Queue-first behavior

If your workspace has concurrency_limit: 1, you may submit several valid jobs at once. Sume can return all of them as queued as long as balance and queue capacity are available. Only one same-workspace generation job should move to processing at a time.

This is the intended behavior:

Do not treat queued as failure. Store the job_id, poll status with backoff, and fetch the result only when the job reports result_ready: true or status: completed.

Immediate rejection

Sume rejects immediately only when the request cannot be safely accepted.

StatusCodeWhy it happensClient behavior
400invalid_requestThe request body, model id shape, mode, webhook options, or headers are invalid.Fix the request before retrying.
401unauthorizedThe API key is missing, malformed, revoked, or invalid.Fix authentication.
402insufficient_creditsSume cannot reserve the estimated generation cost from the workspace balance.Add funds or submit a cheaper request.
404model_not_found or not_foundThe public model or resource does not exist in this workspace.Use /v1/catalog or verify ids.
409idempotency_conflictThe same idempotency key was reused for a different operation or payload.Reuse keys only for exact retries.
429queue_fullThe workspace has no remaining accepted generation capacity.Wait for jobs to finish or cancel queued jobs, then retry with the same idempotency key.
429rate_limitedAPI request volume exceeded an abuse-protection limit.Back off using retry-after when present.
503provider_capacity_exceeded or runtime configuration errorsSume cannot start or dispatch generation work safely.Retry later with the same idempotency key unless the error says not to retry.

Concurrency being full is not an error by itself. It becomes a submit error only when the queue is also full.

generation_limits

Generation submit responses include generation_limits when Sume can compute the workspace admission snapshot.

Field meanings:

FieldMeaning
tierPublic Sume tier for generation admission.
purchased_usd_cents_last_4_weeksPaid USD credits purchased in the last 28 days, in cents.
concurrency_limitMaximum same-workspace paid generation jobs that can be processing.
queued_jobs_limitAdditional same-workspace paid generation jobs that can wait in queued.
accepted_generation_jobs_limitconcurrency_limit + queued_jobs_limit.
active_generation_jobsCurrent same-workspace generation jobs with status processing.
queued_generation_jobsCurrent same-workspace generation jobs with status queued.
accepted_generation_jobsactive_generation_jobs + queued_generation_jobs.
queue_capacity_remainingRemaining accepted-job slots before queue_full.

The counts are a snapshot. They can change immediately after the response as workers claim jobs or other clients submit work.

Before bulk submissions

For launch integrations, use GET /v1/balance and the generation_limits returned by generation submit responses to make conservative queue decisions. If the live OpenAPI later exposes a read-only admission preview endpoint for your environment, treat it as optional preflight only: it must not create a job, reserve credits, capture usage, refund usage, or call generation providers.

Submit and poll pattern

For production integrations, prefer async submit with an idempotency key.

Then poll status:

Fetch the result after completion:

Recommended client behavior:

  • Treat queued and processing as normal non-terminal states.
  • Use exponential backoff for polling. Avoid tight loops across many jobs.
  • Keep polling until terminal: true, or until your own application deadline.
  • Use Idempotency-Key for every paid submit that may be retried.
  • Do not resubmit a paid request just because your local worker timed out.
  • Store status_url, result_url, events_url, and cancel_url when present.
  • Check generation_limits and stop adding work when queue capacity is low.

The Sume CLI follows the same model:

Queue-full handling

queue_full means the workspace has consumed all accepted generation capacity:

The error details can include a generation_limits snapshot and job metadata for the failed admission attempt. Sume releases or refunds the reservation for the failed admission when applicable.

When you receive queue_full:

  • stop adding more generation work for that workspace;
  • poll existing jobs until at least one reaches a terminal state;
  • cancel queued jobs that are no longer needed;
  • retry with the same idempotency key after capacity opens;
  • use retry-after when present.

Cancellation and billing

Paid generation uses public Sume USD estimates. At submit time, Sume reserves the estimated amount when the request is accepted. Successful completion captures the reserved usage. Failed jobs and failed queue admission release or refund the reservation where applicable.

Cancellation is available for jobs that are still queued or processing:

Cancel queued jobs you no longer need before they start processing. Once a job is already processing, cancellation is best-effort and the job may still complete or fail normally.

Edge cases and current boundaries

  • Sume currently exposes queue counts and remaining accepted capacity, not a precise per-job queue position or ETA.
  • sync and subscribe modes can wait up to 30 seconds. If the wait budget is exhausted, keep polling the job id.
  • Queue expiration and explicit client-supplied fail-fast queue length are not currently public API options. Treat them as future contract additions unless they appear in the live OpenAPI schema.
  • Public API responses are provider-neutral. They do not expose hidden provider names, raw provider task ids, raw provider URLs, internal workflow names, storage object keys, API keys, or private workspace/user metadata.