Hesiod first gives the detailed literary account of Pandora opening her jar.
Hesiod was an ancient Greek poet generally dated to the late eighth or early seventh century BCE. His Works and Days contains the fullest early narrative: the gods create Pandora, she is sent to Epimetheus, and the container is opened, releasing the hardships associated with human existence.
Hesiod also refers to Pandora in the Theogony, but the two poems do not provide identical amounts of detail. Works and Days is the key source for the sequence involving Pandora, the jar, and elpis. Later Greek, Roman, Renaissance, and modern writers expanded or reshaped the story.
Homer is a plausible wrong answer because Homeric epic is central to Greek literature, but the Pandora episode is not a Homeric narrative. Sappho and Pindar were also major Greek poets, yet neither is the primary ancient source for this particular myth.