Skip to content

stxrmik/ManusLLM-Proxy-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 Chat with Manus Proxy (OpenAI-compatible API)

🇷🇺 Русская версия | 🇬🇧 English version


🇷🇺 Русская версия

📘 Описание

Этот репозиторий содержит два Python-скрипта для взаимодействия с прокси Manus API, совместимым с OpenAI API.
Оба файла выполняют одну и ту же задачу — отправляют текстовый запрос к LLM-модели и выводят ответ.
Различие только в языке комментариев и интерфейса:

  • main_ru.py — русская версия
  • main_en.py — английская версия

⚙️ Требования

  • Python 3.9+
  • Установленная библиотека openai
  • Переменная окружения MANUS_API_KEY с вашим API ключом Manus

🚀 Установка и запуск

  1. Установите зависимости:
    pip install openai
    
  2. Установите переменную окружения с API ключом:
    export MANUS_API_KEY="ваш_ключ"
    (в Windows PowerShell:)
    setx MANUS_API_KEY "ваш_ключ"
  3. Запустите скрипт:
    python main_ru.py
  4. Пример вывода:
    🚀 Отправка запроса через прокси: https://api.manus.im/api/llm-proxy/v1/
    🤖 Модель: gemini-2.5-flash
    💬 Ответ от AI:
    --------------------
    Hello! I am an AI assistant.
    --------------------
    📊 Использовано токенов: 42
    

🔧 Настройки

Вы можете изменить модель, раскомментировав нужную строку в коде:

MODEL_TO_USE = "gemini-2.5-flash"
# MODEL_TO_USE = "gpt-4.1-mini"
# MODEL_TO_USE = "gpt-4.1-nano"

🇬🇧 English Version

📘 Description

This repository contains two Python scripts for interacting with the Manus proxy API, which is compatible with the OpenAI API. Both scripts perform the same logic — sending a text prompt to an LLM model and displaying the AI response. The only difference is the language of comments and printed messages:

  • main_en.py — English version
  • main_ru.py — Russian version

⚙️ Requirements

  • Python 3.9+
  • Installed openai library
    • Environment variable MANUS_API_KEY containing your Manus API key

🚀 Setup and Run

  1. Install dependencies:
    pip install openai
    
  2. Set your API key:
    export MANUS_API_KEY="your_key"
    (on Windows PowerShell:)
    setx MANUS_API_KEY "your_key"
  3. Run the script:
    python main_en.py
  4. Example output:
    🚀 Sending request via proxy: https://api.manus.im/api/llm-proxy/v1/
    🤖 Model: gemini-2.5-flash
    💬 AI response:
    --------------------
    Hello! I am an AI assistant.
    --------------------
    📊 Tokens used: 42
    

🔧 Configuration

You can change the model by modifying this line:

MODEL_TO_USE = "gemini-2.5-flash"
# MODEL_TO_USE = "gpt-4.1-mini"
# MODEL_TO_USE = "gpt-4.1-nano"

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages