查询任务状态
curl --request GET \
--url https://api.evolink.ai/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evolink.ai/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evolink.ai/v1/tasks/{task_id}', 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://api.evolink.ai/v1/tasks/{task_id}",
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://api.evolink.ai/v1/tasks/{task_id}"
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://api.evolink.ai/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/tasks/{task_id}")
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{
"created": 1756817821,
"id": "task-unified-1756817821-4x3rx6ny",
"model": "gemini-3.1-flash-image-preview",
"object": "image.generation.task",
"progress": 100,
"results": [
"http://example.com/image.jpg"
],
"status": "completed",
"error": {
"code": "content_policy_violation",
"message": "Content policy violation.\nYour request was blocked by safety filters.",
"type": "task_error"
},
"task_info": {
"can_cancel": false
},
"type": "image"
}{
"error": {
"code": "invalid_task_id",
"message": "Invalid task ID format, must start with 'task-unified-'",
"type": "invalid_request_error",
"param": "task_id"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required",
"type": "authentication_error"
}
}{
"error": {
"code": "quota_exceeded",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "permission_denied",
"message": "You don't have permission to access this task",
"type": "invalid_request_error"
}
}{
"error": {
"code": "task_not_found",
"message": "The requested task could not be found",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"type": "evo_api_error"
}
}{
"error": {
"code": "internal_error",
"message": "Failed to retrieve task status",
"type": "api_error"
}
}任务管理
查询任务状态
根据任务ID查询异步任务的状态、进度和结果信息
GET
/
v1
/
tasks
/
{task_id}
查询任务状态
curl --request GET \
--url https://api.evolink.ai/v1/tasks/{task_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.evolink.ai/v1/tasks/{task_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.evolink.ai/v1/tasks/{task_id}', 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://api.evolink.ai/v1/tasks/{task_id}",
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://api.evolink.ai/v1/tasks/{task_id}"
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://api.evolink.ai/v1/tasks/{task_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.evolink.ai/v1/tasks/{task_id}")
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{
"created": 1756817821,
"id": "task-unified-1756817821-4x3rx6ny",
"model": "gemini-3.1-flash-image-preview",
"object": "image.generation.task",
"progress": 100,
"results": [
"http://example.com/image.jpg"
],
"status": "completed",
"error": {
"code": "content_policy_violation",
"message": "Content policy violation.\nYour request was blocked by safety filters.",
"type": "task_error"
},
"task_info": {
"can_cancel": false
},
"type": "image"
}{
"error": {
"code": "invalid_task_id",
"message": "Invalid task ID format, must start with 'task-unified-'",
"type": "invalid_request_error",
"param": "task_id"
}
}{
"error": {
"code": "unauthorized",
"message": "Authentication required",
"type": "authentication_error"
}
}{
"error": {
"code": "quota_exceeded",
"message": "Insufficient quota. Please top up your account.",
"type": "insufficient_quota"
}
}{
"error": {
"code": "permission_denied",
"message": "You don't have permission to access this task",
"type": "invalid_request_error"
}
}{
"error": {
"code": "task_not_found",
"message": "The requested task could not be found",
"type": "invalid_request_error"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded",
"type": "evo_api_error"
}
}{
"error": {
"code": "internal_error",
"message": "Failed to retrieve task status",
"type": "api_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key :
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
路径参数
任务ID,查询时请忽略{},在路径尾部拼接异步任务响应体的id
响应
任务状态详情
任务创建时间戳
示例:
1756817821
任务ID
示例:
"task-unified-1756817821-4x3rx6ny"
使用的模型
示例:
"gemini-3.1-flash-image-preview"
任务类型
可用选项:
image.generation.task, video.generation.task, audio.generation.task 示例:
"image.generation.task"
任务进度百分比
必填范围:
0 <= x <= 100示例:
100
任务结果列表(完成时提供)
示例:
["http://example.com/image.jpg"]
任务状态
可用选项:
pending, processing, completed, failed 示例:
"completed"
任务失败时的错误信息(仅当 status 为 failed 时出现)。注意:此处的 error.code 为字符串类型的业务错误码,与 HTTP 状态码不同。完整错误码列表请参阅错误码参考文档。
Show child attributes
Show child attributes
任务详细信息
Show child attributes
Show child attributes
任务类型
可用选项:
image, video, audio, text 示例:
"image"
⌘I