added the api for the gallery