Get async tool execution status and result
  GET /api/v3/organizations/{organisation}/ai/tools/executions/{executionId}    
 Retrieves the status and result of an async tool execution. Used for polling long-running tools like image generation.
*
* Async Tool Execution Pattern:
* This endpoint enables a polling pattern for long-running tools that would otherwise hit API Gateway’s 30-second timeout.
*
* Flow:
* 1. AI requests tool use (e.g., generate_image)
* 2. Chat API returns toolUse with execution tracking info
* 3. Client starts polling this endpoint with the executionId
* 4. When status === 'complete', retrieve result and send back to AI
* 5. AI incorporates result into final response
*
* Status Values:
* - pending: Tool execution queued, not yet started
* - running: Tool is currently executing
* - complete: Tool execution finished successfully, result available
* - failed: Tool execution failed, error available
*
* Polling Recommendations:
* - Poll every 2-3 seconds for image generation
* - Exponential backoff for other tools (start 1s, max 5s)
* - Stop polling after 5 minutes (consider failed)
* - Auto-cleanup after 24 hours (TTL)
*
* Use Cases:
* - Image generation (10-15s typical runtime)
* - Video processing
* - Large file uploads/downloads
* - Complex database queries
* - External API calls with high latency
Authorizations
Parameters
Path Parameters
The organisation ID
exec_abc123def456Tool execution identifier
Responses
200
Tool execution status retrieved successfully
object
exec_abc123def456generate_imageTool execution result (only present when status=‘complete’). Structure varies by tool type.
object
For image generation: Array of base64-encoded data URIs for inline display/preview
For image generation: Array of signed S3 URLs for high-quality downloads (expire after 1 hour)
{  "images": [    "data:image/jpeg;base64,/9j/4AAQSkZJRg..."  ],  "s3Urls": [    "https://au-stg-ai-images.s3.amazonaws.com/generated/exec_abc123..."  ]}Error message (only present when status=‘failed’)
Image generation failed: Invalid promptUnix timestamp when execution was created
1730271600Unix timestamp when execution started (if status >= ‘running’)
1730271601Unix timestamp when execution completed (if status in [‘complete’, ‘failed’])
1730271612Execution duration in seconds (if completed)
11403
Access denied
404
Execution not found (may have expired after 24h)
object
Execution not foundexec_abc123def456500
Failed to retrieve execution status