Better handling of api formats