# Grok Image Edit

> Grok Image Edit 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).

Edits an existing image based on a text description of the desired changes using xAI's Grok image models

## Facts

- Endpoint: POST https://grok.mpp.paywithlocus.com/grok/image-edit?utm_source=zero.xyz
- Price: $0.02–$0.08 per image (dynamic)
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 4
- 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-edit-238b92fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gpxw9mhRMtc3zSf8TKpm4

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-edit-238b92fa -d '<json body>'
```

Example prompt: Edit this photo of my friend — add a red baseball hat to their head — using Grok's image editing model: https://example.com/friend.jpg

## When to prefer this

Use this endpoint when you need to modify or enhance an existing image using natural language instructions, powered by xAI's Grok models. Prefer this over image generation endpoints when you have a source image to edit rather than generating from scratch. Choose grok-imagine-image-pro for higher quality edits.

## Known failure modes

- Invalid or inaccessible image URL returns an error
- Unsupported image format or corrupted base64 data causes a processing error
- Prompt too vague or conflicting with image content may produce poor edits
- Invalid model ID falls back to default or returns an error
- n parameter exceeding platform limits returns a validation error
- Network timeout for large images or slow connections

## How this service works

Edit existing images with natural language. Provide a source image and describe the changes.

## Output

Returns an edited image as either a URL or base64-encoded JSON (b64_json), depending on the response_format parameter. The image reflects the edits described in the prompt applied to the source image.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "prompt",
  "image",
  "model"
 ],
 "properties": {
  "n": {
   "type": "number",
   "description": "Number of edited images to generate (default 1)"
  },
  "image": {
   "type": "object",
   "required": [
    "url"
   ],
   "properties": {
    "url": {
     "type": "string"
    }
   },
   "description": "Source image: { url: \"https://...\" } or { url: \"data:image/jpeg;base64,...\" }",
   "additionalProperties": true
  },
  "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 edits to apply (e.g. \"Add a hat to the person\")"
  },
  "resolution": {
   "type": "string",
   "description": "Output resolution: '1k' (default) or '2k'"
  },
  "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-edit-238b92fa/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)
