If $a$ and $b$ are the roots of $x^2 - 2x + 5$, what is $|a^8 + b^8|$?

1. **Identify the roots using Vieta's formulas:**
   Given the quadratic equation \(x^2 - 2x + 5 = 0\), by Vieta's formulas, the sum and product of the roots \(a\) and \(b\) are:
   \[
   a + b = 2 \quad \text{and} \quad ab = 5.
   \]

2. **Calculate \(a^2 + b^2\):**
   Using the identity \(a^2 + b^2 = (a + b)^2 - 2ab\):
   \[
   a^2 + b^2 = (a + b)^2 - 2ab = 2^2 - 2 \cdot 5 = 4 - 10 = -6.
   \]

3. **Calculate \(a^4 + b^4\):**
   Using the identity \(a^4 + b^4 = (a^2 + b^2)^2 - 2(ab)^2\):
   \[
   a^4 + b^4 = (a^2 + b^2)^2 - 2(ab)^2 = (-6)^2 - 2 \cdot 5^2 = 36 - 2 \cdot 25 = 36 - 50 = -14.
   \]

4. **Calculate \(a^8 + b^8\):**
   Using the identity \(a^8 + b^8 = (a^4 + b^4)^2 - 2(ab)^4\):
   \[
   a^8 + b^8 = (a^4 + b^4)^2 - 2(ab)^4 = (-14)^2 - 2 \cdot 5^4 = 196 - 2 \cdot 625 = 196 - 1250 = -1054.
   \]

5. **Find the absolute value:**
   The absolute value of \(a^8 + b^8\) is:
   \[
   |a^8 + b^8| = |-1054| = 1054.
   \]

The final answer is \(\boxed{1054}\).