Get Tool
curl --request GET \
--url https://api.fish.audio/v1/agent/tools/{tool_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fish.audio/v1/agent/tools/{tool_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fish.audio/v1/agent/tools/{tool_id}', 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.fish.audio/v1/agent/tools/{tool_id}",
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.fish.audio/v1/agent/tools/{tool_id}"
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.fish.audio/v1/agent/tools/{tool_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/tools/{tool_id}")
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{
"tool_id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"tool_type": "webhook",
"method": "GET",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_type": "<string>",
"timeout_seconds": 123,
"error_handling": "passthrough",
"description": "",
"used_by": 0,
"arguments": [
{
"name": "<string>",
"description": ""
}
],
"body_template": "",
"headers": [
{
"name": "<string>",
"kind": "custom",
"value": "<string>",
"has_secret": false
}
],
"mock_responses": [
{
"name": "",
"status_code": 200,
"content_type": "application/json",
"body": ""
}
],
"expects_response": true,
"execution_mode": "blocking"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Tools
Get Tool
Fetch one tool’s full definition.
GET
/
v1
/
agent
/
tools
/
{tool_id}
Get Tool
curl --request GET \
--url https://api.fish.audio/v1/agent/tools/{tool_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.fish.audio/v1/agent/tools/{tool_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.fish.audio/v1/agent/tools/{tool_id}', 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.fish.audio/v1/agent/tools/{tool_id}",
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.fish.audio/v1/agent/tools/{tool_id}"
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.fish.audio/v1/agent/tools/{tool_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.fish.audio/v1/agent/tools/{tool_id}")
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{
"tool_id": "<string>",
"workspace_id": "<string>",
"name": "<string>",
"tool_type": "webhook",
"method": "GET",
"url": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"content_type": "<string>",
"timeout_seconds": 123,
"error_handling": "passthrough",
"description": "",
"used_by": 0,
"arguments": [
{
"name": "<string>",
"description": ""
}
],
"body_template": "",
"headers": [
{
"name": "<string>",
"kind": "custom",
"value": "<string>",
"has_secret": false
}
],
"mock_responses": [
{
"name": "",
"status_code": 200,
"content_type": "application/json",
"body": ""
}
],
"expects_response": true,
"execution_mode": "blocking"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}{
"status": 123,
"message": "<string>",
"reason": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Request fulfilled, document follows
Available options:
webhook, client Available options:
GET, POST, PUT, PATCH, DELETE Available options:
passthrough, hide How many agents reference this tool in their draft configuration.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Available options:
blocking, fire_and_forget, background Was this page helpful?

