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

# Remove the background from an image

> Strip the background from an image and return a transparent PNG. Works on generated images (must be completed) and uploaded/scraped images. Returns immediately with a new image ID; the cutout typically completes in under 10 seconds. Poll GET /images/{id} to check status and retrieve the result.



## OpenAPI

````yaml https://www.trybloom.ai/api/v1/spec.json post /images/{id}/remove-background
openapi: 3.1.1
info:
  title: Bloom API
  version: 1.0.0
servers:
  - url: https://www.trybloom.ai/api/v1
security:
  - apiKey: []
  - bearer: []
tags:
  - name: Account
    description: >-
      Inspect the authenticated account — profile, credit balance, and
      accessible workspaces.
  - name: Brands
    description: Manage brands and brand identity.
  - name: Images
    description: Generate, edit, and retrieve images.
paths:
  /images/{id}/remove-background:
    post:
      tags:
        - Images
      summary: Remove the background from an image
      description: >-
        Strip the background from an image and return a transparent PNG. Works
        on generated images (must be completed) and uploaded/scraped images.
        Returns immediately with a new image ID; the cutout typically completes
        in under 10 seconds. Poll GET /images/{id} to check status and retrieve
        the result.
      operationId: images.removeBackground
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            description: >-
              ID of a completed generated image, or an uploaded/scraped image,
              to remove the background from
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                brandSessionId:
                  type: string
                  format: uuid
                  description: Brand session ID (from GET /brands)
              required:
                - brandSessionId
      responses:
        '202':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                      status:
                        const: pending
                    required:
                      - id
                      - status
                required:
                  - data
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: IMAGE_NOT_COMPLETED
                      status:
                        const: 400
                      message:
                        type: string
                        default: >-
                          Source image must be completed before removing
                          background
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: IMAGE_NOT_REMOVABLE_BACKGROUND
                      status:
                        const: 400
                      message:
                        type: string
                        default: >-
                          Vector images don't have a background to remove. Pick
                          a raster image.
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: UNAUTHORIZED
                      status:
                        const: 401
                      message:
                        type: string
                        default: Invalid or missing API credentials
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '402':
          description: '402'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: INSUFFICIENT_CREDITS
                      status:
                        const: 402
                      message:
                        type: string
                        default: Not enough credits to remove background
                      data:
                        type: object
                        properties:
                          action_url:
                            type: string
                            format: uri
                            description: >-
                              Deep link to /pricing for the caller to top up
                              credits
                        required:
                          - action_url
                    required:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: true
                      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:
                      - defined
                      - code
                      - status
                      - message
                      - data
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: FORBIDDEN
                      status:
                        const: 403
                      message:
                        type: string
                        default: Plan upgrade required
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: IMAGE_NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: Source image not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: SESSION_NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: Brand session not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: TOO_MANY_REQUESTS
                      status:
                        const: 429
                      message:
                        type: string
                        default: Rate limit exceeded
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Bloom API key, for example `x-api-key: bloom_sk_...`.'
    bearer:
      type: http
      scheme: bearer
      description: Bloom API key (`Bearer bloom_sk_...`) or Bloom OAuth access token.

````