Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
It's hard to say for certain but the concensus is that as long as you don't damage anything in the process then your warranty is okay. There doesn't appear to be anything in the terms and conditions for Applecare that specifically says you CAN'T. There's no way for Apple to know that you've disassembled the computer assuming you've been careful in the process

Saying that, I think if you sent in your iMac to AppleCare with an SSD drive installed then I imagine they might use that as a way to deny service since it's not really a 'user serviceable' computer but if that were me I'd just put the original HDD back in.

From the Applecare T&Cs:

"The Plan does not cover:

(ii) Damage to the Covered Equipment caused by accident, abuse, neglect, misuse
(including faulty installation, repair, or maintenance by anyone other than Apple or an
Apple Authorized Service Provider), unauthorized modification, extreme environment
(including extreme temperature or humidity), extreme physical or electrical stress or
interference, fluctuation or surges of electrical power, lightning, static electricity, fire,
acts of God or other external causes"

However, there have been times in the past where Apple has given an unofficial nod of approval to people opening up computers to install memory etc (Mac Mini is an example I can remember a few years back).

Ultimately it's up to you. I'm going to put my SSD in as soon as my iMac arrives (hopefully today), and I'm confident that if I have any issues I can just put the HDD back in prior to taking it to the Apple Store.
 
You should be ok as long as you're careful. And yes, I'd put the original HDD back in if you need to bring it in for warranty service.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.