{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hop-base.com/spec/models/seedream-4-5.json",
  "title": "POST /v1/images/generations · seedream-4-5",
  "description": "Seedream 4.5 的请求体契约，由插件校验代码导出的 spec 生成。未列出的字段网关会忽略或原样转发。",
  "type": "object",
  "required": [
    "model",
    "prompt"
  ],
  "properties": {
    "model": {
      "const": "seedream-4-5"
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\S",
      "description": "去除首尾空白后不能为空，否则 400「missing prompt」"
    },
    "size": {
      "description": "简写 2K / 4K，或 宽x高：总像素 3686400–16777216，宽高比 1:16–16:1",
      "anyOf": [
        {
          "enum": [
            "2K",
            "4K"
          ]
        },
        {
          "type": "string",
          "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
        }
      ],
      "x-hopbase-constraints": {
        "pixels": {
          "min": 3686400,
          "max": 16777216
        },
        "max_aspect_ratio": 16
      }
    },
    "n": {
      "const": 1,
      "default": 1,
      "description": "only a single output is supported (n=1)"
    },
    "response_format": {
      "enum": [
        "url"
      ],
      "default": "url"
    },
    "output_format": {
      "enum": [
        "jpeg"
      ]
    },
    "optimize_prompt_options": {
      "type": "object",
      "properties": {
        "mode": {
          "enum": [
            "standard"
          ]
        }
      }
    },
    "image": {
      "description": "参考图（传入即图生图 / 编辑）：最多 14 张；Data URL 单张 ≤ 31457280 字节；URL 提交时不下载",
      "anyOf": [
        {
          "type": "string",
          "pattern": "^(https?://|data:image/)",
          "description": "HTTP(S) URL 或图片 Data URL"
        },
        {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^(https?://|data:image/)",
            "description": "HTTP(S) URL 或图片 Data URL"
          },
          "minItems": 1,
          "maxItems": 14
        }
      ]
    },
    "watermark": {
      "description": "服务端固定为 false，传了不生效"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "edits": {
      "$comment": "POST /v1/images/edits（multipart 为主）：至少 1 张参考图，不接受 mask（null 也拒）",
      "type": "object",
      "required": [
        "model",
        "prompt",
        "image"
      ],
      "properties": {
        "model": {
          "const": "seedream-4-5"
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S",
          "description": "去除首尾空白后不能为空，否则 400「missing prompt」"
        },
        "size": {
          "description": "简写 2K / 4K，或 宽x高：总像素 3686400–16777216，宽高比 1:16–16:1",
          "anyOf": [
            {
              "enum": [
                "2K",
                "4K"
              ]
            },
            {
              "type": "string",
              "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
            }
          ],
          "x-hopbase-constraints": {
            "pixels": {
              "min": 3686400,
              "max": 16777216
            },
            "max_aspect_ratio": 16
          }
        },
        "n": {
          "const": 1,
          "default": 1,
          "description": "only a single output is supported (n=1)"
        },
        "response_format": {
          "enum": [
            "url"
          ],
          "default": "url"
        },
        "output_format": {
          "enum": [
            "jpeg"
          ]
        },
        "optimize_prompt_options": {
          "type": "object",
          "properties": {
            "mode": {
              "enum": [
                "standard"
              ]
            }
          }
        },
        "image": {
          "description": "参考图（传入即图生图 / 编辑）：最多 14 张；Data URL 单张 ≤ 31457280 字节；URL 提交时不下载",
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(https?://|data:image/)",
              "description": "HTTP(S) URL 或图片 Data URL"
            },
            {
              "type": "array",
              "items": {
                "type": "string",
                "pattern": "^(https?://|data:image/)",
                "description": "HTTP(S) URL 或图片 Data URL"
              },
              "minItems": 1,
              "maxItems": 14
            }
          ]
        },
        "watermark": {
          "description": "服务端固定为 false，传了不生效"
        },
        "mask": false
      },
      "additionalProperties": true
    }
  },
  "x-hopbase": {
    "model_name": "Seedream 4.5",
    "family": "seedream",
    "endpoints": [
      "POST /v1/images/generations",
      "POST /v1/images/edits"
    ],
    "response_field": "data[].url",
    "groups": [
      {
        "id": 24,
        "name": "Seedream 生图分组",
        "name_en": "Seedream Image Generation"
      }
    ],
    "pricing": {
      "currency": "USD",
      "label": "官方价，实际按分组倍率计费",
      "source": "https://api.hop-base.com/api/v1/models/pricing",
      "snapshot": "2026-09-25",
      "unit": "image",
      "per_image_le_2_61mp": 0.04,
      "per_image_gt_2_61mp": 0.04
    },
    "rejected": [
      {
        "field": "mask",
        "status": 400,
        "message": "seedream does not accept a traditional mask; draw the annotation on the reference image and describe it in the prompt"
      }
    ],
    "references": {
      "max": 14,
      "enforced_by": "gateway",
      "max_bytes": 31457280
    },
    "size_shorthands": [
      "2K",
      "4K"
    ],
    "reference_mimes": [
      "image/jpeg",
      "image/png",
      "image/webp",
      "image/bmp",
      "image/tiff",
      "image/gif",
      "image/heic",
      "image/heif"
    ],
    "url_ttl_hours": 24,
    "verified": {
      "date": null,
      "feed": "https://hop-base.com/docs-verified.json",
      "route": "media/images"
    },
    "docs": "https://hop-base.com/zh-cn/docs/media/images#seedream-请求参数",
    "source": [
      "toc-landing/docs-app/spec/seedance.json#images.models[id=seedream-4-5] (airgate-seedance)"
    ],
    "generated_by": "toc-landing/docs-app/scripts/build-model-schemas.mjs"
  }
}
