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.