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

# Replicate Flux

> Generate images with Replicate's Flux or Flux Pro model

Flux is a state-of-the-art text-to-image model from Replicate that generates high-quality images from text descriptions.

<Warning> Replicate requires paid credits to use their API. Please refer to their pricing [here](https://replicate.com/pricing#public-models).</Warning>

## Overview

<CardGroup cols={2}>
  <Card title="Create Account" icon="user">
    Sign up for a Replicate account
  </Card>

  <Card title="Get API Key" icon="key">
    Generate your Replicate API key
  </Card>

  <Card title="Copy into Anything" icon="plug">
    Add your API key to Anything's secrets
  </Card>
</CardGroup>

## Account Creation

<Steps>
  <Step title="Visit Replicate Website">
    Go to [replicate.com](https://replicate.com/) and click "Sign Up"
  </Step>

  <Step title="Choose Signup Method">
    * Sign up with email/password
    * Or continue with GitHub authentication

    <img src="https://mintcdn.com/create/-FyrzxgKR6I2JC9B/images/replicate/replicate-github-signin.png?fit=max&auto=format&n=-FyrzxgKR6I2JC9B&q=85&s=3492f9f4cdd2a76cdeaacf5e11c252dd" style={{ borderRadius: '0.5rem' }} width="1200" height="630" data-path="images/replicate/replicate-github-signin.png" />
  </Step>
</Steps>

## Generate API Key

<Steps>
  <Step title="Access API Keys">
    1. Go to your Replicate dashboard
    2. Click on your profile and select "API Tokens"

    <img src="https://mintcdn.com/create/-FyrzxgKR6I2JC9B/images/replicate/replicate-api-tokens.png?fit=max&auto=format&n=-FyrzxgKR6I2JC9B&q=85&s=23c132b27add91c9a28e35af48d33736" style={{ borderRadius: '0.5rem' }} width="1200" height="630" data-path="images/replicate/replicate-api-tokens.png" />
  </Step>

  <Step title="Create New Key">
    1. Click "New Token"
    2. Name your token (e.g., "Anything Integration")
    3. Copy your API token

    <img src="https://mintcdn.com/create/-FyrzxgKR6I2JC9B/images/replicate/replicate-copy-token.png?fit=max&auto=format&n=-FyrzxgKR6I2JC9B&q=85&s=3c80cfde9894280aee29826c120bc1c7" style={{ borderRadius: '0.5rem' }} width="1200" height="630" data-path="images/replicate/replicate-copy-token.png" />
  </Step>
</Steps>

## Add to Anything project

<Steps>
  <Step title="Add the integration">
    1. In your Anything project, type `/` in the chat
    2. Select "Replicate Flux" from the menu
  </Step>

  <Step title="Add your API key">
    1. Paste your API key into the "REPLICATE\_API\_KEY" field

    <Tip>
      Need a new key? Generate one in your Replicate dashboard.
    </Tip>
  </Step>

  <Step title="Start generating">
    You can now use prompts with the integration to generate images.

    Example prompts:

    * `Generate a landscape painting using /ReplicateFlux`
    * `Create product mockups with /ReplicateFlux`
    * `Build an AI art gallery using /ReplicateFlux`

    <Warning>
      Each generation uses API credits. If your app generates the same images often, ask the agent to save them locally so it doesn't re-fetch every time.
    </Warning>

    Example prompt for optimization:

    ```
    When using /ReplicateFlux, save the generated images so my app doesn't have to fetch it again
    ```
  </Step>
</Steps>

<Tip>
  Your Replicate Flux integration is ready! Use `/ReplicateFlux` in chat to generate images.
</Tip>
