openai_get_task
Retrieve an async image task result by task ID or custom trace ID. Check status and get final output after processing completes.
Instructions
Retrieve a single async image task by its task ID or custom trace ID.
Image generation and editing requests submitted with a callback_url are
processed asynchronously and produce a persistent task record. Use this
tool to check whether the task has finished and to retrieve the final
result.
Note: tasks are only created when the original request included a
callback_url. Synchronous (non-callback) calls are not stored.
Use this when:
- You previously called openai_generate_image or openai_edit_image with a
callback_url and want to retrieve the result
- You want to check the status of an async image task
Returns:
JSON object with task details (id, trace_id, type, request, response,
created_at, finished_at, duration) or an empty object if not found.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Task ID returned by the original image request (e.g. from openai_generate_image or openai_edit_image when callback_url was set). At least one of 'id' or 'trace_id' must be provided. | |
| trace_id | No | Custom trace ID supplied via the 'trace_id' field on the original image request. When both 'id' and 'trace_id' are given, 'trace_id' takes precedence. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |