Guys the answer is so simple. According to the pathinder core rulebook “. A swallowed creature can try to cut its way free with any light slashing or piercing weapon (the amount of cutting damage required to get free is equal to 1/10 the creature’s total hit points), or it can just try to escape the grapple.”