Skip to content

Get Task Details ​

This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.

Endpoint ​

GET /jobs/recordInfo

Full URL: https://ai.modelfold.online/v1/jobs/recordInfo

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Query the status and results of any task created in the Market models. This is a unified query interface that works with all models under the Market category.

Supported Models ​

Works for every task created via POST /api/v1/jobs/createTask. Chat models are synchronous and have no task to query.

Task States ​

  • waiting: Task is queued and waiting to be processed
  • queuing: Task is in the processing queue
  • generating: Task is currently being processed
  • success: Task completed successfully
  • fail: Task failed

Best Practices ​

  • Use callbacks for production: Include callBackUrl when creating tasks to avoid polling
  • Implement exponential backoff: Start with 2-3 second intervals, increase gradually
  • Long-running tasks: Some video tasks take longer than 10 minutes. Keep polling until state is success or fail.
  • Download results: Generated files are kept for 14 days.

Errors ​

Errors are returned with HTTP 200; check code. Common values: 401 invalid or missing API key; 422 taskId is missing, or the task does not exist or does not belong to your account.

Request Parameters ​

Path / Query / Header ​

ParameterTypeRequiredDescription
query.taskIdanyYesThe unique task identifier returned when you created the task. In: query

Response ​

200 — Request successful ​

参数类型必填说明
dataobject否The task data object containing all task information
  data.taskIdstring否The unique identifier for this task 示例:task_12345678。
  data.modelstring否The model used for this task (e.g., grok-imagine/text-to-image, seedream-4.0, kling-1.0) 示例:bytedance/seedance-2-5。
  data.statestring否Current state of the task. Check state to determine the outcome. 可选值:waiting / queuing / generating / success / fail。 示例:success。
  data.paramstring否JSON string containing the original request parameters used to create the task. Its input is itself a JSON string — parse it twice. 示例:{"model":"grok-imagine/text-to-image","callBackUrl":"https://your-domain.com/api/callback","input":"{\"prompt\":\"Cinematic portrait...\",\"aspect_ratio\":\"3:2\"}"}。
  data.resultJsonstring否Result JSON string. Present when state is success; on failure it may be null or an empty string.
The structure is as follows:
- For images/media/videos: {resultUrls: []}
- If return_last_frame is enabled on Seedance 2.x models: {resultUrls: [], lastFrameUrl: []}
- For text output: {resultObject: {}}
For OmniHuman series models:
- OmniHuman 1.5 Subject Detection (subject detection model): response structure is {resultObject: {mask_urls: ["url1", "url2", ...]}}, returning a list of mask image URLs corresponding to the detected subjects. The URLs returned by this model are valid for 1 hour.
- OmniHuman 1.5 Human Identification (human identification model): response structure is {resultObject: {subject_status: 1}}, where subject_status means 0 = no subject detected, 1 = subject detected, indicating whether a human subject is detected in the image. 示例:{"resultUrls":["https://example.com/generated-content.jpg"]}。
  data.responseobject否Parsed form of resultJson. Present only when state is success.
  data.failCodestring否Failure code (numeric string, e.g. "500"). Present when state is fail; on success it may be null or an empty string. 示例:``。
  data.failMsgstring否Failure reason. Present when state is fail; on success it may be null or an empty string. 示例:``。
  data.costTimeinteger否Processing time in seconds. Present for both successful and failed tasks. 示例:15。
  data.completeTimeinteger否Completion timestamp (Unix timestamp in milliseconds) 示例:1698765432000。
  data.createTimeinteger否Creation timestamp (Unix timestamp in milliseconds) 示例:1698765400000。
  data.creditsConsumednumber否Credit consumption details for this task, indicating the actual number of credits deducted during task execution.
json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_12345678",
    "model": "grok-imagine/text-to-image",
    "state": "success",
    "param": "{\"model\":\"grok-imagine/text-to-image\",\"callBackUrl\":\"https://your-domain.com/api/callback\",\"input\":\"{\\\"prompt\\\":\\\"Cinematic portrait...\\\",\\\"aspect_ratio\\\":\\\"3:2\\\"}\"}",
    "resultJson": "{\"resultUrls\":[\"https://example.com/generated-content.jpg\"]}",
    "failCode": "",
    "failMsg": "",
    "costTime": 15,
    "completeTime": 1698765432000,
    "createTime": 1698765400000,
    "updateTime": 1698765432000,
    "progress": 45,
    "creditsConsumed": 50
  }
}

401 — Unauthorized - Invalid or missing API key ​

json
{
  "code": 401,
  "msg": "Unauthorized"
}

422 — Validation error. ​

参数类型必填说明
codeinteger是—
msgstring是—
datanull是—
json
{
  "code": 422,
  "msg": "recordInfo is null",
  "data": null
}

429 — Rate Limited - Too many requests ​

json
{
  "code": 429,
  "msg": "Rate limit exceeded"
}

500 — Server error. ​

参数类型必填说明
codeinteger是Response status code
- 200: Success - Request has been processed successfully
- 401: Unauthorized - Authentication credentials are missing or invalid
- 402: Insufficient Credits - Account does not have enough credits to perform the operation
- 404: Not Found - The requested resource or endpoint does not exist
- 408: Timeout - No result has been returned for over 10 minutes.
- 422: Validation Error - The request parameters failed validation checks
- 429: Rate Limited - Request limit has been exceeded for this resource
- 455: Service Unavailable - System is currently undergoing maintenance
- 500: Server Error - An unexpected error occurred while processing the request
- 501: Generation Failed - Content generation task failed
- 505: Feature Disabled - The requested feature is currently disabled
msgstring是Response message, error description when failed
dataobject是—
json
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}

ModelFold — one API for all the best AI models.