AI Services/Image Generation
Image Task Status
Interface description: Query the execution status and results of asynchronous image tasks based on logId.
GET
/
api
/
ai
/
image
/
task
/
{logId}
Image Task Status
curl --request GET \
--url https://aitoearn.cn/api/ai/image/task/{logId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/ai/image/task/{logId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/ai/image/task/{logId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/ai/image/task/{logId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "Request succeeded",
"data": {
"logId": "string",
"status": "generating",
"startedAt": "2026-07-02T12:00:00.000Z",
"points": 1,
"request": {},
"createdAt": "2026-07-02T12:00:00.000Z",
"updatedAt": "2026-07-02T12:00:00.000Z",
"duration": 1,
"response": {},
"images": [
{
"url": "string",
"b64_json": "string",
"revised_prompt": "string"
}
],
"errorMessage": "string"
}
}
Authorizations
Need to get API Key from AiToEarn. Click to go to "API Key Obtaining Tutorial".
Path Parameters
Task log ID, returned by the asynchronous image generation and editing interface, used for task status or generation result query.
Response
200 - application/json
The request has been processed by the service. Business success is determined by whether the response body has code === 0.
Business status code. 0 means success; non-zero means a business error.
Response message.
Hide child attributes
Hide child attributes
Task log ID
Task status
Available options:
generating, success, failed start time
Consume Credits
Request parameters
creation time
Update time
duration (milliseconds)
response result
error message
Request ID.
Error response timestamp in Unix milliseconds.
Last modified on September 29, 2026
⌘I
Image Task Status
curl --request GET \
--url https://aitoearn.cn/api/ai/image/task/{logId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://aitoearn.cn/api/ai/image/task/{logId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://aitoearn.cn/api/ai/image/task/{logId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://aitoearn.cn/api/ai/image/task/{logId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": 0,
"message": "Request succeeded",
"data": {
"logId": "string",
"status": "generating",
"startedAt": "2026-07-02T12:00:00.000Z",
"points": 1,
"request": {},
"createdAt": "2026-07-02T12:00:00.000Z",
"updatedAt": "2026-07-02T12:00:00.000Z",
"duration": 1,
"response": {},
"images": [
{
"url": "string",
"b64_json": "string",
"revised_prompt": "string"
}
],
"errorMessage": "string"
}
}

