CheaperGen
xAI画像人気

Grok Imagine Image 2.0 テキストから画像を生成 API

テキストから画像を生成をxAIが提供。Grok Imagine Image 2.0を搭載。xAIの最上位画像モデル — 写実的、大胆、高速。

Grok Imagine Image 2.0テキストから画像を生成を試す

0/5000

出力画像の形状。

1K ≈ 1 MP、2K ≈ 4 MP。

lowは高速・低価格、mediumはより高精細です(編集は常にmediumで実行)。

推定料金…

Googleまたはメールで無料アカウントを作成できます。生成した分だけお支払いください。

ここにお客様の画像が表示されます

プロンプトを入力し、設定を選んで「実行」を押してください。成功した生成にのみ料金がかかります。

こちらも利用できます:Grok Imagine Image 2.0 画像を編集

Grok Imagine Image 2.0のサンプルとプロンプトを見る

Grok Imagine Image 2.0 テキストから画像を生成 API

POST/api/v1/run/xai/grok-imagine-image/text-to-image

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

入力パラメーター

名前種類説明料金に影響
prompt必須stringショットを説明してください:被写体、動き、カメラワーク、照明、スタイル。いいえ
aspect_ratiostring (enum)出力画像の形状。
値:1:1 · 3:4 · 4:3 · 9:16 · 16:9 · 2:3 · 3:2 · 1:2 · 2:1 · 9:19.5 · 19.5:9 · 9:20 · 20:9
デフォルト:1:1
はい
resolutionstring (enum)1K ≈ 1 MP、2K ≈ 4 MP。
値:1K · 2K
デフォルト:1K
はい
qualitystring (enum)lowは高速・低価格、mediumはより高精細です(編集は常にmediumで実行)。
値:low · medium
デフォルト:medium
はい
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/xai/grok-imagine-image/text-to-image`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "塩原に立つ彫刻的なオレンジのコート姿のモデル。正午の強い影、ファッション誌のような写真、中判カメラ。",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "quality": "medium"
  }),
}).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": "xai/grok-imagine-image",
  "endpoint": "xai/grok-imagine-image/text-to-image",
  "mode": "text-to-image",
  "status": "queued",
  "input": {
    "prompt": "塩原に立つ彫刻的なオレンジのコート姿のモデル。正午の強い影、ファッション誌のような写真、中判カメラ。",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "quality": "medium"
  },
  "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"
}

Grok Imagine Image 2.0の料金

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

プラン公式価格CheaperGen
1K · 低
$0.04/img$0.0329/img
月額プランの場合: Pro $0.0318Max $0.0307
1K · 中
$0.06/img$0.0429/img
月額プランの場合: Pro $0.0408Max $0.0387
2K · 低
$0.06/img$0.0552/img
2K · 中
$0.08/img$0.0736/img

月額プラン多くのモデルが割引価格になります(各モデルの料金の下に表示)。従量課金も引き続き利用できます。Pro $499/月 · Max $4,999/月。

  • 公式価格:xAI APIのgrok-imagine-image-2.0公開価格(1K:low $0.04/medium $0.06、2K:$0.06/$0.08。入力画像1枚あたり$0.01)。価格確認日:2026年10月18日。
  • 編集にはmedium画質の料金に加え、入力画像1枚あたり割引適用前の$0.01がかかります。