HTTP API (Generic)
Flexible HTTP tool with configurable auth, scopes, templates, and safety limits
The HTTP API (Generic) tool lets an assistant call external HTTP APIs directly.
It is intended for controlled API integrations when no dedicated connector exists.
Methods
The tool exposes three methods with different risk levels:
generic_http_request_read(read)generic_http_request_write(write)generic_http_request_dangerous(dangerous)
This classification drives method permissions in assistant and admin settings.
Assistant Configuration
Connection
baseUrl: API base URL (for examplehttps://api.example.com)authMode:none | bearer | apiKey | basicauthHeaderName: auth header name (default:Authorization)authSecret: secret used for auth (stored encrypted)
Scope & Security
allowedMethods: allowed HTTP methods (for example onlyGET,POST)allowedHostPatterns: allowed hosts (for exampleapi.example.com,*.example.com)allowedPathPrefixes: allowed path prefixes (for example/v1,/api)blockedPathPrefixes: explicitly blocked path prefixes (for example/admin)
Request Control
defaultHeaders(JSON): static headers always sentrequestTemplates(JSON): predefined request templatestimeoutMs: request timeoutmaxResponseBytes: hard response size limitmaxResponseChars: max response characters returned to the model
Request Templates
Templates are useful for clean, reusable, and safer request definitions.
Example:
[
{
"name": "listUsers",
"method": "GET",
"path": "/v1/users"
},
{
"name": "createTicket",
"method": "POST",
"path": "/v1/tickets",
"headers": {
"Content-Type": "application/json"
},
"body": {
"title": "Example"
}
}
]A tool call can set templateName and optionally override values (query, headers, bodyJson).
Security Behavior
The tool enforces these guardrails:
- Only
http/httpsURLs - Blocks private/internal hosts (for example
localhost, private IP ranges) - Enforces host allowlist and path policies from settings
- Enforces allowed methods from
allowedMethods - Enforces response size and response length limits
Typical Setup
- Configure API access with
baseUrl+ auth - Define host/path scopes
- Add important endpoints as
requestTemplates - Restrict method permissions to
read/write/dangerous
Notes
- For production setups, always define
allowedHostPatternsandallowedPathPrefixes. - Use templates for critical endpoints instead of fully free-form requests.
- There is currently no dedicated connection-test button for this tool.