API Documentation
Integrate AI-powered code debugging into your own tools. Available on Pro & Expand plans.
Your API Key
Login to see your API key
Overview
The API lets you submit code for AI analysis and get structured fixes, explanations, and optimizations.
Base URL
https://www.aitenzo.com/api
Authentication
Pass your API key as a Bearer token in every request:
Authorization: Bearer abf_your_api_key_here
Or use ?token=YOUR_KEY as a query parameter (less secure, for testing only).
Error Handling
All errors return JSON with success: false and a message field.
| HTTP Code | Meaning |
200 | Success |
400 | Bad request — check parameters |
401 | Unauthorized — invalid or missing API key |
402 | No credits remaining |
429 | Rate limit exceeded |
500 | AI processing error |
POST/auth.php?action=loginGet a JWT token
| Field | Type | Required | Description |
email | string | required | Account email |
password | string | required | Account password |
Response
{ "success": true, "token": "eyJ...", "user": { "credits": 45 } }
GET/auth.php?action=meGet current user profile
Returns the authenticated user's plan, credits, and API key.
{ "success": true, "user": { "name": "John", "plan": "Pro", "credits": 45, "api_key": "abf_..." } }
POST/fix.php?action=fix⭐ Submit code for AI analysis
The core endpoint. Submits code for AI analysis. Consumes 1 credit per request.
| Field | Type | Required | Description |
code | string | required | Code to analyze (max 50,000 chars) |
language | string | optional | auto, php, javascript, python… Default: auto |
mode | string | optional | full, fix, explain, optimize. Default: full |
Response
{
"success": true,
"request_id": 187,
"fixed_code": "... corrected code ...",
"explanation": "This function queries...",
"bugs_found": [{"line": 5, "description": "SQL Injection", "severity": "critical"}],
"suggestions": ["Use prepared statements"],
"severity_score": 9,
"confidence": 97,
"tokens_used": 823,
"credits_left": 44,
"from_cache": false
}
Live Tester
GET/fix.php?action=history
| Param | Type | Default | Description |
page | int | 1 | Page number |
limit | int | 10 | Results per page (max 50) |
language | string | – | Filter by language |
mode | string | – | Filter by mode |
search | string | – | Search code content |
Supported Languages
php
javascript
typescript
python
html
css
java
go
ruby
cpp
sql
bash
Rate Limits
| Plan | Monthly | Per 60 seconds |
| Free | 5 | 5 requests |
| Pro | 200 | 200 requests |
| Expand | 1000 | 1000 requests |
Code Examples
JavaScript / Node.js
const res = await fetch('https://www.aitenzo.com/api/fix.php?action=fix', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_KEY' },
body: JSON.stringify({ code: 'your code', language: 'php', mode: 'full' })
});
const data = await res.json();
console.log(data.fixed_code, data.bugs_found);
PHP (cURL)
$ch = curl_init('https://www.aitenzo.com/api/fix.php?action=fix');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true, CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode(['code' => $code, 'language' => 'php', 'mode' => 'full']),
CURLOPT_HTTPHEADER => ['Content-Type: application/json', 'Authorization: Bearer YOUR_KEY'],
]);
$data = json_decode(curl_exec($ch), true);
echo $data['fixed_code'];
Python
import requests
r = requests.post('https://www.aitenzo.com/api/fix.php?action=fix',
headers={'Authorization': 'Bearer YOUR_KEY'},
json={'code': code, 'language': 'python', 'mode': 'full'})
print(r.json()['fixed_code'])