跳至內容

Bria Text-to-Image Base

整合

模型 id bria/text-to-image/base
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/bria/text-to-image/base?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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

此請求: $0.16 160 API 點數 · ≈ ₽17.21 在此頁面執行

取得 API 金鑰
Bria AI · 圖像

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

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

建立請求

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

•必填

引導圖像生成的文字提示詞。

aspect_ratio 預設 1:1

無引導生成時的輸出長寬比;使用引導方法時會改用其引導圖像的比例並忽略此設定。

num_images 預設 4

要求的圖像數量;使用任何引導方法時都會覆寫為 1。

進階 negative_prompt · medium · num_inference_steps · guidance_scale · seed · prompt_enhancement · guidance
預設

用於圖像生成的負面文字提示詞。

medium

生成圖像中要使用的媒材。未設定或指定 null 時會自動選擇媒材。

預設 30

用於細化輸出圖像的可選模型迭代次數。

預設 5

圖像選取的提示詞遵循強度,以 CFG (Classifier Free Guidance) 表示。

可重現圖像的種子:模型版本不變時,相同的提示詞與種子會產生相同圖像。

預設 []

生成引導圖像,透過可在一次推論中合併的方法提供,最多可使用 4 種方法。

POST /run/bria/text-to-image/base?wait=20 報價 → $0.16
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.ru/v1/run/bria/text-to-image/base?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.ru/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

執行此請求

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

關於 Bria Text-to-Image Base

從 `prompt` 生成影像,`aspect_ratio` 提供從 1:1 到 16:9 的選項,每次請求可產生 1 至 4 張影像(預設 4)。控制項包括 `negative_prompt`、介於 0 至 20 的 `guidance_scale`、介於 20 至 50 的 `num_inference_steps` 及選用的 `prompt_enhancement`。`medium` 可為 photography 或 art,`guidance` 最多接受 4 張合併的引導影像。

參數

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

名稱類型 預設值允許值 說明
prompt必填
類型string
引導圖像生成的文字提示詞。
negative_prompt選填
類型string
預設值
用於圖像生成的負面文字提示詞。
num_images選填 num_outputs
類型integer
預設值4
1 – 4
要求的圖像數量;使用任何引導方法時都會覆寫為 1。
aspect_ratio選填
類型enum
預設值1:1
1:12:33:23:44:34:55:49:1616:9
無引導生成時的輸出長寬比;使用引導方法時會改用其引導圖像的比例並忽略此設定。
seed選填
類型integer | null
0 – 2,147,483,647
可重現圖像的種子:模型版本不變時,相同的提示詞與種子會產生相同圖像。
num_inference_steps選填
類型integer
預設值30
20 – 50
用於細化輸出圖像的可選模型迭代次數。
guidance_scale選填
類型number
預設值5
0 – 20
圖像選取的提示詞遵循強度,以 CFG (Classifier Free Guidance) 表示。
prompt_enhancement選填
類型boolean
預設值false
提示詞增強開關:true 會將所提供的提示詞擴展為含有更豐富描述的其他變化,促成更多元且具創意的圖像。
medium選填
類型enum
photographyart
生成圖像中要使用的媒材。未設定或指定 null 時會自動選擇媒材。
guidance選填
類型object[]
預設值[]
生成引導圖像,透過可在一次推論中合併的方法提供,最多可使用 4 種方法。
guidance[].image_url必填
類型url · image
guidance_method_1 指定方法的 Base64 編碼引導圖像;選取 guidance_method_1 時必須提供圖像。支援格式:jpeg、jpg、png、webp;大小上限為 12 MB。合併引導方法時,每張引導圖像都必須使用相同長寬比,該比例也會決定輸出長寬比。
guidance[].method選填
類型enum
controlnet_cannycontrolnet_depthcontrolnet_recoloringcontrolnet_color_grid
生成的可選引導類型。一次推論最多可合併 4 種引導方法。
guidance[].scale選填
類型number
預設值1
0 – 1
引導效果的強度。
必填 標準名稱,也可使用

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "bria/text-to-image/base",
  "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": 160,
    "usd": "0.16",
    "charged": 160,
    "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
  },
  "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.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.ru/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
您的檔案,由您選擇每個 outputs[].url 都是儲存空間中的副本:可永久保留(按 GB-月計費),或免費保留 7 天;可透過帳戶設定或 ?storage= 設定。
所有模型使用相同結構圖片、影片和音訊皆包含 type、url、content_type、width、height 和 duration。output 是模型自己的結果物件。
輸出欄位
images
array of object {url, content_type, file_name, file_size, width, height}模型生成的圖像。
seed
integer生成時套用的種子。

更多模型:文字轉圖像

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