Hair Style Wizard by Mojju

Hair Style Wizard by Mojju · GPT-Aktionen

Mojjo image restoration API

Actions for retrieveing restored images

  • POST /api/postImageUseful to retrieve the image from the db when the user provided an id

    Retrieves an image from the db based on user's id

Ursprüngliches API-Schema
{
  "openapi": "3.1.0",
  "info": {
    "title": "Mojjo image restoration API",
    "description": "Actions for retrieveing restored images",
    "version": "v1.0.0"
  },
  "servers": [
    {
      "url": "https://upload.mojju.com"
    }
  ],
  "paths": {
    "/api/postImage": {
      "post": {
        "operationId": "postImage",
        "summary": "Useful to retrieve the image from the db when the user provided an id",
        "description": "Retrieves an image from the db based on user's id",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/StandardRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/SuccessResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "403": {
            "$ref": "#/components/responses/AccessDenied"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "$ref": "#/components/responses/InternalServerError"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "StandardRequest": {
        "type": "object",
        "properties": {
          "resultId": {
            "type": "string",
            "description": "The 21 or 22 characters long id that user pasted in the chat."
          }
        },
        "required": [
          "resultId"
        ]
      },
      "StandardResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer"
          },
          "image": {
            "type": "string"
          }
        }
      }
    },
    "responses": {
      "SuccessResponse": {
        "description": "Operation was successful.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardResponse"
            }
          }
        }
      },
      "BadRequest": {
        "description": "The request was invalid or cannot be otherwise served."
      },
      "AccessDenied": {
        "description": "Access to the resource is denied."
      },
      "NotFound": {
        "description": "The requested resource was not found."
      },
      "TooManyRequests": {
        "description": "Too many requests hit the API too quickly."
      },
      "InternalServerError": {
        "description": "Internal server error."
      }
    },
    "securitySchemes": {
      "apiToken": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization"
      }
    }
  },
  "security": [
    {
      "apiToken": []
    }
  ]
}