CheaperGen

Seedream 4.5 APIドキュメント

コードからSeedream 4.5を呼び出すために必要な情報をすべて掲載しています。ベースURLはhttps://cheapergen.com/api/v1です。まずプレイグラウンドでお試しください。

コーディングエージェントを使いますか?

これをClaude Code、Cursor、Codex、または任意のコーディングエージェントに貼り付けてください。プロジェクトにAPIを追加し、キーをCHEAPERGEN_API_KEYに保存して、支払いが発生する前に無料見積もりでテストします。

Add Seedream 4.5 (CheaperGen endpoint bytedance/seedream-4.5/text-to-image) to this project by following https://cheapergen.com/agents/integrate.md
エージェントが参照する情報

認証

ダッシュボード → APIキーでキーを作成し、Bearerトークンとして送信してください。キーはサーバー側で管理してください。

export CHEAPERGEN_API_KEY="cg_live_…"

# every request
Authorization: Bearer $CHEAPERGEN_API_KEY

Seedream 4.5 テキストから画像を生成 API

POST/api/v1/run/bytedance/seedream-4.5/text-to-image

非同期ジョブを送信すると、生成IDを含む202が返されます。GET /api/v1/generations/{id}をポーリングするか、webhook_urlを指定してください。詳細はジョブのライフサイクルをご覧ください。

入力パラメーター

名前種類説明料金に影響
prompt必須stringショットを説明してください:被写体、動き、カメラワーク、照明、スタイル。いいえ
aspect_ratiostring (enum)出力画像の形状。
値:1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3 · 21:9
デフォルト:1:1
はい
sizestring (enum)2Kは約400万画素、4Kは約1,600万画素です(同一料金)。
値:2K · 4K
デフォルト:2K
はい
seedinteger同じ結果を再現するには、seedと設定を同じにしてください。ランダムにする場合は空欄のままにします。いいえ
enable_safety_checkerbooleantrueに設定すると、安全性チェッカーが有効になります。どちらの設定でも、当社の利用規定で禁止されているコンテンツはブロックされます。
デフォルト:true
いいえ
webhook_urlstring (URL)任意。生成が完了すると、Webhookシークレットで署名してここにPOSTします。Webhookいいえ

リクエスト

const API = "https://cheapergen.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
  "Content-Type": "application/json",
};

// 1. Submit the job
let job = await fetch(`${API}/run/bytedance/seedream-4.5/text-to-image`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "トラバーチンの上に置いたマットブラックのエスプレッソマシンの商品写真。柔らかな窓の光、85mm。",
    "aspect_ratio": "1:1",
    "size": "2K"
  }),
}).then((r) => r.json());

// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
  await new Promise((r) => setTimeout(r, 3000));
  job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}

console.log(job.status === "succeeded" ? job.output.images[0].url : job.error);

レスポンス

{
  "id": "gen_8c2QmX1nq0k4",
  "object": "generation",
  "model": "bytedance/seedream-4.5",
  "endpoint": "bytedance/seedream-4.5/text-to-image",
  "mode": "text-to-image",
  "status": "queued",
  "input": {
    "prompt": "トラバーチンの上に置いたマットブラックのエスプレッソマシンの商品写真。柔らかな窓の光、85mm。",
    "aspect_ratio": "1:1",
    "size": "2K"
  },
  "output": null,
  "error": null,
  "cost": {
    "amount_usd": 0.2255,
    "currency": "usd",
    "estimated": true,
    "official_usd": null,
    "list_price_source": "official",
    "list_price_label": "Official",
    "saved_usd": null
  },
  "source": "api",
  "started_at": null,
  "completed_at": null,
  "urls": {
    "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
    "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
  },
  "created_at": "2026-10-15T09:21:04Z"
}

Seedream 4.5 画像を編集 API

POST/api/v1/run/bytedance/seedream-4.5/edit

非同期ジョブを送信すると、生成IDを含む202が返されます。GET /api/v1/generations/{id}をポーリングするか、webhook_urlを指定してください。詳細はジョブのライフサイクルをご覧ください。

入力パラメーター

名前種類説明料金に影響
prompt必須stringショットを説明してください:被写体、動き、カメラワーク、照明、スタイル。いいえ
image_urls必須string[] (URLs)編集または合成できる画像は最大10枚です。プロンプトでは「image 1」「image 2」…のように指定してください。
最大項目数:10
いいえ
aspect_ratiostring (enum)出力画像の形状。
値:1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3 · 21:9
デフォルト:1:1
はい
sizestring (enum)2Kは約400万画素、4Kは約1,600万画素です(同一料金)。
値:2K · 4K
デフォルト:2K
はい
seedinteger同じ結果を再現するには、seedと設定を同じにしてください。ランダムにする場合は空欄のままにします。いいえ
enable_safety_checkerbooleantrueに設定すると、安全性チェッカーが有効になります。どちらの設定でも、当社の利用規定で禁止されているコンテンツはブロックされます。
デフォルト:true
いいえ
webhook_urlstring (URL)任意。生成が完了すると、Webhookシークレットで署名してここにPOSTします。Webhookいいえ

リクエスト

const API = "https://cheapergen.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
  "Content-Type": "application/json",
};

// 1. Submit the job
let job = await fetch(`${API}/run/bytedance/seedream-4.5/edit`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "背景を日差しの差す地中海風テラスに変更し、商品はそのままにしてください。",
    "image_urls": [
      "https://cdn.cheapergen.com/samples/portrait.jpg"
    ],
    "aspect_ratio": "1:1",
    "size": "2K"
  }),
}).then((r) => r.json());

// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
  await new Promise((r) => setTimeout(r, 3000));
  job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}

console.log(job.status === "succeeded" ? job.output.images[0].url : job.error);

レスポンス

{
  "id": "gen_8c2QmX1nq0k4",
  "object": "generation",
  "model": "bytedance/seedream-4.5",
  "endpoint": "bytedance/seedream-4.5/edit",
  "mode": "edit",
  "status": "queued",
  "input": {
    "prompt": "背景を日差しの差す地中海風テラスに変更し、商品はそのままにしてください。",
    "image_urls": [
      "https://cdn.cheapergen.com/samples/portrait.jpg"
    ],
    "aspect_ratio": "1:1",
    "size": "2K"
  },
  "output": null,
  "error": null,
  "cost": {
    "amount_usd": 0.2255,
    "currency": "usd",
    "estimated": true,
    "official_usd": null,
    "list_price_source": "official",
    "list_price_label": "Official",
    "saved_usd": null
  },
  "source": "api",
  "started_at": null,
  "completed_at": null,
  "urls": {
    "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
    "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
  },
  "created_at": "2026-10-15T09:21:04Z"
}

結果を取得する

生成処理は非同期です。statusがsucceeded、failed、またはcanceledになるまでポーリングしてください。送信時にwebhook_urlを指定する方法もあります。失敗した生成は自動返金されます。

curl https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4 \
  -H "Authorization: Bearer $CHEAPERGEN_API_KEY"

その他:ジョブのライフサイクル · Webhook · エラー

Seedream 4.5の料金

従量課金: 画像1枚あたりを使った分だけ支払えます。サブスクリプションは不要です。生成に失敗した場合は自動で返金されます。

プラン公式価格CheaperGen
2K
約4 MP
$0.04/img$0.0309/img
月額プランの場合: Pro $0.0307Max $0.0305
4K
約16 MP
$0.04/img$0.0309/img
月額プランの場合: Pro $0.0307Max $0.0305

月額プラン多くのモデルが割引価格になります(各モデルの料金の下に表示)。従量課金も引き続き利用できます。Pro $499/月 · Max $4,999/月。 月額プランの料金は、安全チェッカーをオフにしたリクエストには適用されません。

  • 公式価格:BytePlus ModelArkの海外向け公式価格:seedream-4-5-251128(2K・4Kとも出力画像1枚$0.04、入力画像は無料)。価格確認日:2026年10月18日。
  • Requests with enable_safety_checker: false (API only) are billed at $0.04 per image.