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

# Food Background Removal

> Food Background Removal API removes food image backgrounds and isolates dishes for menus, delivery apps, food blogs, and e-commerce.



## OpenAPI

````yaml /docs/openapi.json post /api/cutout/general/food-background-removal
openapi: 3.0.0
info:
  title: AILabAPI
  description: >-
    [<b>AILabTools</b>](https://www.ailabtools.com) is an advanced tool that
    offers a vast array of simple and flexible API endpoints to suit your
    specific needs. With just one [<b>API
    KEY</b>](https://www.ailabtools.com/doc/get-api-key), you can easily call
    any of the endpoints and integrate them quickly into your application or
    workflow, allowing for smooth and efficient operations. 
     
    [<b>AILabTools</b>](https://www.ailabtools.com) is continuously evolving,
    and you can anticipate even more API endpoints being added in the future,
    further enhancing its capabilities and usefulness for your artificial
    intelligence and machine learning requirements.
  version: 1.0.0
servers:
  - url: https://www.ailabapi.com
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: AI IMAGE
  - name: AI IMAGE > Image Enhancement
  - name: AI IMAGE > Image Effects
  - name: AI IMAGE > Image Editing
  - name: AI IMAGE > Image Scoring
  - name: AI BACKGROUND REMOVAL
  - name: AI BACKGROUND REMOVAL > Portrait
  - name: AI BACKGROUND REMOVAL > General
  - name: AI PORTRAIT
  - name: AI PORTRAIT > Portrait Effects
  - name: AI PORTRAIT > Portrait Enhance
  - name: AI PORTRAIT > Portrait Editing
  - name: AI PORTRAIT > Portrait Analysis
  - name: AI COMMON
paths:
  /api/cutout/general/food-background-removal:
    post:
      tags:
        - AI BACKGROUND REMOVAL > General
      summary: Food Background Removal
      description: >-
        Food Background Removal API removes food image backgrounds and isolates
        dishes for menus, delivery apps, food blogs, and e-commerce.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  format: binary
                  description: >-
                    - Image format: `JPEG` `JPG` `BMP` `PNG`. 

                    - Image size: No more than 4 MB. 

                    - Image resolution: Larger than 40x40px and smaller than
                    1999x1999px.
                return_form:
                  type: string
                  enum:
                    - mask
                    - whiteBK
                  description: |-
                    Specifies the form of the returned image. 
                    - If not set, the four-channel PNG map is returned. 
                    - `mask`: Returns a single channel mask. 
                    - `whiteBK`: Return to white background image.
      responses:
        '200':
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicResponseFields'
                  - type: object
                    properties:
                      data:
                        type: object
                        description: The content of the result data returned.
                        properties:
                          image_url:
                            type: string
                            description: Result image URL.
              example:
                request_id: ''
                log_id: ''
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                data:
                  image_url: ''
          description: Success
components:
  schemas:
    PublicResponseFields:
      type: object
      required:
        - request_id
        - log_id
        - error_detail
      properties:
        request_id:
          type: string
          description: Request ID for debugging.
        log_id:
          type: string
          description: Log ID for debugging.
        error_detail:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - code
        - code_message
        - message
      properties:
        code:
          type: string
          description: >-
            Error Code. See [Error
            Codes](/docs/response-description#error-codes).
        code_message:
          type: string
          description: Error summary.
        message:
          type: string
          description: Detailed error message.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ailabapi-api-key
      description: API Key for authentication

````