curl --request POST \ --url https://toapis.com/v1/images/edits \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "grok-imagine-1.0-edit", "prompt": "Change the background to a starry sky, keep the main subject", "image_urls": ["https://example.com/original.png"], "n": 1 }'
{ "id": "task_01JNXXXXXXXXXXXXXXXXXX", "object": "generation.task", "model": "grok-imagine-1.0-edit", "status": "queued", "progress": 0, "created_at": 1768380224, "metadata": {} }
Async image editing with grok-imagine-1.0-edit based on reference images
model
grok-imagine-1.0-edit
Authorization: Bearer YOUR_API_KEY
["https://example.com/original.png"]
generation.task
queued
in_progress
completed
failed