spacexaiCertifiedReleased 08/07/2026

Grok Imagine Image 2.0

View API reference ↓
PriceFrom$0.060per image
24h uptime—
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.images.generate({
  model: "spacexai/grok-imagine-image-2.0",
  prompt: "A lighthouse at dusk, oil painting",
  size: "1024x1024",
});

// Base64 only: images are returned, never stored.
const png = Buffer.from(res.data[0].b64_json, "base64");

Providers

Dispatch routes requests across these providers and fails over between them without changing the model. Restrict or order providers with team Directives. Prices are gateway list prices before the platform fee.

ProviderContextMax outputLatencyThroughputInputOutputCacheCapabilitiesZDRNo trainingRegionsStatus
xAI00——$0$0Read —Write —1 featuresYesYesGlobalCertified

Uptime

24 hours

Request success rate per provider.

xAI—

Getting started

Create a key on the API Keys page and set it as IB_API_KEY. See the quickstart.

import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api.inferencebureau.com/v1",
  apiKey: process.env.IB_API_KEY,
});

const res = await client.images.generate({
  model: "spacexai/grok-imagine-image-2.0",
  prompt: "A lighthouse at dusk, oil painting",
  size: "1024x1024",
});

// Base64 only: images are returned, never stored.
const png = Buffer.from(res.data[0].b64_json, "base64");

Grok Imagine Image 2.0 answers POST /v1/images/generations, and edits images with POST /v1/images/edits, not chat completions. It is billed per image.

Price per image

OutputPrice
Default$0.060
low$0.040
2048x2048$0.080
2048x2048 · low$0.060

More models by spacexai

ModelContextInputOutputCacheRelease
spacexai/grok-imagine-image0——Read —Write —01/28/2026