跳至內容

PATINA · Material

整合

模型 id patina/material
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/patina/material?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

像範例一樣的檔案: $0.08 80 API 點數 您的檔案會在執行前計量 在此頁面執行

取得 API 金鑰
Open model 文字轉圖像 #material#pbr#displacement#metalness

文字轉材質生成器,可輸出可平鋪圖片與 PBR 貼圖,並支援選用的 img2img 與修補

Open model · 圖像

您的第一個結果會顯示在這裡

在下方建立請求,並使用您的 API 金鑰執行。輸出會複製到我們的儲存空間,可永久保留或免費保留 7 天。

建立請求

控制項是根據模型結構描述生成的。變更設定時,程式碼和價格會同步更新。

•必填

要建立之材質或紋理的文字描述。

image_size 預設 square_hd

產生紋理的像素尺寸。

upscale_factor 預設 0

SeedVR 無縫放大倍率,會影響預測的 PBR 貼圖,但讓基礎紋理維持原始解析度。選擇 2 可取得兩倍解析度,4 可取得四倍解析度,選擇 0 可停用放大。

num_images 預設 1

要建立的紋理圖像數量。

進階 image · mask · tiling_mode · output_format · num_inference_steps · tile_size · tile_stride · strength · seed · enable_prompt_expansion · enable_safety_checker · maps
image_url
拖放檔案,或

來源圖像 URL;若同時提供 mask_url,則用於圖像修補,否則用於圖像轉圖像處理。

mask_url
拖放檔案,或

與必要的 image_url 一同提供的圖像修補遮罩 URL。遮罩會保留黑色區域不變,並重新生成白色區域。

tiling_mode 預設 both

平鋪方向:'both' 表示全方向平鋪,或選擇 'horizontal'、'vertical'。

output_format 預設 png

輸出紋理與 PBR 貼圖的圖像檔案格式。

預設 8

用於生成紋理的去噪步驟數。

預設 128

潛在空間平鋪尺寸,其中 64 代表 512px,128 代表 1024px。在每個平鋪軸上,生成圖像的尺寸會設定自動上限。

預設 64

設定潛在空間平鋪之間的步幅;自動上限會防止其超過有效平鋪尺寸的一半。

預設 0.6

僅套用於透過 image_url 提供之圖像的轉換強度;否則不使用。

使生成結果可重現的隨機種子。

預設 ["basecolor","normal"...

用於預測的 PBR 貼圖,預設會選取全部五種。完全不選取時會略過 PBR 估算。

POST /run/patina/material?wait=20 報價 → $0.08
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/patina/material?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

您的金鑰會保留在此瀏覽器中:只會傳送至 Doitong API,且只有在勾選「記住」時才會儲存至 localStorage。 取得 API 金鑰

關於 PATINA · Material

根據提示詞建立可平鋪材質,並預測 PBR 貼圖:basecolor、normal、roughness、metalness 和 height。使用 `tiling_mode` 設定雙向、水平或垂直平鋪,並使用 0、2 或 4 的 `upscale_factor` 放大貼圖。傳入 `image_url` 可啟用 image-to-image,加入 `mask_url` 可啟用修補。每次請求最多 4 張圖片。

參數

請傳送標準名稱或原生名稱其中之一,不要同時傳送兩者。 標準名稱

名稱類型 預設值允許值 說明
prompt必填
類型string
要建立之材質或紋理的文字描述。
image_size選填
類型object
預設值square_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
產生紋理的像素尺寸。
num_inference_steps選填
類型integer
預設值8
1 – 8
用於生成紋理的去噪步驟數。
seed選填
類型integer | null
使生成結果可重現的隨機種子。
num_images選填 num_outputs
類型integer
預設值1
1 – 4
要建立的紋理圖像數量。
enable_prompt_expansion選填
類型boolean
預設值true
啟用以 LLM 為基礎的提示詞擴充功能以增加細節。
enable_safety_checker選填
類型boolean
預設值true
啟用生成圖像的安全性檢查。
tiling_mode選填
類型enum
預設值both
bothhorizontalvertical
平鋪方向:'both' 表示全方向平鋪,或選擇 'horizontal'、'vertical'。
tile_size選填
類型integer
預設值128
32 – 256
潛在空間平鋪尺寸,其中 64 代表 512px,128 代表 1024px。在每個平鋪軸上,生成圖像的尺寸會設定自動上限。
tile_stride選填
類型integer
預設值64
16 – 128
設定潛在空間平鋪之間的步幅;自動上限會防止其超過有效平鋪尺寸的一半。
image_url選填 image
類型url · image
來源圖像 URL;若同時提供 mask_url,則用於圖像修補,否則用於圖像轉圖像處理。
mask_url選填 mask
類型url · image
與必要的 image_url 一同提供的圖像修補遮罩 URL。遮罩會保留黑色區域不變,並重新生成白色區域。
strength選填
類型number
預設值0.6
≤ 1> 0
僅套用於透過 image_url 提供之圖像的轉換強度;否則不使用。
maps選填
類型enum[]
預設值["basecolor","normal","roughness","metalness","height"]
用於預測的 PBR 貼圖,預設會選取全部五種。完全不選取時會略過 PBR 估算。
upscale_factor選填
類型enum
預設值0
024
SeedVR 無縫放大倍率,會影響預測的 PBR 貼圖,但讓基礎紋理維持原始解析度。選擇 2 可取得兩倍解析度,4 可取得四倍解析度,選擇 0 可停用放大。
output_format選填
類型enum
預設值png
jpegpngwebp
輸出紋理與 PBR 貼圖的圖像檔案格式。
必填 標準名稱,也可使用

檔案參數接受公開的 https:// URL、最大 10 MB 的 data: URI,或上傳檔案的 file_url。 檔案

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "patina/material",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 80,
    "usd": "0.08",
    "charged": 80,
    "refunded": 0
  },
  "input": {
    "prompt": "A red fox trots through fresh snow at sunrise, soft golden light, shallow depth of field"
  },
  "output": {
    "images": [
      {
        "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
        "content_type": "image/jpeg",
        "file_name": "0-output.jpeg",
        "file_size": 1843200,
        "width": 1024,
        "height": 768
      }
    ],
    "seed": 42,
    "prompt": "string",
    "timings": {}
  },
  "outputs": [
    {
      "type": "image",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.jpeg",
      "content_type": "image/jpeg",
      "file_size": 1843200,
      "width": 1024,
      "height": 768,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
images
array of any輸出圖像包含 PATINA 預測的 PBR 材質貼圖,以及由 z-image 生成的可平鋪紋理。
seed
integer生成紋理時使用的種子。
prompt
string紋理生成提示詞,包含任何已套用的擴充內容。
timings
object涵蓋完整處理流程的計時細分,以秒為單位。

更多模型:文字轉圖像

給 AI 代理程式:此頁面的 Markdown 位於 https://doitong.com/zh-TW/developers/models/patina/material.md. 所有模型與指南: https://doitong.com/developers/llms.txt