Grok API access guide: keys, pricing, और free tier का क्या हुआ
Updated 2026-07-15
Grok API access console.x.ai से चलता है: एक account बनाएं, prepaid credits load करें, एक key generate करें, और https://api.x.ai/v1 पर OpenAI-compatible endpoint call करें। 2026 में कोई standing free API tier नहीं है, तो यह guide cover करती है कि उसकी जगह क्या आया, current published pricing, xAI की fiction policy का एक neutral summary, और हल्के usage के लिए एक discounted gateway route।
Quick answer: 2026 में Grok API key कैसे लें
चार steps, कोई waitlist नहीं। console.x.ai पर email या X account से sign up करें। एक payment method add करें और prepaid credits load करें, क्योंकि xAI बाद में invoice करने की बजाय per-team credit balance के against bill करता है। Console dashboard से एक API key बनाएं। फिर OpenAI Chat Completions API जैसे ही request schema के साथ https://api.x.ai/v1 पर requests भेजें, यानी OpenAI SDKs सिर्फ दो लाइनें बदलने से काम करते हैं: base URL और key। अगर आपने "grok api free" search किया: X और grok.com पर consumer Grok chatbot का एक free usage tier है, लेकिन developer API का नहीं। 2024 public beta वाले $25 monthly credits खत्म हो चुके हैं, और बचे हुए credit programs के साथ conditions जुड़ी हैं। Details अगले section में हैं। कोई भी code copy करने से पहले एक naming note। xAI side पर model IDs grok-4 family pattern follow करती हैं (जैसे grok-4 और fast variants), और xAI पुराने point releases को एक schedule पर retire करता है। महीनों पुराने किसी tutorial में मिली ID hardcode करने की बजाय /v1/models endpoint या console से live list लें।
Grok API के free tier का क्या हुआ
xAI ने कभी permanent free API tier offer नहीं किया, लेकिन उसने कई programs चलाए हैं जिन्हें लोग एक ही समझ लेते हैं। यही वजह है कि search results एक-दूसरे से disagree करते हैं। 2024 के आखिर में API public beta के दौरान, हर account को हर महीने $25 free credits मिलते थे। Beta बंद होने के साथ वह program खत्म हो गया। 2025 के मध्य से, xAI ने periodically एक बड़ा monthly credit grant offer किया है, community-reported लगभग $150 प्रति महीने, उन teams के लिए जो training के लिए अपना API request data share करने के लिए opt in करती हैं और एक छोटा prior-spend threshold पूरा करती हैं। यह eligible countries तक limited है और terms एक से ज़्यादा बार बदल चुके हैं, तो इसे plan करने लायक एक fact की बजाय console में verify करने लायक एक program मानें। अलग से, नए console accounts को कभी-कभी छोटे promotional trial credits मिलते हैं, लेकिन ये occasional होते हैं, guaranteed नहीं। नीचे दी table 2026 में "grok api free" का honest version है।
| Option | आपको असल में क्या मिलता है | The catch |
|---|---|---|
| Grok on X / grok.com | Daily limits के साथ free chatbot usage | सिर्फ consumer product, कोई API key नहीं |
| Public beta credits ($25/mo) | खत्म हो चुका | 2024 beta के साथ बंद; कोई replacement नहीं |
| Data-sharing credits | Monthly API credits, community-reported लगभग $150/mo | Request-data sharing में opt in, prior spend, eligible countries चाहिए |
| Promotional trial credits | कुछ नए accounts पर छोटा one-time credit | Occasional, guaranteed नहीं, expire होता है |
| Prepaid pay-as-you-go | पूरा API access, कोई expiry games नहीं | आप pay करते हैं, लेकिन fast models पर कम per-token rates |
Grok API pricing: published rates
xAI प्रति million tokens price करता है, अलग input और output rates के साथ, और lineup को एक flagship tier और एक fast tier में split करता है। ज़्यादातर applications के लिए fast tier interesting है: इसमें बहुत लंबा context window है और rates जो हर दूसरी US flagship lab को undercut करती हैं। नीचे दी rates Grok 4 generation के लिए published docs.x.ai figures हैं। नए point releases ने same tier structure रखा है, लेकिन xAI बिना ज़्यादा ceremony के rates adjust करता है और models retire करता है, तो traffic commit करने से पहले live pricing page के against verify करें। दो billing details जो लोगों को पकड़ती हैं। पहली, cached input tokens एक reduced rate पर bill होते हैं, जो उन chat applications के लिए मायने रखता है जो हर turn पर एक लंबा system prompt resend करती हैं। दूसरी, Live Search (built-in web search tool) token costs के ऊपर, retrieve किए गए हर source पर अलग से bill होता है। अगर आपके requests search tools enable करते हैं, तो invoice एक pure token estimate से बड़ा होगा।
| Model | Input / 1M tokens | Output / 1M tokens | Notes |
|---|---|---|---|
| Grok 4 (flagship) | $3.00 | $15.00 | 128K context से आगे higher rates apply होती हैं |
| Grok 4 Fast | $0.20 | $0.50 | Reasoning और non-reasoning variants, बहुत लंबा context |
| Grok 3 Mini | $0.30 | $0.50 | Legacy small model |
| Grok Code Fast | $0.20 | $1.50 | Code-focused variant |
Fiction के लिए xAI content policy, neutrally summarized
Grok API में काफी interest fiction और roleplay developers से आती है, तो forums जो claim करते हैं उसकी बजाय written policy असल में क्या कहती है यह बताना ज़रूरी है। xAI की published acceptable use policy दूसरी US labs से अलग line लेती है: यह clearly fictional work में depiction को real-world harm से अलग करती है, और जब context unambiguously fiction हो तो adult users के लिए mature themes permit करती है। इससे xAI इस तरह की written allowance वाला इकलौता major US provider बन जाता है। Anthropic की usage policy fiction में भी, sexually explicit content को पूरी तरह prohibit करती है, और Google Gemini की API की adjustable safety settings के बावजूद explicit content को restrict करता है। Same document fiction में और हर जगह लागू होने वाली सख्त lines भी खींचता है: किसी भी framing में minors से जुड़ा sexual content नहीं, बिना consent के real identifiable people की depictions नहीं, और actual illegal activity को facilitate करने वाला कुछ भी नहीं। यह adult fiction features बनाने का एक written basis है, कोई anything-goes switch नहीं। अगर आप इसके ऊपर build करते हैं, तब भी आप अपने users को age gating देते हैं, और जिस भी platform पर publish करते हैं उसकी अपनी terms of service के हिसाब से compliance देते हैं, जो अक्सर model provider से ज़्यादा strict होती हैं। हर major provider fiction को कैसे treat करता है इसकी side-by-side के लिए, इस page के नीचे linked content policy comparison देखें।
Quickstart: दो मिनट में Grok API call करें
Endpoint OpenAI-compatible है, तो नीचे दोनों snippets standard Chat Completions shape में हैं। पहले अपनी key को एक environment variable के रूप में export करें; keys को source files में paste न करें। curl version, key बनाने के तुरंत बाद एक smoke test के लिए useful:
curl https://api.x.ai/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $XAI_API_KEY" \
-d '{
"model": "grok-4",
"messages": [
{"role": "user", "content": "Reply with exactly: key works"}
]
}'हल्के Grok usage के लिए एक discounted gateway option
Production workloads के लिए direct xAI access सही choice है। लेकिन अगर आप कभी-कभी Grok चाहते हैं, दूसरे models के साथ, और बिना एक और billing account खोले, तो एक OpenAI-compatible gateway छोटा रास्ता है। APIsRouter grok-4.5, xAI का flagship general model, $1.60 input और $4.80 output प्रति 1M tokens पर carry करता है, इसके official $2 / $6 list rates से 20% नीचे, साथ में DeepSeek, GLM, Kimi, Claude, Gemini, और GPT models एक balance पर। Billing pay-as-you-go है, कोई subscription नहीं, /topup पर checkout बिना account बनाए काम करता है (पहले pay करें, key email पर आती है), पहला top-up +100% balance जोड़ता है, और global models official pricing से 20% नीचे चलते हैं, Chinese models official rates से नीचे। Chat और roleplay frontends के लिए जो spec मायने रखती है वह 500K context window है: हर turn पर एक बड़ा character card और लंबी chat history resend करना marathon sessions में भी एक window के अंदर रहता है, हालांकि input tokens अब भी bill drive करते हैं। Same key किसी भी OpenAI-compatible client में काम करती है:
# SillyTavern (Chat Completion source: Custom OpenAI-compatible)
Base URL: https://api.apisrouter.com/v1
# model list auto-populates from /v1/models with your key
Model: grok-4.5
# JanitorAI proxy config (needs the FULL endpoint)
Endpoint: https://api.apisrouter.com/v1/chat/completions
Model: grok-4.5
API key: sk-... (from the checkout email)Creative writing के models में Grok कहां fit बैठता है
कोई एक model हर rating और हर budget नहीं जीतता। Practical setup एक ऐसा frontend है जो एक multi-model endpoint पर point हो, तो model बदलना एक नया account नहीं बल्कि एक dropdown change है।
- Grok: distinctive asset xAI का adult users के लिए written fiction allowance है, जो कोई और US flagship provider publish नहीं करता। Prose quality competitive है, और fast tier लंबी sessions को cheap रखती है।
- DeepSeek V4 family (deepseek-v4-flash, deepseek-v4-pro): लंबे roleplay के लिए community favorite और प्रति token सबसे strong value; volume के लिए flash, complex scenes में बेहतर instruction-following के लिए pro।
- GLM-5, Kimi K2.6, MiMo: solid long-context behavior वाले value picks; अपने specific card format के against DeepSeek से A/B test करने लायक।
- Claude Sonnet 4.6 और Opus 4.7: SFW creative writing के लिए available सबसे high prose quality; Anthropic की policy explicit content prohibit करती है, तो इन्हें all-ages work तक scope करें।
अक्सर पूछे जाने वाले प्रश्न
क्या Grok API free है?
नहीं। Consumer Grok chatbot में एक free tier है, लेकिन developer API prepaid pay-as-you-go है। $25 monthly beta credits 2024 में खत्म हो गए। xAI ने periodically उन teams को monthly credits offer किए हैं जो API request data share करने के लिए opt in करती हैं, eligibility और prior spend के अधीन, लेकिन यह एक conditional program है, कोई free tier नहीं।
Grok API की cost कितनी है?
Published Grok 4 generation rates: flagship प्रति 1M tokens $3.00 input और $15.00 output पर, और fast tier $0.20 input और $0.50 output पर। Cached input कम bill होता है, flagship पर 128K context से आगे rates बढ़ती हैं, और Live Search हर source पर अलग से bill होता है। Current figures के लिए docs.x.ai check करें।
मुझे Grok API key कैसे मिलेगी?
console.x.ai पर एक account बनाएं, एक payment method add करें, prepaid credits load करें, और dashboard से एक key generate करें। कोई waitlist या approval step नहीं है। Keys per team scoped होती हैं, और usage credit balance से घटता है।
क्या Grok API OpenAI SDK के साथ compatible है?
हां। https://api.x.ai/v1 पर endpoint OpenAI Chat Completions request format accept करता है, तो official OpenAI SDKs base_url और api_key बदलने के बाद काम करते हैं। ज़्यादातर OpenAI-compatible tools और frontends same तरीके से काम करते हैं।
क्या Grok पर content restrictions हैं?
हां। xAI की published acceptable use policy clearly fictional contexts में adult users के लिए mature themes permit करती है, जो दूसरी US labs से लिखित रूप में ज़्यादा permissive है, लेकिन यह minors से जुड़ा sexual content, बिना consent के real people की depictions, और illegal activity enable करने वाले content को prohibit करती है। इसके ऊपर बनी apps को भी age gating चाहिए और अपने platform की terms follow करनी होती हैं।
क्या मैं Grok को SillyTavern या JanitorAI के साथ use कर सकता हूं?
हां, किसी भी OpenAI-compatible endpoint के through। SillyTavern में, /v1 पर खत्म होने वाले base URL के साथ एक custom Chat Completion source set करें और auto-populated list से Grok model चुनें। JanitorAI को पूरा chat completions URL, model name, और key चाहिए। Direct xAI keys और gateway keys दोनों इसी तरह काम करती हैं।