← 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

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|chicago

Choose your citation format (default: APA)

--pages 20

Target page count (default: 40)

Example output

Want to see what the output looks like before running it yourself?

Download sample PDF

Next steps

  • Read the code. The orchestration logic in opendraft.py is 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.