# Photo Restoration

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/aiart/restoration:
    post:
      summary: Photo Restoration
      deprecated: false
      description: ''
      tags:
        - Reference
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Bearer <your api key>
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userImageUrl:
                  type: string
                  description: >-
                    The URL or BASE64 encoded image of the initial image
                    provided by the user, used to generate a new image based on
                    it.
                faceUpsample:
                  type: boolean
                  description: Whether to enhance the background.
                backgroundEnhance:
                  type: boolean
                  description: Coefficient.
                upscale:
                  type: integer
                  description: 'Fixed magnification: 2.'
                fidelityWeight:
                  type: number
                  description: 'Fidelity, recommended value: 0.5.'
              required:
                - userImageUrl
                - faceUpsample
                - backgroundEnhance
                - upscale
                - fidelityWeight
              x-apifox-orders:
                - userImageUrl
                - faceUpsample
                - backgroundEnhance
                - upscale
                - fidelityWeight
            example:
              userImageUrl: >-
                https://pub-static.fotor.com/assets/goart-effects/examples/mini-figure-after.jpg
              faceUpsample: true
              backgroundEnhance: true
              upscale: 2
              fidelityWeight: 0.5
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: '000: Success，999: Unknown error'
                    x-apifox-mock: '000'
                    examples:
                      - '000'
                  msg:
                    type: string
                    x-apifox-mock: success
                    examples:
                      - success
                  data:
                    type: object
                    properties:
                      taskId:
                        type: string
                        description: Task ID, used to query task information.
                        x-apifox-mock: e0dc194703174b6eafeacb4ee8e02850
                        examples:
                          - e0dc194703174b6eafeacb4ee8e02850
                    required:
                      - taskId
                    x-apifox-orders:
                      - taskId
                required:
                  - code
                  - msg
                  - data
                x-apifox-orders:
                  - code
                  - msg
                  - data
          headers: {}
          x-apifox-name: success
      security: []
      x-apifox-folder: Reference
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5562290/apis/api-240777226-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api-b.fotor.com
    description: 正式环境
security: []

```
