Back to Home
API Documentation
Overview
TextForge provides 28 text transformation utilities through a simple HTTP API. All transformations are stateless and can be called individually or chained together in pipelines.
Base URL: https://textforge.co
Authentication
Free tier (1,000 requests/day) requires no authentication. For higher limits, include your API key in the header:
X-API-Key: your_api_key_hereQuick Start Examples
cURL
curl -X POST https://textforge.co/v1/run \
-H "Content-Type: application/json" \
-d '{"input":"Hello World!","pipeline":["slugify","reverse"]}'Python
import requests
payload = {
"input": "Hello World!",
"pipeline": ["slugify", "reverse"]
}
response = requests.post("https://textforge.co/v1/run", json=payload)
print(response.json())JavaScript
fetch("https://textforge.co/v1/run", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
input: "Hello World!",
pipeline: ["slugify", "reverse"]
})
})
.then(r => r.json())
.then(console.log);PHP
<?php
$payload = json_encode([
"input" => "Hello World!",
"pipeline" => ["slugify", "reverse"]
]);
$ch = curl_init("https://textforge.co/v1/run");
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
$response = curl_exec($ch);
echo $response;
?>Available Transformations (28)
slugifycamelcasesnakecasekebabcasepascalcaseconstantcasesentencecasetitlecasereversecountwordsremovemultipleremovespecialextractemailsextracturlsextractnumberstruncateleetmorsebase64encodebase64decodehashrandompalindromecheckhtmlencodehtmldecodemarkdownplainunicodenormalizetrimtextRate Limits
Rate limits ensure fair usage and protect our infrastructure from abuse.
Free Tier
- 1,000 requests per day
- 60 requests per minute
- Burst limit: 10 concurrent requests
Pro Tier
- 50,000 requests per day
- 1,000 requests per minute
- Burst limit: 50 concurrent requests
Response Format
All endpoints return JSON responses:
{
"success": true,
"input": "Hello World!",
"pipeline": ["slugify", "reverse"],
"result": "dlrow-olleh",
"steps": [
{ "step": 1, "action": "slugify", "result": "hello-world" },
{ "step": 2, "action": "reverse", "result": "dlrow-olleh" }
],
"execution_time_ms": 4
}Error Handling
Errors return appropriate HTTP status codes with descriptive messages:
400 Bad Request: Invalid input or operations
401 Unauthorized: Invalid or expired API key
429 Too Many Requests: Rate limit exceeded
500 Internal Server Error: Server error
Support
Need help? Contact us at odderonlab@protonmail.com