Historically, Sanhedrin is the correct spelling for this ancient Jewish council, but the spelling Sanhedrim is often seen.
The word comes from the Greek synhedrion, “council,” which is made up of syn, “together,” and hedra, “seat,” hence, literally, “seat together.”