Skip to content
Last updated

Rate limits and errors

Rate limits

Limits apply per organization and per endpoint, measured in requests per minute.

PlanRequests per minute per endpoint
Free10
Pay-as-you-go60
Enterprise1000, customizable per organization

Above the limit the API returns 429 Too Many Requests. Status endpoint calls count toward the limit, so poll at a sensible interval or use webhooks. If you need more throughput, contact us about an Enterprise plan.

Handling 429

Retry with exponential backoff and jitter, honor Retry-After when present, and cap concurrency on your side so a burst does not turn into a wave of retries.

The SDK retries 429, 502, 503 and 504 responses to status polling automatically (3 attempts, exponential backoff). run and submit are never retried, so a job is never started twice. Tune it per client:

from bria_client import BriaSyncClient
from httpx_retries import Retry

client = BriaSyncClient(retry=Retry(total=5, backoff_factor=2))

Keep your own concurrency bounded, for example with a thread pool of a few workers, so parallel jobs stay under the per-endpoint limit.

Error contract

Synchronous errors return a JSON body with an error object and the request_id to quote when contacting support:

{
  "request_id": "9d4a1a2f5c7e4b6f8a0c2d3e4f5a6b7c",
  "error": {
    "code": 422,
    "message": "Unprocessable Entity",
    "details": "Prompt failed content moderation."
  }
}

Asynchronous jobs report failures through the status endpoint: status is ERROR and the same error object is included.

HTTP statusWhen it happens
400 Bad RequestMalformed JSON, an unknown parameter, an invalid value or an unsupported parameter combination.
401 UnauthorizedMissing or invalid api_token. See Authentication.
403 ForbiddenThe endpoint or option is not included in your plan.
404 Not FoundUnknown route, or an unknown or expired request_id on the status endpoint.
406 Not AcceptableThe input image is over the endpoint's pixel limit, or the requested output resolution is over its maximum.
413 Payload Too LargeThe image or request exceeds the endpoint's size limit.
415 Unsupported Media TypeThe input file type or color mode is not supported. Use JPEG, PNG or WEBP.
422 Unprocessable EntityThe request is well formed but cannot be processed: content moderation failed, no object was detected for a prompt, or an async-only option was combined with sync: true.
429 Too Many RequestsRate limit exceeded. Back off and retry.
5xxA problem on Bria's side. Retry with backoff; check status.bria.ai if it persists.

Each endpoint page lists its specific error responses and messages.