Japanese 3D Designer

Japanese 3D Designer · Ações GPT

Jife

Transform your life with Japanese style

  • GET /generate-upload-url/Generate Upload Url
  • POST /upload-image{trailing_slash}Upload Image
  • POST /create-checkout-session/Create Stripe Checkout Session
  • POST /stripe-webhook/Stripe Webhook
  • GET /check-upload-status/Check Upload Status
  • POST /transform-image/Transform Image Endpoint
  • POST /webhook/Webhook Endpoint
  • GET /check-status/{unique_id}Check Status
Esquema API original
{
  "openapi": "3.1.0",
  "info": {
    "title": "Jife",
    "description": "Transform your life with Japanese style",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.jife.com",
      "description": "Production server"
    }
  ],
  "paths": {
    "/generate-upload-url/": {
      "get": {
        "summary": "Generate Upload Url",
        "operationId": "generate_upload_url_get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "upload_page_url": {
                      "type": "string"
                    },
                    "unique_id": {
                      "type": "string"
                    },
                    "is_free_link": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/upload-image{trailing_slash}": {
      "post": {
        "summary": "Upload Image",
        "operationId": "upload_image_upload_image_trailing_slash__post",
        "parameters": [
          {
            "name": "uniqueid",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "trailing_slash",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_image_upload_image_trailing_slash__post"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "image_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {}
          },
          "413": {
            "description": "Payload Too Large",
            "content": {}
          },
          "415": {
            "description": "Unsupported Media Type",
            "content": {}
          },
          "422": {
            "description": "Validation Error",
            "content": {}
          },
          "500": {
            "description": "Internal Server Error",
            "content": {}
          }
        }
      }
    },
    "/create-checkout-session/": {
      "post": {
        "summary": "Create Stripe Checkout Session",
        "operationId": "create_checkout_session_post",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "unique_id": {
                    "type": "string"
                  }
                },
                "required": [
                  "unique_id"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {}
          }
        }
      }
    },
    "/stripe-webhook/": {
      "post": {
        "summary": "Stripe Webhook",
        "operationId": "stripe_webhook_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {}
          }
        }
      }
    },
    "/check-upload-status/": {
      "get": {
        "summary": "Check Upload Status",
        "operationId": "check_upload_status_get",
        "parameters": [
          {
            "name": "unique_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "canUpload": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {}
          }
        }
      }
    },
    "/transform-image/": {
      "post": {
        "summary": "Transform Image Endpoint",
        "operationId": "transform_image_endpoint_transform_image__post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransformImageRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    },
                    "prediction_id": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/webhook/": {
      "post": {
        "summary": "Webhook Endpoint",
        "operationId": "webhook_endpoint_webhook__post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          }
        }
      }
    },
    "/check-status/{unique_id}": {
      "get": {
        "summary": "Check Status",
        "operationId": "check_status_check_status__unique_id__get",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "unique_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "unique_id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "output_url": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Prediction ID not found",
            "content": {}
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Body_upload_image_upload_image_trailing_slash__post": {
        "properties": {
          "file": {
            "type": "string",
            "format": "binary",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_image_upload_image_trailing_slash__post"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "TransformImageRequest": {
        "properties": {
          "unique_id": {
            "type": "string",
            "title": "Unique Id"
          },
          "model_version": {
            "type": "string",
            "title": "Model Version"
          },
          "prompt": {
            "type": "string",
            "title": "Prompt"
          },
          "image_resolution": {
            "type": "integer",
            "title": "Image Resolution",
            "default": 512
          },
          "guidance_scale": {
            "type": "number",
            "title": "Guidance Scale",
            "default": 7
          }
        },
        "type": "object",
        "required": [
          "unique_id",
          "model_version",
          "prompt"
        ],
        "title": "TransformImageRequest"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  }
}