コンテンツへスキップ

Krea 2 Medium

統合

モデルID krea/v2/medium/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.com/v1/run/krea/v2/medium/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

このリクエスト: $0.03 30 APIクレジット このページで実行

APIキーを取得
Krea テキストから画像 参照入力 #text-to-image#image-generation#style-reference#krea

創造性レベル、8 種類のアスペクト比、任意のスタイル参照、プリセット、ムードボードに対応したテキストから画像生成

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`で選択する任意の生成ムードボード。1回のリクエストで指定できるムードボードは1つです。

POST /run/krea/v2/medium/text-to-image?wait=20 見積もり → $0.03
# 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/krea/v2/medium/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.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

このリクエストを実行

キーはこのブラウザ内に保持されます。Doitong APIにのみ送信され、「記憶する」にチェックを入れた場合のみlocalStorageに保存されます。 APIキーを取得

Krea 2 Mediumについて

最大 5000 文字のテキストプロンプトから画像を生成します。`aspect_ratio` は 1:1 から 2.35:1 および 9:16 までの 8 種類に対応します。`creativity` は raw から high の範囲で、結果がプロンプトにどの程度忠実かを制御します。最大 10 個の `image_style_references`、最大 10 個のプリセット `styles`、または 1 つのムードボードで見た目を指定でき、`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`で選択する任意の生成ムードボード。1回のリクエストで指定できるムードボードは1つです。
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/medium/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": 30,
    "usd": "0.03",
    "charged": 30,
    "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.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
ファイルの保存期間を選択すべてのoutputs[].urlはストレージ上のコピーです。アカウント設定または?storage=により、永久保存(GB・月単位で有料)または無料で7日保存できます。
すべてのモデルで同じ形式画像、動画、音声のいずれでも、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/ja/developers/models/krea/v2/medium/text-to-image.md. すべてのモデルとガイド: https://doitong.com/developers/llms.txt