xAI
ModelAPI for xAI's Grok models for text, code, images, video and voice
- Fiyat
- Pay per use
- Erişim
- API key
Hakkında
The xAI API, now run by SpaceXAI, serves Grok 4.7 for chat, coding and agents, plus Grok Imagine for images and video and a voice API. It has built-in web and X search tools. A US-only endpoint costs 10% more.
Neler yapabilirsin
- Generate text and code with Grok 4.7 through the Responses API
- Generate and edit images and videos with Grok Imagine
- Ground answers in live results with built-in web and X search
Başlarken
- Sign up at console.x.ai and add credits
- Create an API key
- Set XAI_API_KEY in your environment
Örnek kod
curl https://api.x.ai/v1/responses \
-H "Authorization: Bearer $XAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "grok-4.7",
"input": "Fix this function and explain the bug: function median(a){a.sort();return a[a.length/2]}"
}'Ayrıntılar
- Barındırma
- Hazır hizmet (bulut)
- Kullanılabildiği yerler
- Tüm dünya
- Resmi SDK'lar
- Python
- MCP sunucusu
- Yok