POST
/
streaming
/
ai
/
tasks
/
{task_id}
/
cancel
Python
from gcore import Gcore

client = Gcore(
    api_key="My API Key",
)
response = client.streaming.ai_tasks.cancel(
    "task_id",
)
print(response.result)
{
  "result": "Task has been cancelled successfully."
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

task_id
string
required

ID of the task to be cancelled

Response

202
application/json

Accepted. AI-task has been cancelled successfully

The response is of type object.