🌐 API Tool
The API Tool lets you connect your AI agent to external APIs, enabling it to fetch, update, and interact with real-time data. It provides a Postman-like interface for configuring parameter routing, authentication, and execution behavior—ensuring the LLM operates on clear, structured API definitions.
How It Works
Unlike traditional prompt-based approaches, the API Tool relies on a deterministic schema—eliminating guesswork and ensuring reliable API execution.
- Define the endpoint — Set the URL, HTTP method, and timeout
- Map inputs — Specify headers, path params, query params, or body fields
- Configure authentication — Choose between Bearer, Basic, or API Key
- Execute via AI — The model executes API calls using this structured definition
Internally, your visual setup is transformed into a structured JSON schema, enabling the agent to execute API calls reliably and without guesswork.
This approach prevents:
- Missing or malformed parameters
- Incorrect authentication handling
- Hallucinated request structures
How to Use the API Tool
To add an API endpoint, you need to define the underlying structure. The builder uses a typed schema for reliability. Each field you define directly maps to the schema used by the agent at runtime.
- Title: A unique name for the API endpoint within your agent.
- Description: Briefly describe the purpose of the endpoint, so the AI knows when and why to use it.
- URL: The full URL of the API endpoint.
- Method: The HTTP method (GET, POST, PUT, DELETE, PATCH).
- Timeout: Set an explicit timeout in seconds (default is 30) for long-running operations.
Parameters & Routing
You can declare explicitly where variables should go—eliminating common AI routing mistakes:
- Headers: Array of key/value pairs for custom static headers.
- Path Parameters (
params): Variables injected directly into the URL path. - Query Parameters (
query): Variables appended to the URL (e.g.,?search=term). - Body (
body): JSON payload keys (primitive typed string/number etc.) for POST, PUT, or PATCH.
Authentication
The API builder provides natively managed authentication directly on the endpoint:
- None: No auth required.
- Bearer: Supply a token which is automatically attached as an
Authorization: Bearer <token>header. - Basic: Supply a
usernameandpassword, which are Base64 encoded by the builder into theAuthorizationheader. - API Key: Supply a key and value, and explicitly configure whether it should be appended to the
headeror thequery.
Supported HTTP Methods
- GET
- POST
- PUT
- DELETE
- PATCH
Example Configurations
Each example below represents the exact schema used by the agent at runtime, showing how the visual builder translates configurations into executable API requests.
1. Basic POST with Formulated Body Structure
Example: HTTPBin Echo Tool
{
"title": "HTTPBin Echo Tool",
"description": "A sandbox to test arbitrary POST requests. Echoes everything back perfectly.",
"method": "post",
"url": "https://httpbin.org/anything",
"headers": [],
"params": [],
"query": [],
"body": [
{
"type": "string",
"key": "message",
"description": "Any message to echo",
"defaultValue": "",
"required": true
},
{
"type": "number",
"key": "retryCount",
"description": "Numerical setting just for testing",
"defaultValue": "",
"required": false
}
],
"auth": { "type": "none" },
"timeout": 30
}2. Basic Auth Setup
Example: HTTPBin Basic Auth
{
"title": "HTTPBin Basic Auth",
"description": "Tests Basic HTTP Authentication. Will return successfully if the Agent triggers it appropriately.",
"method": "get",
"url": "https://httpbin.org/basic-auth/admin/123456",
"headers": [],
"params": [],
"query": [],
"body": [],
"auth": { "type": "basic", "username": "admin", "password": "123456" },
"timeout": 30
}3. CRM / Lead Creation (Bearer Auth)
Example: Create Lead in CRM
{
"title": "Create Lead",
"description": "Create a new lead in CRM. Use this when a user expresses interest or submits contact information.",
"method": "post",
"url": "https://api.example-crm.com/leads",
"headers": [],
"params": [],
"query": [],
"body": [
{
"type": "string",
"key": "name",
"description": "Full name of the lead",
"defaultValue": "",
"required": true
},
{
"type": "string",
"key": "email",
"description": "Email address of the lead",
"defaultValue": "",
"required": true
}
],
"auth": { "type": "bearer", "token": "YOUR_ACCESS_TOKEN" },
"timeout": 30
}4. API Key Injection in Query
Example: OpenWeatherMap Simulator
{
"title": "OpenWeatherMap Simulator",
"description": "Fetch weather data using an API key passed in Query Parameters.",
"method": "get",
"url": "https://api.openweathermap.org/data/2.5/weather",
"headers": [],
"params": [],
"query": [
{
"key": "q",
"example": "London",
"description": "City name",
"defaultValue": "",
"required": true
}
],
"body": [],
"auth": {
"type": "api-key",
"key": "appid",
"value": "YOUR_API_KEY_FROM_OPEN_WEATHER_MAP",
"addTo": "query"
},
"timeout": 30
}5. Custom Headers & API Key Authentication (Header API Key)
Example: Google Places Search Simulator
{
"title": "Google Places Search Simulator",
"description": "Searches for places using Google Places API (New). Tests Header API-key auth and static header injection.",
"method": "post",
"url": "https://places.googleapis.com/v1/places:searchText",
"headers": [
{
"key": "X-Goog-FieldMask",
"value": "places.displayName,places.formattedAddress"
}
],
"params": [],
"query": [],
"body": [
{
"type": "string",
"key": "textQuery",
"description": "The text string to search for",
"defaultValue": "",
"required": true
}
],
"auth": {
"type": "api-key",
"key": "X-Goog-Api-Key",
"value": "YOUR_GOOGLE_PLACES_API_KEY",
"addTo": "header"
},
"timeout": 30
}Warning: Mutation calls (POST, PUT, PATCH, DELETE) should be used with caution. Jhunkoo.ai provides no guarantee of data integrity, idempotency, or rollback for such operations. Use them only if you understand the risks and have appropriate safeguards in your API.
Security Warning: Jhunkoo.ai does not encrypt or store API keys, passwords, or other credentials in a secure vault. Any credentials provided to the API Tool are handled as plain configuration data. Generative AI models are inherently non-deterministic and may, in rare cases, reproduce portions of input data or system context. As such, sensitive information should never be included in prompts, request bodies, or any AI-accessible fields. You are solely responsible for managing and securing your credentials. Jhunkoo.ai assumes no liability for any exposure, leakage, or misuse of credentials resulting from their use within the platform.
If you have questions or need help, please contact [email protected].