Trisiras

Trishiras (त्रिशिरस्), also referred to as Vishvarupa, was the three-headed son of the craftsman god Tvashta. He was killed by Indra, the king of the devas. To avenge his death, Tvashta later created the demon Vritra.

Vedic
In the Rigveda, Vishvarupa is the son of the god Tvashta and the guardian of cows. He is an enemy of Indra, the king of the gods, who comes into conflict with him. Indra is victorious in the conflict and Aptya (an ally of Indra) kills Vishvarupa and is later beheaded by Indra. Another verse states that Indra stole Vishvarupa's cattle and released them. The Brihaddevata narrates that Vishvarupa is the son of Tvashta and his asura wife, and the twin of Saranyu. He is sent by the demons to become the priest of the devas, desiring to destroy them. Indra suspected his intentions and beheaded him. His three heads turn into three different birds. Furious by the demise of his son, Tvashtr creates a demon called Vritra to avenge his death.

Epic and Puranic
According to the Udyoga Parva of the epic Mahabharata and the Devi Bhagavata Purana, Tvashta had a conflict with Indra and wanted to dethrone him. With his wife Virocana (or Rechana), who was the daughter of Prahlada and belonged to Asura race, Tvashta had Trishiras, who was born with three heads. His three heads were each named Somapītha, Surāpītha, and Annāda as each head consumed Soma, Sura, and food, respectively. It is also told that one head was responsible for drinking; with another head, he observed his surroundings; and with his last head, he read the Vedas. Trishiras grew powerful and performed penance to become more powerful. Indra became frightened of him, and sent Apsaras (nymphs) to seduce him and break his penance. However, Trisharas was unaffected and Indra went to him and killed him using his thunderbolt. He was concerned about the possibility of Trishiras reviving, so he sent a carpenter to cut off each of his heads. From the head that chanted Vedic mantras rose the Kapiñjala birds; from the head used for drinking soma rose the Kalapiṅga birds and from the third head rose the Tittiri birds. Tvashta performed a yajna, from which Vritra emerged to avenge Trishiras's death.

The Shanti Parva of the Mahabharata, Bhagavata Purana, Brahmavaivarta Purana narrates a different myth about Vishvarupa and portray him as a guru or priest of Indra. According to this version, Brihaspati, the guru of the devas (gods), refused to perform yajna (sacrifice) after he was insulted by Indra. This led the devas to lose to their enemies, the Asuras. On the advice of the creator god Brahma, Indra appointed Vishvarupa, the son of Tvashta and Rechana, as the new priest of the sacrifice. However, Vishvarupa was also related to the Asuras through his mother and didn't perform the sacrifice appropriately. Indra suspected his allegiance and beheaded Vishvarupa.

These texts state that Indra sinned Brahmanahatya (murder of a Brahman) for killing Trishiras, who was both a Brahama and his guru. The Brahmavaivarta Purana also attests that Vishvarupa had a son named Sutapa.