Exactly, speed does not matter, the ai line is not a "ghost lap".
In fact, it is recommended to do it as slowly as possible, it is also recommended to do this ai line with a similar car or the same car with which you are going to race on the track.
To give you a basic idea of how to make an ai line, keep this factor in mind:
The older the car the ai line has to go to the center of the track, modern cars that (above all) brake well, tighter to the curve, for example with a modern f1 you can adjust the curves almost to the maximum, but that line wouldn't fit a car from the 60s-80s
Edit, a very very important thing to make an optimal line of trace is that the boundaries of the track must be perfect, that completely affects the line of ai (the red stripes on the sides of the track)