better API inference