> ## Documentation Index
> Fetch the complete documentation index at: https://docs.builderbox.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter Integration

> OpenRouter provides a unified API to access multiple large language models (LLMs). This guide will show you how to use OpenRouter in your application.

## Overview

OpenRouter acts as a unified interface to access multiple LLM providers through a single API. This simplifies working with different AI models in your application.

## Available Models

OpenRouter supports leading LLM providers:

* GPT-4 (OpenAI)
* Claude 3 (Anthropic)
* Gemini Pro (Google)
* Mistral
* And many more... (see [OpenRouter Models](https://openrouter.ai/models) for the full list)

## Example Usage

```typescript theme={null}
// app/actions/ai.ts
'use server';

import { streamText } from 'ai';
import { openrouter } from '@/lib/openrouter';

export async function TextStream(prompt: string) {

 const result = streamText({
		model: openrouter("gemini-1.5-flash"),
		messages: [
      {
        role: "user",
        content: prompt,
      },
    ],
	}); // streamText is a function from the ai package

  return result;
}
```
