To get Ace you need to do the questline in the Batcave. Finish both quests to get the character token.
To unlock Krypto you need to go to the Zamaron hub where you race him. Once you win you'll get the character token.
Then you just need to buy the two characters and switch to them in free play. I don't recall how much they cost, but as with most Lego games once you have the multipliers on the character token costs are minimal.