I moved your post to a more appropriate place.
There are several good threads here - e.g.
http://forums.sketchucation.com/viewtopic.php?f=180&t=10142
Also 'Automatic Sketchup' is a good general primer.
http://www.autosketchup.com/

On your particular subject...
You have already go something like
mytext=Sketchup.active_model.active_entities.add_3d_text(xxxxxxxxxxxxxx)
where ' xxxxxxxxxxxxxx' represents the various arguments that you need to pass to the method...
This then adds the 3d-text as 'raw geometry' into the current context [usually the model's entities].
If you look at the API section on 'entities'
https://developers.google.com/sketchup/docs/ourdoc/entities
there are lots of ways to add things to ANY 'entities' collection...
So to add a group to the model.entities use
group=Sketchup.active_model.entities.add_group()
Now you have a group in the model and can add things to that group's entities, instead of the model, thus...
group.entities.add_3d_text(xxxxxxxxxxxxxx)
Now the 3d-text's geometry is inside 'group'...
You can add more things into it, or change its name, material, layer etc as you now have a reference to it ' group'... You can even add groups inside such new groups etc, as you desire...