Update api.py

Resolved naming inconsistency