API Keys Guide

How to get all the keys you need to deploy your first agent.


What Keys Do You Need?

| Key | Required? | Template | |-----|-----------|----------| | Telegram Bot Token | Yes | All templates | | AI API Key (Anthropic or OpenAI) | Yes | All templates | | Brave Search API Key | Optional | Reddit Lead Gen, HN Lead Gen | | X (Twitter) API Credentials | Required | X Autopilot, X Lead Gen |


1. Telegram Bot Token

Your agent communicates through a Telegram bot. You create and own this bot — ModelFitAI just runs it.

Steps:

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a display name (e.g. "My Lead Gen Bot")
  4. Choose a username ending in bot (e.g. myleadgen_bot)
  5. BotFather sends your token: 7123456789:AAFxxxxxxxxxxxxx

Save this token — you'll paste it during agent deploy.

Privacy note: Your bot token is stored encrypted in our database using AES-256-GCM. It is only decrypted at deploy time to launch your container.


2. AI API Key

Your agent uses a large language model to understand context, score leads, and generate responses. You bring your own key — you pay the provider directly at their rates (typically $1–5/month for light use).

Option A — Anthropic (Claude) — Recommended

  1. Go to console.anthropic.com
  2. Sign up → API KeysCreate Key
  3. Add $5 credit (enough for months of light use)
  4. Copy your key: sk-ant-api03-...

Best for: Reddit Lead Gen, HN Lead Gen, Product Hunt Assistant

Option B — OpenAI (GPT)

  1. Go to platform.openai.com
  2. Sign up → API KeysCreate new secret key
  3. Add $5 credit
  4. Copy your key: sk-...

Best for: X Autopilot, general purpose

Option C — OpenRouter (Access 100+ models)

  1. Go to openrouter.ai
  2. Sign up → API Keys → create key
  3. Add $5 credit
  4. Copy your key: sk-or-v1-...

Best for: Budget use — access DeepSeek, Mistral, and other low-cost models


3. Brave Search API Key (Optional)

Some templates (Reddit Lead Gen, HN Lead Gen) can use Brave Search to enrich lead results. This is optional — the agent works without it.

  1. Go to brave.com/search/api
  2. Sign up for the Free tier (2,000 queries/month free)
  3. Create an API key
  4. Copy your key: BSA_...

4. X (Twitter) API Credentials

Required only for X Autopilot and X Lead Gen templates.

  1. Go to developer.twitter.com
  2. Sign up for a Free Developer Account
  3. Create a new app → Keys and Tokens
  4. You'll need:
    • API Key & Secret
    • Access Token & Secret (for your account)

Note: X's free developer tier allows read + write access for your own account, which is sufficient for X Autopilot.


How Your Keys Are Stored

ModelFitAI takes security seriously. Here's exactly how your keys are handled:

  • In transit: All keys are submitted over HTTPS
  • At rest: Keys are encrypted with AES-256-GCM before being stored in our database. The encryption key never touches the database.
  • At runtime: Keys are decrypted only when your Docker container is launched, injected as environment variables, and never written to disk
  • Isolation: Each agent runs in its own Docker container on a dedicated bridge network — your keys are never shared with other users' containers

Next Steps