Get Tool Run Status
curl --request GET \
--url https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}', 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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}",
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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}"
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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}")
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{
"status": "RUNNING",
"outputs": [
{
"title": "<string>",
"text": "<string>",
"files": [
{
"uid": "<string>",
"url": "<string>"
}
]
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"title": "<string>",
"severity": "error",
"message": "<string>"
}Tools
Get Tool Run Status
This endpoint returns the status of the specified tool run. If the run is completed, it also returns the outputs of the run.
The status of the run can be one of:
RUNNING: The run is still in progress.COMPLETED: The run has completed successfully.FAILED: The run has failed.
The outputs are specified as a list of dictionaries each containing the title of the output block, the output text, and any files.
GET
/
v1beta2
/
tool
/
run-status
/
{tool_run_uid}
Get Tool Run Status
curl --request GET \
--url https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}', 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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}",
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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}"
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.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hunch.tools/v1beta2/tool/run-status/{tool_run_uid}")
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{
"status": "RUNNING",
"outputs": [
{
"title": "<string>",
"text": "<string>",
"files": [
{
"uid": "<string>",
"url": "<string>"
}
]
}
]
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}{
"title": "<string>",
"severity": "error",
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.