HTTP/HTTPS API
Connect to any HTTP API endpoint with full control over request/response handling.
Configuration
| Field | Required | Description |
|---|---|---|
| Application Name | Yes | Unique identifier (e.g., my-http-app) |
| API Endpoint URL | Yes | Full URL to the API endpoint |
| HTTP Method | No | POST (default) or GET |
| HTTP Headers | No | Custom headers as key-value pairs |
| Request Body | Yes | JSON template with placeholders |
| Response Parser Path | Yes | JSONPath to extract the response |
Available Placeholders
Use these placeholders in your request body:
| Placeholder | Description | Example |
|---|---|---|
{{messages}} | Full conversation as OpenAI-format array | [{"role": "user", "content": "Hello"}] |
{{prompt}} | Formatted conversation as string | "User: Hello\n\nAssistant: Hi!" |
Response Parser Syntax
Extract the AI response using dot notation and array indexing:
| Parser Path | Use Case |
|---|---|
choices[0].message.content | OpenAI-style responses |
response.text | Simple nested object |
data[0].output | Array response |
content | Top-level field |
result.candidates[0].text | Nested array |
Example Configurations
OpenAI-Style API
Endpoint: https://api.example.com/v1/chat/completions
Headers:
| Key | Value |
|---|---|
Content-Type | application/json |
Authorization | Bearer YOUR_API_KEY |
Request Body:
{
"model": "gpt-3.5-turbo",
"messages": {{messages}},
"temperature": 0.7
}
Response Parser Path:
choices[0].message.content
Simple Text API
Endpoint: https://api.example.com/generate
Headers:
| Key | Value |
|---|---|
X-API-Key | YOUR_API_KEY |
Request Body:
{
"text": "{{prompt}}",
"max_length": 100
}
Response Parser Path:
generated_text
Custom Inference Server
Endpoint: https://my-server.com/inference
Headers:
| Key | Value |
|---|---|
Content-Type | application/json |
Request Body:
{
"inputs": "{{prompt}}",
"parameters": {
"max_new_tokens": 512,
"temperature": 0.8
}
}
Response Parser Path:
output
Troubleshooting
| Issue | Solution |
|---|---|
| Empty response | Verify the Response Parser Path matches your API's response structure |
| 401 Unauthorized | Check API key in headers |
| 400 Bad Request | Validate JSON structure in Request Body |
| Timeout | Ensure endpoint is reachable and responding |
Setup Steps
- Navigate to AI Applications → New Application
- Select Custom Applications tab
- Click HTTP/HTTPS API
- Enter your Application Name
- Enter your API Endpoint URL
- Select HTTP Method (POST or GET)
- Add HTTP Headers (e.g., Authorization, Content-Type)
- Enter your Request Body template with placeholders
- Enter your Response Parser Path
- Click Test Response to verify (optional)
- Review and submit