参数
prompt必填类型
text
取值
text description
默认值
required
价格
—
Grok Imagine 2.0 区域编辑——暂时不可用。
grok-imagine-2.0-ext:white该模型在目录中仅公布最低价格。
Grok Imagine 2.0 区域编辑——暂时不可用。
生成是异步的:先创建任务,然后轮询状态直至完成。
在 Bearer 请求头中传递密钥。API 会返回 jobId 用于轮询状态。
curl -sS https://getvibeapi.com/api/media/generate \
-H "Authorization: Bearer $GETVIBE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary '{"model":"grok-imagine-2.0-ext:white","prompt":"a beautiful landscape","opts":{"mode":"region_edit","image_url":"https://example.com/image_url.png","resolution":"1K"}}'const response = await fetch('https://getvibeapi.com/api/media/generate', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.GETVIBE_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"model": "grok-imagine-2.0-ext:white",
"prompt": "a beautiful landscape",
"opts": {
"mode": "region_edit",
"image_url": "https://example.com/image_url.png",
"resolution": "1K"
}
}),
});
if (!response.ok) throw new Error(`GetVibe API: ${response.status}`);
const { jobId } = await response.json();
console.log(jobId);通过 GetVibe API 向 Grok Imagine 2.0 EXT 发起请求的参数。
prompt必填image_urlmoderesolutionimage_file_idimage_base64| 参数 | 类型 | 取值 | 默认值 | 价格 |
|---|---|---|---|---|
prompt必填 | text | text description | required | — |
image_url | URL | Public image URL | — | — |
mode | option selection | Region edit (default) | Region edit | Included in the base price |
resolution | option selection | 1K (default) · 2K | 1K | Included in the base price |
image_file_id | text | Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…) | — | Included in the base price |
image_base64 | text | Alternative to image_url: the file inline, as base64 or a data: URI | — | Included in the base price |
请求:POST https://getvibeapi.com/api/media/generate。价格以 USD 计。
Grok Imagine 2.0 EXT 的价格待确认:供应商尚未发布该契约的初步确认价格。价格确认后即可生成。
Grok Imagine 2.0 EXT 的机器可读契约包含请求 schema、操作、限制、轮询和响应示例。
# Grok Imagine 2.0 EXT
公开模型:grok-imagine-2.0-ext:white
创建任务: POST /api/media/generate
检查状态: GET /api/media/jobs/{jobId}
## 输入参数
- `prompt` (text): text description; 默认: required
- `image_url` (URL): Public image URL; 默认: —
- `mode` (option selection): Region edit (default); 默认: Region edit
- `resolution` (option selection): 1K (default) · 2K; 默认: 1K
- `image_file_id` (text): Alternative to image_url: the id of your own file from POST /v1/files (file-pv-…); 默认: —
- `image_base64` (text): Alternative to image_url: the file inline, as base64 or a data: URI; 默认: —
## 公开变体
- `grok-imagine-2.0-ext:white`: 默认Grok Imagine 2.0 EXT 的价格:按需。价格按当前汇率动态计算。
是的,API 完全兼容 OpenAI。只需将 base_url 改为 https://getvibeapi.com/v1 并设置密钥——其余代码不变。