The Prophet ﷺ ruled that for a fetus the compensation is a slave, male or female. The man against whom the judgment was given said, "Is blood money to be paid for one who neither ate nor drank, who neither cried out nor gave any sound of life? Such a case should be dismissed."The Prophet replied, "This is the speech of a poet. For it there is a slave, male or female."
وبإسناده قال في الجنين غرة عبد أو أمة فقال الذي قضي عليه أيعقل من لا أكل ولا شرب ولا صاح ولا استهل فمثل ذلك يطل فقال إن هذا القول لقول شاعر فيه غرة عبد أو أمة
Its isnad is sahih. Bukhari narrated it, 13/298, no. 7317, in Fath al-Bari, in the chapter on holding fast (Itisam), on what has been said about ijtihad in judgment. Muslim narrated it, 3/1309, no. 1681, in the chapter on qasamah, on the blood money for a fetus. Abu Dawud narrated it, 4/192, no. 4576. Tirmidhi narrated it, 3/450, no. 1153. Nasai narrated it, 6/108, no. 3329. Ibn Majah narrated it, 2/882, no. 2639. And Darimi narrated it, 1/209, no. 2254.