
Paper2Code
API Overview
Our own services
API Console
Log in to explore more features! Click to Log In
API Reference (3)
| API Description | API Endpoint | Request Method | Stability | Parameter Description |
|---|---|---|---|---|
Create Paper2Code Task | POST | Stable | View Details | |
Document Details Create a Paper2Code task, based on the paper: https://arxiv.org/abs/2504.17192 In the field of machine learning, code implementations for scientific papers are often missing, leading to slow research reproduction and innovation. However, recent Large Language Models (LLMs) have shown excellence in understanding scientific literature and generating high-quality code. To this end, we propose PaperCoder, a multi-agent LLM framework designed to automatically convert machine learning papers into functional code repositories. The PaperCoder process is divided into three stages: the planning stage creates an implementation roadmap, designs the system architecture, identifies file dependencies, and generates configuration files; the analysis stage interprets implementation details; and the generation stage produces modular, dependency-aware code. Our experiments demonstrate the effectiveness of PaperCoder in producing high-quality implementations, particularly excelling in the Paper2CodeBench and PaperBench Code-Dev benchmarks. Furthermore, the framework shows strong execution capabilities across different LLM models, requiring only minor modifications to 0.81% of code lines to run. Despite implementation challenges, PaperCoder’s work is a significant step toward accelerating scientific research progress. Future directions include expanding to other domains where validation does not primarily rely on code and enhancing the ability to handle visual inputs. After successfully creating the task, obtain the task_id and use it to poll the task query interface; a single task typically takes about 10 minutes. Price: Based on the pricing of the model called Request Parameters Header ParametersAuthorizationstringRequired Example Value: Bearer {{YOUR_API_KEY}}Request Body multipart/form-datapaper_filestringRequired Paper file (PDF format) model_versionstringOptional Model version, default is “o3-mini”, recommended to use “o3-mini” Example Value: o3-mini | ||||
Query Paper2Code Task | GET | Stable | View Details | |
Document Details Create a Paper2Code task, based on the paper: https://arxiv.org/abs/2504.17192 In the field of machine learning, code implementations for scientific papers are often missing, leading to slow research reproduction and innovation. However, recent Large Language Models (LLMs) have shown excellence in understanding scientific literature and generating high-quality code. To this end, we propose PaperCoder, a multi-agent LLM framework designed to automatically convert machine learning papers into functional code repositories. The PaperCoder process is divided into three stages: the planning stage creates an implementation roadmap, designs the system architecture, identifies file dependencies, and generates configuration files; the analysis stage interprets implementation details; and the generation stage produces modular, dependency-aware code. Our experiments demonstrate the effectiveness of PaperCoder in producing high-quality implementations, particularly excelling in the Paper2CodeBench and PaperBench Code-Dev benchmarks. Furthermore, the framework shows strong execution capabilities across different LLM models, requiring only minor modifications to 0.81% of code lines to run. Despite implementation challenges, PaperCoder’s work is a significant step toward accelerating scientific research progress. Future directions include expanding to other domains where validation does not primarily rely on code and enhancing the ability to handle visual inputs. After successfully creating the task, obtain the task_id and use it to poll the task query interface; a single task typically takes about 10 minutes. Price: Based on the pricing of the model called Request Parameters Header ParametersAuthorizationstringRequired Example Value: Bearer {{YOUR_API_KEY}}Request Body multipart/form-datapaper_filestringRequired Paper file (PDF format) model_versionstringOptional Model version, default is “o3-mini”, recommended to use “o3-mini” Example Value: o3-mini | ||||
Create a paper2code task (pass parameters in JSON) | POST | Stable | View Details | |
Document Details Create a paper2code task from the paper: https://arxiv.org/abs/2504.17192 In the field of machine learning, code implementations for scientific papers are often missing, which slows down research reproducibility and innovation. However, recently, large language models (LLMs) have demonstrated outstanding performance in understanding scientific literature and generating high-quality code. To address this, we propose PaperCoder, a multi-agent LLM framework for automatically converting machine learning papers into functional code repositories. The PaperCoder workflow is divided into three stages: the planning stage formulates an implementation roadmap, designs the system architecture, identifies file dependencies, and generates configuration files; the analysis stage interprets implementation details; and the generation stage produces modular, dependency-aware code. Our experiments demonstrate the effectiveness of PaperCoder in high-quality implementations, especially excelling in the Paper2CodeBench and PaperBench Code-Dev benchmarks. In addition, the framework shows strong execution capabilities across different LLM models, requiring only minor modifications to 0.81% of code lines to run. Despite implementation challenges, PaperCoder represents an important step toward accelerating scientific research progress. Future work includes expanding to other domains where validation is not code-centric and enhancing the ability to handle visual inputs. After successfully creating the task, obtain the task_id. Use the task_id to poll the task query interface. Each task typically takes about 10 minutes. Pricing: Calculated based on the model invocation cost Request Parameters Header ParametersAuthorizationstringRequired Example Value: Bearer {{YOUR_API_KEY}}Request Body application/jsonpaper_urlstringRequired Paper link (PDF format) Example Value: https://file.302ai.cn/gpt/imgs/20250708/788f37f30f1547f18fc101b825b939c0.pdfmodel_versionstringOptional Model version, defaults to o3-mini. In theory, other inference models on 302.ai such as “o4-mini”, “gemini-2.0-pro-exp-02-05”, etc. are also supported. Example Value: o3-mini | ||||
API Pricing
| Model | Description | 302.AI Price |
|---|
Create Paper2Code Task | Create Paper2Code Task |
|
Query Paper2Code Task | Query Paper2Code Task |
|
Create a paper2code task | Create a paper2code task (pass parameters in JSON) |
|