{"uid":"cap_gpxw9mhRMtc3zSf8TKpm4","slug":"grok-image-edit-238b92fa","name":"Grok Image Edit","description":"Edit existing images with natural language. Provide a source image and describe the changes.","url":"https://grok.mpp.paywithlocus.com/grok/image-edit?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["llm","chat","x-search","web-search","image-generation","tts","ai"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":true,"priceHint":"$0.02–$0.08 per image","priceStatus":"priced","priceSource":"registry","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"dynamic","summary":"$0.02–$0.08 per image (dynamic)","primary":{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"dynamic","protocol":"mpp","network":"tempo","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uP_XMo_BfW9yvLo0VhAd5","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":"Grok","brandSlug":"grok","brandBaseUrl":"https://x.ai","brandDocsUrl":"https://docs.x.ai","whatItDoes":"Edits an existing image based on a text description of the desired changes using xAI's Grok image models","exampleAgentPrompt":"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","exampleUseCases":null,"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":4,"lastUsedAt":"2026-05-21T00:20:39.687Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:41:59.525Z","isFirstParty":false,"canonicalSlug":"grok-image-edit-238b92fa"}