api call returns the number of bytes