xAI

Grok Imagine image 2 0

圖像

文字生成圖片、分割圖及針對性圖片編輯

起價 $0.03 / 次呼叫 Grok Imagine image 2 0 API reference →
模型健康狀態 資料不足
curl -X POST https://runapi.ai/api/v1/grok_imagine/segment_map \
  -H "Authorization: Bearer $RUNAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-imagine-image-2-0",
  "prompt": "生成一段短片:機器手將棋子放上棋盤,戲劇性燈光,慢動作。"
}'
https://runapi.ai 3 endpoints
Playground

試用 Grok Imagine image 2 0

選擇任一模型,幾秒內即可開始生成。

最多 5 個檔案

預估: $0.04 / 張圖片

請登入以使用 RunAPI 生成。

請登入以生成

登入後,即可使用您可用的語言模型開始生成。

規格

技術細節

提供者 xAI
模型 ID grok-imagine-image-2-0
模態 圖像
任務類型 Asynchronous
API 端點 /api/v1/grok_imagine/edit_image, /api/v1/grok_imagine/segment_map, /api/v1/grok_imagine/text_to_image
計費單位 次呼叫
輸入參數 aspect_ratio, callback_url, enable_pro, enable_safety_checker, image_url, mask_indices, model, prompt, source_image_url, source_image_urls, source_task_id
長寬比 1:1, 2:3, 3:2, 16:9, 9:16, auto
目錄狀態 可直接上線
使用方式

3 個步驟使用此模型

  1. 取得 API 金鑰

    免費註冊後,從控制台建立 grok-imagine-image-2-0 的 API 金鑰。

  2. 傳送請求

    向 /api/v1/grok_imagine/segment_map 傳送 POST 請求,並傳入 grok-imagine-image-2-0 模型 ID 與參數。

  3. 取得結果

    輪詢工作或依照回呼取得已完成的 grok-imagine-image-2-0 結果。

此模型提供的功能

彈性參數

可設定 9 個已記錄的參數,包括 aspect_ratio, enable_pro, enable_safety_checker, image_url, mask_indices。

Endpoint 覆蓋範圍

公開 3 個公共 endpoint:edit_image, segment_map, text_to_image。

Webhook 傳送

非同步任務接受回呼 URL 以接收完成通知。

用量計費

依 次呼叫 計量,無需訂閱。

Grok Imagine image 2 0 價格

API endpoint
解析度
時長
價格
edit_image
暫無資料
次呼叫
$0.04 / 張圖片
segment_map
暫無資料
次呼叫
免費 / 張圖片
text_to_image
暫無資料
次呼叫
$0.03 / 張圖片
API 參考

端點規格

端點
POST /api/v1/grok_imagine/segment_map
模型 ID
grok-imagine-image-2-0
工作類型
edit_image, segment_map, text_to_image
最長時長
暫無資料
解析度
暫無資料
長寬比
暫無資料
輸出格式
暫無資料
平均生成時間
暫無資料

請求參數

image_url

選填 string

Public image URL that the service can fetch.

callback_url

選填 string

Webhook URL for terminal Task delivery.

source_task_id

選填 string

Completed Image 2.0 text-to-image Task ID owned by the same account. Compatibility input; use image_url instead.

使用情境

產品攝影

為缺少棚拍照片的電商型錄,自動生成生活風格產品照片。

遊戲與概念美術

在定稿前快速發想場景與角色概念。

編輯插畫

大規模生成部落格文章與專欄所需的獨特封面與插圖。

使用指標

深受開發者信賴
14
API 呼叫次數 / 天
0.0%
成功率
不可用
平均生成時間

此模型目前尚無已驗證的客戶回饋。

FAQ

關於 Grok Imagine image 2 0 的常見問題

如何選擇 grok-imagine-image-2-0?

傳入 quickstart 顯示的 model ID。

這個 variant 的速率限制是多少?

每個金鑰的速率限制會依使用方案而調整。請查看定價頁面以了解目前限制。

之後可以切換 variant 嗎?

可以——variant 只是旗標。只要變更 model 參數即可切換。

它支援串流嗎?

只要支援串流,RunAPI 就會端到端串流。

我該在哪裡回報品質問題?

請在公開 GitHub repo 提交 issue,或寄信給支援。

需要獨立的供應商帳戶嗎?

不需要。你的 RunAPI API key 足以存取此 variant 及目錄中的所有其他模型,無需底層供應商帳戶。

正在與團隊一起打造?

我們可以協助企業接入、整合與技術問題。

聯絡我們