Skip to main content
POST

授权

Authorization
string
header
必填

所有接口均需要使用Bearer Token进行认证

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求体

application/json
model
string
默认值:patina-material
必填

patina-material:生成可平铺纹理和 PBR maps

示例:

"patina-material"

prompt
string
必填

材质描述提示词

说明:

  • 描述想要生成的材质外观
  • 支持中英文
示例:

"Weathered red brick wall with moss"

maps
string[]
必填

要生成的 PBR map 类型列表

可选值:

  • basecolor — 基础色贴图
  • normal — 法线贴图
  • roughness — 粗糙度贴图
  • metalness — 金属度贴图
  • height — 高度贴图
示例:
image_url
string | null

参考图片的公开 URL

说明:

  • 可选,作为材质生成的参考
  • 不传时为纯文生材质模式
示例:

"https://example.com/brick-photo.jpg"

mask_url
string | null

蒙版图片的公开 URL

说明:

  • image_url 配合使用,指定局部区域生成材质
示例:

"https://example.com/mask.png"

image_size
integer
默认值:1024

输出图像边长(像素)

说明:

  • 控制生成的纹理和 PBR maps 尺寸
示例:

512

tiling_mode
string | null

平铺模式

可选值:

  • none — 不平铺
  • x — 水平平铺
  • y — 垂直平铺
  • xy — 双向平铺

非必须不要传这个参数。

示例:

"xy"

upscale_factor
integer | null

放大倍率

说明:

  • 对输出材质进行放大处理
  • 启用会增加计费

非必须不要传这个参数。

示例:

2

响应

任务创建成功

created
integer

任务创建时间戳

示例:

1757165031

id
string

任务ID

示例:

"task-unified-1757165031-uyujaw3d"

model
string

实际使用的模型名称

object
enum<string>

任务的具体类型

可用选项:
image.generation.task
progress
integer

任务进度百分比 (0-100)

必填范围: 0 <= x <= 100
示例:

0

status
enum<string>

任务状态

可用选项:
pending,
processing,
completed,
failed
示例:

"pending"

task_info
object

异步任务信息

type
enum<string>

任务的输出类型

可用选项:
image
示例:

"image"