{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://hop-base.com/spec/models/seedream-5-5.json",
  "title": "POST /v1/images/generations · seedream-5-5",
  "description": "Seedream 5.5 的请求体契约，由插件校验代码导出的 spec 生成。未列出的字段网关会忽略或原样转发。",
  "type": "object",
  "required": [
    "model",
    "prompt"
  ],
  "properties": {
    "model": {
      "const": "seedream-5-5"
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "pattern": "\\S",
      "description": "去除首尾空白后不能为空，否则 400「missing prompt」"
    },
    "size": {
      "description": "简写 1K / 1.5K / 2K，或 宽x高：总像素 921600–4624220，宽高比 1:16–16:1",
      "anyOf": [
        {
          "enum": [
            "1K",
            "1.5K",
            "2K"
          ]
        },
        {
          "type": "string",
          "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
        }
      ],
      "x-hopbase-constraints": {
        "pixels": {
          "min": 921600,
          "max": 4624220
        },
        "max_aspect_ratio": 16
      }
    },
    "n": {
      "const": 1,
      "default": 1,
      "description": "only a single output is supported (n=1)"
    },
    "response_format": {
      "enum": [
        "url",
        "b64_json"
      ],
      "default": "url",
      "description": "`url` 返回 24 小时有效的签名直链；`b64_json` 返回 `data[].b64_json`"
    },
    "output_format": {
      "enum": [
        "png",
        "jpeg"
      ]
    },
    "optimize_prompt_options": {
      "type": "object",
      "properties": {
        "mode": {
          "enum": [
            "standard"
          ]
        }
      }
    },
    "image": {
      "description": "参考图（传入即图生图 / 编辑）：最多 10 张；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": 10
        }
      ]
    },
    "layer_decomposition": {
      "not": {
        "const": true
      },
      "description": "不支持图层拆分：传 true 返回 400「model seedream-5-5 does not support layer_decomposition」"
    },
    "watermark": {
      "type": "boolean",
      "default": false,
      "description": "本站默认 false（官方默认 true）；传 true 才加水印"
    },
    "background": {
      "enum": [
        "opaque",
        "transparent"
      ],
      "default": "opaque",
      "description": "`transparent` 仅图生图：恰好 1 张带透明通道的输入图，输出 PNG（不可配 `output_format: jpeg`）"
    },
    "sequential_image_generation": {
      "not": {},
      "description": "不支持：传入返回 400「model seedream-5-5 does not support sequential_image_generation」"
    },
    "sequential_image_generation_options": {
      "not": {},
      "description": "不支持：传入返回 400「model seedream-5-5 does not support sequential_image_generation」"
    },
    "stream": {
      "not": {
        "const": true
      },
      "description": "不支持：传 true 返回 400「model seedream-5-5 does not support stream」"
    },
    "tools": {
      "not": {},
      "description": "暂不支持：传入返回 400「model seedream-5-5 does not support tools」"
    }
  },
  "allOf": [
    {
      "$comment": "background transparent：恰好 1 张带透明通道的输入图，输出 png",
      "if": {
        "properties": {
          "background": {
            "const": "transparent"
          }
        },
        "required": [
          "background"
        ]
      },
      "then": {
        "required": [
          "image"
        ],
        "properties": {
          "image": {
            "anyOf": [
              {
                "type": "string",
                "not": {
                  "pattern": "^data:image/(jpe?g|bmp)[;,]"
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "not": {
                    "pattern": "^data:image/(jpe?g|bmp)[;,]"
                  }
                },
                "minItems": 1,
                "maxItems": 1
              }
            ]
          },
          "output_format": {
            "not": {
              "const": "jpeg"
            }
          }
        }
      }
    }
  ],
  "additionalProperties": true,
  "$defs": {
    "edits": {
      "$comment": "POST /v1/images/edits（multipart 为主）：至少 1 张参考图，不接受 mask（null 也拒）",
      "type": "object",
      "required": [
        "model",
        "prompt",
        "image"
      ],
      "properties": {
        "model": {
          "const": "seedream-5-5"
        },
        "prompt": {
          "type": "string",
          "minLength": 1,
          "pattern": "\\S",
          "description": "去除首尾空白后不能为空，否则 400「missing prompt」"
        },
        "size": {
          "description": "简写 1K / 1.5K / 2K，或 宽x高：总像素 921600–4624220，宽高比 1:16–16:1",
          "anyOf": [
            {
              "enum": [
                "1K",
                "1.5K",
                "2K"
              ]
            },
            {
              "type": "string",
              "pattern": "^[1-9][0-9]*x[1-9][0-9]*$"
            }
          ],
          "x-hopbase-constraints": {
            "pixels": {
              "min": 921600,
              "max": 4624220
            },
            "max_aspect_ratio": 16
          }
        },
        "n": {
          "const": 1,
          "default": 1,
          "description": "only a single output is supported (n=1)"
        },
        "response_format": {
          "enum": [
            "url",
            "b64_json"
          ],
          "default": "url",
          "description": "`url` 返回 24 小时有效的签名直链；`b64_json` 返回 `data[].b64_json`"
        },
        "output_format": {
          "enum": [
            "png",
            "jpeg"
          ]
        },
        "optimize_prompt_options": {
          "type": "object",
          "properties": {
            "mode": {
              "enum": [
                "standard"
              ]
            }
          }
        },
        "image": {
          "description": "参考图（传入即图生图 / 编辑）：最多 10 张；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": 10
            }
          ]
        },
        "layer_decomposition": {
          "not": {
            "const": true
          },
          "description": "不支持图层拆分：传 true 返回 400「model seedream-5-5 does not support layer_decomposition」"
        },
        "watermark": {
          "type": "boolean",
          "default": false,
          "description": "本站默认 false（官方默认 true）；传 true 才加水印"
        },
        "background": {
          "enum": [
            "opaque",
            "transparent"
          ],
          "default": "opaque",
          "description": "`transparent` 仅图生图：恰好 1 张带透明通道的输入图，输出 PNG（不可配 `output_format: jpeg`）"
        },
        "sequential_image_generation": {
          "not": {},
          "description": "不支持：传入返回 400「model seedream-5-5 does not support sequential_image_generation」"
        },
        "sequential_image_generation_options": {
          "not": {},
          "description": "不支持：传入返回 400「model seedream-5-5 does not support sequential_image_generation」"
        },
        "stream": {
          "not": {
            "const": true
          },
          "description": "不支持：传 true 返回 400「model seedream-5-5 does not support stream」"
        },
        "tools": {
          "not": {},
          "description": "暂不支持：传入返回 400「model seedream-5-5 does not support tools」"
        },
        "mask": false
      },
      "allOf": [
        {
          "$comment": "background transparent：恰好 1 张带透明通道的输入图，输出 png",
          "if": {
            "properties": {
              "background": {
                "const": "transparent"
              }
            },
            "required": [
              "background"
            ]
          },
          "then": {
            "required": [
              "image"
            ],
            "properties": {
              "image": {
                "anyOf": [
                  {
                    "type": "string",
                    "not": {
                      "pattern": "^data:image/(jpe?g|bmp)[;,]"
                    }
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "not": {
                        "pattern": "^data:image/(jpe?g|bmp)[;,]"
                      }
                    },
                    "minItems": 1,
                    "maxItems": 1
                  }
                ]
              },
              "output_format": {
                "not": {
                  "const": "jpeg"
                }
              }
            }
          }
        }
      ],
      "additionalProperties": true
    }
  },
  "x-hopbase": {
    "model_name": "Seedream 5.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-11-19",
      "unit": "image",
      "per_image_le_2_61mp": 0.02,
      "per_image_gt_2_61mp": 0.035,
      "per_input_reference": 0.008
    },
    "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"
      },
      {
        "field": "tools",
        "status": 400,
        "message": "model seedream-5-5 does not support tools"
      }
    ],
    "references": {
      "max": 10,
      "enforced_by": "gateway",
      "max_bytes": 31457280
    },
    "size_shorthands": [
      "1K",
      "1.5K",
      "2K"
    ],
    "reference_mimes": [
      "image/jpeg",
      "image/png",
      "image/webp",
      "image/bmp",
      "image/tiff",
      "image/gif",
      "image/heic",
      "image/heif"
    ],
    "url_ttl_hours": 24,
    "backgrounds": [
      "opaque",
      "transparent"
    ],
    "sequential_image_generation": false,
    "stream": false,
    "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": [
      "user-docs/docs-app/spec/seedance.json#images.models[id=seedream-5-5] (airgate-seedance)"
    ],
    "generated_by": "user-docs/docs-app/scripts/build-model-schemas.mjs"
  }
}
