📖 Overview
GoodPage provides powerful text-to-HTML API services that can automatically convert plain text into beautiful web pages with rich visual effects. Supports multiple style templates, intelligent typesetting, and custom requirements.
✨ Smart Beautification
AI automatically analyzes content and intelligently matches the best layout style and visual elements
🎨 Diverse Templates
17+ professional design templates to meet display needs for different scenarios
⚡ Fast Response
Usually completes conversion within 3-10 seconds, supports high concurrent calls
🔗 Flexible Output
Can return HTML code or directly generate accessible web page links
🌐 API Endpoint
📝 Request Parameters
Request Headers
Content-Type: application/json
Request Body (JSON Format)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
content |
string | Yes | - | Text content to convert |
title |
string | No | AI Generated | Article title (if not provided, AI will auto-generate) |
content_strategy |
string | No | strict |
Expansion mode:strict - Strictly follow originalinterpret - Interpret & optimizeexpand - Expand & enrich |
extra_requirements |
string | No | Empty | Additional requirements, describe formatting needs in natural language, e.g., "Use blue theme", "Add tables to display data" |
response_type |
string | No | html |
Response type:html - Return HTML content with metadata (default)url - Return only webpage URL (no HTML content, reduces data transfer) |
style |
string | No | AI Selected | Specify style template code, e.g., minimalist, premium_bw, tech_blue, etc. |
include_title |
boolean | No | true |
Whether to include title in generated HTML:true - Include <h1> title tagfalse - Do NOT generate any title tags |
design_system |
object | No | AI Selected |
Design System Configuration Object (Advanced feature) for precise control over page styling. ⚠️ Important: This parameter only works when style="diy" (custom style). If you use other preset styles, this parameter will be ignored.Contains the following fields: • theme (string): Theme ID, e.g., "minimal", "dark", "pink" (17 themes available)• layout (string): Layout ID, e.g., "single-column", "integrated/ppt"• typography (string): Typography ID, e.g., "modern", "serif", "handwritten"• width (string): Width control, e.g., "fixed", "percentage", "fullscreen"• effects (array): Effects array, e.g., ["starry-bg"], ["particle"] (11 effects available)• components (array): Components array (optional)If not provided, AI will intelligently select the best configuration based on content |
💻 Request Examples
Basic Usage
{
"content": "This is a test text.\n\nAI technology is changing our way of life.". "
}
Advanced Usage
{
"content": "Artificial intelligence is changing the world\n\nWith the advancement of technology, artificial intelligence has penetrated into every aspect of our lives. From smartphones to autonomous vehicles, AI technology is reshaping our way of life.\n\nFuture outlook:\n1. Smarter personal assistants\n2. Innovation in medical diagnosis\n3. Personalized education\n4. Industrial automation",
"title": "Artificial Intelligence Changes Life",
"content_strategy": "strict",
"extra_requirements": "Please use a blue theme and incorporate elements with a technological feel.",
"response_type": "url",
"style": "neon_glassmorphism"
}
Advanced Usage with Design System (Precise Style Control)
{
"content": "Business Plan\n\nChapter 1: Market Analysis\n...",
"title": "Business Plan",
"style": "diy",
"design_system": {
"theme": "minimal",
"layout": "integrated/ppt",
"typography": "modern",
"width": "fullscreen",
"effects": ["none"]
},
"response_type": "url"
}
⚠️ Important: When using design_system, you must also set "style": "diy", otherwise this parameter will be ignored.
Note: Using design_system allows precise control over each dimension of the page:
• Theme (Color Scheme): 17 themes available (pink, dark, minimal, business-professional, etc.)
• Layout: Single-column, double-column, PPT presentation, article, website, etc.
• Typography: modern (sans-serif), serif (elegant), handwritten (playful)
• Width: fixed (800px), percentage (responsive), fullscreen (full-width)
• Effects: starry-bg (stars), particle (particles), gradient-flow (flowing gradients), and 8 more
• Components: Supports professional components like tables, ECharts charts, etc.
If design_system is not provided, AI will automatically select the optimal configuration based on content
📤 Response Format
Success Response (Returns HTML)
{
"status": "success",
"message": "HTML generated successfully",
"return_data": {
"page_html": "<!DOCTYPE html>\n<html lang=\"zh-CN\">\n...",
"content_html": "<div class=\"article\">\n...",
"title": "Artificial intelligence changes life",
"keywords": "AI, technology",
"description": "Article description"
},
"quota": {
"remaining": 48,
"used": 2,
"limit": 50
}
}
Success Response (Returns URL)
{
"status": "success",
"message": "HTML generated and saved successfully",
"url": "/p/abcdefgh",
"full_url": "https://cn.goodpage.net/p/abcdefgh",
"article_id": "abcdefgh",
"title": "Artificial intelligence changes life",
"quota": {
"remaining": 48,
"used": 2,
"limit": 50
}
}
Note: URL mode does NOT return HTML content to reduce data transfer.
Error Response
{
"status": "error",
"message": "Error message description"
}
🔧 Usage Examples
Python Example
import requests
# API endpoint (recommended)
url = "https://cn.goodpage.net/api/text-to-page"
# Request data
payload = {
"content": """Artificial intelligence is transforming the world
With technological advancements, artificial intelligence has penetrated into every aspect of our lives. From smartphones to autonomous vehicles, AI technology is reshaping our way of life.
Future outlook:
1. A smarter personal assistant
2. Innovation in medical diagnosis
3. Personalized education
4. Industrial automation""",
"title": "Artificial Intelligence Changes Life",
"response_type": "url"
}
# Send request
response = requests.post(url, json=payload)
# Check response
if response.status_code == 200:
result = response.json()
if result["status"] == "success":
article_url = result["full_url"]
print(f"✅ Web page generated successfully!")
print(f"🔗 Access link: {article_url}")
else:
print(f"❌ Generation failed: {result['message']}")
else:
print(f"❌ Request failed, status code: {response.status_code}")
JavaScript Example
async function textToPage() {
const url = 'https://cn.goodpage.net/api/text-to-page';
const payload = {
content: `Artificial intelligence is changing the world
With the advancement of technology, artificial intelligence has penetrated into every aspect of our lives. `,
title: 'Artificial Intelligence Changes Life',
response_type: 'url'
};
try {
const response = await fetch(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(payload)
});
const result = await response.json();
if (result.status === 'success') {
console.log('✅ Web page generated successfully!');
console.log('🔗 Access link:', result.full_url);
} else {
console.error('❌ Generation failed:', result.message);
}
} catch (error) {
console.error('❌ Request exception:', error.message);
}
}
textToPage();
cURL Example
curl -X POST https://cn.goodpage.net/api/text-to-page \
-H "Content-Type: application/json" \
-d '{
"content": "This is a test text.\\n\\nAI technology is changing our way of life.",
"title": "Test Article",
"response_type": "url"
}'
📊 Quota Information
Each IP address enjoys 50 free call quota. After exceeding the quota, please contact customer service to upgrade.
Quota validity period is 30 days, automatically reset after expiration.
🎨 Available Style Templates
You can specify the following style templates through the style parameter:
| Template Code | Chinese Name | English Name | Features |
|---|---|---|---|
minimalist |
极简主义 | Minimalist | Simple & Professional - Suitable for technical documentation, reports |
premium_bw |
高级黑白 | Premium Black & White | Elegant black, white & gray - Showcases text beauty through typography |
neon_glassmorphism |
霓虹玻璃 | Neon Glass | Tech & Futuristic - Suitable for AI, technology themes |
magazine_gradient |
杂志渐变 | Magazine Gradient | Warm & Modern - Suitable for lifestyle, fashion |
cyberpunk_neon |
赛博朋克 | Cyberpunk Neon | Tech & Avant-garde - Suitable for cybersecurity, hacker themes |
minimalist_timeline |
时间线 | Minimalist Timeline | Historical Process - Suitable for development history, time series |
gradient_glass |
渐变玻璃 | Gradient Glass | Soft & Modern - Suitable for business, startup themes |
bold_waves |
大胆波浪 | Bold Waves | Vibrant & Dynamic - Suitable for sports, young audience |
space_cosmic |
太空宇宙 | Space Cosmic | Sci-Fi Exploration - Suitable for astronomy, aerospace themes |
swiss_grid |
瑞士网格 | Swiss Grid | Rigorous & Professional - Suitable for data analysis, academic research |
handdrawn_notes |
手绘笔记 | Handdrawn Notes | Relaxed & Creative - Suitable for study notes, creative ideas |
dark_luxury |
暗黑奢华 | Dark Luxury | High-end & Mysterious - Suitable for luxury goods, premium brands |
pastel_soft |
柔和粉彩 | Pastel Soft | Gentle & Fresh - Suitable for female, children, warm themes |
brutalist_bold |
粗野主义 | Brutalist Bold | Strong Personality - Suitable for art, design expression |
kawaii_bubbles |
可爱泡泡 | Kawaii Bubbles | Cute & Lively - Suitable for pets, anime, entertainment |
newspaper_classic |
报纸经典 | Newspaper Classic | Traditional & Formal - Suitable for news, announcements, statements |
geometric_modern |
几何现代 | Geometric Modern | Modern Structured - Suitable for architecture, design themes |
digital_magazine |
数字杂志 | Digital Magazine | Immersive reading - Suitable for in-depth content, professional publishing |
colorful_dance |
色彩飞舞 | Colorful Dance | Dynamic typography - Exaggerated font sizes, diverse shapes, rich colors visual feast |
website |
网站首页 | Homepage | Complete website homepage - Includes navigation, features showcase, cases, stats, FAQ, contact info modules |
🎨 Design System Resource List
The Design System provides six-dimensional design control, allowing you to precisely customize page styles. Here is the complete list of all available resources:
1. Theme (Color Layer) - 17 Themes
| ID | Chinese Name | Style Characteristics |
|---|---|---|
minimal | 极简主题 | Clean and fresh, suitable for formal documents and business reports |
dark | 暗黑主题 | Dark background, suitable for technical documentation and night reading |
pink | 粉红主题 | Soft pink tones, suitable for warm, feminine content |
business-professional | 商务专业 | Stable business style, suitable for corporate documents |
classical-elegant | 古典优雅 | Elegant classical style, suitable for literary works |
coral-reef | 珊瑚礁 | Warm coral tones, suitable for nature themes |
cyberpunk-neon | 赛博朋克 | Neon tech style, suitable for futuristic content |
forest-green | 森林绿 | Fresh green tones, suitable for environmental themes |
ink-zen | 水墨禅意 | Oriental ink style, suitable for culture and art |
lavender-dream | 薰衣草梦 | Dreamy purple tones, suitable for romantic content |
luxury-gold | 奢华金 | Golden luxury style, suitable for high-end brands |
nordic-fresh | 北欧清新 | Minimalist Nordic style, suitable for lifestyle |
ocean-blue | 海洋蓝 | Refreshing blue tones, suitable for tech content |
pop-art | 波普艺术 | Lively pop style, suitable for creative content |
sunset-warm | 日落暖色 | Warm sunset tones, suitable for emotional content |
tech-future | 科技未来 | Futuristic tech feel, suitable for innovation themes |
vintage-newspaper | 复古报纸 | Vintage newspaper style, suitable for nostalgic content |
2. Layout (Layout Layer) - 8 Options
| ID | Type | Name | Description |
|---|---|---|---|
single-column | Simple Layout | Single Column | All content arranged vertically in a single column, general purpose |
double-column | Simple Layout | Double Column | Two-column layout, suitable for comparison display |
triple-column | Simple Layout | Triple Column | Three-column layout, suitable for multi-column display |
integrated/article | Integrated Layout | Article | Standard article layout with title and content area |
integrated/ppt | Integrated Layout | PPT Presentation | PPT presentation layout, full-screen single-column slides |
integrated/magazine | Integrated Layout | Magazine | Magazine style with multi-column typography |
integrated/website | Integrated Layout | Website Page | Website layout with flexible composition of header, main, sidebar, footer |
integrated/documentation | Integrated Layout | Documentation | Documentation layout with navigation and article content |
3. Typography (Typography Layer) - 3 Options
| ID | Chinese Name | Font Characteristics | Applicable Scenarios |
|---|---|---|---|
modern | 现代字体 | Clear sans-serif fonts | Technical documents, business reports |
serif | 衬线体 | Elegant serif fonts | Literary works, formal documents |
handwritten | 手写体 | Playful handwritten style | Children's content, creative works |
4. Width (Width Control Layer) - 3 Options
| ID | Chinese Name | CSS Rule | Applicable Scenarios |
|---|---|---|---|
fixed | 固定宽度 | width: 800px; | Long-form reading |
percentage | 百分比宽度 | width: 80%; max-width: 1200px; | Responsive adaptation |
fullscreen | 全屏宽度 | width: 100%; | Wide tables/charts |
5. Effects (Effect Layer) - 11 Effects
| ID | Chinese Name | Type | Description |
|---|---|---|---|
none | 无特效 | - | Default option, no animation effects |
starry-bg | 星空背景 | Background Animation | Dynamic starry background with twinkling stars |
particle | 粒子效果 | Particle Animation | Floating particle effects |
gradient-flow | 渐变流光 | Background | Flowing gradient background with smooth color transitions |
aurora | 极光效果 | Background | Aurora-like dynamic light band effects |
wave-ripple | 波浪涟漪 | Animation | Water ripple diffusion effects |
neon-grid | 霓虹网格 | Background | Cyberpunk-style neon grid background |
floating-bubbles | 漂浮气泡 | Animation | Rising semi-transparent bubble animations |
light-rays | 光线追踪 | Background | Dynamic light beams radiating from center |
digital-rain | 数字雨 | Background | Matrix-style green digital rain effect |
falling-petals | 花瓣飘落 | Animation | Romantic cherry blossom petal falling effect |
⚠️ Important: The design_system parameter only works when style="diy" (custom style). If you use other preset styles (such as minimalist, premium_bw, etc.), even if you provide the design_system parameter, the system will ignore it.
💡 Recommendation: If you need to use Design System's precise control features (including table components, ECharts charts, etc.), please make sure to set "style": "diy".
❓ Frequently Asked Questions
Q: Why am I getting a 403 error?
A: Your IP address quota has been exhausted. Each IP has 50 free call quota. After exceeding, please contact customer service to upgrade.
Q: How to get permanent links for articles?
A: Use the response_type: "url" parameter, the API will return the complete webpage access link.
Q: Can the generated HTML be used offline?
A: Yes, all styles are inline, no external resources needed, can be fully used offline.
Q: What languages are supported?
A: Supports Chinese, English and other languages. The API will automatically detect the text language and apply corresponding typesetting rules.
Q: How to handle long text?
A: It is recommended not to exceed 10,000 characters per request. For ultra-long text, you can process it in segments or contact customer service for optimization solutions.
📞 Technical Support
If you have questions or need to increase quota, please contact us through the following methods:
- Email: chenkunji@qq.com
- Website: https://cn.goodpage.net