Grok Imagine Image 2.0 API — 实时定价、参数规格与 SDK 接入指南

Technical Summary & Live Pricing

通过 API Store Hub 调用 Grok Imagine Image 2.0 API(grok-image-2.0),低至 1,000 ST/次,支持 /v1/images/generations(Image Generation API)。透明 ST 预付计费,提供 cURL、Python、TypeScript 完整示例。

Model Name
Grok Imagine Image 2.0
Primary Model ID
grok-image-2.0
Model Family
xAI Grok
Starting Price
1,000 ST/次 (1 VND = 1 ST)
Protocol & Endpoint
/v1/images/generations — Image Generation API
Compatible Apps & SDKs
POST /v1/images/generations, POST /v1/images/edits, OpenAI SDK, cURL, n8n, Dify

Active Lanes & Variants

Grok Imagine Image 2.0
Model IDLaneBilling UnitPrice (ST / VND)Min/RequestContext WindowMax OutputFeatures
grok-image-2.0Fixed Request (req/)Per request1,000 ST/req---Image generation, OpenAI API

Practical Cost Estimator (ST / VND)

VolumeEstimated Cost (ST)VND Equivalent
10 images10,000 ST10,000 VNĐ
100 images100,000 ST100,000 VNĐ
1,000 images1,000,000 ST1,000,000 VNĐ
10,000 images10,000,000 ST10,000,000 VNĐ

Integration Snippets: cURL, Python, TypeScript & Anthropic / Claude Code

cURL

curl https://apistorehub.com/v1/images/generations \
  -H "Authorization: Bearer sk-ash-your_key" \
  -H "Content-Type: application/json" \
  -d '{"model":"grok-image-2.0","prompt":"Minimalist studio product shot, soft lighting","size":"1024x1024"}'

Python SDK

import os
from openai import OpenAI

client = OpenAI(base_url="https://apistorehub.com/v1", api_key=os.environ["API_KEY"])
img = client.images.generate(model="grok-image-2.0", prompt="Modern minimalist workspace", size="1024x1024")
print(img.data[0].url)

TypeScript SDK

import OpenAI from "openai";

const client = new OpenAI({ baseURL: "https://apistorehub.com/v1", apiKey: process.env.API_KEY });
const img = await client.images.generate({ model: "grok-image-2.0", prompt: "Editorial architecture photo", size: "1024x1024" });
console.log(img.data);

Anthropic / Claude Code & CLI

export OPENAI_BASE_URL="https://apistorehub.com/v1"
export OPENAI_API_KEY="sk-ash-your_key"
export ANTHROPIC_BASE_URL="https://apistorehub.com"
export ANTHROPIC_AUTH_TOKEN="sk-ash-your_key"
export MODEL_ID="grok-image-2.0"

Model FAQ

How much does Grok Imagine Image 2.0 API cost on API Store Hub?
Grok Imagine Image 2.0 is live across 1 lane variant(s) starting from 1,000 ST/次 (1 VND = 1 ST), settled accurately to actual usage.
What context window and protocol does Grok Imagine Image 2.0 support?
Grok Imagine Image 2.0 (xAI Grok) provides N/A context over /v1/images/generations (Image Generation API) and works with POST /v1/images/generations, POST /v1/images/edits, OpenAI SDK, cURL, n8n, Dify.
How do I integrate Grok Imagine Image 2.0 with Python, TypeScript, or Claude Code?
Set base_url to https://apistorehub.com/v1 (OpenAI SDK) or https://apistorehub.com (Anthropic SDK / Claude Code), pass model="grok-image-2.0", and authenticate with a sk-ash- key.
Does Grok Imagine Image 2.0 share one ST credit balance with other AI models?
Yes. Every model on API Store Hub shares one prepaid ST credit balance and a single API key.