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

# Remove the background of an image

> This endpoint removes the background from an image provided via a URL. The URLs in the response are temporary and valid for **5 minutes** only.

**Supported formats:** JPG, PNG

**File size limit:** up to 20 MB

**Output resolutions:** Preview (up to 0.25 megapixels), Full resolution (up to 25 megapixels)




## OpenAPI

````yaml post /v1/ai/beta/remove-background
openapi: 3.0.0
info:
  description: >-
    The Magnific API is your gateway to a vast collection of high-quality
    digital resources for your applications and projects. As a leading platform,
    it offers a wide range of graphics, including vectors, photos,
    illustrations, icons, PSD templates, and more, all curated by talented
    designers from around the world.
  title: Magnific API
  version: 1.0.0
servers:
  - description: B2B API Production V1
    url: https://api.magnific.com
security:
  - magnificApiKey: []
paths:
  /v1/ai/beta/remove-background:
    post:
      tags:
        - remove-background
      summary: Remove the background of an image
      description: >
        This endpoint removes the background from an image provided via a URL.
        The URLs in the response are temporary and valid for **5 minutes** only.


        **Supported formats:** JPG, PNG


        **File size limit:** up to 20 MB


        **Output resolutions:** Preview (up to 0.25 megapixels), Full resolution
        (up to 25 megapixels)
      operationId: remove_image_background
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/remove_image_background_request'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/remove_image_background_200_response'
          description: Successful background removal.
components:
  schemas:
    remove_image_background_request:
      properties:
        image_url:
          description: The URL of the image whose background needs to be removed.
          example: >-
            https://img.freepik.com/free-vector/cute-cat-sitting-cartoon-vector-icon-illustration-animal-nature-icon-concept-isolated-premium-vector-flat-cartoon-style_138676-4148.jpg?w=2000&t=st=1725353998~exp=1725357598~hmac=a17f90afeeff454b36c0715f84eed2b388cd9c4a7ce59fcdff075fa41770e469
          format: uri
          type: string
      type: object
    remove_image_background_200_response:
      example:
        original: >-
          https://api.magnific.com/v1/ai/beta/images/original/037ea4ea-e8ad84a8c7/thumbnail.jpg
        high_resolution: >-
          https://api.magnific.com/v1/ai/beta/images/download/037ead-44cd8ad84a8c7/high.png
        preview: >-
          https://api.magnific.com/v1/ai/beta/images/download/037ea4eacad84a8c7/preview.png
        url: >-
          https://api.magnific.com/v1/ai/beta/images/download/037ea4ea-720d-411e8ad84a8c7/high.png
      properties:
        original:
          description: URL of the original image.
          format: uri
          type: string
        high_resolution:
          description: URL of the high-resolution image with the background removed.
          format: uri
          type: string
        preview:
          description: URL of the preview version of the image.
          format: uri
          type: string
        url:
          description: Direct URL for downloading the high-resolution image.
          format: uri
          type: string
      type: object
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey

````