Get Task Details
curl --request GET \
--url https://whollyapi.com/api/v1/jobs/recordInfo \
--header 'Authorization: Bearer <token>'import requests
url = "https://whollyapi.com/api/v1/jobs/recordInfo"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://whollyapi.com/api/v1/jobs/recordInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://whollyapi.com/api/v1/jobs/recordInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://whollyapi.com/api/v1/jobs/recordInfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://whollyapi.com/api/v1/jobs/recordInfo")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://whollyapi.com/api/v1/jobs/recordInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {},
"taskId": "<string>",
"model": "<string>",
"state": "<string>",
"param": "<string>",
"resultJson": "<string>",
"failCode": "<string>",
"failMsg": "<string>",
"costTime": 123,
"completeTime": 123,
"createTime": 123,
"updateTime": 123,
"progress": 123,
"creditsConsumed": 123
}Documentation
Get Task Details
Query the status and results of any task created in the Market models.
GET
/
api
/
v1
/
jobs
/
recordInfo
Get Task Details
curl --request GET \
--url https://whollyapi.com/api/v1/jobs/recordInfo \
--header 'Authorization: Bearer <token>'import requests
url = "https://whollyapi.com/api/v1/jobs/recordInfo"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://whollyapi.com/api/v1/jobs/recordInfo', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://whollyapi.com/api/v1/jobs/recordInfo",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://whollyapi.com/api/v1/jobs/recordInfo"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://whollyapi.com/api/v1/jobs/recordInfo")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://whollyapi.com/api/v1/jobs/recordInfo")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"code": 123,
"msg": "<string>",
"data": {},
"taskId": "<string>",
"model": "<string>",
"state": "<string>",
"param": "<string>",
"resultJson": "<string>",
"failCode": "<string>",
"failMsg": "<string>",
"costTime": 123,
"completeTime": 123,
"createTime": 123,
"updateTime": 123,
"progress": 123,
"creditsConsumed": 123
}Query the status and results of any task created in the whollyapi models.
This is a unified query interface that works with all models under the image to video category.
Supported Models
This endpoint works with all Image-to-Video models in the Market, including:- Seedance:
Seedance-2.0,Seedance-1.5-Pro, and related image to video models - Grok Imagine: image-to-video
- Kling: image-to-video models
Task States
| State | Description |
|---|---|
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
- Download results immediately: Generated content URLs typically expire after 24 hours.
Query Parameters
string
required
The unique task identifier returned when you created the task.Example:
task_12345678Authentication
All API requests require a Bearer Token. Add your API key to the request:Authorization: Bearer YOUR_API_KEY
Response
A successful request returns a200 response containing the task status, task metadata, generated results, timing information, and credit consumption details.
Response schema
integer
Response status code.Allowed values:
| Code | Description |
|---|---|
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 |
422 | Validation Error — The request parameters failed validation checks |
429 | Rate Limited — Request limit has been exceeded for this resource |
433 | Request Limit — Sub-key usage exceeds limit |
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 |
string
Response message. Contains the error description when the request fails.Example:
successobject
required
The task data object containing all task information.
Task data
string
required
The unique identifier for this task.Example:
task_12345678string
The model used for this task.
string
Current state of the task.Allowed values:
waitingqueuinggeneratingsuccessfail
successstring
A JSON string containing the original request parameters used to create the task.
string
A JSON string containing the generated result. This field is only available when the task state is
success.string
Error code if the task failed. Returns an empty string if the task succeeds.
string
Error message if the task failed. Returns an empty string if the task succeeds.
integer
Processing time in milliseconds. Available when the task is successful.Example:
15000integer
Completion timestamp as a Unix timestamp in milliseconds.Example:
1698765432000integer
Creation timestamp as a Unix timestamp in milliseconds.Example:
1698765400000integer
Update timestamp as a Unix timestamp in milliseconds.Example:
1698765432000integer
Generation progress from
0 to 100.This field is only returned when the model is sora2 or sora2 pro.Example: 45number
The actual number of credits deducted during task execution.
Result formats
The structure ofdata.resultJson depends on the output type and model.
media, and videos
For videos,resultJson has the following structure:
{
"resultUrls": [
"https://example.com/generated-video.mp4"
]
}
Seedance 2 and Seedance 2 Fast
Whenreturn_last_frame is enabled:
{
"resultUrls": [],
"firstFrameUrl": [],
"lastFrameUrl": []
}
Text output
For text output:{
"resultObject": {}
}
URLs returned by the subject detection model are valid for 1 hour.
Example response
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_12345678",
"model": "grok-imagine/image-to-video",
"state": "success",
"param": "{\"model\":\"grok-imagine/image-to-video\"}",
"resultJson": "{\"resultUrls\":[\"https://example.com/generated-video.mp4\"]}",
"failCode": "",
"failMsg": "",
"costTime": 15000,
"completeTime": 1698765432000,
"createTime": 1698765400000,
"updateTime": 1698765432000,
"progress": 100,
"creditsConsumed": 10
}
}
HTTP error responses
400 — Bad Request
400 — Bad Request
The request could not be processed due to invalid input.
401 — Unauthorized
401 — Unauthorized
Authentication credentials are missing or invalid.
404 — Not Found
404 — Not Found
The requested resource or endpoint does not exist.
422 — Validation Error
422 — Validation Error
The request parameters failed validation checks.
429 — Rate Limited
429 — Rate Limited
The request limit has been exceeded for this resource.
500 — Server Error
500 — Server Error
An unexpected error occurred while processing the request.
