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

Welcome

Contact Us

Edit one public reference image for recoloring, restyling, scene replacement, and detail refinement while following its framing.

Provider: xAI

Category: image generation

Endpoint: /v1/tasks

Status: Available

Cost: See live page pricing

Back to Models

Grok Image 2.0 Image to Image

New
by xAIImage

Edit one public reference image for recoloring, restyling, scene replacement, and detail refinement while following its framing.

Pricing

Standard Usage

130 Credits/ image

Input

0 / 5000

More parameters

Generation settings

Choose the quality tier; tiers affect pricing

Estimated cost130 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 Image to Image

Edit one public reference image for recoloring, restyling, scene replacement, and detail refinement while following its framing.

The Playground and API use the same model ID: grok-imagine-image-2.0/image-to-image. Reference images provide subject, product, scene, or style facts, while the prompt assigns each role and limits the edit.

Provider
xAI
Task
Image-to-Image / Editing
References
1
Pricing
130 Credits / image

Model specifications

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

Reference images
1
Output resolution
1K2K
Aspect ratios
match input
Output formats
PNGJPEG
Prompt length
Up to 20,000 characters
Pricing
Per image: 130 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 Image to Image

References provide visual facts; the prompt assigns their roles and limits the edit.

Subject
Scene

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/image-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/image-to-image",
  "input": {
    "prompt": "Change the product color and preserve its structure",
    "aspect_ratio": "1:1",
    "image": "https://example.com/reference.jpg",
    "quality": "medium",
    "resolution": "1k"
  }
}'

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 Image to Image best for?

Edit one public reference image for recoloring, restyling, scene replacement, and detail refinement while following its framing.

Does Grok Image 2.0 Image to Image accept reference images?

Yes. This route requires reference input and accepts up to 1 image.

Which output settings are supported?

The page exposes 1K, 2K and match input; use the Playground contract for the final available set.

How is Grok Image 2.0 Image 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 Image to Image API?

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

Style
Up to 1
01

Upload references

Choose 1 to 1 publicly accessible images without redundant or conflicting roles.

What to change
What to preserve
02

Define changes and constraints

Describe the requested edit and the subject, text, composition, lighting, and positions that must remain.

Playground
POST /v1/tasks
03

Validate before integration

Check the reference relationship in Playground, then create asynchronous tasks with the same model ID.