freeaiapi.aiSign Up

xAI: grok-4.5 API

grok-4.5

Grok 4.5 is xAI's frontier model for coding, agents and knowledge work, trained with expanded science, engineering and maths data.

In / out price
$1.40 / $4.20 per 1M
Official price
$2.00 / $6.00
You save
30%
Type
Text

Pricing

Price per 1M tokens compared with xAI's official list price. Last updated .

Token typeOfficialfreeaiapi.aiYou save
Input$2.00$1.4030%
Output$6.00$4.2030%
Cached input$0.30$0.2130%

Call grok-4.5 with the OpenAI SDK

Use model ID grok-4.5 with base URL https://api.freeaiapi.ai/v1. Quickstart

curl https://api.freeaiapi.ai/v1/chat/completions \
  -H "Authorization: Bearer $FREEAIAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "grok-4.5",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Frequently asked questions

Is this the official xAI API?

No. freeaiapi.ai is an independent API gateway. You get one OpenAI-compatible key that routes to xAI and other models, billed from a prepaid balance.

Do I need a credit card to start?

No. Sign up, connect Telegram and join our channel to unlock $1 trial credit. Create an API key and make your first request. Add funds when you want to keep going.

Does it work with the OpenAI SDK?

Yes. Point any OpenAI SDK or OpenAI-compatible tool at https://api.freeaiapi.ai/v1 and use your freeaiapi.ai key. No code changes beyond the base URL and key.

Not affiliated with xAI. Grok is a trademark of xAI.