Skip to main content

Quick Start

Get up and running with Genkit in under a minute. Choose your preferred language and follow the steps below.

Prerequisites

  • Node.js 20 or higher
  • npm or yarn

Installation

1

Install Genkit and Google AI plugin

npm install genkit @genkit-ai/google-genai
2

Install the Genkit CLI

npm install -g genkit-cli
3

Get an API key

Get a Google AI API key from Google AI Studio.Set it as an environment variable:
export GOOGLE_GENAI_API_KEY="your-api-key"

Your First Genkit App

Create a file called index.ts (or index.js):
index.ts
import { genkit } from 'genkit';
import { googleAI } from '@genkit-ai/google-genai';

const ai = genkit({ plugins: [googleAI()] });

const { text } = await ai.generate({
    model: googleAI.model('gemini-2.5-flash'),
    prompt: 'Why is Firebase awesome?'
});

console.log(text);

Run Your App

npx tsx index.ts
You should see the AI-generated response printed to your console!

Launch the Developer UI

The Genkit Developer UI helps you test and debug your AI flows:
genkit start -- npx tsx index.ts
Open your browser to the URL shown in the terminal (usually http://localhost:4000) to access the Developer UI.

Next Steps

Build Your First Flow

Learn how to create deployable AI workflows

Add Tool Calling

Enable your AI to use external functions and APIs

Structured Output

Generate type-safe JSON responses

Deploy to Production

Ship your AI features to Cloud Run, Firebase, or anywhere

Common Next Steps

Regardless of which language you chose, here are some common next steps:

Explore Model Providers

Connect to OpenAI, Anthropic, Ollama, and more

Learn Core Concepts

Understand flows, tools, prompts, and the Genkit architecture

Try Examples

Explore interactive examples and sample applications

Join the Community

Get help and share ideas with other developers

Need Help?

If you run into any issues:

Build docs developers (and LLMs) love