PASAR API

🇲🇾 xAI Grok API

← directory
xAIAItier: commercialauth: bearerpricing: paidverified 2026-06-29

Grok 4/4.1 LLMs via OpenAI-compatible REST endpoint. Pay-per-token from $0.20/1M input tokens. New accounts get $25 promo credits. Strong reasoning and coding.

View docs ↗ More AI APIs

Get started

# xAI Grok API needs a bearer token ~ get yours at:
# https://docs.x.ai/docs/overview
curl 'https://api.x.ai/v1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

AI prompt

I'm integrating a Malaysia API into my app.

API: xAI Grok API
Provider: xAI
Auth: requires a bearer token (sign up: https://docs.x.ai/docs/overview)
Pricing: paid
Base URL: https://api.x.ai/v1
Important note: Grok 4/4.1 LLMs via OpenAI-compatible REST endpoint. Pay-per-token from $0.20/1M input tokens. New accounts get $25 promo credits. Strong reasoning and coding.

Source: xAI (https://docs.x.ai/docs/overview)
Source type: Provider API or developer docs
Endpoint type: Provider API base URL
Integration difficulty: Needs bearer
Last checked: 2026-06-29
Production caveat: Keep credentials server-side and confirm current limits, pricing, and webhook/error behaviour in the provider docs.

Help me set up the correct onboarding/authentication path and make the first valid request ~ explain exactly where credentials go and what must happen before production.

Related AI APIs

OpenAI API ~ GPT models, embeddings, images, audioAnthropic Claude API ~ Claude LLM messagesGoogle Gemini API ~ multimodal LLMGroq API ~ fast LLM inferenceMistral AI API ~ open and frontier LLMsCohere API ~ LLMs, embeddings, rerankPerplexity API ~ web-grounded answers and searchOpenRouter API ~ one endpoint for many LLMsHugging Face Inference Providers ~ run open modelsReplicate API ~ run and host ML models