use marked api instead of cli