> ## 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.

# Create a brand

> Create a brand and its Brand Skill from your sources. See [Create a brand](/guides/create-brand) to choose sources, start creation, and handle retries or an existing brand.



## OpenAPI

````yaml https://www.rainbrand.com/api/v1/spec.json post /brands
openapi: 3.1.1
info:
  title: Rainbrand API
  version: 1.0.0
servers:
  - url: https://www.rainbrand.com/api/v1
security:
  - apiKey: []
  - bearer: []
tags:
  - name: Uploads
    description: >-
      Stage private local files for brand sources, the Library, and other
      supported operations.
  - name: Account
    description: >-
      Inspect the authenticated account — profile, credit balance, and
      accessible workspaces.
  - name: Brands
    description: Manage brands and brand identity.
  - name: Library
    description: Add, list, and remove a brand's images, video, and audio.
  - name: Images
    description: Retrieve and manage images.
  - name: Videos
    description: Retrieve and manage video files.
  - name: Audio
    description: Retrieve and manage audio files.
  - name: Briefs
    description: Get brand guidance and selected assets for a specific task.
  - name: Models
    description: Find available models and check their inputs.
  - name: Generations
    description: Create and retrieve model generations.
  - name: Reviews
    description: >-
      Check an asset against a brand's color, typography, logo, and copy
      guidance.
paths:
  /brands:
    post:
      tags:
        - Brands
      summary: Create a brand
      description: >-
        Create a brand and its Brand Skill from your sources. See [Create a
        brand](/guides/create-brand) to choose sources, start creation, and
        handle retries or an existing brand.
      operationId: brands.create
      parameters:
        - name: idempotency-key
          in: header
          schema:
            type: string
            minLength: 1
            maxLength: 255
            description: >-
              Optional retry key, 1–255 characters after trimming. Reuse with
              the same request to recover the original Brand ID. Use a new key
              for a new creation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                sources:
                  type: array
                  minItems: 1
                  maxItems: 30
                  items:
                    anyOf:
                      - anyOf:
                          - type: object
                            properties:
                              kind:
                                enum:
                                  - website
                                type: string
                                description: Source type for a public website
                              url:
                                type: string
                                format: uri
                                description: Public website URL to turn into a Brand Skill
                            required:
                              - kind
                              - url
                            title: Website
                          - type: object
                            properties:
                              kind:
                                enum:
                                  - instagram
                                type: string
                                description: Source type for an Instagram account
                              username:
                                type: string
                                minLength: 1
                                maxLength: 31
                                description: Instagram username to use as brand evidence
                            required:
                              - kind
                              - username
                            title: Instagram
                          - type: object
                            properties:
                              kind:
                                enum:
                                  - file
                                type: string
                                description: >-
                                  Source type for an uploaded file, including a
                                  PDF
                              url:
                                type: string
                                format: uri
                                description: >-
                                  Temporary public HTTPS URL for a file up to
                                  100 MiB, including a PDF
                              filename:
                                type: string
                                minLength: 1
                                maxLength: 240
                                description: >-
                                  Original filename used for source labels. It
                                  defaults from the URL when possible.
                            required:
                              - kind
                              - url
                            additionalProperties: false
                            title: File
                      - type: object
                        properties:
                          kind:
                            const: file
                            description: Source type for a completed temporary upload
                          uploadId:
                            type: string
                            format: uuid
                            description: Completed temporary upload from POST /uploads
                        required:
                          - kind
                          - uploadId
                        additionalProperties: false
                        title: Temporary upload
                  description: >-
                    Sources to combine into a Brand Skill. At most one website
                    and one Instagram account can be included. Files may be
                    public HTTPS URLs or completed temporary uploads, up to 100
                    MiB each and 256 MiB combined.
                instructions:
                  type: string
                  maxLength: 4000
                  description: >-
                    Optional instructions passed to the Brand Agent for this
                    run. The Agent applies them using its existing judgment.
                workspaceId:
                  type: string
                  minLength: 1
                  description: >-
                    Team workspace ID. The brand is created in that workspace
                    and billed to its customer. Omit to create in the caller's
                    personal workspace.
                allowDuplicate:
                  type: boolean
                  description: >-
                    Allow creation when a website or Instagram source matches an
                    existing brand in the selected workspace. Set to true only
                    when the caller intentionally chooses to create another
                    brand. Defaults to false.
              required:
                - sources
              additionalProperties: false
              title: One or more sources
      responses:
        '202':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        const: analyzing
                    required:
                      - id
                      - status
                required:
                  - data
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate400ErrorResponse'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate401ErrorResponse'
        '402':
          description: '402'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate402ErrorResponse'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate403ErrorResponse'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate404ErrorResponse'
        '409':
          description: '409'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate409ErrorResponse'
        '429':
          description: '429'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate429ErrorResponse'
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying after the API-key request limit
                or billing-account brand onboarding limit is reached. Present
                only when the active limiter can calculate the delay.
              schema:
                type: integer
                minimum: 0
        '500':
          description: '500'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate500ErrorResponse'
        '503':
          description: '503'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandsCreate503ErrorResponse'
components:
  schemas:
    BrandsCreate400ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: INVALID_URL
                    status:
                      const: 400
                    message:
                      type: string
                      default: Invalid URL
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: UNSUPPORTED_SOURCE
                    status:
                      const: 400
                    message:
                      type: string
                      default: This brand source is not supported
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: INVALID_SOURCE
                    status:
                      const: 400
                    message:
                      type: string
                      default: Invalid brand source
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate401ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: UNAUTHORIZED
                    status:
                      const: 401
                    message:
                      type: string
                      default: Invalid or missing API credentials
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate402ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: INSUFFICIENT_CREDITS
                    status:
                      const: 402
                    message:
                      type: string
                      default: Not enough credits to create a brand
                    data:
                      type: object
                      properties:
                        action_url:
                          type: string
                          format: uri
                          description: >-
                            Deep link to /pricing for the caller to top up
                            credits
                        credits_required:
                          type: number
                          description: Credits the refused request needed
                        balance:
                          type: number
                          description: >-
                            The workspace's credit balance when the request was
                            refused
                        pricing_version:
                          type: integer
                          minimum: -9007199254740991
                          maximum: 9007199254740991
                          description: >-
                            The workspace's pricing version. Credit amounts are
                            comparable only within one version.
                      required:
                        - action_url
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      const: PAYMENT_REQUIRED
                    status:
                      const: 402
                    message:
                      type: string
                      default: Subscription paused — complete payment to resume
                    data:
                      type: object
                      properties:
                        action_url:
                          type: string
                          format: uri
                          description: >-
                            Deep link to /pricing to complete the pending
                            payment
                      required:
                        - action_url
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate403ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: ACCOUNT_BANNED
                    status:
                      const: 403
                    message:
                      type: string
                      default: This account has been suspended.
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: FORBIDDEN
                    status:
                      const: 403
                    message:
                      type: string
                      default: Plan upgrade required
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: TARGET_RESTRICTED
                    status:
                      const: 403
                    message:
                      type: string
                      default: This brand cannot be added on a free account right now
                    data:
                      type: object
                      properties:
                        supportReference:
                          type: string
                      required:
                        - supportReference
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate404ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: WORKSPACE_NOT_FOUND
                    status:
                      const: 404
                    message:
                      type: string
                      default: Workspace not found or not accessible
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate409ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: IDEMPOTENCY_CONFLICT
                    status:
                      const: 409
                    message:
                      type: string
                      default: >-
                        Idempotency-Key was already used with a different
                        request
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      const: DUPLICATE_BRAND
                    status:
                      const: 409
                    message:
                      type: string
                      default: >-
                        A Brand in this workspace already uses one or more of
                        these sources.
                    data:
                      type: object
                      properties:
                        matches:
                          type: array
                          minItems: 1
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              name:
                                type: string
                              status:
                                enum:
                                  - analyzing
                                  - ready
                                  - logo_required
                                  - failed
                                type: string
                              matchingSources:
                                type: array
                                minItems: 1
                                items:
                                  anyOf:
                                    - type: object
                                      properties:
                                        kind:
                                          const: website
                                        url:
                                          type: string
                                          format: uri
                                      required:
                                        - kind
                                        - url
                                    - type: object
                                      properties:
                                        kind:
                                          const: instagram
                                        username:
                                          type: string
                                      required:
                                        - kind
                                        - username
                            required:
                              - id
                              - name
                              - status
                              - matchingSources
                      required:
                        - matches
                  required:
                    - code
                    - status
                    - message
                    - data
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate429ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: TOO_MANY_REQUESTS
                    status:
                      const: 429
                    message:
                      type: string
                      default: Rate limit exceeded
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate500ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: INTERNAL_ERROR
                    status:
                      const: 500
                    message:
                      type: string
                      default: Failed to start brand creation
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    BrandsCreate503ErrorResponse:
      type: object
      properties:
        error:
          allOf:
            - $ref: '#/components/schemas/ApiError'
            - anyOf:
                - type: object
                  properties:
                    code:
                      const: SCRAPE_FAILED
                    status:
                      const: 503
                    message:
                      type: string
                      default: Couldn't reach that URL. Please try again.
                    data: {}
                  required:
                    - code
                    - status
                    - message
                - type: object
                  properties:
                    code:
                      type: string
                    status:
                      type: integer
                    message:
                      type: string
                    data: {}
                  required:
                    - code
                    - status
                    - message
      required:
        - error
    ApiError:
      type: object
      properties:
        code:
          type: string
        status:
          type: integer
        message:
          type: string
        data: {}
      required:
        - code
        - status
        - message
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Rainbrand API key, for example `x-api-key: bloom_sk_...`.'
    bearer:
      type: http
      scheme: bearer
      description: >-
        Rainbrand API key (`Bearer bloom_sk_...`) or Rainbrand OAuth access
        token.

````

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