suffix
Attaches to the -masu stem of a verb or to a noun to express that the action or thing is worthwhile, produces a satisfying result, or has value. Often used in set phrases like 生きがい (reason for living) or やりがい (sense of fulfillment).
See also: 甲斐 (かい)
この仕事はやりがいがある。
This job is rewarding.
努力した甲斐があって、試験に合格した。
My efforts paid off and I passed the exam.
かい is the same suffix in its kun'yomi reading, used in the same way but less common in modern Japanese. がい is the more standard reading.
Derived from the noun 甲斐 (かい), meaning 'worth' or 'effect'. The reading shifted to がい when used as a suffix.