Skip to main content
GET
/
v1
/
tasks
/
{task_id}
Query Task Status
curl --request GET \
  --url https://api.foxapi.cc/v1/tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "created": 1757165031,
  "id": "task-unified-1757165031-uyujaw3d",
  "model": "gemini-3.1-flash-image-preview",
  "object": "image.generation.task",
  "progress": 100,
  "status": "completed",
  "task_info": {
    "can_cancel": true,
    "estimated_time": 45
  },
  "type": "image",
  "output": {
    "url": "https://cdn.foxapi.cc/output/example.png",
    "urls": [
      "https://cdn.foxapi.cc/output/example1.png",
      "https://cdn.foxapi.cc/output/example2.png"
    ],
    "duration": 5,
    "width": 1024,
    "height": 1024
  },
  "error": {
    "code": "generation_failed",
    "message": "Image generation failed due to content policy violation"
  }
}

Authorizations

Authorization
string
header
required

All APIs require Bearer Token authentication

Add to request header:

Authorization: Bearer YOUR_API_KEY

Path Parameters

task_id
string
required

The task ID returned from generation endpoints

Response

Task detail retrieved successfully

created
integer

Task creation timestamp

Example:

1757165031

id
string

Task ID

Example:

"task-unified-1757165031-uyujaw3d"

model
string

Model used for the task

Example:

"gemini-3.1-flash-image-preview"

object
string

Task type identifier

Example:

"image.generation.task"

progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

100

status
enum<string>

Task status

Available options:
pending,
processing,
completed,
failed,
cancelled
Example:

"completed"

task_info
object

Asynchronous task information

type
enum<string>

Task output type

Available options:
text,
image,
audio,
video
Example:

"image"

output
object

Task output data, present when status is completed

error
object

Error details, present when status is failed