Fixed docstrings in api.py