{"library":"xai-sdk","type":"library","category":null,"description":"Official Python SDK for xAI's Grok models — gRPC-based client for chat, image generation, and agentic tool use. Also supports OpenAI-compatible REST API.","language":"python","status":"active","version":"1.7.0","tags":["llm","grok","openai-compatible","grpc","python","search","agentic"],"last_verified":"Tue Jun 09","install":[{"cmd":"pip install xai-sdk","imports":["from xai_sdk import Client","from openai import OpenAI\nclient = OpenAI(api_key=os.environ['XAI_API_KEY'], base_url='https://api.x.ai/v1')"]},{"cmd":"pip install openai","imports":[]}],"homepage":"https://x.ai","github":"https://github.com/xai-org/xai-sdk-python","docs":"https://docs.x.ai","changelog":null,"pypi":"https://pypi.org/project/xai-sdk/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"3.10–3.9","success_rate":65,"avg_install_s":6.2,"avg_import_s":2.06,"wheel_type":"wheel"},"url":"https://checklist.day/v1/registry/xai-sdk/compatibility"}}