当前位置: 首页 > Skill >

paper-view

paper-view

paper-view

PaperView API — 根据数据、文本或PDF论文生成ECharts可视化图表、AI科学图表和词云。当用户想要创建可视化内容时使用。

1.0.2 2026.11.17 528
获取Skill文件查看使用说明
作 者:林安 许可证: 更新时间:2026.11.17
本文目录展开

PaperView API

PaperView provides three AI-powered visualization APIs:

  1. ECharts Visualization — generate interactive charts from CSV/JSON/text data
  2. AI Scientific Diagram — generate publication-quality figures from text or arxiv PDF
  3. Word Cloud — extract keyword frequencies from PDF documents (supports CJK)

Authentication

All requests require an API Token:

Authorization: Bearer pv_live_<your_token>

Obtain your token from the www.ipaperview.com website (Profile → API Token). Each account can create one token. Set via environment variable PAPERVIEW_API_TOKEN or ask the user for their token.

Base URL

https://api.ipaperview.com

API Quota

Daily API call limits by plan:

Plan Daily Limit
Free 3 calls/day
Monthly ($4.99/mo) 30 calls/day
Yearly ($29.99/yr) 100 calls/day

Each API call consumes 1 quota.

1. ECharts Visualization

POST /api/v1/viz/generate/

AI analyzes your data sample, selects the best chart type, and returns a ready-to-render ECharts option. The full data processing happens server-side — AI only sees a sample to generate a transform script, then the backend executes it with Node.js on the full dataset.

Field Type Required Description
data string Yes Raw data in CSV, JSON, or plain text
toolset string No Chart category: bar, line, scatter, pie, heatmap, violin, manhattan, volcano, forest, survival, roc, venn, upset, etc. If omitted, AI auto-selects
template string No Specific template within the toolset. If omitted, AI auto-selects
context string No Natural language instructions, e.g. "show GDP trend by country", "use blue color scheme"

Available chart types:

  • Basic: line, bar, scatter, pie, radar, funnel, boxplot
  • Advanced: heatmap, treemap, sankey, tree, sunburst, map, structure
  • 3D: gl3d (bar3D, scatter3D)
  • Scientific: violin, manhattan, volcano, forest, survival, roc, venn, upset, enrichment, circos, waterfall
curl -X POST 
  -H "Authorization: Bearer $PAPERVIEW_API_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "data": "Year,China,USA,Japann2018,13608,20544,4971n2019,14280,21373,5082n2020,14723,20894,5040n2021,17734,23315,4941n2022,17963,25463,4231",
    "context": "Show GDP trends as a line chart"
  }' 
  https://api.ipaperview.com/api/v1/viz/generate/

Response:

{
  "success": true,
  "toolset": "line",
  "template": "confidence_band",
  "echarts_option": {
    "title": { "text": "GDP by Country (2018-2022)" },
    "xAxis": { "type": "category", "data": ["2018", "2019", "2020", "2021", "2022"] },
    "yAxis": { "type": "value" },
    "series": [
      { "name": "China", "type": "line", "data": [13608, 14280, 14723, 17734, 17963] },
      { "name": "USA", "type": "line", "data": [20544, 21373, 20894, 23315, 25463] },
      { "name": "Japan", "type": "line", "data": [4971, 5082, 5040, 4941, 4231] }
    ],
    "legend": { "data": ["China", "USA", "Japan"] }
  },
  "reason": "Time series data with multiple countries — line chart shows trends clearly"
}

The echarts_option can be rendered directly with echarts.setOption(echarts_option) in any ECharts-compatible environment.

2. AI Scientific Diagram

POST /api/diagram/ai-generate/

Generate publication-quality scientific diagrams, flowcharts, and research illustrations. Supports arxiv paper URLs directly. Returns a Server-Sent Events stream — use curl -N to receive events.

Field Type Required Description
template_type string Yes custom_text_only (from text) or custom (with reference image)
custom_prompt string Yes Description of what to draw. Can include style instructions (colors, themes, specific elements)
pdf_url string No URL to a PDF paper (supports arxiv abs/pdf URLs like http://arxiv.org/abs/2510.13809v1)
selected_text string No Text excerpt to visualize
reference_image_url string No Reference image URL to guide the style
language string No auto, en, zh (default: auto)
aspect_ratio string No e.g. 16:9, 1:1, 4:3

Example — from text description:

curl -N -X POST 
  -H "Authorization: Bearer $PAPERVIEW_API_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "template_type": "custom_text_only",
    "custom_prompt": "A flowchart: Data Collection -> Preprocessing -> Training -> Evaluation"
  }' 
  https://api.ipaperview.com/api/diagram/ai-generate/

Example — from arxiv paper with custom style:

curl -N -X POST 
  -H "Authorization: Bearer $PAPERVIEW_API_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "template_type": "custom_text_only",
    "pdf_url": "http://arxiv.org/abs/2510.13809v1",
    "custom_prompt": "Generate an architecture diagram with pink color scheme, include Doraemon as a mascot element"
  }' 
  https://api.ipaperview.com/api/diagram/ai-generate/

SSE Events (in order):

data: {"type": "step", "step": "extracting", "message": "Extracting document content..."}
data: {"type": "step", "step": "generating_prompt", "message": "Generating image prompt..."}
data: {"type": "prompt_generated", "prompt": "...", "enhanced_prompt": "..."}
data: {"type": "step", "step": "generating_image", "message": "Generating image..."}
data: {"type": "complete", "success": true, "image_url": "https://...", "model": "gemini-2.0-flash-preview-image-generation"}

The final complete event contains image_url — a CDN URL to the generated image.

3. Word Cloud

POST /api/wordcloud/extract/

Extract keyword frequencies from PDF documents with automatic CJK (Chinese/Japanese/Korean) segmentation and semantic clustering.

Field Type Required Description
pdf_url string Yes URL to a PDF document (supports arxiv URLs)
max_words integer No Max keywords to return (default: 100)
curl -X POST 
  -H "Authorization: Bearer $PAPERVIEW_API_TOKEN" 
  -H "Content-Type: application/json" 
  -d '{
    "pdf_url": "https://arxiv.org/pdf/2301.00001.pdf",
    "max_words": 50
  }' 
  https://api.ipaperview.com/api/wordcloud/extract/

Response:

{
  "success": true,
  "data": [
    { "word": "neural", "frequency": 45, "cluster": 0 },
    { "word": "network", "frequency": 38, "cluster": 0 },
    { "word": "attention", "frequency": 32, "cluster": 1 }
  ]
}

The cluster field (0-4) groups words by frequency — useful for color coding in word cloud rendering. CJK documents are automatically segmented using jieba.

Error Responses

{ "success": false, "error": "Error description" }
HTTP Code Meaning
400 Bad request (missing or invalid parameters)
401 Invalid or missing API token
402 Quota exceeded (daily API call limit reached)
500 Server error

Rendering Results

After calling the API, you MUST render the results visually. No extra dependencies needed — use CDN-loaded HTML files.

Render ECharts Visualization

When you receive echarts_option from /api/v1/viz/generate/, create a self-contained HTML file and open it in the browser:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>PaperView Chart</title>
  <script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
  <style>body{margin:0;background:#fff}#chart{width:100vw;height:100vh}</style>
</head>
<body>
  <div id="chart"></div>
  <script>
    var chart = echarts.init(document.getElementById('chart'));
    var option = {{ECHARTS_OPTION_JSON}};
    chart.setOption(option);
    window.addEventListener('resize', function() { chart.resize(); });
  </script>
</body>
</html>

Replace {{ECHARTS_OPTION_JSON}} with the echarts_option value from the API response (the JSON object, not stringified). Save as a .html file and open:

# macOS
open /tmp/paperview_chart.html
# Linux
xdg-open /tmp/paperview_chart.html

For 3D charts (gl3d toolset), add this additional script tag before the main script:

<script src="https://cdn.jsdelivr.net/npm/echarts-gl@2/dist/echarts-gl.min.js"></script>

Render Word Cloud

When you receive word frequency data from /api/wordcloud/extract/, create an HTML file using echarts-wordcloud:

<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>PaperView Word Cloud</title>
  <script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/echarts-wordcloud@2/dist/echarts-wordcloud.min.js"></script>
  <style>body{margin:0;background:#fff}#chart{width:100vw;height:100vh}</style>
</head>
<body>
  <div id="chart"></div>
  <script>
    var chart = echarts.init(document.getElementById('chart'));
    var words = {{WORDCLOUD_DATA_JSON}};
    var clusterColors = ['#5470c6','#91cc75','#fac858','#ee6666','#73c0de'];
    chart.setOption({
      series: [{
        type: 'wordCloud',
        sizeRange: [14, 80],
        rotationRange: [-45, 45],
        gridSize: 8,
        shape: 'circle',
        textStyle: {
          fontFamily: 'sans-serif',
          color: function(params) {
            return clusterColors[params.data.cluster || 0];
          }
        },
        data: words.map(function(w) {
          return { name: w.word, value: w.frequency, cluster: w.cluster };
        })
      }]
    });
  </script>
</body>
</html>

Replace {{WORDCLOUD_DATA_JSON}} with the data array from the API response.

Render AI Diagram

The AI diagram endpoint already returns an image_url (CDN link). Simply download it or open in browser:

# Open in browser
open "https://cdn.example.com/generated/image.jpg"
# Or download
curl -o /tmp/paperview_diagram.png "https://cdn.example.com/generated/image.jpg"

Privacy & Data Handling

What data is sent to api.ipaperview.com:

  • ECharts API: The raw text data (CSV/JSON/text string) you provide in the data field is sent to the server. No local files are uploaded — you must pass the data content as a string in the request body.
  • AI Diagram API: Only the pdf_url (a public URL) is sent. The server fetches the PDF from that URL. No local files are uploaded from your machine.
  • Word Cloud API: Only the pdf_url (a public URL) is sent. The server fetches the PDF from that URL. No local files are uploaded from your machine.

Data retention:

  • Submitted text data (CSV/JSON) is processed in memory and not stored after the response is returned.
  • Generated AI diagram images are uploaded to Upyun CDN and retained for 30 days, after which they are automatically deleted.
  • No user data is sold or shared with third parties.

Authentication:

  • This skill requires a PAPERVIEW_API_TOKEN environment variable (format: pv_live_<hex_string>).
  • Obtain your token from www.ipaperview.com → Profile → API Token.
  • Each API call is authenticated and rate-limited per your subscription plan.

Usage Tips

  1. Auto-selection: For ECharts, omit toolset and template to let AI pick the best chart type for your data
  2. Large datasets: Safe to send large CSV files — AI only sees a sample, full data is processed server-side
  3. SSE parsing: AI diagram endpoint uses Server-Sent Events. Parse each data: line as JSON and wait for the type: "complete" event
  4. Arxiv URLs: Both http://arxiv.org/abs/... and https://arxiv.org/pdf/... formats are supported for pdf_url
  5. Custom styles: Use the custom_prompt and context fields to request specific colors, themes, or visual elements
  6. Always render: After receiving API results, always render them visually using the HTML templates above so the user can see the chart/wordcloud

推荐文章

更多
PHP时间戳与日期字符串相互转换方法详解

本文介绍PHP中时间数值(Unix时间戳)与日期字符串之间的相互转换方法。通过strtotime和date函数,实现将当前时间、指定日期转换为时间戳,以及将时间戳格式化为可读的日期时间字符串,并提供相关在线计算工具推荐。

2025.11.30 1,016
PHP跨域配置:怎么安全地允许指定域名而非使用通配符

在 PHP 中安全地允许指定域名跨域,核心是解析请求头中的 Origin ,验证其是否在白名单内,然后动态设置 Access-Control-Allow-Origin 响应头。不要使用通配符 * ,也不要硬编码单一域名。

2025.03.29 1,004
Apache开启.htaccess及使用方法详解

本文介绍如何在本地Apache环境中启用.htaccess文件,主要涉及修改httpd.conf中的AllowOverride参数。同时详细解析.htaccess的多种实用功能,包括自定义错误页面、目录密码保护、IP访问限制、URL自动转向、默认首页设置以及防止图片盗链等配置方法,并分析了使用.htaccess对服务器性能和安全性的潜在影响。

2026.05.09 1,001
JavaScript中利用replace结合正则实现replaceAll效果

JavaScript原生仅支持replace()进行单次或全局替换,缺乏类似Java的replaceAll()便捷方法。本文总结四种在JS中实现全量替换的方案:使用带g标志的正则、带gm标志的正则、扩展String原型以及split后join。通过对比代码示例,展示各方法的实现细节与适用场景,帮助开发者根据需求选择最优解。

2025.04.29 1,001
PHP日期转时间戳时区偏差怎么解决

在 PHP 中将日期字符串转换为时间戳时,若未显式指定时区,默认使用脚本配置的 date.timezone 或系统时区。当服务器时区与业务逻辑预期(如 UTC )不一致时,会产生偏差。解决核心是确保输入字符串携带明确时区信息,或在转换前统一设置时区上下文。

2026.10.24 1,000
PHP实现基础文件上传:HTML表单与$_FILES处理流程

在 HTML 表单中设置 enctype="multipart/form-data" ,并在 PHP 后端通过 $_FILES 数组接收文件,调用 move_uploaded_file() 将临时文件移动到目标目录即可完成上传。

2026.09.07 1,000
Skill 文件
  • SKILL.md
    • PaperView API
    • Authentication
    • Base URL
    • API Quota
    • 1. ECharts Visualization
    • 2. AI Scientific Diagram
    • 3. Word Cloud
    • Error Responses
    • Rendering Results
      • Render ECharts Visualization
      • Render Word Cloud
      • Render AI Diagram
    • Privacy & Data Handling
    • Usage Tips
  • 项目或源文件

相关 Skill

更多
service-qa-coach service-qa-coach Review support quality for chat, email, phone, social DM, or marketplace service teams. Use when a team needs a QA scorecard, failure-mode analysis, coaching plan, calibration checklist, or service-improvement brief without live ticketing, CRM, or contact-center system access.
高中数学作业批改助手 高中数学作业批改助手 >图片识别 直接读取学生手写作答照片,识别公式、符号、步骤 🧮 自动推导 根据题目自动生成参考答案和评分细则,无需教师预设 📊 逐步给分 每个关键步骤独立评分,体现过程分 📝 结构化报告 输出含识别内容、参考答案、逐步评分、改进建议的完整报告 🗂 批量批改 支持一次性批改多道题,最终汇总得分表
Vibration Analysis Vibration Analysis 分析来自CMS趋势、RMS/峰值、频谱及SCADA报警的风机传动链(主轴、齿轮箱、发电机)振动数据。
Traditional Bone Tool Making Basics Traditional Bone Tool Making Basics Use when you need custom, durable, repairable tools like awls, needles, scrapers, harpoons, or fishing hooks made from local animal bones or antlers and comm...
音频混音工具 音频混音工具 名称:Sound Mixing Tool(标识 sound-mixing-tool) 短简介(≤60字):音乐/音效响度精确对齐 + 融合混音工作流:用 ffmpeg 两段式 loudnorm 把多组素材 LUFS 偏差压到 <0.10,再最小干预融合、导出可进引擎的独立分轨。 标签/关键词:音频混音 响度匹配 LUFS ffmpeg 游戏音频 音效设计 Wwise FMOD 分轨导出 后期处理 触发词:混音 · 响度匹配 · LUFS 对齐 · MIX 版本 · 音乐音效分轨 · 融合 · 不打架 · 不能盖住 适用场景 :游戏音频集成、影视短视频配乐、播客后期