跳至內容

Krea 2 Large

整合

模型 id krea/v2/large/text-to-image
# 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/v2/large/text-to-image?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.06 60 API 點數 · ≈ ₽6.44 在此頁面執行

取得 API 金鑰
Krea 文字轉圖像 參考輸入 #text-to-image#image-generation#style-reference#krea

文字轉影像,支援創意程度、八種長寬比,以及風格參考、預設風格或情緒板

Krea · 圖像

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

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

建立請求

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

•必填 88 / 5000

以文字指定所需的圖像內容。

aspect_ratio 預設 1:1

輸出圖像的寬高比。

進階 creativity · seed · enable_safety_checker · image_style_references · styles · moodboards
creativity 預設 medium

提示詞解讀彈性;較低設定會更嚴格遵循提示詞,較高設定則提供更高創意,且可能偏離提示詞。

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

預設 []

使用最多 10 張參考圖像引導生成圖像的風格;提供此清單為可選。

預設 []

可選的 LoRA Krea 風格預設值,最多 10 個項目。項目使用其在 Krea 風格目錄中的 `id` 識別風格。

預設 []

可選的生成靈感板,透過項目的 UUID `id` 選取。當前每個請求限制為一個靈感板。

POST /run/krea/v2/large/text-to-image?wait=20 報價 → $0.06
# 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/v2/large/text-to-image?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 Large

根據最多 5000 個字元的 `prompt` 生成影像。從 1:1 至 2.35:1 和 9:16 的八種長寬比中選擇,並將 `creativity` 設為 raw、low、medium 或 high,以控制輸出遵循提示的程度。可使用最多 10 個 `image_style_references`、最多 10 個預設 `styles` 或一個情緒板引導外觀。`seed` 可產生可重現的輸出。

參數

名稱類型 預設值允許值 說明
prompt必填
類型string
≤ 5,000 個字元
以文字指定所需的圖像內容。
aspect_ratio選填
類型enum
預設值1:1
1:14:33:216:92.35:14:52:39:16
輸出圖像的寬高比。
creativity選填
類型enum
預設值medium
rawlowmediumhigh
提示詞解讀彈性;較低設定會更嚴格遵循提示詞,較高設定則提供更高創意,且可能偏離提示詞。
seed選填
類型integer | null
使生成結果可重現的隨機種子。
image_style_references選填
類型object[]
預設值[]
≤ 10 個項目
使用最多 10 張參考圖像引導生成圖像的風格;提供此清單為可選。
image_style_references[].image_url必填
類型url · image
可公開存取的參考圖像 URL。
image_style_references[].strength選填
類型number
預設值1
-2 – 2
設定參考圖像對生成圖像的影響;使用負值可改為引導結果遠離該參考。
styles選填
類型object[]
預設值[]
≤ 10 個項目
可選的 LoRA Krea 風格預設值,最多 10 個項目。項目使用其在 Krea 風格目錄中的 `id` 識別風格。
styles[].id必填
類型string
使用 Krea 風格目錄中的識別碼選取風格;選取的預設值以 LoRA 為基礎。
styles[].strength選填
類型number
預設值1
-2 – 2
設定風格對生成圖像的影響;使用負值可改為引導結果遠離該風格。
moodboards選填
類型object[]
預設值[]
≤ 1 個項目
可選的生成靈感板,透過項目的 UUID `id` 選取。當前每個請求限制為一個靈感板。
moodboards[].id必填
類型string
識別 Krea 靈感板的 UUID。
moodboards[].strength選填
類型number
預設值0.23
0 – 1
靈感板對圖像生成的影響強度。
enable_safety_checker選填
類型boolean
預設值true
在呼叫端獲得授權的情況下,將此值設為 false 可放寬審核。
必填

輸出

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "krea/v2/large/text-to-image",
  "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": 60,
    "usd": "0.06",
    "charged": 60,
    "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/krea/v2/large/text-to-image.md. 所有模型與指南: https://doitong.com/developers/llms.txt