Need placeholder text for your designs, mockups, or test data? The Lorem Ipsum Sentences API generates customizable lorem ipsum text by sentence count, perfect for UI prototyping and development workflows.
What is Lorem Ipsum?
Lorem ipsum is placeholder text commonly used in design and publishing. Derived from a Latin text by Cicero, it provides realistic-looking text without the distraction of readable content, allowing designers and developers to focus on layout and visual elements.
The standard lorem ipsum passage begins: "Lorem ipsum dolor sit amet, consectetur adipiscing elit..."
Why Generate by Sentences?
Generating text by sentence count offers precise control:
Consistent Lengths
Each sentence provides a predictable unit of text, making it easy to fill specific UI components like cards, tooltips, or list items.
Natural Flow
Sentence-based generation produces more natural-looking text than word-based generation, with proper punctuation and structure.
Flexible Formatting
Combine sentences into paragraphs or use individually for varied content layouts.
Using the Lorem Sentences API
TinyFn provides a simple endpoint to generate lorem ipsum sentences:
GET https://api.tinyfn.io/v1/generate/lorem/sentences?count=3
Headers: X-API-Key: your-api-key
{
"sentences": [
"Lorem ipsum dolor sit amet, consectetur adipiscing elit.",
"Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"Ut enim ad minim veniam, quis nostrud exercitation ullamco."
],
"text": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco.",
"count": 3,
"word_count": 32
}
Parameters
| Parameter | Type | Description |
|---|---|---|
count |
integer | Number of sentences to generate (1-100, default: 5) |
min_words |
integer | Minimum words per sentence (default: 5) |
max_words |
integer | Maximum words per sentence (default: 15) |
start_with_lorem |
boolean | Start with classic "Lorem ipsum" (default: true) |
Code Examples
JavaScript / Node.js
const response = await fetch(
'https://api.tinyfn.io/v1/generate/lorem/sentences?count=5',
{ headers: { 'X-API-Key': 'your-api-key' } }
);
const { sentences, text } = await response.json();
console.log(text);
// Or use individual sentences
sentences.forEach(s => console.log(s));
Python
import requests
response = requests.get(
'https://api.tinyfn.io/v1/generate/lorem/sentences',
headers={'X-API-Key': 'your-api-key'},
params={'count': 3, 'start_with_lorem': False}
)
data = response.json()
print(data['text'])
cURL
curl "https://api.tinyfn.io/v1/generate/lorem/sentences?count=5" \
-H "X-API-Key: your-api-key"
Common Use Cases
- UI Mockups: Fill design prototypes with realistic-looking text
- Testing Forms: Generate input data for form validation testing
- Database Seeding: Populate development databases with sample content
- Email Templates: Preview email layouts with placeholder content
- Documentation Examples: Create sample content for documentation
Best Practices
- Match content length: Use appropriate sentence counts for the UI element
- Vary sentence lengths: Mix min/max word counts for natural appearance
- Consider context: Use start_with_lorem=false for less recognizable placeholder text
- Replace before production: Always replace lorem ipsum with real content before launch
- Test edge cases: Generate very long and very short sentences to test UI limits
Use via MCP
Your AI agent can call this tool directly via Model Context Protocol — no HTTP code needed. Add TinyFn to Claude Desktop, Cursor, or any MCP client:
{
"mcpServers": {
"tinyfn-generate": {
"url": "https://api.tinyfn.io/mcp/generate/",
"headers": {
"X-API-Key": "your-api-key"
}
}
}
}
See all generator tools available via MCP in our Generator MCP Tools for AI Agents guide.
Try the Lorem Sentences API
Get your free API key and start generating placeholder text instantly.
Get Free API Key