PASAR API

🇲🇾 xAI Grok API

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

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 credentials ~ get yours at:
# https://docs.x.ai/api
curl 'https://api.x.ai/v1' \
  -H 'Authorization: Bearer YOUR_TOKEN'

AI prompt

I'm integrating a Malaysian API into my app.

API: xAI Grok API
Provider: xAI
Auth: requires credentials (sign up: https://docs.x.ai/api)
Pricing: paid
Base URL: https://api.x.ai/v1

Help me set up authentication and make my first successful request ~ explain exactly where the credentials go.

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