# Grok Image Edit

> Grok Image Edit is a paid API for AI agents from StableStudio at stablestudio.dev, paid per call via MPP or x402, $10/call, status unknown (last checked 2026-10-10, last successful call 2026-05-20).

Edits one or more existing images using Grok Image AI based on a text prompt, returning a pending job ID

## Facts

- Endpoint: POST https://stablestudio.dev/api/generate/grok/edit?utm_source=zero.xyz
- Price: $10/call
- Payment: MPP, x402
- Status: unknown
- Last checked: 2026-10-10
- Last successful call: 2026-05-20
- Success rate: 100% of calls made through Zero
- Activations on Zero: 10
- Provider: StableStudio
- Docs: https://stablestudio.dev
- Website: https://stablestudio.dev
- Tags: image, video, generation, nano-banana, gpt-image, grok, flux, sora, veo, seedance, wan, ai, media, x402
- Canonical page: https://www.zero.xyz/c/stablestudio-edit-76cf3c27
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dqHJSkPv7iZMlxPCe1VeG

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 stablestudio-edit-76cf3c27 -d '<json body>'
```

Example prompt: Edit this image (https://example.com/photo.jpg) using Grok Image — make the background a sunset sky and add a mountain range in the distance, output in 16:9.

## When to prefer this

Use this endpoint when you specifically want Grok Image's editing model to modify existing images via text prompt on the StableStudio platform. Prefer this over other StableStudio edit endpoints (Flux 2 Pro, GPT Image, Nano Banana) when Grok's particular visual style or capabilities are desired. Use the generate endpoint instead if starting from scratch with no source image.

## Known failure modes

- Invalid or inaccessible image URL returns an error
- Prompt exceeds 8000 character limit
- No images provided (minItems: 1 not met)
- Invalid aspect ratio enum value
- Payment of $10 USDC not fulfilled results in 402 response
- Job creation may succeed but underlying edit can fail asynchronously

## How this service works

Pay-per-generation AI image and video creation. No subscriptions ever.

## Output

Returns a JSON object with a jobId string, a status of 'pending', a type field, and success: true. The agent must poll the job ID to retrieve the completed edited image.

## Example request

```json
{
 "images": [
  "https://www.w3schools.com/css/img_5terre.jpg"
 ],
 "prompt": "Add a warm golden sunset glow to the background and enhance the overall lighting",
 "aspect_ratio": "16:9"
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "images": {
   "type": "array",
   "items": {
    "type": "string",
    "format": "uri",
    "description": "Image URL"
   },
   "minItems": 1,
   "description": "Array of image URLs to edit"
  },
  "prompt": {
   "type": "string",
   "maxLength": 8000,
   "minLength": 1,
   "description": "A detailed description of the image you want to generate"
  },
  "aspect_ratio": {
   "enum": [
    "1:1",
    "16:9",
    "9:16",
    "4:3",
    "3:4",
    "3:2",
    "2:3",
    "2:1",
    "1:2",
    "19.5:9",
    "9:19.5",
    "20:9",
    "9:20"
   ],
   "type": "string",
   "default": "16:9",
   "description": "Aspect ratio of the output image"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "type": "grok-edit",
  "jobId": "cmpbmzaee000j04jrzx4f43tw",
  "status": "pending",
  "pollUrl": "https://stablestudio.dev/api/jobs/cmpbmzaee000j04jrzx4f43tw",
  "success": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/stablestudio-edit-76cf3c27/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from stablestudio.dev](https://www.zero.xyz/host/stablestudio.dev/llms.txt)
