Yes, you can use a spray gun with an indoor air compressor, but it is important to ensure that the compressor has enough cubic feet per minute (CFM) to handle the spray gun and that the compressor has a longer hose to allow for flexibility in movement.