Comprehensive API documentation for integrating with AllAI's unified AI platform.
Secure API access with JWT tokens
/api/v1/auth/loginUser login
/api/v1/auth/registerUser registration
/api/v1/auth/refreshRefresh JWT token
/api/v1/auth/logoutUser logout
Interact with multiple AI models
/api/v1/chat/sendSend message to AI
/api/v1/chat/historyGet chat history
/api/v1/chat/clearClear chat history
/api/v1/chat/streamStream AI response
Access to premium AI services
/api/v1/ai/openaiOpenAI (ChatGPT-4, DALL-E)
/api/v1/ai/anthropicAnthropic (Claude-3)
/api/v1/ai/geminiGoogle Gemini Pro
/api/v1/ai/grokxAI Grok
/api/v1/ai/perplexityPerplexity AI
/api/v1/ai/deepseekDeepSeek Coder
User profile and subscription management
/api/v1/user/profileGet user profile
/api/v1/user/profileUpdate user profile
/api/v1/user/subscriptionGet subscription status
/api/v1/user/usageGet usage statistics
Manage subscription and billing
/api/v1/subscription/createCreate subscription
/api/v1/subscription/updateUpdate subscription
/api/v1/subscription/cancelCancel subscription
/api/v1/subscription/invoicesGet invoices
const response = await fetch('/api/v1/ai/openai', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_JWT_TOKEN'
},
body: JSON.stringify({
model: 'gpt-4',
message: 'Hello, how can you help me today?',
temperature: 0.7,
max_tokens: 1000
})
});
const data = await response.json();
console.log(data.response);import requests
response = requests.post(
'https://api.allai.co.in/api/v1/chat/stream',
headers={
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json'
},
json={
'model': 'claude-3-sonnet',
'message': 'Explain quantum computing',
'stream': True
},
stream=True
)
for line in response.iter_lines():
if line:
data = json.loads(line.decode('utf-8'))
print(data.get('content', ''), end='')curl -X GET "https://api.allai.co.in/api/v1/user/profile" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"All API responses include rate limit headers: X-RateLimit-Limit,X-RateLimit-Remaining, andX-RateLimit-Reset.
Sign up for an account and generate your API key from the dashboard.
Select from our range of premium AI models based on your needs.
Get started with our API in just a few minutes. We've provided examples in multiple programming languages.
We're here to help you succeed with our API. Contact our support team for assistance.