The following Magma code defines one elliptic curve for each of the 13 rational j-invariants with CM defined over Q.
E3:=EllipticCurve([0,0,1,0,0]);
E12:=EllipticCurve([0,0,0,-15,22]);
E27:=EllipticCurve([0,0,1,-30,63]);
E4:=EllipticCurve([0,0,0,1,0]);
E16:=EllipticCurve([0,0,0,-11,14]);
E7:=EllipticCurve([1,-1,0,-2,-1]);
E28:=EllipticCurve([0,0,0,-595,5586]);
E8:=EllipticCurve([0,4,0,2,0]);
E11:=EllipticCurve([0,-1,1,-7,10]);
E19:=EllipticCurve([0,0,1,-38,90]);
E43:=EllipticCurve([0,0,1,-860,9707]);
E67:=EllipticCurve([0,0,1,-7370,243528]);
E163:=EllipticCurve([0,0,1,-2174420,1234136692]);
ECM:=[E3,E12,E27,E4,E16,E7,E28,E8,E11,E19,E43,E67,E163];
for E in ECM do
E, HasComplexMultiplication(E);
end for;
CMj:=[jInvariant(E) : E in ECM];
CMj;