The time depends on whether we are talking about an agreement or an internship contract.
In the case of an internship agreement, the answer depends on the duration of the agreement. In other words, the maximum is 6 months, but it can be less if the agreement so specifies. However, at the end of these 6 months, it is possible to renew the agreement for a further 6 months. At the end of this year, the employer must change the general regime if he wants to continue with the student-worker.
On the other hand, if it is done under a traineeship contract, the residence card has the same expiry date as the traineeship contract. In this case, the maximum is 2 years, but it cannot be less than 6 months.
But you must keep in mind something important. The application is linked to one company in particular. That is to say, if, at the end of the 6 months of the internship contract you want to change the company, you will have to start another application from 0, since the initial one is not useful.

