For a single particle, we can write the action integral in either of two ways:
I = ∫ L dτ where τ is the particle's proper time, and in this case L is a Lorentz invariant.
Otherwise, in terms of the coordinate time t,
I = ∫L' dt
In the latter case L' is not Lorentz invariant. For a point particle with mass m, an expression that gives the right equations of motion is
L' = mc2√(1 - β2) - V
where V(x) is an external potential. See for example the chapter in Goldstein.
For N particles this form can be easily generalized:
L' = ∑ mic2√(1 - βi2) - V
where V(x1, x2, ...) is the interaction potential.