Skip to content

xAI

Overview

xAI builds Grok, a family of large language models with strong reasoning capabilities. Floopy proxies requests to xAI’s OpenAI-compatible API, supporting both reasoning and non-reasoning modes.

Supported Models

ModelContext WindowNotes
grok-4.20-reasoning131KFlagship reasoning model
grok-4.20-non-reasoning131KFlagship model, standard mode
grok-4.20-multi-agent131KOptimized for multi-agent workflows
grok-4-1-fast-reasoning131KCost-efficient reasoning model
grok-4-1-fast-non-reasoning131KCost-efficient standard model

Setup

  1. Go to Settings > Providers in the dashboard.
  2. Click Add provider and select xAI.
  3. Paste your xAI API key and click Save.

Usage

import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.floopy.ai/v1",
apiKey: process.env.FLOOPY_API_KEY,
});
const response = await client.chat.completions.create({
model: "grok-4.20-reasoning",
messages: [{ role: "user", content: "Explain quantum computing." }],
});

Provider-Specific Features

  • Reasoning modes — Grok 4.20 supports both reasoning and non-reasoning modes. Use the -reasoning suffix for complex tasks requiring chain-of-thought, or -non-reasoning for faster general-purpose responses.
  • Cached input discount — xAI offers 90% discount on cached input tokens, reducing cost for repeated contexts.
  • Multi-agent support — The grok-4.20-multi-agent variant is optimized for orchestrating multi-agent workflows.