The valve in the pipe just before the muffler is called the EXUP valve.
The AIS is completely different and you really need to do more reading about your bike before you do anything else to it.
With a stock pipe leave the EXUP alone. It rarely if ever closes and it only does it for a split second.
99% of the time it's open, and does nothing to rob you of power, and some people will say it actually provides you with more power/torque at certain rpm ranges.
In it's natural state, the valve is wide open.
There's plenty of threads, pictures and an awesome video or two around this forum about both the AIS and the EXUP.
Start searching and reading before you do anything else.
_________________
2008 WR250X
Gearing: 13t - 48t
Power Commander 5 / PC-V
Airbox Door Removed - Flapper glued - AIS removed
FmF Q4
Bridgestone Battlax BT-003rs