🚀 GoodPage API Documentation

Transform plain text into beautiful HTML web pages with one click

📖 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

POST https://cn.goodpage.net/api/text-to-page

📝 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 original
interpret - Interpret & optimize
expand - 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 tag
false - 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-columnSimple LayoutSingle ColumnAll content arranged vertically in a single column, general purpose
double-columnSimple LayoutDouble ColumnTwo-column layout, suitable for comparison display
triple-columnSimple LayoutTriple ColumnThree-column layout, suitable for multi-column display
integrated/articleIntegrated LayoutArticleStandard article layout with title and content area
integrated/pptIntegrated LayoutPPT PresentationPPT presentation layout, full-screen single-column slides
integrated/magazineIntegrated LayoutMagazineMagazine style with multi-column typography
integrated/websiteIntegrated LayoutWebsite PageWebsite layout with flexible composition of header, main, sidebar, footer
integrated/documentationIntegrated LayoutDocumentationDocumentation layout with navigation and article content

3. Typography (Typography Layer) - 3 Options

ID Chinese Name Font Characteristics Applicable Scenarios
modern现代字体Clear sans-serif fontsTechnical documents, business reports
serif衬线体Elegant serif fontsLiterary works, formal documents
handwritten手写体Playful handwritten styleChildren'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 AnimationDynamic starry background with twinkling stars
particle粒子效果Particle AnimationFloating particle effects
gradient-flow渐变流光BackgroundFlowing gradient background with smooth color transitions
aurora极光效果BackgroundAurora-like dynamic light band effects
wave-ripple波浪涟漪AnimationWater ripple diffusion effects
neon-grid霓虹网格BackgroundCyberpunk-style neon grid background
floating-bubbles漂浮气泡AnimationRising semi-transparent bubble animations
light-rays光线追踪BackgroundDynamic light beams radiating from center
digital-rain数字雨BackgroundMatrix-style green digital rain effect
falling-petals花瓣飘落AnimationRomantic 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: