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

# Image Upscaler

> Image Upscaler API enlarges images 2x to 4x while enhancing detail, reducing noise, and preserving visual quality.



## OpenAPI

````yaml /docs/openapi.json post /api/image/enhance/image-lossless-enlargement
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/image/enhance/image-lossless-enlargement:
    post:
      tags:
        - AI IMAGE > Image Enhancement
      summary: Image Upscaler
      description: >-
        Image Upscaler API enlarges images 2x to 4x while enhancing detail,
        reducing noise, and preserving visual quality.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  format: binary
                  description: >-
                    - Image format: `JPEG` `JPG` `PNG` `BMP`. 

                    - Image size: No more than 3 MB. 

                    - Image resolution: Larger than 32x32px and smaller than
                    1920x1080px.
                upscale_factor:
                  type: integer
                  enum:
                    - 2
                    - 3
                    - 4
                  default: 2
                  description: Magnification.
                mode:
                  type: string
                  enum:
                    - base
                    - enhancement
                  default: base
                  description: >-
                    Image output mode. 

                    - `base`: Normal mode, i.e. stable super-resolution effect. 

                    - `enhancement`: Enhancement mode, which has a more
                    prominent enhancement effect than the normal mode, further
                    improving the clarity and sharpness of the output image.
                output_format:
                  type: string
                  enum:
                    - png
                    - jpg
                    - bmp
                  default: png
                  description: >-
                    Output image format. If the input image is in RGBA format,
                    the output is forced to `png` to preserve the RGBA format
                    and alpha channel accuracy. If the output image resolution
                    exceeds 3840x2160, the output format is automatically set to
                    `jpg`.
                output_quality:
                  type: integer
                  minimum: 30
                  maximum: 100
                  default: 95
                  description: >-
                    Quality factor of the output image, where a higher value
                    corresponds to higher quality. Only applicable when
                    `output_format=jpg`.
      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:
                          url:
                            type: string
                            description: Result image URL.
              example:
                request_id: ''
                log_id: ''
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                data:
                  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

````