Call Tool
curl --request POST \
--url https://api.danubeai.com/v1/tools/call/{tool_id} \
--header 'Content-Type: application/json' \
--header 'danube-api-key: <api-key>' \
--data '
{
"tool_input": {
"limit": 5
}
}
'import requests
url = "https://api.danubeai.com/v1/tools/call/{tool_id}"
payload = { "tool_input": { "limit": 5 } }
headers = {
"danube-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'danube-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_input: {limit: 5}})
};
fetch('https://api.danubeai.com/v1/tools/call/{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.danubeai.com/v1/tools/call/{tool_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tool_input' => [
'limit' => 5
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"danube-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.danubeai.com/v1/tools/call/{tool_id}"
payload := strings.NewReader("{\n \"tool_input\": {\n \"limit\": 5\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("danube-api-key", "<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.danubeai.com/v1/tools/call/{tool_id}")
.header("danube-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tool_input\": {\n \"limit\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.danubeai.com/v1/tools/call/{tool_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["danube-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_input\": {\n \"limit\": 5\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": {
"message": "<string>",
"usage": {},
"upgrade_url": "<string>"
}
}Tools
Call Tool
Execute a tool with the provided input parameters
POST
/
tools
/
call
/
{tool_id}
Call Tool
curl --request POST \
--url https://api.danubeai.com/v1/tools/call/{tool_id} \
--header 'Content-Type: application/json' \
--header 'danube-api-key: <api-key>' \
--data '
{
"tool_input": {
"limit": 5
}
}
'import requests
url = "https://api.danubeai.com/v1/tools/call/{tool_id}"
payload = { "tool_input": { "limit": 5 } }
headers = {
"danube-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'danube-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({tool_input: {limit: 5}})
};
fetch('https://api.danubeai.com/v1/tools/call/{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.danubeai.com/v1/tools/call/{tool_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tool_input' => [
'limit' => 5
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"danube-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.danubeai.com/v1/tools/call/{tool_id}"
payload := strings.NewReader("{\n \"tool_input\": {\n \"limit\": 5\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("danube-api-key", "<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.danubeai.com/v1/tools/call/{tool_id}")
.header("danube-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tool_input\": {\n \"limit\": 5\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.danubeai.com/v1/tools/call/{tool_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["danube-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tool_input\": {\n \"limit\": 5\n }\n}"
response = http.request(request)
puts response.read_body{}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": {
"message": "<string>",
"usage": {},
"upgrade_url": "<string>"
}
}Execute a tool with the provided input parameters. The tool’s response format varies depending on the specific tool being called.
Example
curl -X POST "https://api.danubeai.com/v1/tools/call/abc123" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"tool_input": {"limit": 5}}'
Authorizations
Your Danube API key
Path Parameters
The unique identifier of the tool to execute
Body
application/json
Tool input parameters
Input parameters for the tool (can also pass parameters directly at root level)
Response
Tool execution result
Tool execution result - structure varies by tool
⌘I
