api for terminal