api.rst: fix some spelling/typos
Merge pull request #799 from cvrebert/patch-1

api.rst: fix some spelling/typos