AIM 5-2-8 Instrument Departure Procedures (DP) - Obstacle Departure Procedures (ODP) and Standard Instrument Departures (SID)
1. Unless specified otherwise, required obstacle clearance for all departures, including diverse, is based on the pilot crossing the departure end of the runway at least 35 feet above the departure end of runway elevation, climbing to 400 feet above the departure end of runway elevation before making the initial turn, and maintaining a minimum climb gradient of 200 feet per nautical mile...
... If an initial turn higher than 400 feet above the departure end of runway elevation is specified in the DP, the turn should be commenced at the higher altitude. If a turn is specified at a fix, the turn must be made at that fix...
*And remember, a DP or SID may have you doing something else. Hence the words "unless otherwise specified"