← Tutorials
Beginner~15 min
Generate your first research paper with OpenDraft
From a topic to a 40-page paper with proper citations in under 15 minutes.
Uses the OpenDraft repository.
What you'll get
By the end of this tutorial, you'll have a complete research paper with:
- •20,000+ words across 40+ pages
- •Real academic sources from OpenAlex
- •Proper citations in APA, MLA, or Chicago format
- •Export to .docx for editing in Word or Google Docs
Prerequisites
- 1.Python 3.10 or higher
- 2.A Gemini API key (free tier from Google AI Studio)
Step 1: Clone and install
git clone https://github.com/federicodeponte/opendraft
cd opendraft
pip install -r requirements.txt
Step 2: Add your API key
Create a .env file in the project root:
GEMINI_API_KEY=your_api_key_here
Step 3: Generate your paper
python opendraft.py --topic "Your research topic here"
That's it. OpenDraft will:
- 1.Search OpenAlex for real academic sources relevant to your topic
- 2.Generate an outline with sections and subsections
- 3.Write each section using 19 AI agents working in parallel
- 4.Format citations and generate a bibliography
- 5.Export to .docx
The whole process takes about 10-15 minutes.
Options
--citation-style apa|mla|chicagoChoose your citation format (default: APA)
--pages 20Target page count (default: 40)
Example output
Want to see what the output looks like before running it yourself?
Download sample PDFNext steps
- •Read the code. The orchestration logic in
opendraft.pyis well-commented. - •Customize the prompts to match your writing style or institution's requirements.
- •Star the repo and open issues if you find bugs or want features.