{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1cf4bf6b-c36e-46ca-8764-8643d01b9ef9",
    "slug": "telegram-bot-python",
    "name": "Telegram Bot Python | Starter Bot with Optional AI Chat",
    "description": "Python Telegram bot starter: commands, buttons, optional AI replies",
    "url": "https://railway.com/deploy/telegram-bot-python",
    "upstream": {
      "repo_url": "https://github.com/two-workspaces/telegram-bot"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "telegram-bot",
      "source": {
        "repo": "https://github.com/two-workspaces/telegram-bot"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "OPENAI_MODEL",
      "service": "telegram-bot",
      "description": "Model name at that API, e.g. openai/gpt-4o-mini on OpenRouter",
      "secret": false,
      "strategy": "default",
      "default": "gpt-4o-mini"
    },
    {
      "key": "SYSTEM_PROMPT",
      "service": "telegram-bot",
      "description": "The bot's personality and instructions for the AI",
      "secret": false,
      "strategy": "default",
      "default": "You are a helpful assistant in a Telegram chat. Keep answers short."
    },
    {
      "key": "OPENAI_BASE_URL",
      "service": "telegram-bot",
      "description": "API base URL. OpenRouter: https://openrouter.ai/api/v1, Groq: https://api.groq.com/openai/v1, DeepSeek: https://api.deepseek.com",
      "secret": false,
      "strategy": "default",
      "default": "https://api.openai.com/v1"
    },
    {
      "key": "TELEGRAM_BOT_TOKEN",
      "service": "telegram-bot",
      "description": "Bot token from @BotFather in Telegram (/newbot)",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "telegram-bot-python"
      }
    },
    "cli": "railway deploy --template telegram-bot-python",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1cf4bf6b-c36e-46ca-8764-8643d01b9ef9",
            "serializedConfig": {
              "services": {
                "98eee91e-4bea-407d-811d-f9f307805c0b": {
                  "icon": "https://devicons.railway.com/i/telegram.svg",
                  "name": "telegram-bot",
                  "build": {},
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/two-workspaces/telegram-bot",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "OPENAI_MODEL": {
                      "isOptional": false,
                      "description": "Model name at that API, e.g. openai/gpt-4o-mini on OpenRouter",
                      "defaultValue": "gpt-4o-mini"
                    },
                    "SYSTEM_PROMPT": {
                      "isOptional": false,
                      "description": "The bot's personality and instructions for the AI",
                      "defaultValue": "You are a helpful assistant in a Telegram chat. Keep answers short."
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional. Any OpenAI-compatible API key turns the bot into an AI chat bot. Empty = echo bot.",
                      "defaultValue": ""
                    },
                    "OPENAI_BASE_URL": {
                      "isOptional": false,
                      "description": "API base URL. OpenRouter: https://openrouter.ai/api/v1, Groq: https://api.groq.com/openai/v1, DeepSeek: https://api.deepseek.com",
                      "defaultValue": "https://api.openai.com/v1"
                    },
                    "ALLOWED_USER_IDS": {
                      "isOptional": true,
                      "description": "Optional. Comma-separated Telegram user IDs allowed to chat (send /id to the bot to get yours). Empty = anyone - set it before adding an AI key.",
                      "defaultValue": ""
                    },
                    "TELEGRAM_BOT_TOKEN": {
                      "isOptional": false,
                      "description": "Bot token from @BotFather in Telegram (/newbot)",
                      "defaultValue": "{{TELEGRAM_BOT_TOKEN}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-11-07T16:15:10.050Z",
  "generator_version": "0.1.0"
}
