xAI: Grok Imagine Image
grok-imagine-image- 價格
- 起 $0.02
- 模態
- 圖片
關於 Grok Imagine Image
Grok Imagine Image 是 xAI 用於根據文字生成圖片以及編輯您所提供圖片的圖像模型。這是最初的 Imagine 1.0 圖像模型,定位於較新的 2.0 版本之下。它提供 1K 和 2K 解析度以及多種長寬比,包括適合手機的直式格式,這有助於將同一個創意應用於貼文、橫幅和限時動態。
適用場景
- 在同一個模型中涵蓋了文字轉圖像生成以及現有圖像的編輯功能。
- 提供多種長寬比,從正方形到寬螢幕和直式手機形狀,並具備自動選項。
- 可選擇 1K 或 2K 輸出,讓您在概念成形後,先進行草稿製作再渲染出較大的成品。
- 適合草稿製作與大量工作需求,且無需使用較新的 2.0 模型。
- 透過自然語言編輯指令來修改提供的圖片,無需重新描述整個場景。
其他選擇建議
- Grok Imagine Image 2.0 是較新的模型,在需要細緻細節時是更好的選擇。
- 它僅能產生靜態圖像;動態影像需要使用 Grok Imagine 影片模型。
- 在圖像內渲染文字以及精確的佈局可能需要多次嘗試。
入門指南
建立 API 金鑰
請至 Console 建立金鑰,即可在平台上使用各類模型。
發送您的第一個請求
複製您所選語言的範例,並針對端點執行它。
影像編輯圖片轉圖片文字生成圖片TokenLab 端點POST/v1/images/generationscurl -X POST "https://api.tokenlab.sh/v1/images/generations" \ -H "Authorization: Bearer sk-xxx" \ -H "Content-Type: application/json" \ -d '{ "operation": "text-to-image", "model": "grok-imagine-image", "prompt": "A minimalist product photo of matte black headphones on a soft blue background." }'
參數設定
影像編輯
| 參數 | 可選值與限制 | 預設值 | 說明 |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | 未提供 | 未提供 |
image | 輸入數量:≥ 1, ≤ 3 | 未提供 | Use at least one source image and at most 3 in total across all source-image representations. |
image_url | 輸入數量:≥ 1, ≤ 1 | 未提供 | 未提供 |
images | 輸入數量:≥ 1, ≤ 3 | 未提供 | 未提供 |
n | 未提供 | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | 未提供 | 未提供 | 未提供 |
prompt | 未提供 | 未提供 | 未提供 |
resolution | 1k, 2k | 未提供 | 未提供 |
response_format | 未提供 | 未提供 | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
圖片轉圖片
| 參數 | 可選值與限制 | 預設值 | 說明 |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | 未提供 | 未提供 |
image | 輸入數量:≥ 1, ≤ 3 | 未提供 | Use at least one source image and at most 3 in total across all source-image representations. |
image_url | 輸入數量:≥ 1, ≤ 1 | 未提供 | 未提供 |
images | 輸入數量:≥ 1, ≤ 3 | 未提供 | 未提供 |
n | 未提供 | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | 未提供 | 未提供 | 未提供 |
prompt | 未提供 | 未提供 | 未提供 |
resolution | 1k, 2k | 未提供 | 未提供 |
response_format | 未提供 | 未提供 | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
文字生成圖片
| 參數 | 可選值與限制 | 預設值 | 說明 |
|---|---|---|---|
aspect_ratio | 1:1, 1:2, 2:1, 2:3, 3:2, 3:4, 4:3, 9:16, 9:19.5, 9:20, 16:9, 19.5:9, 20:9, auto | 未提供 | 未提供 |
image | 未提供 | 未提供 | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
image_url | 未提供 | 未提供 | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
images | 未提供 | 未提供 | Text-to-image does not accept source images. Do not send this field for that operation. Use one of this model's declared image operations for source-image requests. |
n | 未提供 | 1 | Defaults to one output image. The model-specific maximum is not declared in this public contract. |
operation | 未提供 | 未提供 | 未提供 |
prompt | 未提供 | 未提供 | 未提供 |
resolution | 1k, 2k | 未提供 | 未提供 |
response_format | 未提供 | 未提供 | The public image response selector accepts url or b64_json. A URL-only supply rejects b64_json before upstream execution. Omit this field to keep the selected supply response representation; no uniform omitted-field default is declared here. |
For image editing, pass image_url, images[] references, or an uploaded image.
TokenLab rejects image edits with more than three source images.
定價
Verified 價格用於 Verified,多數模型更便宜;Official 價格是模型廠商公布的價格,用於更穩定的 Official。Auto 按最終完成請求的線路計價。
定價
每筆請求- Verified 價格
- 計費說明
- Official 價格
- 計費說明
| Official 價格每筆請求 | Verified 價格每筆請求 | 折扣 | |
|---|---|---|---|
| 價格 | 計費說明 | 計費說明 | — |
使用量與活動
成功率是請求完成的比例;延遲是一次完整回應所需的時間,P95 表示 95% 的請求在該時間內完成。
用量與可用性
過去 24 小時- 請求數
- 成功率
- P95 延遲
- 總 Token 用量
資料基於彙總的使用者請求,不包含狀態檢查。
直接在 Console 裡試
在 Console 中開啟 Grok Imagine Image,並準備好編輯或發送提示詞。
協助我使用 grok-imagine-image 透過 /v1/images/generations 執行 text-to-image 建立圖像,並顯示結果、成本與相關限制。
應用情境
適合場景- 文生圖
社群媒體變體
以正方形、直式和寬螢幕比例渲染同一個概念,讓相同的視覺內容適用於動態貼文、限時動態和橫幅。
概念草稿
透過簡短的提示詞快速探索多種視覺方向,然後將最佳方案移至高保真模型進行最終藝術創作。
依指令進行照片編輯
上傳產品照片並要求更換背景或改變顏色,同時保持主體位置不變。
提示詞範例
一張黃昏時分燈塔的直式海報,以厚油畫筆觸繪製,頂部留有放置標題的空間。
將此產品照片的背景更改為淺色混凝土攝影棚牆面,並保持陰影自然。
咖啡品牌的 3:2 橫幅:木桌上的杯子冒著熱氣,呈現溫暖的晨光。
FAQ
Grok Imagine Image 能做什麼?
它能根據文字提示生成圖像,並依照書面指令編輯您提供的圖像。您可以選擇 1K 或 2K 的輸出尺寸,並從多種長寬比中進行選擇,包括直式和寬螢幕。
grok-imagine-image 與 grok-imagine-image-2.0 有何不同?
這是最初的 Imagine 圖像模型,而 2.0 是 xAI 在其文件範例中使用的較新一代模型。請從這裡開始進行草稿和大量批次處理,當您在最終圖片中需要更細緻的細節時,再轉用 2.0 模型。
它支援哪些長寬比?
它支援正方形、3:2、4:3、16:9 及其對應的直式比例,加上 9:19.5 和 9:20 等較高的手機形狀,以及讓模型自動選擇的自動設定。
它可以編輯我自己的圖片嗎?
可以。提供一張圖片和文字指令,模型就會回傳編輯後的版本。這對於更換背景、改變顏色以及對現有圖片進行小幅增補非常有用。
它會生成影片嗎?
不會,它只能製作靜態圖像。若需要動態效果,請使用 Grok Imagine 影片模型,該模型可以為圖像製作動畫或根據文字生成短片。
Grok Imagine Image 的費用是多少?
價格因計費單位、規格和用量而異。請在模型的詳細定價中比較相同條件下的費率;單一費率不代表總價。
Grok Imagine Image 應該使用哪一個端點?
請使用 https://api.tokenlab.sh/v1/images/generations 進行 Grok Imagine Image 的呼叫。下方的請求範例展示了對應的程式碼格式。
Grok Imagine Image 支援哪些操作?
Grok Imagine Image 支援 影像編輯, 圖片轉圖片, 文字生成圖片。請在上方選擇一項操作以查看其端點與請求範例。
比較 Grok Imagine Image
使用 Grok Imagine Image 的指南
來源
- xAI model page: grok-imagine-image
- xAI image generation guide
- xAI migration guide: grok-imagine-image-quality
更新於 2026年11月5日