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

# Super Resolution

> Super Resolution API returns a super resolution version of the image.

### Super Resolution

<img src="https://mintcdn.com/mod/i8dYICFkuz1vpdrI/images/image-editing/assets/images/Superresolution-138175764429bf837f39bb8198b1ecd3.jpg?fit=max&auto=format&n=i8dYICFkuz1vpdrI&q=85&s=1a63f6eb40379c4481e4c0a1dba5dc5c" alt="Super Resolution endpoint result" width="691" height="518" data-path="images/image-editing/assets/images/Superresolution-138175764429bf837f39bb8198b1ecd3.jpg" />

## Request

Send a `POST` request to below endpoint to return the corresponding super resolution image of the image passed.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/image_editing/super_resolution' \
```

### The following upscale model are supported

| Model ID                      | Description                 |
| ----------------------------- | --------------------------- |
| RealESRGAN\_x4plus            | 4x upscaling model          |
| RealESRGAN\_x4plus            | 4x upscaling model          |
| RealESRGAN\_x4plus\_anime\_6B | 4x Anime upscaling model    |
| RealESRGAN\_x2plus            | 2x upscaling model          |
| realesr-general-x4v3          | 4x upscaling general model  |
| ultra\_resolution             | 4K+ upscaling general model |

## Body

```json json theme={null}
{    
    "key": "your_api_key",   
    "init_image": "https://i.pinimg.com/564x/fc/8e/6a/fc8e6a075f341284b0f44bf1592f9f3c.jpg", 
    "face_enhance": false, 
    "scale": 3, 
    "webhook": null, 
    "track_id": null
}
```


## OpenAPI

````yaml POST /image_editing/super_resolution
openapi: 3.1.0
info:
  title: ModelsLab Image Editing API
  description: >-
    Image editing endpoints for ModelsLab API including background removal,
    super resolution, face generation, fashion try-on, and various image
    manipulation tools
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
    description: Image Editing API v6 server
security: []
paths:
  /image_editing/super_resolution:
    post:
      summary: Super resolution image enhancement
      description: >-
        Super Resolution API returns a super resolution version of an image that
        is passed to the init_image attribute
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SuperResolutionRequest'
      responses:
        '200':
          description: Super resolution response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageEditingSuccessResponse'
                  - $ref: '#/components/schemas/ImageEditingProcessingResponse'
                  - $ref: '#/components/schemas/ImageEditingErrorResponse'
components:
  schemas:
    SuperResolutionRequest:
      type: object
      required:
        - key
        - init_image
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        init_image:
          type: string
          format: uri
          description: The URL of the image that you want to upscale
        model_id:
          type: string
          default: realesr-general-x4v3
          enum:
            - RealESRGAN_x4plus
            - RealESRGAN_x4plus_anime_6B
            - RealESRGAN_x2plus
            - realesr-general-x4v3
            - ultra_resolution
        scale:
          type: integer
          default: 3
          description: A number for scaling the image
        face_enhance:
          type: boolean
          default: false
          description: A boolean flag for face enhancement feature
        webhook:
          type: string
          format: uri
          description: URL to receive POST API call when complete
        track_id:
          type: integer
          description: ID for webhook identification
    ImageEditingSuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        generationTime:
          type: number
          description: Time taken to generate the image in seconds
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingProcessingResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
        tip:
          type: string
          description: Information about the processing status
        eta:
          type: integer
          description: Estimated time remaining in seconds
        message:
          type: string
          description: Processing status message
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when ready
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
          description: Empty array during processing
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message describing what went wrong

````