Public API
Cancel an active run
POST
/
api
/
public
/
v1
/
runs
/
{runId}
/
cancel
Cancel an active run
curl --request POST \
--url https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel', 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.vyomflow.co.in/api/public/v1/runs/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.vyomflow.co.in/api/public/v1/runs/{runId}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"chatId": "<string>",
"status": "queued",
"userMessageId": "<string>",
"assistantMessageId": "<string>",
"lastStreamIndex": 123,
"cancelRequestedAt": "<string>",
"requestedModel": "<string>",
"resolvedModel": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"toolInvocations": [
{
"id": "<string>",
"agentRunId": "<string>",
"turnIndex": 1,
"callIndex": 1,
"toolCallId": "<string>",
"name": "<string>",
"nodeType": "<string>",
"input": {},
"status": "DISPATCHING",
"creditEstimate": 1,
"creditUsed": 1,
"resultUrls": [
"<string>"
],
"errorCode": "<string>",
"errorMessage": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"durationMs": 1,
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"totalCreditsUsed": 1,
"pendingWaitpoint": {
"id": "<string>",
"agentRunId": "<string>",
"kind": "CREDIT_APPROVAL",
"status": "PENDING",
"requestPayload": {
"toolName": "<string>",
"estimatedCredits": 1,
"threshold": 1
},
"resolvedPayload": {
"approved": true,
"respondedAt": "<string>"
},
"expiresAt": "<string>",
"resolvedAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
Clerk-native API key, Authorization: Bearer <key>. Minted at https://www.vyomflow.co.in/settings/api-keys, scoped per operation. 401 = missing/invalid/revoked key; 403 = valid key missing the required scope.
Path Parameters
Minimum string length:
1Response
Run cancelled.
Available options:
queued, running, waiting, completed, failed, cancelled Show child attributes
Show child attributes
Required range:
x >= 0- Option 1
- Option 2
Show child attributes
Show child attributes
⌘I
Cancel an active run
curl --request POST \
--url https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel', 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.vyomflow.co.in/api/public/v1/runs/{runId}/cancel",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.vyomflow.co.in/api/public/v1/runs/{runId}/cancel"
req, _ := http.NewRequest("POST", 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.post("https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vyomflow.co.in/api/public/v1/runs/{runId}/cancel")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"chatId": "<string>",
"status": "queued",
"userMessageId": "<string>",
"assistantMessageId": "<string>",
"lastStreamIndex": 123,
"cancelRequestedAt": "<string>",
"requestedModel": "<string>",
"resolvedModel": "<string>",
"errorCode": "<string>",
"errorMessage": "<string>",
"createdAt": "<string>",
"updatedAt": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"toolInvocations": [
{
"id": "<string>",
"agentRunId": "<string>",
"turnIndex": 1,
"callIndex": 1,
"toolCallId": "<string>",
"name": "<string>",
"nodeType": "<string>",
"input": {},
"status": "DISPATCHING",
"creditEstimate": 1,
"creditUsed": 1,
"resultUrls": [
"<string>"
],
"errorCode": "<string>",
"errorMessage": "<string>",
"startedAt": "<string>",
"finishedAt": "<string>",
"durationMs": 1,
"createdAt": "<string>",
"updatedAt": "<string>"
}
],
"totalCreditsUsed": 1,
"pendingWaitpoint": {
"id": "<string>",
"agentRunId": "<string>",
"kind": "CREDIT_APPROVAL",
"status": "PENDING",
"requestPayload": {
"toolName": "<string>",
"estimatedCredits": 1,
"threshold": 1
},
"resolvedPayload": {
"approved": true,
"respondedAt": "<string>"
},
"expiresAt": "<string>",
"resolvedAt": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}