Hyperleap REST API
Build custom AI workflows with our RESTful API. Create agents, manage conversations, upload knowledge, and integrate with your existing systems.
API Uptime
Avg Response Time
API Endpoints
Encryption Standard
Authentication
Hyperleap uses API keys to authenticate requests. Include your API key in the Authorization header of every request.
curl https://api.hyperleap.ai/v1/agents \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
# Response:
{
"data": [
{
"id": "agent_abc123",
"name": "Support Bot",
"model": "gemini-pro",
"status": "active",
"created_at": "2025-01-15T10:30:00Z"
}
],
"pagination": {
"total": 1,
"page": 1,
"per_page": 20
}
}API Endpoints
Complete reference for all available endpoints. Base URL: https://api.hyperleap.ai
Agents
/v1/agentsList all agents/v1/agentsCreate a new agent/v1/agents/{id}Get agent details/v1/agents/{id}Update an agent/v1/agents/{id}Delete an agentConversations
/v1/conversationsStart a new conversation/v1/conversations/{id}/messagesSend a message/v1/conversations/{id}Get conversation history/v1/conversationsList all conversationsKnowledge Sources
/v1/sourcesUpload a knowledge source/v1/sourcesList knowledge sources/v1/sources/{id}Get source details/v1/sources/{id}Delete a sourceWebhooks
/v1/webhooksCreate a webhook/v1/webhooksList webhooks/v1/webhooks/{id}Delete a webhook/v1/webhooks/{id}/testTest webhook deliveryAnalytics
/v1/analytics/conversationsConversation metrics/v1/analytics/agents/{id}Agent performance stats/v1/analytics/usageAPI usage statisticsRate Limits
Rate limits are applied per API key and vary by subscription tier. Monitor your usage via the X-RateLimit-* response headers.
| Plan Tier | Hourly Limit | Burst Limit |
|---|---|---|
| Free | 100/hour | 10/minute |
| Plus | 1,000/hour | 50/minute |
| Pro | 5,000/hour | 100/minute |
| Max | 20,000/hour | 500/minute |
| Enterprise | Custom | Custom |
Rate Limit Headers
Webhooks
Receive real-time notifications when events occur in your Hyperleap account. Perfect for triggering workflows, sending notifications, or logging activity.
Available Events
X-Hyperleap-Signature header for verification.// POST to your endpoint
{
"event": "conversation.message",
"timestamp": "2025-01-15T14:30:00Z",
"data": {
"conversation_id": "conv_xyz789",
"message_id": "msg_abc123",
"sender": "user",
"content": "What are your hours?",
"agent_id": "agent_def456",
"metadata": {
"channel": "whatsapp",
"phone": "+1234567890"
}
}
}
// Verify signature:
const signature = req.headers[
'x-hyperleap-signature'
];
const payload = req.body;
const secret = process.env.WEBHOOK_SECRET;
const computed = crypto
.createHmac('sha256', secret)
.update(JSON.stringify(payload))
.digest('hex');
if (computed === signature) {
// Verified! Process webhook
}Code Examples
Quick start examples in popular languages
const Hyperleap = require('@hyperleap/sdk');
const client = new Hyperleap({
apiKey: process.env.HYPERLEAP_API_KEY
});
// Create an agent
const agent = await client.agents.create({
name: 'Support Bot',
model: 'gemini-pro',
prompt: 'You are a helpful assistant',
sources: ['doc_abc123']
});
console.log('Agent created:', agent.id);from hyperleap import Hyperleap
client = Hyperleap(
api_key=os.environ.get("HYPERLEAP_API_KEY")
)
# Create an agent
agent = client.agents.create(
name="Support Bot",
model="gemini-pro",
prompt="You are a helpful assistant",
sources=["doc_abc123"]
)
print(f"Agent created: {agent.id}")curl https://api.hyperleap.ai/v1/agents \
-X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Bot",
"model": "gemini-pro",
"prompt": "You are a helpful assistant",
"sources": ["doc_abc123"]
}'package main
import (
"github.com/hyperleap/hyperleap-go"
)
func main() {
client := hyperleap.NewClient(
os.Getenv("HYPERLEAP_API_KEY"),
)
agent, _ := client.Agents.Create(&hyperleap.AgentCreateParams{
Name: "Support Bot",
Model: "gemini-pro",
Prompt: "You are a helpful assistant",
})
}Error Handling
Hyperleap uses conventional HTTP response codes and returns detailed error messages in JSON format.
Request succeeded
Invalid parameters or malformed request
Invalid or missing API key
Rate limit exceeded, retry after specified time
Something went wrong on our end
Need API Support?
Our engineering team is here to help you integrate with Hyperleap API.