# How can a generic potential transform under Lorentz transformations?

If you assume $V(x)$ to be a scalar, then Lorentz invariance implies that $$V=V(x^2)$$ where $x^2=t^2-\boldsymbol x^2$. For example, the relativistic harmonic oscillator has $$V=\frac12 k x^2$$

One may also allow for $V$ to be velocity-dependent, in which case one may use the scalars $x^2,u^2,u\cdot x$ in the potential (though I don't know of any real-life system that uses this).

If you allow for $V$ to be something more general than a scalar, then you can have a more general dependence of $V$ on $x$, e.g. in the OP, where $V$ is the zeroeth component of a vector.

A more general discussion can be found in the wikipedia entry Relativistic Lagrangian mechanics. For example, the general analysis of Lorentz invariance becomes much more transparent in the reparametrisaiton-invariant formulation, where the Lagrangian reads $$L=\frac12 m u(\tau)^2+V(x,u)$$ with $u=\frac{\mathrm d}{\mathrm d\tau}x$. Classical electrodynamics has $$V(x,u)=q\ u\cdot A(x)$$