Async image tasks

Submit a long-running image job and poll for the result.

POSThttps://your-instance.com/v1/images/tasks

Some image models take long enough that a synchronous request is impractical. These return a task ID immediately; poll the task endpoint until it reports success or failure.

curl https://your-instance.com/v1/images/tasks \
  -H "Authorization: Bearer $CLAWROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-image",
    "prompt": "A koi pond at dawn"
  }'
GEThttps://your-instance.com/v1/images/tasks/{task_id}

Poll at a few seconds' interval. The task carries a status field; treat anything other than a terminal success or failure as still running.