Corrected minor typographical errors.

Corrected minor typographical errors in api.py.