xAI¶
Setup¶
Get your API key from the xAI Console, and export it as an environment variable:
Examples¶
from toolfront import Database
db = Database("postgresql://user:pass@host/db")
# Latest Grok version
result = db.ask(..., model="grok:grok-2-1212")
xAI Model Names
Always specify an xAI model with the grok:
prefix.