HiAPI
OverviewModel MarketplaceAPI KeysUsage StatisticsCall LogsBillingReferralPlaygroundStorageChangelogContact UsSettings
Display unit
N
Powered by hiapi
Settings

Welcome

Contact Us

Generate product, editorial, landscape, and character visuals in low or medium quality at 1K/2K across square to ultrawide formats.

Provider: xAI

Category: image generation

Endpoint: /v1/tasks

Status: Available

Cost: See live page pricing

Back to Models

Grok Image 2.0 Text to Image

New
by xAIImage

Generate product, editorial, landscape, and character visuals in low or medium quality at 1K/2K across square to ultrawide formats.

Pricing

Standard Usage

104 Credits/ image

Input

0 / 5000

More parameters

Generation settings

Choose the quality tier; tiers affect pricing

Estimated cost104 Credits / imageper image

Output

Ready for generation

Configure your parameters and click "Run" to see the output here.

--

Related image models

Choose an adjacent model by task, output tier, and reference-image needs.

Fast image generation

Seedream 5.0 Lite

A low-cost route for multilingual commercial visuals and rapid iteration.

Typography and layout

Qwen Image 3.0

Compare poster typography, scene composition, and 1K/2K output.

Flexible image creation

Nano Banana 2

A general-purpose route with optional references and broad aspect-ratio coverage.

Compare AI image APIs

About Grok Image 2.0 Text to Image

Generate product, editorial, landscape, and character visuals in low or medium quality at 1K/2K across square to ultrawide formats.

The Playground and API use the same model ID: grok-imagine-image-2.0/text-to-image. This endpoint accepts text prompts only; reference-image editing uses the separate Image-to-Image route.

Provider
xAI
Task
Text-to-Image
References
Not supported
Pricing
104 Credits / image

Model specifications

Explore reference limits, sizes, formats and quality settings for Grok Image 2.0 Text to Image.

Reference images
Not supported
Output resolution
1K2K
Aspect ratios
auto1:116:99:164:33:42:11:2
Output formats
PNGJPEG
Prompt length
Up to 20,000 characters
Pricing
Per image: 104 Credits / image

Final cost depends on the output tier and input add-ons. Check the live page price and task record for the final charge.

How to use Grok Image 2.0 Text to Image

Choose the destination and aspect ratio before composing subject, scene, material, light, and text.

Subject
Scene
Camera and light
01

API Quickstart

Copy a minimal request below. See Docs for parameters, callbacks, task retrieval, and errors.

Endpoint
POST /v1/tasks
Model ID
grok-imagine-image-2.0/text-to-image
cURL
curl -X POST "https://api.hiapi.ai/v1/tasks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-imagine-image-2.0/text-to-image",
  "input": {
    "prompt": "A cinematic product campaign with sharp text",
    "aspect_ratio": "1:1",
    "resolution": "1k",
    "quality": "medium"
  }
}'

The create request immediately returns a taskId; image generation continues asynchronously.

Read the full API documentation
Need to compare models and billing tiers?View live pricing for all models

Frequently asked questions

What is Grok Image 2.0 Text to Image best for?

Generate product, editorial, landscape, and character visuals in low or medium quality at 1K/2K across square to ultrawide formats.

Does Grok Image 2.0 Text to Image accept reference images?

No. This route is text-to-image only.

Which output settings are supported?

The page exposes 1K, 2K and auto, 1:1, 16:9, 9:16, 4:3, 3:4, 2:1, 1:2; use the Playground contract for the final available set.

How is Grok Image 2.0 Text to Image billed?

Billing is per successful generated image. Resolution or quality differences, when present, are reflected by the live page price.

How do I call the Grok Image 2.0 Text to Image API?

POST an asynchronous task to /v1/tasks with model set to grok-imagine-image-2.0/text-to-image and put generation fields inside input.

Describe subject and scene

Start with the subject, environment, and visual goal, then add material, light, camera, and exact text.

Draft

1K

Final

2K

02

Choose output settings

Generate in 1K / 2K across 8 supported aspect ratios.

Playground
POST /v1/tasks
03

Validate before integration

Confirm the result in Playground, then reuse the same prompt and model ID in an asynchronous task.