> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tapapi.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 图生图

> 使用输入图生成新图 · 当前为规划能力

图生图用于在已有图片基础上改风格、换背景、生成变体或保持主体一致性。这个能力是图片 API 的重要方向，但当前公开文档不把它写成稳定生产接口。

<Warning>当前不要通过 `/v1/tapapi/images/advanced` 传 `image_urls`。本地实现会在计费前拦截这类请求，避免“返回空图片但扣费”的风险。</Warning>

## 当前状态

| 项目          | 状态             |
| ----------- | -------------- |
| 文生图         | ✅ 当前主线         |
| 单图参考生成      | 按模型逐步验证        |
| 多参考图        | 按模型逐步验证        |
| 局部重绘 / mask | 仅图片编辑模型明确支持时使用 |

如果业务只是让模型“看图后生成文字、分析图片、生成 prompt”，可以评估多模态文本模型的 `messages[].content[].image_url`。这不等于图生图；它不会直接返回新图片。

## 规划中的请求形态

下面是后续接口设计方向，不是当前可直接复制运行的生产示例。

```json theme={null}
{
  "model": "seedream-v4",
  "prompt": "turn this product photo into a bright ecommerce hero image",
  "image_urls": ["https://example.com/input.png"]
}
```

## 开放前需要确认

* 哪些模型真实支持图片输入
* 输入图片 URL、格式、大小、数量限制
* 参考图和 prompt 的优先级
* 空结果、超时、失败重试和计费规则
* 是否走专用图生图 endpoint，还是由高级路径统一承载

当前要上线生产，请先使用 [文生图](/image-generation/text-to-image)。如果某个模型明确支持 OpenAI-compatible 图片编辑协议，可以评估 [图片编辑](/image-generation/image-editing)。

遇到 `image_urls` 被 400 拦截时，排查日志需要保存 HTTP 状态码、错误对象和 `X-Oneapi-Request-Id`。
