The Ruby API can only be used from within SketchUp, correct.
As for the C SDK, where are you stuck? What prevents you from creating terrain geometry? The C API is generic, there is no limitations imposed to what it creates - so creating terrains will be possible.