add canonicalize to api.py, add canonicalize to documentation