AI Model Hub API
Slay your AI game with our developer-friendly API. Build, deploy, and scale AI models without the struggle.
Real-time Inference
Run models in milliseconds with our optimized inference pipeline
Flexible Hosting
Deploy models on our infrastructure or integrate with your own
Secure Access
Enterprise-grade security with role-based access controls
Detailed Analytics
Track usage, performance metrics, and costs in real-time
Rate Limits & Pricing
Authentication
Secure API access with API keys and tokens
Request Example
// Get your API key from the dashboard
const API_KEY = "your_api_key_here";
// Include it in your requests
fetch("https://api.aimodelhub.com/v1/models", {
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json"
}
})
Response Example
{
"status": "success",
"authenticated": true,
"user": {
"id": "usr_12345",
"plan": "pro",
"rate_limits": {
"requests_per_min": 60,
"requests_per_day": 10000
}
}
}
Endpoint Details
URL | https://api.aimodelhub.com/v1/auth |
Method | GET |
Rate Limit | 60 requests/minute |
Authentication | Required (API Key) |
Models
Browse, search, and get details about available models
Request Example
// List all available models
fetch("https://api.aimodelhub.com/v1/models", {
headers: {
"Authorization": "Bearer your_api_key_here"
}
})
// Get specific model details
fetch("https://api.aimodelhub.com/v1/models/model_123456", {
headers: {
"Authorization": "Bearer your_api_key_here"
}
})
Response Example
{
"models": [
{
"id": "model_123456",
"name": "VibeGPT-7B",
"type": "text-generation",
"creator": "aimodelhub",
"version": "1.0.0",
"description": "Slay your text generation needs with this lit model",
"parameters": "7B",
"created_at": "2023-09-15T12:00:00Z"
},
// More models...
],
"total": 42,
"page": 1,
"page_size": 10
}
Endpoint Details
URL | https://api.aimodelhub.com/v1/models |
Method | GET |
Rate Limit | 60 requests/minute |
Authentication | Required (API Key) |
Inference
Run models with your input data and get predictions
Request Example
// Text generation
fetch("https://api.aimodelhub.com/v1/inference/text", {
method: "POST",
headers: {
"Authorization": "Bearer your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
model: "VibeGPT-7B",
prompt: "Write a tweet about AI that would go viral:",
max_tokens: 100,
temperature: 0.7
})
})
Response Example
{
"id": "gen_789012",
"model": "VibeGPT-7B",
"created_at": "2023-10-05T15:32:10Z",
"result": "just watched my AI assistant roast my code review so hard the git repo caught fire 🔥 no notes, only emotional damage #AIRevolution #DevLife",
"usage": {
"prompt_tokens": 10,
"completion_tokens": 24,
"total_tokens": 34
}
}
Endpoint Details
URL | https://api.aimodelhub.com/v1/inference/text |
Method | POST |
Rate Limit | 30 requests/minute |
Authentication | Required (API Key) |
Upload
Upload and manage your custom models
Request Example
// Upload a new model (multipart form data)
const formData = new FormData();
formData.append("name", "MyCustomModel");
formData.append("description", "This model classifies vibes");
formData.append("model_file", modelFileBlob);
formData.append("type", "classification");
fetch("https://api.aimodelhub.com/v1/models/upload", {
method: "POST",
headers: {
"Authorization": "Bearer your_api_key_here"
},
body: formData
})
Response Example
{
"id": "model_abcdef",
"name": "MyCustomModel",
"status": "processing",
"upload_progress": 100,
"processing_progress": 0,
"estimated_completion": "2023-10-05T16:10:00Z",
"webhook_url": "https://your-webhook.com/model-ready"
}
Endpoint Details
URL | https://api.aimodelhub.com/v1/models/upload |
Method | POST |
Rate Limit | 60 requests/minute |
Authentication | Required (API Key) |
Webhooks
Set up notifications for model events
Request Example
// Register a new webhook
fetch("https://api.aimodelhub.com/v1/webhooks", {
method: "POST",
headers: {
"Authorization": "Bearer your_api_key_here",
"Content-Type": "application/json"
},
body: JSON.stringify({
"url": "https://your-webhook.com/model-events",
"events": ["model.ready", "model.failed", "inference.completed"],
"secret": "your_webhook_secret"
})
})
Response Example
{
"id": "webhook_54321",
"url": "https://your-webhook.com/model-events",
"events": ["model.ready", "model.failed", "inference.completed"],
"created_at": "2023-10-05T14:25:30Z",
"status": "active"
}
Endpoint Details
URL | https://api.aimodelhub.com/v1/webhooks |
Method | POST |
Rate Limit | 60 requests/minute |
Authentication | Required (API Key) |
Ready to build something fire?
Get your API key today and start building AI-powered experiences that'll make your users say "no cap frfr"