xAI joins the Vercel Marketplace

Authors

xAI's Grok models are now available in the Vercel Marketplace, making it easy to integrate conversational AI into your Vercel projects.

  • Get started with xAI's free plan—no additional signup through the Marketplace

  • Access Grok's large language models (LLMs) directly from your Vercel projects

  • Simplify authentication and API key management through automatically configured environment variables

  • Pay only for what you use with integrated billing through Vercel

To get started, you can use the AI SDK xAI provider in your project:

import { xai } from "@ai-sdk/xai";
import { streamtext } from "ai";
const result = streamText({
model: xai("grok-2-1212"),
prompt: "What is the meaning of life?",
});
for await (const textPart of result.textStream) {
process.stdout.write(textPart); // The answer is 42.
}

Then, install the xAI Marketplace Integration with Vercel CLI (or from the dashboard):

vercel install xai

Once you've accepted the terms, you'll be able to use Grok models from within your project, with no additional steps necessary.

To help you get started, we've also made a ready-to-deploy Next.js xAI starter template. To learn more about xAI on Vercel, read our announcement and the documentation.