Grammarly Cost Tuning
Pricing
Grammarly API pricing is enterprise/custom. Contact Grammarly for volume pricing.
Cost Optimization
Cache Results
Same text produces same scores — cache aggressively to avoid duplicate API calls.
Validate Before Calling
function shouldScore(text: string): boolean {
const words = text.split(/\s+/).length;
if (words < 30) return false; // API will reject
if (words > 50000) return false; // Too expensive, chunk first
return true;
}
Sample-Based Scoring
// For bulk content, score a sample instead of everything
function selectSample(documents: string[], sampleRate = 0.2): string[] {
return documents.filter(() => Math.random() < sampleRate);
}
Track Usage
let apiCalls = { score: 0, ai: 0, plagiarism: 0 };
// Increment on each call, report daily
Resources
Next Steps
For architecture, see grammarly-reference-architecture.