# Source: https://docs.replit.com/replitai/replit-ai-integrations.md

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

# Replit AI Integrations

> Use AI models from providers like OpenAI, Anthropic, Google, and OpenRouter without requiring your own developer account or API key.

export const AiPrompt = ({children}) => {
  return <CodeBlock className="relative block font-sans whitespace-pre-wrap break-words">
      <div className="pr-7">
        {children}
      </div>
    </CodeBlock>;
};

Replit AI Integrations makes it easy to build AI-powered applications. Get started with models from OpenAI, Anthropic, Google, and OpenRouter immediately—no developer account setup, no API key management. Replit handles everything for you.

## What is Replit AI Integrations?

Replit AI Integrations provides managed access to AI models from leading providers. Build chat apps, content generators, and AI-powered tools without leaving Replit. No need to create external developer accounts, find your API credentials, or manage separate billing.

When you use Replit AI Integrations, Replit manages the provider credentials and bills you at the public API price. Your usage is billed to your Replit credits and appears on your [usage page](/billing/managing-spend), broken down by Existing Replit App.

## Features

Replit AI Integrations streamlines AI development with built-in access and transparent billing:

* **Zero setup required**: No developer accounts or API keys needed to get started
* **Managed credentials**: Replit handles provider authentication and credential management
* **Transparent billing**: Pay public API prices, billed to your Replit credits
* **Usage tracking**: View your usage per Existing Replit App on your usage page
* **Cross-stack support**: Works across all programming languages and frameworks
* **Optional BYOK**: Bring your own API key if you prefer to use your own credentials

## Getting started

### Using Replit-managed credentials

When you mention AI functionality or specific providers (OpenAI, Anthropic, Google, or OpenRouter) in your prompt, Agent defaults to using Replit AI Integrations:

<AiPrompt>
  Create a web app that uses OpenAI to summarize articles
</AiPrompt>

You can tell which integration is being used by looking for **"OpenAI (Replit managed)"**, **"Anthropic (Replit managed)"**, **"Google (Replit managed)"**, or **"OpenRouter (Replit managed)"** in your initial prompt response. This indicates Agent will use Replit's credentials instead of requiring your own API key.

**For initial builds**: When you submit an initial prompt to create a new app with AI functionality, Replit AI Integrations is matched automatically. Agent will start building with Replit's managed credentials right away.

**For existing Replit Apps**: When Agent detects you want to add AI functionality to an existing Replit App, Agent will explicitly tell you in the Workspace that it's asking to use Replit AI Integrations instead of your own API key. You'll see a confirmation prompt:

<Frame>
  <img src="https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=8bec4d7de97207210677cde50a838f60" alt="Confirm OpenAI Integration dialog showing message about adding OpenAI using Replit's managed service with no API keys required, with Dismiss and Approve buttons" data-og-width="924" width="924" data-og-height="294" height="294" data-path="images/replitai/replit-ai-integrations-confirmation-msg.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=280&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=cdadcd7f8c0782fc7d2dbaf954ad1a39 280w, https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=560&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=ee2555c143a8016c0f276548659f2a26 560w, https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=840&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=b6f2684eaf683db8ccfb97c0afdc84a0 840w, https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=1100&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=d5300710297411b7402682cf9e6710f6 1100w, https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=1650&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=6612d0a933df9c28d8dfb1668db4c787 1650w, https://mintcdn.com/replit/eUxyoACXLNi6Vd-8/images/replitai/replit-ai-integrations-confirmation-msg.png?w=2500&fit=max&auto=format&n=eUxyoACXLNi6Vd-8&q=85&s=0741cc20f3ba82bbc13a706cccd7e513 2500w" />
</Frame>

Click "Approve" to continue with Replit-managed credentials, or "Dismiss" if you prefer to use your own API key.

Your usage is automatically tracked and billed to your Replit account at the public API price.

### Bringing your own API key

If you prefer to use your own credentials from OpenAI, Anthropic, Google, or other providers instead of Replit AI Integrations, you have a few options:

**For initial builds**: Include in your prompt that you want to use your own API key:

<AiPrompt>
  Create a web app that uses OpenAI to summarize articles. Use my own OpenAI API key.
</AiPrompt>

You'll see the provider name (without "Replit managed") in the response, indicating Agent will request your API key.

**For existing Replit Apps**: When Agent tells you it wants to use Replit AI Integrations and shows the confirmation prompt, click "Dismiss" instead of "Approve."

In both cases, Agent will build through the first checkpoint before requesting your API key. This allows Agent to set up your project structure first, then pause to collect your credentials.

When you use your own API key, you're billed directly by the provider rather than through Replit credits.

## Viewing your usage

All Replit AI Integrations usage appears on your [usage page](/billing/managing-spend) alongside your other Replit usage. Usage is broken down by Existing Replit App so you can see exactly where your AI spend is going.

## Supported providers

Replit AI Integrations currently supports:

* **OpenAI**: Multimodal models for text generation, reasoning, and audio. Supports chat completions, responses, image generation, audio transcription (`gpt-4o-transcribe`, `gpt-4o-transcribe-mini`), and audio output (`gpt-4o-audio`, `gpt-4o-audio-mini`).
* **Anthropic**: Multimodal models for reasoning, writing, and coding. Supports the Messages API and interactions with web search.
* **Google (Gemini)**: Multimodal models for text generation and reasoning. Supports text and image generation.
* **OpenRouter**: Access to models from providers such as Microsoft (Phi series), Meta (Llama series), Mistral, Qwen, DeepSeek, Nvidia, Amazon, and more.

<Note>
  Replit AI Integrations supports **text, image, and audio output**. Video output is not supported. If you need video generation capabilities, you'll need to use your own API key from a provider that offers them.
</Note>

## OpenRouter privacy and availability

When you use OpenRouter through Replit AI Integrations, your requests are sent with specific privacy settings to protect your data. Understanding these settings is important because they may affect which models are available to you.

### Privacy settings for self-serve users

For individual and team users, Replit configures OpenRouter requests with the following privacy defaults:

* **Paid endpoints training disabled**: Your data will not be used for training by paid model providers
* **Free endpoints training enabled**: Free model providers may train on your prompts and completions
* **Free endpoints publishing enabled**: Free providers may publish your prompts and completions to public datasets
* **Input/output logging disabled**: Your requests and responses are not logged by OpenRouter for the 1% billing discount
* **Analytics cookies disabled**: Analytics cookies are not used

These settings prioritize your privacy while enabling access to the widest range of models. However, **some models may not be available** if they require different privacy settings than those configured above.

### Privacy settings for Enterprise

For Enterprise organizations, Replit enforces stricter privacy controls:

* **Zero Data Retention (ZDR) endpoints only**: Only models with a Zero Data Retention policy are available
* All privacy settings listed above for self-serve users also apply
* This ensures that Enterprise requests are only routed to endpoints that do not retain any data

Because Enterprise enforces ZDR endpoints only, **the selection of available models will be more limited** compared to self-serve users. This trade-off ensures the highest level of data privacy for enterprise workloads.

## Teams and Enterprise

For Teams and Enterprise organizations, Replit AI Integrations access is disabled by default. Organization admins can control access from the organization settings page:

1. Navigate to your organization settings
2. Find the Replit AI Integrations section
3. Toggle access on or off for your organization

When enabled, organization members can use Replit AI Integrations in their apps. All usage is tracked and billed to the organization account. When disabled, members will need to provide their own API keys to use AI model providers.

## Use cases

Build powerful AI applications across any stack:

* **Content generation**: Summarize articles, generate descriptions, create content
* **Analysis and insights**: Extract key information, analyze sentiment, classify text
* **Conversational interfaces**: Build chatbots and AI assistants
* **Text transformation**: Translate, rewrite, or format content
* **Code assistance**: Generate code snippets, explain algorithms, review code

## FAQ

<AccordionGroup>
  <Accordion title="How is this different from other Agent integrations?">
    Other Agent integrations let you connect to external services and APIs. Replit AI Integrations specifically provides managed access to AI model providers like OpenAI, Anthropic, Google, and OpenRouter, with Replit handling credentials and billing so you can start building immediately.
  </Accordion>

  <Accordion title="Do I need a paid Replit account?">
    Yes. Replit AI Integrations is available for paying users.
  </Accordion>

  <Accordion title="What models are available?">
    Replit AI Integrations supports models from leading AI providers:

    |                |                                                               |
    | -------------- | ------------------------------------------------------------- |
    | **OpenAI**     | GPT models for text generation, reasoning, and image creation |
    | **Anthropic**  | Claude models for reasoning, writing, and coding              |
    | **Google**     | Gemini models for multimodal understanding                    |
    | **OpenRouter** | 200+ models from Meta, Mistral, DeepSeek, Qwen, and more      |

    <Tip>
      For the complete and up-to-date model catalog, see [OpenRouter's model list](https://openrouter.ai/models).
    </Tip>
  </Accordion>

  <Accordion title="How is billing calculated?">
    You're billed at the public API price set by the provider. Costs are deducted from your Replit credits and appear on your usage page.
  </Accordion>

  <Accordion title="Can I use my own API key?">
    Yes. You can provide your own API key using Replit secrets. When you use your own key, you're billed directly by the provider instead of through Replit.
  </Accordion>

  <Accordion title="Does this work in all programming languages?">
    Yes. Replit AI Integrations works across all stacks and programming languages supported on Replit.
  </Accordion>

  <Accordion title="Why is this feature not available for my organization?">
    For Teams and Enterprise, Replit AI Integrations access is disabled by default for security and control. Your organization admin can enable it from the organization settings page.
  </Accordion>

  <Accordion title="How do I know if I'm using Replit AI Integrations?">
    Look for "OpenAI (Replit managed)", "Anthropic (Replit managed)", "Google (Replit managed)", or "OpenRouter (Replit managed)" in Agent's response. This indicates you're using Replit AI Integrations. If you see just the provider name without "Replit managed," Agent will request your own API key.
  </Accordion>

  <Accordion title="What happens when I use Replit AI Integrations?">
    When you mention AI functionality or a specific provider (OpenAI, Anthropic, Google, or OpenRouter), Agent defaults to Replit AI Integrations. For new apps, Agent starts building immediately using Replit's credentials. For existing Replit Apps, Agent will tell you in the Workspace that it's asking to use Replit AI Integrations and show a confirmation prompt. Either way, your app can make API calls to the provider, and usage is tracked and billed to your Replit account.
  </Accordion>

  <Accordion title="When do I see the confirmation prompt?">
    You'll see a confirmation prompt when adding Replit AI Integrations to an existing Replit App. Agent will explicitly tell you it's asking to use Replit AI Integrations instead of your own API key. For initial builds when creating a new app, Replit AI Integrations is matched automatically without a pop up.
  </Accordion>

  <Accordion title="When does Agent ask for my API key if I want to use my own?">
    Agent will build through the first checkpoint before requesting your API key. This lets Agent set up your project structure first, then pause to collect your credentials before continuing.
  </Accordion>

  <Accordion title="What types of models & outputs are supported?">
    Replit AI Integrations supports text, image, and audio output. Audio capabilities include transcription (speech-to-text) via `gpt-4o-transcribe` and `gpt-4o-transcribe-mini`, and audio generation via `gpt-4o-audio` and `gpt-4o-audio-mini`. Video output is not supported. If your application requires video generation capabilities, Agent will direct you to use your own API key from a provider that offers these features.
  </Accordion>
</AccordionGroup>