API Documentation
Complete guide to integrating Get TLDR's AI-powered summarization platform into your applications. Process text, URLs, and YouTube videos with our comprehensive API.
Lightning Fast
Secure & Reliable
Developer Friendly
Quick Start
Get up and running with the Get TLDR API in minutes
2. Make Your First Request
curl -X POST https://www.get-tldr.com/api/v1/summarize \
-H "Content-Type: application/json" \
-H "X-API-Key: tl_your_api_key_here" \
-d '{"input": "Your text content here..."}'API Reference
POST /api/v1/summarize
Summarize text, URLs, or YouTube videos
v1
Request Body
{
"input": "Text content or URL to summarize",
"system_prompt": "Optional custom prompt (paid plans)",
"system_prompt_name": "Optional saved prompt name (paid plans)",
"skip_cache": false
}Precedence: if both system_prompt and system_prompt_name are provided, the full system_prompt is used. The name is fuzzy-matched against your own/shared/public prompts. Free plan keys ignore both and enforce the default prompt (response includes X-Prompt-Policy: default-enforced).
Response
{
"summary": "Generated summary text",
"input_type": "text | url",
"input_tokens": 150,
"output_tokens": 45,
"total_tokens": 195,
"source_url": null,
"cached": false,
"processing_info": {
"strategy": "direct",
"input_length": 1200,
"chunks_processed": 1,
"processing_time": 0.65
},
"processed_at": "2025-09-08T20:00:00Z"
}Examples
curl -X POST https://www.get-tldr.com/api/v1/summarize \
-H "Content-Type: application/json" \
-H "X-API-Key: tl_your_key" \
-d '{"input": "Long article text here..."}'Response Headers
X-Prompt-Policy: default-enforced— Free plan keys ignore custom prompts.X-Prompt-Resolution: resolved-by-name—system_prompt_namematched a saved prompt; includesX-Prompt-TitleandX-Prompt-Id.X-Prompt-Resolution: name-not-found— No close name match; default prompt used.X-Cached: true|false— Indicates cache hit.
SDK Examples
Node.js Example
Complete example with error handling
const API_KEY = 'tl_your_api_key';
const BASE_URL = 'https://www.get-tldr.com/api/v1';
async function summarizeText(text) {
try {
const response = await fetch(`${BASE_URL}/summarize`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': API_KEY
},
body: JSON.stringify({
input: text,
system_prompt: 'Summarize in 2-3 sentences'
})
});
if (!response.ok) {
throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
const result = await response.json();
return result.summary;
} catch (error) {
console.error('Summarization failed:', error);
throw error;
}
}
// Usage
summarizeText('Your long text here...')
.then(summary => console.log(summary))
.catch(error => console.error(error));Authentication
Secure API access with API key authentication
API Key Format
All API keys start with tl_ prefix
# Example API Key
tl_DsRuOqVB9_6BuG2ijX_LeDhzGe68KP8lRequest Headers
X-API-Key: tl_your_api_key_here
Content-Type: application/jsonSecurity Best Practices
- • Never commit API keys to version control
- • Use environment variables for key storage
- • Rotate keys regularly for security
- • Monitor usage through the dashboard
Response Codes
200Success
400Bad Request
401Unauthorized
429Rate Limited
500Server Error
Need Help?
Get support for API integration and development
