查询任务状态
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": 1788436500,
"duration": 30,
"id": "task-unified-1788436500-yscib7uw",
"model": "gemini-3-pro-image-preview",
"object": "image.generation.task",
"progress": 100,
"result_data": [
{
"url": "http://example.com/image.jpg"
}
],
"results": [
"http://example.com/image.jpg"
],
"status": "completed",
"task_info": {
"can_cancel": false
},
"type": "image",
"usage": {
"cost": {
"credits": 10,
"usd": 0.148,
"cny": 1
},
"credits_used": 10
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key (request id: 20260908103000123456789abcdef)",
"param": null,
"type": "authentication_error"
}
}{
"error": {
"code": "user_disabled",
"message": "Your account has been disabled (request id: 20260908103000123456789abcdef)",
"param": null,
"type": "invalid_request_error"
}
}{
"error": {
"message": "Task not found",
"type": "invalid_request_error",
"param": "",
"code": "task_not_found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "You have reached the request limit: max 60 requests per 1 minutes. Retry after 30 seconds. (request id: 20260908103000123456789abcdef)",
"param": null,
"retry_after": 30,
"retryable": true,
"type": "rate_limit_error"
}
}{
"error": {
"message": "Failed to get task status",
"type": "api_error",
"param": "",
"code": "internal_error"
}
}任务管理
查询任务状态
根据任务ID查询异步任务的状态、进度和结果信息
存储在 EvoLink 的生成结果文件保留 7 天。极少数情况下,生成结果会以官方原始链接交付,有效期可能短于 7 天,请及时下载保存。
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": 1788436500,
"duration": 30,
"id": "task-unified-1788436500-yscib7uw",
"model": "gemini-3-pro-image-preview",
"object": "image.generation.task",
"progress": 100,
"result_data": [
{
"url": "http://example.com/image.jpg"
}
],
"results": [
"http://example.com/image.jpg"
],
"status": "completed",
"task_info": {
"can_cancel": false
},
"type": "image",
"usage": {
"cost": {
"credits": 10,
"usd": 0.148,
"cny": 1
},
"credits_used": 10
}
}{
"error": {
"code": "unauthorized",
"message": "Invalid API key (request id: 20260908103000123456789abcdef)",
"param": null,
"type": "authentication_error"
}
}{
"error": {
"code": "user_disabled",
"message": "Your account has been disabled (request id: 20260908103000123456789abcdef)",
"param": null,
"type": "invalid_request_error"
}
}{
"error": {
"message": "Task not found",
"type": "invalid_request_error",
"param": "",
"code": "task_not_found"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "You have reached the request limit: max 60 requests per 1 minutes. Retry after 30 seconds. (request id: 20260908103000123456789abcdef)",
"param": null,
"retry_after": 30,
"retryable": true,
"type": "rate_limit_error"
}
}{
"error": {
"message": "Failed to get task status",
"type": "api_error",
"param": "",
"code": "internal_error"
}
}授权
##所有接口均需要使用Bearer Token进行认证##
获取 API Key :
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
响应
任务状态详情
Midjourney V7 variation / pan / outpaint: prompt 为可选。缺省、空字符串、纯空白或清理受控速度/版本参数后为空时,统一使用 Fast 并按 Fast 价格计费,包括 speed=turbo 的请求。有有效提示词时,speed 缺省或 fast 按 Fast 执行和计费,turbo 按 Turbo 执行,价格为 Fast 的 2 倍。Playground 仅提供 Fast。源任务必须属于当前用户且已完成;空提示词目前支持生图和已支持的变体、平移扩图、外绘结果。 历史任务保留其原执行速度和账务。
可用选项:
draft, fast, turbo