取消任务
curl --request POST \
--url https://api.maxapi.ai/ent/v2/tasks/{id}/cancel \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "vidu_task_123456789"
}
'import requests
url = "https://api.maxapi.ai/ent/v2/tasks/{id}/cancel"
payload = { "id": "vidu_task_123456789" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'vidu_task_123456789'})
};
fetch('https://api.maxapi.ai/ent/v2/tasks/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/ent/v2/tasks/{id}/cancel"
payload := strings.NewReader("{\n \"id\": \"vidu_task_123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/ent/v2/tasks/{id}/cancel")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"vidu_task_123456789\"\n}")
.asString();取消正在执行的任务
POST
https://api.maxapi.ai
/
ent
/
v2
/
tasks
/
{id}
/
cancel
取消任务
curl --request POST \
--url https://api.maxapi.ai/ent/v2/tasks/{id}/cancel \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "vidu_task_123456789"
}
'import requests
url = "https://api.maxapi.ai/ent/v2/tasks/{id}/cancel"
payload = { "id": "vidu_task_123456789" }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'vidu_task_123456789'})
};
fetch('https://api.maxapi.ai/ent/v2/tasks/{id}/cancel', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.maxapi.ai/ent/v2/tasks/{id}/cancel"
payload := strings.NewReader("{\n \"id\": \"vidu_task_123456789\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.maxapi.ai/ent/v2/tasks/{id}/cancel")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"vidu_task_123456789\"\n}")
.asString();