OmwAIOmwAI
API GuideAPI ReferenceProgramming Tools
Novel AI

Query Result

Novel AI async task result query endpoint

Queries the status and result of a Novel AI async generation task by task ID. After submitting an image generation / image-to-image task, poll this endpoint with the returned task_id until the task completes.

Task status

  • queued / in_progress: processing, progress shows the progress — retry later;
  • completed: done, the data array contains the final image URL (url field);
  • failed: failed, error explains why.

Images are kept for about 2 hours

The returned image URL is temporary (metadata.assetsExpireAt holds the expiry time in Unix seconds); images are kept for about 2 hours and then deleted automatically. Download them before they expire if you need long-term storage.

GET
/v1/images/async/generations/{task_id}

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx 令牌需开通对应模型的调用权限。

In: header

Path Parameters

task_id*string

提交图片生成任务时返回的任务 ID(id / task_id)

Response Body

application/json

application/json

application/json

curl -X GET "https://www.omwai.xyz/v1/images/async/generations/task_01J8ABCDEFGHIJKLMNOPQRST"
{
  "id": "task_01J8ABCDEFGHIJKLMNOPQRST",
  "task_id": "task_01J8ABCDEFGHIJKLMNOPQRST",
  "object": "image.task",
  "model": "nai-diffusion-4-5-curated",
  "status": "completed",
  "progress": "100%",
  "created_at": 1788256630,
  "completed_at": 1788256720,
  "data": [
    {
      "url": "https://cdn.omwai.xyz/1/image/png/xxxx.png"
    }
  ],
  "error": {
    "code": "task_failed",
    "message": "string"
  },
  "metadata": {
    "assetsExpireAt": 1788263830
  }
}
{
  "code": "string",
  "message": "string"
}
{
  "code": "string",
  "message": "string"
}

Note

Only tasks created under the current account can be queried. A task that does not exist or is not accessible returns 400. After the images expire, data becomes empty and the URLs are no longer accessible.

How is this guide?

Last updated on