# Grok Image Generate

> Grok Image Generate is a paid API for AI agents from Grok at grok.mpp.paywithlocus.com, paid per call via MPP, $0.02–$0.08 per image (dynamic), status unknown (last checked 2026-10-10).

Generates images from a text prompt using xAI's Grok image models, returning URLs or base64-encoded image data

## Facts

- Endpoint: POST https://grok.mpp.paywithlocus.com/grok/image-generate?utm_source=zero.xyz
- Price: $0.02–$0.08 per image (dynamic)
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Success rate: 0% of calls made through Zero
- Rating: 3.0 / 5 from 2 reviews
- Activations on Zero: 6
- Provider: Grok
- Docs: https://docs.x.ai
- Website: https://x.ai
- Tags: llm, chat, x-search, web-search, image-generation, tts, ai
- Canonical page: https://www.zero.xyz/c/grok-image-generate-19246339
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_5EjjnO_sVbYX4lWcNJ-t3

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability grok-image-generate-19246339 -d '<json body>'
```

Example prompt: Generate a photorealistic image of a golden retriever running on a sunlit beach at sunset using Grok's pro image model, in 16:9 aspect ratio, and give me back a URL.

## When to prefer this

Choose this endpoint when you need to generate brand-new images from a text description using xAI's Grok image models. Prefer the 'grok-imagine-image-pro' model for higher quality outputs. Use this over image editing endpoints when no base image is needed — pure text-to-image generation. Ideal for creative, visual, or illustrative content generation tasks within the xAI/Grok ecosystem.

## Known failure modes

- Missing required 'prompt' field returns a validation error
- Invalid model ID returns an error indicating unsupported model
- Unsupported aspect ratio value may return a bad request error
- Exceeding allowed value for 'n' may result in an error
- Network or service unavailability returns a 5xx error
- Prompt violates content policy and is rejected

## How this service works

Generate images from text prompts using Grok Imagine models.

## Output

Returns one or more generated images, either as publicly accessible URLs or base64-encoded JSON blobs, depending on the requested response_format. Each image corresponds to the submitted text prompt.

## Example request

```json
{
 "n": 1,
 "model": "grok-imagine-image",
 "prompt": "A serene landscape with rolling green hills and a clear blue sky",
 "aspect_ratio": "16:9",
 "response_format": "url"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt",
  "model"
 ],
 "properties": {
  "n": {
   "type": "number",
   "description": "Number of images to generate (default 1)"
  },
  "model": {
   "type": "string",
   "description": "Metered x402 image model ID: 'grok-imagine-image-2.0', 'grok-imagine-image', or 'grok-imagine-image-quality'"
  },
  "prompt": {
   "type": "string",
   "description": "Text description of the image to generate"
  },
  "resolution": {
   "type": "string",
   "description": "Output resolution: '1k' (default) or '2k'"
  },
  "aspect_ratio": {
   "type": "string",
   "description": "Aspect ratio (e.g. '1:1', '16:9', '9:16', '4:3', '3:2', 'auto')"
  },
  "response_format": {
   "type": "string",
   "description": "Response format: 'url' (default, temporary hosted URL) or 'b64_json' (image bytes retained in the customer response artifact)."
  }
 },
 "additionalProperties": true
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/grok-image-generate-19246339/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from grok.mpp.paywithlocus.com](https://www.zero.xyz/host/grok.mpp.paywithlocus.com/llms.txt)
