Get a 12-gauge cord as short as possible.
No longer than 6 feet, and definitely 12-gauge or thicker. Window air conditioners pull a lot of current, especially on startup, and a thin or long extension cord can overheat, cause voltage drop, or even start a fire.
Use a cord rated for at least 15 amps (12-gauge is the safest bet for most window units; 14-gauge might work for small 5,000 BTU models, but I’d still go 12). Keep it short — longer cords increase resistance and heat. Never use a 16-gauge light-duty cord.
Don’t risk your circuit for a few bucks on the wrong cord.