API
Random Sentence Generator API
This reference page documents the JSON format used by the sentence generator project. The Cloudflare static package focuses on the browser-based generator, so a live API endpoint is not included in this export build.
Base URL
https://randomsentencegenerator.tools/api/generate
GET /api/generate
GET /api/generate?category=funny&type=simple&count=5&length=medium&tense=any
| Param | Type | Default | Options |
|---|---|---|---|
| category | string | random | random, funny, inspirational, academic, mystery, scifi, romance, horror |
| type | string | simple | simple, compound, complex |
| count | integer | 1 | 1-20 |
| length | string | medium | short, medium, long |
| tense | string | any | any, past, present, future |
| style | string | casual | formal, casual, poetic |
| vocabulary | string | mixed | basic, advanced, mixed |
| noun | string | none | optional custom noun |
| verb | string | none | optional custom verb |
| adjective | string | none | optional custom adjective |
Response
{
"success": true,
"count": 2,
"sentences": [
{
"id": "abc123",
"text": "The curious fox leaped over a golden fence.",
"category": "random",
"type": "simple",
"length": "medium",
"tense": "any",
"style": "casual"
}
]
}Try it in the product
The interactive generator uses the same option model shown here, so you can still test categories, sentence types, tense, vocabulary and style directly in the static site.