Documentation
¶
Overview ¶
Package xai implements the public xAI Responses API transport.
Index ¶
Constants ¶
const ConsumerBaseURL = consumerBaseURL
ConsumerBaseURL is the pinned Grok consumer proxy. It is exported for read-only integrations such as plan usage; API-key traffic must not use it.
Variables ¶
This section is empty.
Functions ¶
func SetConsumerHeaders ¶
SetConsumerHeaders applies the compatibility contract required by the Grok consumer proxy. Keep all proxy callers on this single implementation.
Types ¶
type XAI ¶
type XAI struct {
// contains filtered or unexported fields
}
XAI is the xAI public API-key provider. It deliberately has no custom-base URL constructor: alternate routes and credentials are distinct xAI products, not OpenAI-compatible configuration.
func NewOAuth ¶
NewOAuth creates an xAI consumer provider. Consumer OAuth is intentionally pinned to the Grok CLI proxy; it must never fall back to api.x.ai.
func (*XAI) SupportsDocuments ¶
SupportsDocuments is false until xAI input_file support is verified. Images are Responses input_image parts and remain supported by the shared codec.