Grok Imagine Image
xAI · 图像
xAI Grok Imagine 图像模型,根据文本描述生成高质量图像。经 getmodel 绘图分组按次计费调用。 Grok Imagine Image 已在 GetModel 上线,通过 OpenAI 兼容 API 调用,按量计费。获取一个 Key 即可用任意 OpenAI SDK 调用。
价格
| 项目 | 价格 |
|---|---|
| 每次生成 | ¥0.22 |
如何调用
curl https://getmodel.ai/v1/chat/completions \
-H "Authorization: Bearer $GETMODEL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"grok-imagine-image","messages":[{"role":"user","content":"Hello"}]}' from openai import OpenAI
client = OpenAI(base_url="https://getmodel.ai/v1", api_key="$GETMODEL_API_KEY")
resp = client.chat.completions.create(
model="grok-imagine-image",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content) 详情
常见问题
Grok Imagine Image API 多少钱?
Grok Imagine Image 在 GetModel 的价格为 ¥0.22 / 每次生成,按量计费、无需订阅。
如何通过 API 调用 Grok Imagine Image?
把任意 OpenAI 兼容客户端指向 https://getmodel.ai/v1,填入你的 GetModel API Key,并将 model 设为“grok-imagine-image”。
Grok Imagine Image 能和其它模型一起用吗?
可以——一个 GetModel API Key 即可调用 Grok Imagine Image 和 30+ 其它模型,改 model 字段即可。