take input for api model