API Documentation
Complete API reference for tentackle.io
Multi-Model AI Platform
Run prompts across 25+ AI models simultaneously. Compare results, track performance, and optimize your AI strategy with our comprehensive API.
Getting Started
Our API allows you to integrate tentackle.io's multi-model AI capabilities into your applications. You can run prompts across multiple AI models, track usage, and manage your AI strategy programmatically.
Base URL
https://tentackle.io/api
Quick Start
- Get your API key from the API Keys section in your dashboard
- Include the API key in your request headers:
Authorization: Bearer YOUR_API_KEY - Start making requests to our endpoints
Authentication
All API requests require authentication using API keys. You can generate and manage API keys from your dashboard.
API Key vs JWT Token
We support both persistent API keys (recommended) and temporary JWT tokens. API keys don't expire and are easier to manage for long-term integrations.
Creating API Keys
To create an API key:
- Go to your API Keys dashboard
- Click "Create API Key"
- Enter a name and optional description
- Copy the generated key (it's only shown once!)
Using API Keys
Include your API key in the Authorization header:
Authorization: Bearer tt_your_api_key_here
POST /api/token 200
Issue a temporary JWT token for authentication (alternative to API keys).
Request Body:
{
"email": "user@example.com",
"password": "your_password"
}
Response:
{
"success": true,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"expires_at": "2024-12-31T23:59:59Z"
}
Prompts & AI Models
Execute prompts across multiple AI models and compare results in real-time.
POST /api/prompt/execute 200
Execute a prompt across multiple AI models simultaneously.
Request Body:
{
"prompt": "Write a professional email to a client about project delays",
"models": [
"gpt-4",
"claude-3-sonnet",
"gemini-pro"
],
"temperature": 0.7,
"max_tokens": 1000
}
Response:
{
"success": true,
"results": [
{
"model": "gpt-4",
"response": "Subject: Project Update - Brief Delay in Timeline...",
"tokens_used": 245,
"response_time": 1.2
},
{
"model": "claude-3-sonnet",
"response": "Dear [Client Name],\n\nI hope this email finds you well...",
"tokens_used": 198,
"response_time": 0.8
}
],
"total_tokens": 443,
"execution_time": 1.5
}
GET /api/prompts/history 200
Retrieve your prompt execution history.
Query Parameters:
limit- Number of results to return (default: 50)offset- Number of results to skip (default: 0)model- Filter by specific AI model
POST /api/prompt/create 200
Create a new prompt request for background processing.
Request Body:
{
"prompt": "Analyze this data and provide insights",
"models": ["gpt-4", "claude-3-sonnet"],
"priority": "high",
"callback_url": "https://tentackle.io/webhook"
}
Usage & Analytics
Track your API usage, monitor performance, and analyze AI model effectiveness.
GET /api/usage-stats 200
Get detailed usage statistics and analytics.
Response:
{
"success": true,
"usage": {
"current_usage": {
"prompts_used": 1250,
"tokens_used": 45000,
"requests_this_month": 1250
},
"limits": {
"prompts_per_month": 5000,
"tokens_per_month": 100000
},
"model_breakdown": {
"gpt-4": 450,
"claude-3-sonnet": 380,
"gemini-pro": 420
},
"cost_breakdown": {
"total_cost": 45.50,
"by_model": {
"gpt-4": 25.00,
"claude-3-sonnet": 12.50,
"gemini-pro": 8.00
}
}
}
}
Billing & Checkout
Manage subscriptions and billing through our Stripe-integrated API.
GET /api/checkout/price-ids 200
Get available pricing plans and their Stripe price IDs.
Response:
{
"success": true,
"plans": {
"starter": {
"monthly": "price_starter_monthly",
"yearly": "price_starter_yearly"
},
"pro": {
"monthly": "price_pro_monthly",
"yearly": "price_pro_yearly"
},
"enterprise": {
"monthly": "price_enterprise_monthly",
"yearly": "price_enterprise_yearly"
}
}
}
POST /api/checkout/create 200
Create a Stripe checkout session for subscription.
Request Body:
{
"plan": "pro",
"interval": "monthly"
}
Response:
{
"success": true,
"url": "https://checkout.stripe.com/pay/cs_test_..."
}
Webhooks
Set up webhooks to receive real-time notifications about events in your account.
GET /api/v1/webhooks 200
List all configured webhooks for your account.
POST /api/v1/webhooks 200
Create a new webhook endpoint.
Request Body:
{
"url": "https://tentackle.io/webhooks/tentackle",
"events": [
"prompt.completed",
"usage.limit_reached",
"billing.subscription_updated"
],
"description": "Main webhook for prompt notifications"
}
Available Events
prompt.completed- When a prompt execution finishesusage.limit_reached- When you hit your usage limitsbilling.subscription_updated- When subscription changesapi_key.created- When a new API key is generated
Rate Limits
API requests are rate limited to ensure fair usage and system stability.
Current Rate Limits
- Free Tier: 100 requests per hour
- Pro Tier: 1,000 requests per hour
- Enterprise: 10,000 requests per hour
Rate limit headers are included in all responses:
X-RateLimit-Limit: 1000 X-RateLimit-Remaining: 999 X-RateLimit-Reset: 1640995200
Error Handling
Our API uses standard HTTP status codes and returns detailed error information.
Error Response Format
{
"success": false,
"error": "Error message",
"code": "ERROR_CODE",
"details": {
"field": "Additional error details"
}
}
Common Error Codes
401- Unauthorized (invalid or missing API key)403- Forbidden (usage limit exceeded)404- Not Found (invalid endpoint)429- Too Many Requests (rate limit exceeded)500- Internal Server Error
SDKs & Examples
We provide SDKs for popular programming languages to make integration easier.
JavaScript/Node.js
const tentackle = require('@tentackle/sdk');
const client = new tentackle.Client({
apiKey: 'your-api-key'
});
const result = await client.prompts.execute({
prompt: 'Write a blog post about AI',
models: ['gpt-4', 'claude-3-sonnet']
});
Python
import tentackle
client = tentackle.Client(
api_key='your-api-key'
)
result = client.prompts.execute(
prompt='Write a blog post about AI',
models=['gpt-4', 'claude-3-sonnet']
)
cURL Example
curl -X POST "https://tentackle.io/api/prompt/execute" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Write a professional email",
"models": ["gpt-4", "claude-3-sonnet"]
}'