> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rainbrand.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Read failed API responses and handle errors by code.

Failed API requests return an `error` object. For example, requesting a brand that cannot be found returns HTTP `404`:

```json theme={"dark"}
{
  "error": {
    "code": "BRAND_NOT_FOUND",
    "status": 404,
    "message": "Brand not found"
  }
}
```

Use `code` to decide how your application responds. `message` explains the failure to a person, and optional `data` supplies details specific to the error. Each endpoint's response panel lists its error codes and fields.

For credit and billing failures, see [Credits and limits](https://docs.rainbrand.com/api/usage-limits.md#billing-errors).

## Brand deletion is not allowed

`DELETE /brands/{id}` returns `403 FORBIDDEN` when you can access the brand but
cannot delete it. Only the owning team's owners and admins can delete brands.
The creator can also delete a brand before its first setup completes, including
after setup fails. Personal account owners can delete their brands.

Ask a team owner or admin to delete a completed brand. Retrying with the same
credentials or upgrading a plan does not change this permission. A brand outside
your teams and personal account still returns `404 BRAND_NOT_FOUND`.

Members can still create brands, edit brand content, and delete images, videos,
and audio.

## Failed generations

A generation can fail after Rainbrand accepts it. Retrieving that generation
still returns HTTP `200`; read its `status` and `failure` fields to learn the
outcome. `failure.code` remains `upstream_failed` for upstream generation failures.

Use `failure.message` to explain what happened. `failure.providerMessage` may
include the provider's explanation, with links and secrets removed. It is
`null` when there is no explanation safe to share.

| Failure | What to do |
| - | - |
| Content policy block | Review the prompt and any reference files before submitting a new generation. |
| Reference image refused | `failure.message` names the reference and the problem. If `failure.retryable` is `true`, Rainbrand could not download it; try the same input again later. Otherwise, fix or replace that reference before submitting a new generation. |
| Service temporarily unavailable | If `failure.retryable` is `true`, try a new generation later. Changing your prompt will not resolve a service problem. |
| Timeout | Read `failure.retryable`. The original request may still be running, so resubmitting can duplicate work. |

`failure.retryable: true` means a **new attempt** with the same input may succeed
later. It does not resume the failed generation or start another one
automatically. If it is `false`, read both `failure.message` and
`failure.providerMessage` before submitting again;
changing the request or resolving an uncertain original request may be necessary.

For a video wait-limit failure, the provider may still finish and charge for the
original generation. Do not automatically resubmit it: a new attempt may incur
another charge.

If you used `Idempotency-Key`, reuse it only to retrieve the original generation
with the same request body. Use a new key when you deliberately start a new
attempt. Avoid immediate retry loops: generation can consume credits.

## Feature not available

The API returns `403 FEATURE_NOT_AVAILABLE` when a feature isn't enabled for
your integration.

```json theme={"dark"}
{
  "error": {
    "code": "FEATURE_NOT_AVAILABLE",
    "status": 403,
    "message": "Brand editing is not enabled for this integration.",
    "data": {
      "feature": "brand_edits",
      "requestId": "a2a334a7-2f7f-46b3-a43f-c8bdd6f72bd9"
    }
  }
}
```

| Field | Meaning |
| - | - |
| `feature` | The feature that isn't available. See the values below. |
| `sourceIndex` | Optional position in `sources`, starting at 0. Included when a particular source caused the error. |
| `requestId` | Optional identifier to include when contacting support. |

### Known feature values

These are the current identifiers. Availability depends on your integration.

| Value | Feature |
| - | - |
| `brands` | Accessing brands. |
| `brand_creation` | Creating brands. |
| `brand_exports` | Exporting Brand Skills. |
| `brand_edits` | Editing brands. |
| `brand_library` | Adding Library assets. |
| `brand_fonts` | Uploading brand fonts. |
| `briefs` | Creating Briefs. |
| `reviews` | Creating Reviews. |
| `generations` | Generating content. |
| `image_transformations` | Transforming images. |
| `temporary_uploads` | Staging temporary uploads. |
| `model_catalog` | Listing models. |
| `image_search` | Searching for images. |
| `docs_search` | Searching documentation. |
| `agent_feedback` | Submitting feedback. |
| `account` | Reading account information. |
| `workspaces` | Listing teams. |
| `credits` | Reading credit information. |
| `media` | Accessing media. |
| `pdf_sources` | Processing PDF sources. |
| `instagram_sources` | Processing Instagram sources. |
| `brand_sources` | Processing a source type. |
| `brand_processing` | Processing a brand. |

New values may be added. If a value is unfamiliar, show the error's `message`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.