Loading...
Loading...
We're building a powerful text conversion API. Want early access?
Integrate text case conversion into your applications with our simple REST API
99.9% uptime with sub-100ms response times
API key authentication and rate limiting
Distributed servers for low latency worldwide
RESTful API with JSON responses
The API is currently in development. Express your interest to be notified when we launch!
Express Interest# Convert text to camelCasecurl -X POST https://api.text-case.com/v1/convert \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "text": "hello world", "format": "camelCase" }'
{
"success": true,
"data": {
"input": "hello world",
"output": "helloWorld",
"format": "camelCase"
},
"meta": {
"timestamp": "2024-12-15T10:30:00Z",
"credits_used": 1,
"credits_remaining": 999
}
}/v1/convertConvert text to the specified case format.
| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The text to convert (max 10,000 characters) |
| format | string | Yes | Target format (see supported formats below) |
/v1/batchConvert multiple texts in a single request.
{
"items": [
{ "text": "hello world", "format": "camelCase" },
{ "text": "API Request", "format": "snake_case" },
{ "text": "user profile", "format": "kebab-case" }
]
}/v1/formatsGet a list of all supported case formats.
uppercaselowercasetitleCasesentenceCasecamelCasePascalCasesnake_casekebab-caseCONSTANT_CASEdot.casepath/caseTrain-CaseCOBOL-CASEaLtErNaTiNgiNVERSECapitalize Words...and 19 more formats including Unicode styles
All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEYconst response = await fetch('https://api.text-case.com/v1/convert', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'hello world',
format: 'camelCase'
})
});
const data = await response.json();
console.log(data.data.output); // "helloWorld"import requests
response = requests.post(
'https://api.text-case.com/v1/convert',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
json={
'text': 'hello world',
'format': 'snake_case'
}
)
data = response.json()
print(data['data']['output']) # "hello_world"$ch = curl_init('https://api.text-case.com/v1/convert');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer YOUR_API_KEY',
'Content-Type: application/json'
]);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'text' => 'hello world',
'format' => 'PascalCase'
]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$data = json_decode($response, true);
echo $data['data']['output']; // "HelloWorld"The API uses standard HTTP status codes and returns error details in JSON format:
400 Bad RequestInvalid request parameters401 UnauthorizedMissing or invalid API key429 Too Many RequestsRate limit exceeded500 Internal Server ErrorServer error (rare, we'll fix it!){
"success": false,
"error": {
"code": "INVALID_FORMAT",
"message": "Format 'invalidCase' is not supported",
"details": "See /v1/formats for supported formats"
}
}Get Started