import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/tools/{tool_id}/run/"
payload = {
"query": "What are the key findings about revenue growth?",
"top_k": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{}
]{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}Tools
Run a tool
Execute a configured tool with provided parameters.
The request body varies based on the tool type. Call
getToolParameters first to discover
the exact parameter schema for a given tool — most retrieval tools
accept query and top_k, but other tool types (e.g.
document_retrieval) expect different fields.
POST
/
projects
/
{project_id}
/
tools
/
{tool_id}
/
run
/
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/tools/{tool_id}/run/"
payload = {
"query": "What are the key findings about revenue growth?",
"top_k": 10
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)[
{}
]{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}{
"error": "Authentication credentials were not provided."
}{
"error": "You do not have permission to perform this action."
}{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}{
"error_type": "syntax_error",
"error_code": "INVALID_QUERY",
"status": "error",
"message": "Invalid query syntax"
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer
Path Parameters
UUID of the project
UUID of the tool
Body
application/json
Request body for running a tool. Parameters vary by tool type.
Most tools accept a query parameter and optional top_k for result count.
Response
Tool execution successful