ModelsPricingAPI keys
  • Overview
  • Quickstart
  • Authentication
  • Errors and retries
  • Limits and billing
  • Client libraries

Reference

Limits and billing

Two limits apply: a request rate per key and a number of jobs in flight per workspace. Jobs are paid from the workspace balance, in US dollars.

Request rate

Each key has a request budget per window. Every response says where you stand:

Headers
ratelimit-limit: 480
ratelimit-remaining: 479
ratelimit-reset: 60

Over the budget you get 429 rate_limited with retry-after. Reads have a larger budget than writes; one poll per job every few seconds stays far inside it.

Jobs in flight

A workspace may have only so many generation jobs queued or running at once. A submit past the cap is refused, not queued, and not charged: 429 queue_full, with your limits in details.generation_limits and retry-after: 30. Wait for a job to end, then send the refused submit again with the same Idempotency-Key; the refusal freed it. A worker pool sized to the limit keeps you under it.

429 Too Many Requests
{
  "error": {
    "code": "queue_full",
    "message": "Workspace generation queue is full. Wait for running jobs to complete before submitting more generation work.",
    "request_id": "req_0ee311b4334e4b118a94c7d1c48577fd",
    "category": "queue",
    "stage": "queue",
    "retryable": true,
    "retry_after_seconds": 30,
    "public_reason": "queue_full",
    "next_action": "retry_later"
  }
}

What a job costs

WhenWhat happens
You submitThe price is reserved from the workspace balance.
The job completesThe reservation is charged.
The job fails or is canceledThe reservation is refunded.

Each model row from the model endpoints carries its pricing; prices depend on quality, resolution and duration. The list prices are on API pricing, and every charge and refund shows up in Billing in the dashboard.

Running out of balance

A submit the balance cannot cover fails with 402 insufficient_funds and is not charged, in a personal or a team workspace alike. details says how much the request needed and how much was available, in dollars. Add funds in Billing, then send the request again with a new Idempotency-Key: the refused one keeps its answer. Turning on auto top-up keeps long runs from stopping.

402 Payment Required
{
  "error": {
    "code": "insufficient_funds",
    "message": "Your sume.com balance does not cover this request. Top it up in Settings → Billing.",
    "request_id": "req_0ee311b4334e4b118a94c7d1c48577fd",
    "category": "quota",
    "stage": "usage_reservation",
    "retryable": false,
    "retry_after_seconds": null,
    "public_reason": "insufficient_balance",
    "next_action": "add_funds",
    "details": {
      "required_usd": "0.29",
      "available_usd": "0.01"
    }
  }
}

Related

  • Errors and retries
  • Models
  • API pricing

On this page

  • Request rate
  • Jobs in flight
  • What a job costs
  • Running out of balance