sangtao.ai
API key

Jobs

Danh sách jobs

GEThttps://api.sangtao.ai/v2/jobs

Xác thực

  • X-Api-Keystring · headerbắt buộc

    API key của bạn, tạo ở trang API key trong tài khoản.

Liệt kê tất cả jobs của user hiện tại với phân trang và bộ lọc. Dùng để xây dựng trang lịch sử, dashboard, hoặc quản lý.

Tham số query

  • pageint

    Số trang. Mặc định: 1

  • pageSizeint

    Số job mỗi trang. Mặc định 10, tối đa 100. Gửi limit cũng được, cùng nghĩa.

  • typestring

    Lọc theo loại job (mô tả ở bảng Loại job bên dưới)

    Giá trị có thể:AgentJobRenderVideo

  • statusstring

    Lọc theo trạng thái

    Giá trị có thể:pendingprocessingcompleteerror

  • blueprintstring

    Lọc theo blueprint slug

Response

data.items là danh sách job, kèm total, page và limit (số job mỗi trang). Mỗi phần tử đọc như GET /jobs/{jobId} — có cả creditCost, resultData và failureKind khi job hỏng — trừ params luôn là null trong danh sách: xem bằng GET /jobs/{jobId}. resultData.thumbnailUrl là ảnh thu nhỏ của job, khi có.

Loại job

LoạiMô tả
AgentJobGPT Image (POST /images/generations)
RenderVideoRender tùy chỉnh từ scenes
GET/jobs
curl "https://api.sangtao.ai/v2/jobs?page=1&pageSize=10&status=complete" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": {
    "items": [
      {
        "jobId": "acff47cbfacf4e27bbc08770c9ea246d",
        "type": "AgentJob",
        "typeDisplayName": "Agent Job",
        "category": "agent",
        "status": "complete",
        "step": null,
        "progress": 100,
        "error": null,
        "failureKind": null,
        "resultUrl": "https://cdn.sangtao.ai/agent-jobs/acff47cb.../fa3c91.png",
        "resultImages": [
          "https://cdn.sangtao.ai/agent-jobs/acff47cb.../fa3c91.png"
        ],
        "resultData": {
          "resultUrl": "https://cdn.sangtao.ai/agent-jobs/acff47cb.../fa3c91.png",
          "imageUrls": [
            "https://cdn.sangtao.ai/agent-jobs/acff47cb.../fa3c91.png"
          ],
          "width": 1024,
          "height": 1024,
          "durationMs": 13100
        },
        "thumbnailUrl": null,
        "prompt": "A vintage travel poster of Ha Long Bay at sunset",
        "params": null,
        "creditCost": 0,
        "elapsedSeconds": 13.1,
        "createdAt": "2026-09-19T09:42:59Z",
        "processingAt": "2026-09-19T09:43:17Z",
        "completedAt": "2026-09-19T09:43:30Z",
        "retryCount": 0,
        "hasDownloadableAssets": true,
        "title": null,
        "queuePosition": null,
        "etaSeconds": null,
        "etaCompleteSeconds": null
      }
    ],
    "total": 42,
    "page": 1,
    "limit": 10
  }
}