Your description is a little vague, but would something like Test::MockObject help solve your problem? If you're using it in a way in which the API is represented by an object or objects, something like this might let you test the rest of your program without having to actually use the API.
Hm, well what i was getting at is: how can i mock something that is supposed to be coming over the network, in this case, the results from the webservice. I want to do this in a clean and modular way.