{
  "openapi": "3.1.0",
  "info": {
    "title": "Zapi — Uploader",
    "description": "Every Uploader endpoint on Zapi. Rendered catalog: https://zpi.web.id/category/uploader",
    "version": "1.0.0",
    "license": {
      "name": "Zapi Terms of Service",
      "url": "https://zpi.web.id/terms"
    }
  },
  "servers": [
    {
      "url": "https://api.zpi.web.id"
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    },
    "schemas": {
      "Envelope": {
        "type": "object",
        "required": [
          "status",
          "message"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "success",
              "error"
            ]
          },
          "message": {
            "type": "string"
          },
          "content": {}
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Invalid key, rate limit, or upstream failure",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Envelope"
            }
          }
        }
      }
    }
  },
  "externalDocs": {
    "url": "https://zpi.web.id/category/uploader/llms.txt"
  },
  "paths": {
    "/v1/uploader:cutout/upload": {
      "post": {
        "operationId": "uploader_cutout_upload",
        "summary": "Upload File",
        "description": "Upload gambar ke S3 presigned URL (3 jam). Khusus image.",
        "tags": [
          "Cutout Image"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/cutout#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "mime": "image/jpeg",
                    "note": "Presigned URL valid 3 jam. Hanya untuk gambar.",
                    "service": "cutout",
                    "fileName": "96fc0fc145454ad9457b51e17ae68a55.jpg",
                    "fileSize": 67105,
                    "expiresAt": "2026-05-23T12:36:21.692Z",
                    "expiresIn": "3h",
                    "publicUrl": "https://deeplor.s3.us-west-2.amazonaws.com/upload/2026/05/23/8abfed491b2d4a50ab02adf20d05a3cf.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20260523T093621Z&X-Amz-SignedHeaders=host&X-Amz-Expires=10800&X-Amz-Credential=AKIAROYXHKZU6F6BHMXV%2F20260523%2Fus-west-2%2Fs3%2Faws4_request&X-Amz-Signature=c92dba3afc5c7c0befc6b1864c0542625afb7873be5ed110681827cbb277569d",
                    "uploadedAt": "2026-05-23T09:36:21.692Z",
                    "oneTimeDownload": false
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "photo.jpg"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:gofile/upload": {
      "post": {
        "operationId": "uploader_gofile_upload",
        "summary": "Upload File",
        "description": "Upload file tanpa batas size. Reset expiry tiap download.",
        "tags": [
          "Gofile"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/gofile#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "mime": "image/jpeg",
                    "note": "Timer 10 hari reset setiap ada yang download. File praktis permanent selama aktif diakses.",
                    "service": "gofile",
                    "fileName": "96fc0fc145454ad9457b51e17ae68a55.jpg",
                    "fileSize": 67105,
                    "expiresAt": "2026-06-02T09:43:34.331Z",
                    "expiresIn": "10 hari idle (reset tiap download)",
                    "publicUrl": "https://gofile.io/d/bO1T4k",
                    "directLink": null,
                    "uploadedAt": "2026-05-23T09:43:34.332Z",
                    "contentCode": null,
                    "oneTimeDownload": false
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "archive.zip"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:kappa-lol/upload": {
      "post": {
        "operationId": "uploader_kappa_lol_upload",
        "summary": "Upload",
        "description": "Upload a file via multipart and return the share URL.",
        "tags": [
          "Kappa.lol"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/kappa-lol#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "ok": true,
                    "url": "https://kappa.lol/ZtVei2",
                    "host": "kappa.lol",
                    "fileName": "96fc0fc145454ad9457b51e17ae68a55.jpg",
                    "fileSize": 67105,
                    "uploadedAt": "2026-05-27T13:37:52.769Z"
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "photo.jpg"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:litterbox/upload": {
      "post": {
        "operationId": "uploader_litterbox_upload",
        "summary": "Upload File",
        "description": "Upload file ephemeral 1h-72h. Max 1GB.",
        "tags": [
          "Litterbox"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/litterbox#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "mime": "image/png",
                    "service": "litterbox",
                    "fileName": "bilibili-global-icon-filled-256.png",
                    "fileSize": 32606,
                    "expiresAt": "2026-05-23T10:45:58.885Z",
                    "expiresIn": "1h",
                    "publicUrl": "https://litter.catbox.moe/ykif06.png",
                    "uploadedAt": "2026-05-23T09:45:58.885Z",
                    "oneTimeDownload": false
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "report.pdf"
                  },
                  "duration": {
                    "type": "string",
                    "enum": [
                      "1h",
                      "12h",
                      "24h",
                      "72h"
                    ],
                    "default": "1h",
                    "example": "1h"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:temp-sh/upload": {
      "post": {
        "operationId": "uploader_temp_sh_upload",
        "summary": "Upload",
        "description": "Upload a file via multipart and return the temporary URL.",
        "tags": [
          "Temp.sh"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/temp-sh#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "ok": true,
                    "url": "https://temp.sh/pknLa/photo.jpg",
                    "host": "temp.sh",
                    "fileName": "photo.jpg",
                    "fileSize": 67105,
                    "uploadedAt": "2026-05-27T13:38:45.913Z",
                    "retentionDays": 3
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "photo.jpg"
                  },
                  "filename": {
                    "type": "string",
                    "example": "photo.jpg"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:tmpfiles/upload": {
      "post": {
        "operationId": "uploader_tmpfiles_upload",
        "summary": "Upload File",
        "description": "Upload file ephemeral 1 jam. Max 100MB.",
        "tags": [
          "Tmpfiles"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/tmpfiles#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "mime": "image/webp",
                    "note": "File auto-dihapus dalam 1m.",
                    "service": "tmpfiles",
                    "fileName": "cekresi.com.webp",
                    "fileSize": 8744,
                    "expiresAt": "2026-05-23T10:00:29.062Z",
                    "expiresIn": "1m",
                    "publicUrl": "https://tmpfiles.org/dl/wdwpgZ8f2FKZ/cekresi.com.webp",
                    "browserUrl": "https://tmpfiles.org/wdwpgZ8f2FKZ/cekresi.com.webp",
                    "uploadedAt": "2026-05-23T09:59:29.062Z",
                    "oneTimeDownload": false
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "image.png"
                  },
                  "expire": {
                    "type": "number",
                    "default": 3600,
                    "example": "3600"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/uploader:uguu/upload": {
      "post": {
        "operationId": "uploader_uguu_upload",
        "summary": "Upload File",
        "description": "Upload file ephemeral 3 jam. Max 128MB.",
        "tags": [
          "Uguu"
        ],
        "externalDocs": {
          "url": "https://zpi.web.id/api/uploader/uguu#reference-upload"
        },
        "parameters": [],
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                },
                "example": {
                  "status": "success",
                  "message": "Success",
                  "content": {
                    "mime": "image/jpeg",
                    "note": "File auto-dihapus dalam 3 jam.",
                    "service": "uguu",
                    "fileName": "96fc0fc145454ad9457b51e17ae68a55.jpg",
                    "fileSize": 67105,
                    "expiresAt": "2026-05-23T12:54:37.072Z",
                    "expiresIn": "3h",
                    "publicUrl": "https://d.uguu.se/cirNNnzq.jpg",
                    "uploadedAt": "2026-05-23T09:54:37.072Z",
                    "oneTimeDownload": false
                  }
                }
              }
            }
          },
          "4XX": {
            "$ref": "#/components/responses/Error"
          },
          "default": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary",
                    "example": "photo.jpg"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}