AIOX Server API Documentation
Complete guide to using the AIOX Server API
Getting Started
The AIOX Server API provides access to advanced AI capabilities through simple REST endpoints.
Base URL
https://app.aioxsuite.com/sandbox3/wp-json/aiox-server/v1/
Authentication
All API requests require authentication using your API key in the request headers:
X-API-Key: YOUR_API_KEY_HERE
Endpoints
POST /generate
Generate AI responses using the Gemini model.
Request Body
{
"prompt": "Your prompt here",
"max_tokens": 1000,
"temperature": 0.7
}
Response
{
"success": true,
"data": {
"response": "Generated AI response",
"tokens_used": 150,
"cost": 0.003
}
}
GET /usage
Get your current usage statistics.
Response
{
"success": true,
"data": {
"requests_this_month": 245,
"tokens_used": 12500,
"total_cost": 2.45,
"remaining_requests": 755
}
}
Code Examples
cURL
curl -X POST "https://app.aioxsuite.com/sandbox3/wp-json/aiox-server/v1/generate" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "Hello, world!"}'
JavaScript
const response = await fetch('https://app.aioxsuite.com/sandbox3/wp-json/aiox-server/v1/generate', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
prompt: 'Hello, world!'
})
});
const data = await response.json();
console.log(data);
Python
import requests
url = "https://app.aioxsuite.com/sandbox3/wp-json/aiox-server/v1/generate"
headers = {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
}
data = {
"prompt": "Hello, world!"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
Rate Limits
API requests are subject to rate limits based on your subscription plan:
- Free Plan: 10 requests per minute, 1,000 per month
- Basic Plan: 30 requests per minute, 10,000 per month
- Pro Plan: 100 requests per minute, 100,000 per month
Error Handling
The API returns standard HTTP status codes and error messages:
{
"success": false,
"error": {
"code": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded. Please try again later."
}
}