openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/magicapi/restoration
info:
  title: "Image Restoration API: Restores old images"
  version: 1.1.8
  description: "Bring faded images back to life: Our API restores clarity,
    vibrancy & detail to old or damaged photos."
paths:
  /predictions/{request_id}:
    get:
      summary: Get Toonified Image URL
      description: >
        This endpoint retrieves the URL of the toonified image for a given
        request ID.
      parameters:
        - name: request_id
          in: path
          required: true
          description: Unique identifier for the request.
          schema:
            type: string
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: Status of the prediction (e.g., "succeeded").
                  image_url:
                    type: string
                    format: uri
                    description: URL of the toonified image.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Description of the error.
      security:
        - apiKey: []
    parameters:
      - &a1
        description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
  /restoration:
    post:
      summary: Image Restoration
      description: |
        This endpoint takes in a URL of an old image and restore it.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                img:
                  type: string
                  format: uri
                  description: URL of the image to be restored.
                  default: https://replicate.delivery/mgxm/f4e50a7b-e8ca-432f-8e68-082034ebcc70/demo.jpg
                scale:
                  type: integer
                  description: Number to be upscaled.
                  default: 2
                version:
                  type: string
                  default: v1.4
              required:
                - img
                - scale
                - version
      responses:
        "200":
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  request_id:
                    type: string
                    description: Unique identifier for the request.
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: Description of the error.
      security:
        - apiKey: []
    parameters:
      - *a1
security: {}
tags:
  - name: tools
    description: Operations related to tools
  - name: visual-recognition
    description: Operations related to visual-recognition
  - name: artificial-intelligence
    description: Operations related to artificial-intelligence
  - name: image-to-image
    description: Operations related to image-to-image
