curl --request POST \
--url https://api.acedata.cloud/openai/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "retrieve",
"id": "task-id"
}
'import requests
url = "https://api.acedata.cloud/openai/tasks"
payload = {
"action": "retrieve",
"id": "task-id"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'retrieve', id: 'task-id'})
};
fetch('https://api.acedata.cloud/openai/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "42b2ab0f-5676-453b-bd23-9ee001b888ae",
"_id": "65ede215550a4144a5fcebac",
"type": "images",
"trace_id": "b0a683a4-aecc-450d-849e-c9f0730826a2",
"api_id": "8f01fe72-8a3e-4872-8d8d-330cde179b3a",
"application_id": "e2ee38ba-19ea-4da9-9f3f-4f8567d19feb",
"credential_id": null,
"user_id": null,
"request": {
"model": "gpt-image-1",
"prompt": "a cute corgi astronaut on Mars",
"size": "1024x1024",
"n": 1
},
"response": {
"success": true,
"task_id": "42b2ab0f-5676-453b-bd23-9ee001b888ae",
"trace_id": "b0a683a4-aecc-450d-849e-c9f0730826a2",
"created": 1761432000,
"data": [
{
"url": "https://platform.cdn.acedata.cloud/gpt-image/cb104e35-af1f-45be-9fac-b62e2b256753_0.png",
"revised_prompt": "A cute corgi astronaut on Mars."
}
]
},
"created_at": 1761432000.063,
"started_at": 1761432000.069,
"finished_at": 1761432015.098,
"elapsed": 15.029
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}Tasks
Query tasks created by /v1/images/generations or /v1/images/edits with callback_url.
curl --request POST \
--url https://api.acedata.cloud/openai/tasks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"action": "retrieve",
"id": "task-id"
}
'import requests
url = "https://api.acedata.cloud/openai/tasks"
payload = {
"action": "retrieve",
"id": "task-id"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({action: 'retrieve', id: 'task-id'})
};
fetch('https://api.acedata.cloud/openai/tasks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "42b2ab0f-5676-453b-bd23-9ee001b888ae",
"_id": "65ede215550a4144a5fcebac",
"type": "images",
"trace_id": "b0a683a4-aecc-450d-849e-c9f0730826a2",
"api_id": "8f01fe72-8a3e-4872-8d8d-330cde179b3a",
"application_id": "e2ee38ba-19ea-4da9-9f3f-4f8567d19feb",
"credential_id": null,
"user_id": null,
"request": {
"model": "gpt-image-1",
"prompt": "a cute corgi astronaut on Mars",
"size": "1024x1024",
"n": 1
},
"response": {
"success": true,
"task_id": "42b2ab0f-5676-453b-bd23-9ee001b888ae",
"trace_id": "b0a683a4-aecc-450d-849e-c9f0730826a2",
"created": 1761432000,
"data": [
{
"url": "https://platform.cdn.acedata.cloud/gpt-image/cb104e35-af1f-45be-9fac-b62e2b256753_0.png",
"revised_prompt": "A cute corgi astronaut on Mars."
}
]
},
"created_at": 1761432000.063,
"started_at": 1761432000.069,
"finished_at": 1761432015.098,
"elapsed": 15.029
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}授權
API token from https://platform.acedata.cloud
標頭
Openai Tasks Param Accept
application/json 主體
Openai Tasks Action
retrieve, retrieve_batch Openai Tasks Id
Openai Tasks Trace Id
Openai Tasks Ids
Openai Tasks Trace Ids
Openai Tasks Application Id
Openai Tasks User Id
Openai Tasks Type
images, images_generations, images_edits Openai Tasks Offset
Openai Tasks Limit
Openai Tasks Created At Min
Openai Tasks Created At Max
Openai Tasks Count Mode
none, exact 回應
Openai Tasks Response 200
- Option 1
- Option 2
- Option 3
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Id.F0C4D04Ac901
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Type.2377365D580B
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Trace Id.294E865Afe7D
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Openaitaskrequestpayload.5B2983943843
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Created At.7Eb1Ea25D63F
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Openaitaskresultpayload.6A35F882Aa4E
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Started At.7B96764Eca42
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Finished At.Af98E2F04Efa
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Elapsed.438Ff25Abacb
x >= 0Openapi.8Ff29E12B8144484Ab50D39773A7A563.User Id.3444939Bec0F
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Actor User Id.2952Ff9B7F38
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Api Id.45Cf1B2E805B
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Application Id.3Fbf90Fcc98C
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Credential Id.7E41Bc205Fd2
Openapi.8Ff29E12B8144484Ab50D39773A7A563.Authorization Id.271938Ba5A22

