Code Plagiarism
Detection API
Build plagiarism detection into your apps. Check code against 20+ billion sources.
API Limits & Security
Understanding API usage limits, security measures, and best practices to ensure optimal performance and compliance with Codequiry's fair usage policies.
API Usage Limits
Codequiry implements intelligent rate limiting and usage quotas to ensure stable service for all users while preventing abuse.
Grow Plan Limits
120 checks, 50 submissions/check, 10MB/file, 60 req/min, Standard priority
Premium Plan Limits
Unlimited checks, 500 submissions/check, 10MB/file, 300 req/min, High priority
Security & Authentication
API Key Security
Best Practices:
- Store API keys in environment variables
- Never commit keys to version control
- Rotate keys regularly (monthly)
- Use different keys for dev/staging/prod
- Implement key rotation in CI/CD
Example Implementation:
# Environment variables
CODEQUIRY_API_KEY=your-production-key
CODEQUIRY_DEV_API_KEY=your-development-key
# .gitignore
.env
.env.local
*.key
Data Protection
Security Measures:
- HTTPS/TLS 1.3 - All API communication encrypted
- SOC 2 Infrastructure - Enterprise security standards
- GDPR Compliant - EU data protection
- Data Retention - Configurable retention policies
- Access Logging - Complete audit trails
Headers Required:
apikey: your-api-key-here
Accept: application/json
Content-Type: application/json
User-Agent: YourApp/1.0
Rate Limiting Details
Codequiry uses a token bucket algorithm with sliding windows to ensure fair access while allowing burst usage.
| Plan Type | Requests/Minute | Burst Limit | Concurrent Checks | Queue Priority |
|---|---|---|---|---|
| Grow | 60 | 100 | 2 | Standard |
| Basic | 120 | 200 | 5 | Standard |
| Premium | 300 | 500 | 10 | High |
| Enterprise | 1000 | 2000 | 25 | Highest |
Abuse Prevention
Automated systems monitor usage patterns to prevent abuse while maintaining service quality for legitimate users.
Usage Monitoring
Monitored Patterns:
- Abnormal request volumes
- Repeated failed requests
- Unusual upload patterns
- Resource-intensive operations
- Suspicious API key usage
Progressive Actions
Response Sequence:
- Warning - Email notification
- Throttling - Reduced rate limits
- Queue Priority - Lower processing priority
- Temporary Suspension - 24-48 hour cooldown
- Account Review - Manual investigation
Best Practices
Avoid Issues:
- Implement exponential backoff
- Cache results when possible
- Batch operations efficiently
- Monitor rate limit headers
- Use appropriate timeouts
Processing Time Guidelines
Understanding typical processing times helps with application design and user expectations.
| Check Size | File Count | Standard Queue | Priority Queue | Factors |
|---|---|---|---|---|
| Small | 1-10 files | 2-5 minutes | 1-3 minutes | File size, language complexity |
| Medium | 11-50 files | 5-15 minutes | 3-10 minutes | Peer comparisons, web search depth |
| Large | 51-200 files | 15-45 minutes | 10-30 minutes | Database size, analysis thoroughness |
| Enterprise | 200+ files | 45+ minutes | 30+ minutes | Custom processing, detailed analysis |
Implementation Guidelines
Error Handling
// Robust error handling
async function makeApiRequest(url, options) {
const maxRetries = 3;
let attempt = 0;
while (attempt < maxRetries) {
try {
const response = await fetch(url, options);
if (response.status === 429) {
// Rate limited - exponential backoff
const delay = Math.pow(2, attempt) * 1000;
await new Promise(resolve => setTimeout(resolve, delay));
attempt++;
continue;
}
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
return await response.json();
} catch (error) {
attempt++;
if (attempt === maxRetries) {
throw error;
}
// Linear backoff for other errors
await new Promise(resolve => setTimeout(resolve, 2000 * attempt));
}
}
}
Rate Limit Monitoring
# Monitor rate limits
class RateLimitMonitor:
def __init__(self):
self.remaining = None
self.reset_time = None
def update_from_headers(self, headers):
self.remaining = int(headers.get('X-RateLimit-Remaining', 0))
self.reset_time = int(headers.get('X-RateLimit-Reset', 0))
# Warn when approaching limit
if self.remaining < 10:
print(f"⚠️ Rate limit warning: {self.remaining} requests remaining")
# Pause if rate limited
if self.remaining <= 0:
wait_time = self.reset_time - time.time()
if wait_time > 0:
print(f"Rate limited. Waiting {wait_time:.0f} seconds...")
time.sleep(wait_time)
def should_throttle(self):
return self.remaining is not None and self.remaining < 5
Usage Analytics
Monitor your API usage and optimize performance with built-in analytics and recommendations.
Support & Resources
Technical Resources
- API Documentation - Complete reference
- Official SDKs - Language-specific libraries
- Changelog - Updates and improvements
- System Status - Service uptime
- GitHub Examples - Code samples
Support Channels
- Contact: Contact Support
- Response Time: 24-48 hours (24/7 for Enterprise)
- Discord Community: Join Discussion
- Issue Tracker: Report Bugs
- Feature Requests: Contact Form