跳至內容

Krea 2 Text to Image Turbo LoRA

整合

模型 id krea-2/turbo/lora
# 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/krea-2/turbo/lora?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.01 10 API 點數 · ≈ ₽1.07 在此頁面執行

取得 API 金鑰
Krea 文字轉圖像 快速 #stylized#transform#typography#realism

Krea 2 Turbo 文字轉影像,套用最多三個自訂 LoRA 以保留訓練過的主體或風格

Krea · 圖像

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

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

建立請求

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

•必填 88 / 5000

以文字指定所需圖像的基本描述。

image_size 預設 square_hd

生成圖像的尺寸。

num_images 預設 1

請求生成的圖像數量。

進階 acceleration · output_format · seed · enable_prompt_expansion · enable_safety_checker · loras
acceleration 預設 none

圖像生成的加速設定。

output_format 預設 png

輸出圖像編碼格式;預設值為 "png"。

控制可重複生成的隨機種子;指派給圖像 *i* 的種子為 `seed + i`。

預設 []

要套用的 LoRA 權重,最多 3 筆。

POST /run/krea-2/turbo/lora?wait=20 報價 → $0.01
# 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/krea-2/turbo/lora?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 金鑰

關於 Krea 2 Text to Image Turbo LoRA

根據 `prompt` 生成影像,同時套用 `loras` 中最多三個權重,例如 Krea 2 trainer 產生的權重。另支援六種 `image_size` 預設值、1 至 4 張影像、`acceleration`、選用的提示擴展、png 或 jpeg,以及 `seed`。

參數

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

名稱類型 預設值允許值 說明
prompt必填
類型string
≤ 5,000 個字元
以文字指定所需圖像的基本描述。
seed選填
類型integer | null
控制可重複生成的隨機種子;指派給圖像 *i* 的種子為 `seed + i`。
image_size選填
類型object
預設值square_hd
square_hdsquareportrait_4_3portrait_16_9landscape_4_3landscape_16_9
生成圖像的尺寸。
num_images選填 num_outputs
類型integer
預設值1
1 – 4
請求生成的圖像數量。
acceleration選填
類型enum
預設值none
noneregular
圖像生成的加速設定。
enable_prompt_expansion選填
類型boolean
預設值false
LLM 提示詞擴展切換鈕:為 true 時,生成會使用更詳細的圖像提示詞以提升品質;若擴展失敗,則使用未變更的原始提示詞。
enable_safety_checker選填
類型boolean
預設值true
輸出安全檢查切換鈕:true 會啟用檢查;沒有帳戶授權的請求無論此設定為何都會執行檢查。關閉檢查需要授權;任何被標記為不安全的結果都會替換為黑色圖像。
output_format選填
類型enum
預設值png
jpegpng
輸出圖像編碼格式;預設值為 "png"。
loras選填
類型object[]
預設值[]
≤ 3 個項目
要套用的 LoRA 權重,最多 3 筆。
loras[].path必填
類型string
LoRA 權重的位置,可指定為 URL、owner/repo 格式的 HuggingFace 儲存庫 ID,或本機路徑。
loras[].scale選填
類型number
預設值1
0 – 4
套用於 LoRA 的縮放係數,範圍為 0.0 至 4.0。
必填 標準名稱,也可使用

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "krea-2/turbo/lora",
  "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": 10,
    "usd": "0.01",
    "charged": 10,
    "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
      }
    ],
    "timings": {},
    "seed": 42,
    "has_nsfw_concepts": [
      false
    ],
    "prompt": "string",
    "actual_prompt": "string"
  },
  "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}模型生成的圖像。
timings
object以秒表示的請求計時測量結果。
seed
integer在圖像生成期間套用的種子。
has_nsfw_concepts
array of boolean生成結果中每個圖像的 NSFW 內容指標。
prompt
string用於生成輸出的提示詞。
actual_prompt
string | null啟用提示詞擴展時用於生成的最終提示詞,反映擴展嘗試的結果。

更多模型:文字轉圖像

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