A Cloudflare Worker implementation for the Grok3 API.
npx wrangler deploy
npx wrangler secret put AUTH_TOKEN
npx wrangler secret put GROK3_COOKIEAUTH_TOKEN: The token you will be using like an OPENAI API token, see below in the curl commandGROK3_COOKIE: It looks likesso=ey...; sso-rw=ey..., you can copy it from your browser
curl -H "Authorization: Bearer AUTH_TOKEN" \
-X POST 'https://your-worker-url.workers.dev/v1/chat/completions' \
-H 'Content-Type: application/json' \
-d '{"messages": [{"role": "user", "content": "Hello"}], "model": "grok-3"}'MIT