Integrate AI-powered security scanning into your applications with our comprehensive REST API.
The AI Cybershield API allows you to integrate our AI-powered security scanning capabilities into your applications. Our REST API is designed to be simple, secure, and scalable.
https://ai-cs.tech/apiOur API supports two authentication methods: JWT tokens for user-based operations and API tokens for browser extension integration.
// User Authentication
const response = await fetch('/api/auth/login', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'user@example.com',
password: 'your-password'
})
});
const data = await response.json();
const token = data.token; // Use this token for authenticated requestsSome endpoints require email verification in addition to authentication. Make sure to verify your email before accessing these features.
/api/auth/signupCreate a new user account
/api/auth/loginAuthenticate user and get JWT token
/api/upload-filesUpload files for security analysis
/api/start-scanStart security scan on uploaded files
/api/scan-status/[scanId]Get status of a running scan
/api/scan-results/[scanId]Get results of completed scan
/api/requestsSubmit captured requests from browser extension
// File Upload for Scanning
const formData = new FormData();
formData.append('files', fileInput.files[0]);
const response = await fetch('/api/upload-files', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`
},
body: formData
});
const result = await response.json();// Start Security Scan
const response = await fetch('/api/start-scan', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
scanType: 'vulnerability',
target: 'uploaded-files'
})
});
const scanData = await response.json();
const scanId = scanData.scanId;// Check Scan Status
const response = await fetch(`/api/scan-status/${scanId}`, {
headers: {
'Authorization': `Bearer ${token}`
}
});
const status = await response.json();
console.log(status.state); // 'running', 'completed', 'failed'If you need assistance with the API or have questions about implementation, our support team is here to help.