{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/meetkuro-com/json-schema/meetkuro-com-upload-schema.json",
  "title": "Upload",
  "description": "A file you brought into Kuro.",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/meetkuro-com-openapi.json#/components/schemas/Upload",
  "type": "object",
  "properties": {
    "object": {
      "type": "string",
      "enum": [
        "upload"
      ]
    },
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "filename": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "image",
        "video",
        "audio"
      ]
    },
    "mime_type": {
      "type": "string"
    },
    "bytes": {
      "type": "integer"
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "verified",
        "rejected",
        "expired"
      ],
      "description": "Only a `verified` upload can be used in a generation."
    },
    "url": {
      "type": "string",
      "format": "uri",
      "description": "A signed link to the file, for about an hour."
    },
    "thumbnail_url": {
      "type": [
        "string",
        "null"
      ],
      "format": "uri"
    },
    "reference": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "upload"
              ]
            },
            "upload_id": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "upload_id"
          ]
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "generation"
              ]
            },
            "generation_id": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "generation_id"
          ]
        }
      ],
      "description": "Pass this where a request takes media."
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    }
  },
  "required": [
    "object",
    "id",
    "filename",
    "type",
    "mime_type",
    "bytes",
    "status",
    "url",
    "thumbnail_url",
    "reference",
    "created_at"
  ]
}