Prices automatically adjust based on your region (EUR for Europe, USD for others)
per month
per month
per month
To use the Text Perfector API, you need to obtain an API key by subscribing to a plan.
X-API-Key headerhttps://textperfector.com/api/v1
All API requests must include your API key in the header:
X-API-Key: tp_your_api_key_here
/detect-region
Automatically detect the user's region and currency.
{
"success": true,
"data": {
"region": "Europe",
"country": "France",
"currency": "EUR",
"symbol": "€"
}
}
/plans
Get all available plans with pricing for your region.
{
"success": true,
"data": {
"plans": [
{
"id": 1,
"name": "Free",
"slug": "free",
"price": 0,
"currency": "EUR",
"requests_per_month": 50,
"rate_limit_per_minute": 10
}
],
"region": { "currency": "EUR", "symbol": "€" }
}
}
/correct
Send text to be corrected with AI-powered grammar and spelling correction.
X-API-Key: tp_your_api_key_here
Content-Type: application/json
{
"text": "Your text to be corrected",
"language": "en", // Optional: auto-detected if not provided
"correction_level": "standard" // basic, standard, or advanced
}
{
"success": true,
"data": {
"original_text": "Your text to be corrected",
"corrected_text": "Your corrected text.",
"language_detected": "en",
"correction_level": "standard",
"changes_count": 1
}
}
/translate
Translate text between languages (Standard and Premium plans only).
X-API-Key: tp_your_api_key_here
Content-Type: application/json
{
"text": "Hello, how are you?",
"target_language": "fr", // Target language code
"source_language": "en" // Optional: auto-detected if not provided
}
{
"success": true,
"data": {
"original_text": "Hello, how are you?",
"translated_text": "Bonjour, comment allez-vous ?",
"source_language": "en",
"target_language": "fr"
}
}
/usage
Get your current API usage statistics and subscription details.
X-API-Key: tp_your_api_key_here
{
"success": true,
"data": {
"subscription": {
"plan": "standard",
"status": "active",
"requests_used": 234,
"requests_limit": 5000,
"remaining_requests": 4766,
"usage_percentage": 4.68,
"current_period_start": "2025-12-01",
"current_period_end": "2025-12-31"
}
}
}
# Get available plans
curl https://textperfector.com/api/v1/plans
# Correct text
curl -X POST https://textperfector.com/api/v1/correct \
-H "Content-Type: application/json" \
-H "X-API-Key: tp_your_api_key" \
-d '{
"text": "Your text to be corrected",
"language": "en",
"correction_level": "standard"
}'
# Translate text
curl -X POST https://textperfector.com/api/v1/translate \
-H "Content-Type: application/json" \
-H "X-API-Key: tp_your_api_key" \
-d '{
"text": "Hello world",
"target_language": "fr"
}'
# Check usage
curl https://textperfector.com/api/v1/usage \
-H "X-API-Key: tp_your_api_key"
import requests
API_KEY = 'tp_your_api_key'
BASE_URL = 'https://textperfector.com/api/v1'
class TextPerfectorAPI:
def __init__(self, api_key):
self.api_key = api_key
self.headers = {
'X-API-Key': api_key,
'Content-Type': 'application/json'
}
def correct_text(self, text, language='en', correction_level='standard'):
response = requests.post(
f'{BASE_URL}/correct',
headers=self.headers,
json={
'text': text,
'language': language,
'correction_level': correction_level
}
)
return response.json()
def translate_text(self, text, target_language, source_language=None):
response = requests.post(
f'{BASE_URL}/translate',
headers=self.headers,
json={
'text': text,
'target_language': target_language,
'source_language': source_language
}
)
return response.json()
def get_usage(self):
response = requests.get(
f'{BASE_URL}/usage',
headers=self.headers
)
return response.json()
# Example usage
api = TextPerfectorAPI(API_KEY)
# Correct text
result = api.correct_text("Text to be corrected")
if result['success']:
print(result['data']['corrected_text'])
# Check usage
usage = api.get_usage()
print(f"Used: {usage['data']['subscription']['requests_used']} / {usage['data']['subscription']['requests_limit']}")
const API_KEY = 'tp_your_api_key';
const BASE_URL = 'https://textperfector.com/api/v1';
class TextPerfectorAPI {
constructor(apiKey) {
this.apiKey = apiKey;
this.headers = {
'X-API-Key': apiKey,
'Content-Type': 'application/json'
};
}
async correctText(text, language = 'en', correctionLevel = 'standard') {
const response = await fetch(`${BASE_URL}/correct`, {
method: 'POST',
headers: this.headers,
body: JSON.stringify({
text,
language,
correction_level: correctionLevel
})
});
return response.json();
}
async translateText(text, targetLanguage, sourceLanguage = null) {
const response = await fetch(`${BASE_URL}/translate`, {
method: 'POST',
headers: this.headers,
body: JSON.stringify({
text,
target_language: targetLanguage,
source_language: sourceLanguage
})
});
return response.json();
}
async getUsage() {
const response = await fetch(`${BASE_URL}/usage`, {
headers: this.headers
});
return response.json();
}
}
// Example usage
const api = new TextPerfectorAPI(API_KEY);
// Correct text
api.correctText("Text to be corrected")
.then(result => {
if (result.success) {
console.log(result.data.corrected_text);
}
})
.catch(error => console.error('Error:', error));
// Check usage
api.getUsage()
.then(usage => {
const sub = usage.data.subscription;
console.log(`Used: ${sub.requests_used} / ${sub.requests_limit}`);
});
| Plan | Monthly Requests | Requests per Minute | Max Text Length |
|---|---|---|---|
| Free | 50 | 10 | 5,000 characters |
| Standard | 10,000 | 30 | 10,000 characters |
| Premium | Unlimited | 60 | 50,000 characters |
If you need any help or have questions about the API, please contact us at [email protected]