gRPC API
Raw Sampling
xai_api.Sample
An API service for sampling the responses of available language models.
Methods: xai_api.Sample
SampleTextunaryGet raw sampling of text response from the model inference.
SampleTextStreamingserver streamingGet streaming raw sampling of text response from the model inference.
Last updated:September 2, 2026