# Grok Imagine Image Quality Edit - Core.Today AI API > Dedicated edit endpoint for xAI's Grok Imagine Image Quality - the highest-fidelity editing tier in the family for polished, detail-preserving edits. - **Provider**: xAI - **Model ID**: xai/grok-imagine-image-quality/edit - **Category**: Image Generation - **Credits**: 140 per image - **Speed**: Medium - **Quality**: Ultra ## Features - Highest-fidelity editing in the Grok Imagine family - Detail-preserving retouches and restorations - Up to 10 edited variants per request (billed per image) - 1k / 2k output resolution tiers (2k billed higher) ## Use Cases - Final-quality retouching of hero images - Photo restoration and detail enhancement - High-end product image editing ## API Endpoint Base URL: https://api.core.today/v1 Create Prediction: POST /predictions Get Status: GET /predictions/{job_id} ## Authentication Header: X-API-Key: YOUR_API_KEY ## Input Parameters ### Required - **prompt**: string - Text prompt describing the edit. - **image**: string - Source image URL to edit. Supports jpg, jpeg, png (max 20MiB). ### Optional - **n**: integer (default: 1) - Number of edited variants to generate (1-10). Billed per image. - **aspect_ratio**: string (default: auto) - Aspect ratio of the output image. Options: auto, 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 - **resolution**: string - Output resolution tier. 2k is billed at a higher rate; omitted defaults to 1k. Options: 1k, 2k ## Examples ### Restoration Restore and enhance a photo without changing composition ```json { "model": "xai/grok-imagine-image-quality/edit", "input": { "prompt": "Restore this photo and enhance fine detail, keep composition", "image": "https://example.com/old-photo.jpg" } } ``` ## Response Format ```json { "job_id": "abc123", "status": "pending | processing | completed | failed", "result": "URL or data (when completed)" } ``` ## Usage Flow 1. POST /predictions with model and input -> receive job_id 2. GET /predictions/{job_id} -> poll until status is completed or failed 3. Result contains output URL(s) ## Tips - Use this tier when edit fidelity matters more than speed or cost - Upstream is limited to 5 requests/second - batch with n instead of parallel calls - For cheaper iteration, start with xai/grok-imagine-image/edit