{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/animgen-com/json-schema/animgen-com-asset-response-schema.json",
  "title": "AssetResponse",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/animgen-com-openapi.json#/components/schemas/AssetResponse",
  "properties": {
    "object": {
      "type": "string",
      "const": "asset",
      "title": "Object",
      "default": "asset"
    },
    "id": {
      "type": "string",
      "format": "uuid",
      "title": "Id",
      "description": "Stable public asset ID; use it to refresh download metadata.",
      "x-description-zh": "稳定公共资产 ID，用于刷新下载信息。"
    },
    "format": {
      "type": "string",
      "title": "Format",
      "description": "Artifact format; inspect actual outputs rather than assuming an array order.",
      "x-description-zh": "实际资产格式，不要依赖 outputs 固定顺序。"
    },
    "mime_type": {
      "type": "string",
      "title": "Mime Type",
      "description": "Asset media type.",
      "x-description-zh": "资产媒体类型。"
    },
    "byte_size": {
      "type": "integer",
      "title": "Byte Size",
      "description": "Expected file size in bytes.",
      "x-description-zh": "文件预期字节数。"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "title": "Created At",
      "description": "Creation timestamp in UTC.",
      "x-description-zh": "UTC 创建时间。"
    },
    "download_url": {
      "type": "string",
      "title": "Download Url",
      "description": "Sensitive short-lived signed URL. Download without a Bearer header, including after redirects; never log the URL.",
      "x-description-zh": "敏感短期签名 URL；下载及跳转时均不携带 Bearer 头，不记录此 URL。"
    },
    "download_expires_at": {
      "type": "string",
      "format": "date-time",
      "title": "Download Expires At",
      "description": "Signed URL expiry in UTC; refresh via asset lookup when expired.",
      "x-description-zh": "签名 URL 的 UTC 过期时间；过期后重新查询资产。"
    },
    "media": {
      "anyOf": [
        {
          "$ref": "#/$defs/MediaResponse"
        },
        {
          "type": "null"
        }
      ],
      "description": "Whitelisted measured video metadata. Unknown fields are null; non-video assets return null.",
      "x-description-zh": "白名单内的实测视频信息，未知字段为 null；非视频资产为 null。"
    }
  },
  "additionalProperties": false,
  "type": "object",
  "required": [
    "id",
    "format",
    "mime_type",
    "byte_size",
    "created_at",
    "download_url",
    "download_expires_at"
  ],
  "$defs": {
    "MediaResponse": {
      "properties": {
        "duration_seconds": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Duration Seconds",
          "description": "Playable video duration measured from presentation timestamps; never provider-requested duration.",
          "x-description-zh": "根据呈现时间戳测得的可播放视频时长，不使用供应商请求时长。"
        },
        "fps": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Fps",
          "description": "Measured average source frame rate; use presentation timestamps for VFR selection.",
          "x-description-zh": "实测源平均帧率；可变帧率选帧仍依据呈现时间戳。"
        },
        "frame_count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Frame Count",
          "description": "Decoded source frame count, or null when unknown.",
          "x-description-zh": "解码源帧数，未知为 null。"
        },
        "width": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Width",
          "description": "Displayed video width in pixels, accounting for rotation.",
          "x-description-zh": "考虑旋转后的显示宽度，单位像素。"
        },
        "height": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Height",
          "description": "Displayed video height in pixels, accounting for rotation.",
          "x-description-zh": "考虑旋转后的显示高度，单位像素。"
        }
      },
      "additionalProperties": false,
      "type": "object",
      "title": "MediaResponse"
    }
  }
}