- サードパーティ
- ゼロデータ保持
よりシャープな細部、正確な構図、強力なテキスト描画に最適化した、xAI の高忠実度テキスト画像生成モデルです。参照画像とマスクによる画像編集に対応します。grok-imagine-image と比べて速度より品質を優先します。デフォルト出力は 2k 解像度です。
| モデル情報 | |
|---|---|
| 利用規約とライセンス | リンク ↗ |
| 詳細情報 | リンク ↗ |
| ゼロデータ保持 | はい |
| 料金 | Cloudflare ダッシュボードで料金を見る ↗ |
const response = await env.AI.run(
'xai/grok-imagine-image-quality',
{ prompt: 'A golden retriever puppy playing in autumn leaves' },
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-imagine-image-quality",
"input": {
"prompt": "A golden retriever puppy playing in autumn leaves"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/xai/grok-imagine-image-quality/simple-generation.jpeg"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}高品質ポートレート — 2K 解像度の高品質ポートレート向きレンダリングです
const response = await env.AI.run(
'xai/grok-imagine-image-quality',
{
prompt:
'A detailed botanical illustration of exotic tropical flowers with fine line work and watercolor textures',
aspect_ratio: '3:4',
quality: 'high',
resolution: '2k',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-imagine-image-quality",
"input": {
"prompt": "A detailed botanical illustration of exotic tropical flowers with fine line work and watercolor textures",
"aspect_ratio": "3:4",
"quality": "high",
"resolution": "2k"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/xai/grok-imagine-image-quality/high-quality-portrait.png"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}シネマティックなワイド画面 — ワイド画面のシネマティックな構図です
const response = await env.AI.run(
'xai/grok-imagine-image-quality',
{
prompt:
'A neon-lit cyberpunk figure standing in the rain beneath a holographic billboard, cinematic lighting',
aspect_ratio: '16:9',
quality: 'high',
resolution: '2k',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-imagine-image-quality",
"input": {
"prompt": "A neon-lit cyberpunk figure standing in the rain beneath a holographic billboard, cinematic lighting",
"aspect_ratio": "16:9",
"quality": "high",
"resolution": "2k"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/xai/grok-imagine-image-quality/cinematic-widescreen.png"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}中品質の風景 — バランス品質の風景レンダリングです
const response = await env.AI.run(
'xai/grok-imagine-image-quality',
{
prompt:
'A panoramic view of the northern lights over a snowy mountain range, vivid greens and purples dancing across the sky',
aspect_ratio: '16:9',
quality: 'medium',
resolution: '1k',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-imagine-image-quality",
"input": {
"prompt": "A panoramic view of the northern lights over a snowy mountain range, vivid greens and purples dancing across the sky",
"aspect_ratio": "16:9",
"quality": "medium",
"resolution": "1k"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/xai/grok-imagine-image-quality/medium-quality-landscape.jpeg"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}正方形の低品質下書き — 反復向けの高速な下書きです
const response = await env.AI.run(
'xai/grok-imagine-image-quality',
{
prompt: 'A quiet Japanese garden in morning mist with a stone lantern and koi pond',
aspect_ratio: '1:1',
quality: 'low',
resolution: '1k',
},
)
console.log(response)curl https://api.cloudflare.com/client/v4/accounts/$CLOUDFLARE_ACCOUNT_ID/ai/run \
--header "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"model": "xai/grok-imagine-image-quality",
"input": {
"prompt": "A quiet Japanese garden in morning mist with a stone lantern and koi pond",
"aspect_ratio": "1:1",
"quality": "low",
"resolution": "1k"
}
}'
{
"state": "Completed",
"result": {
"image": "https://examples.aig.cloudflare.com/xai/grok-imagine-image-quality/square-low-quality-draft.jpeg"
},
"gatewayMetadata": {
"keySource": "Unified"
}
}prompt
string必須n
integerminimum: 1maximum: 10aspect_ratio
stringenum: 1:1, 3:4, 4:3, 9:16, 16:9, 2:3, 3:2, 9:19.5, 19.5:9, 9:20, 20:9, 1:2, 2:1, autoquality
stringenum: low, medium, highresolution
stringenum: 1k, 2kresponse_format
stringenum: url, b64_jsonuser
string▶image{}
object▶images[]
arraymaxItems: 10▶mask{}
objectimage
string生成画像です。上流の `response_format` に応じて、Base64 data URI(`data:image/png;base64,...`)または `https://` URL です(デフォルトは Base64)。