merge api.py