diff --git a/doc/source/conf.py b/doc/source/conf.py
index 5d54db86a4ca65b5883795befdea8ec9bd3ded80..950ffaa5c3edcebd0ecb62131e6b73c3b0ca323b 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -37,7 +37,7 @@ for path, dirs, files in os.walk('.'):
 
 ### -- Auto-generate API documentation -----------------------------------------
 here = os.path.dirname(__file__)
-subprocess.check_output(f'sphinx-apidoc -e -f -o source/api {os.path.dirname(teqp.__file__)}', shell=True, cwd=here)
+subprocess.check_output(f'sphinx-apidoc -e -f -o api {os.path.dirname(teqp.__file__)}', shell=True, cwd=here)
 
 # -- General configuration ---------------------------------------------------