xAIReasoning Model

    Grok 4.5

    xAI's frontier model for coding, agentic tasks, and knowledge work. Notably token-efficient — it solves comparable tasks in fewer steps and fewer output tokens than peer models — with a 500K context and low, medium, and high reasoning control.

    import OpenAI from "openai";
    
    const openai = new OpenAI({
      baseURL: "https://api.inference.net/v1",
      apiKey: "<YOUR_API_KEY>",
    });
    
    const completion = await openai.chat.completions.create({
      model: "grok-4.5",
      messages: [
        {
          role: "user",
          content: "What is the meaning of life?"
        }
      ],
      stream: true,
    });
    
    for await (const chunk of completion) {
      process.stdout.write(chunk.choices[0]?.delta.content as string);
    }

    Start building with Grok 4.5 today

    Serverless, OpenAI-compatible, and billed per token. No commitments.