lunar_mcp_project
v1.0.0
Published
An MCP package for Duomi API image generation and editing.
Maintainers
Readme
Image Editor Script
This script interacts with the Duomi API for image editing.
Setup
Open
image_editor.py:import requests import time import json DUOMI_API_BASE_URL = "https://duomiapi.com/api/gemini" # Replace with your actual Authorization header AUTHORIZATION_TOKEN = "YOUR_AUTHORIZATION_TOKEN" # ... (rest of the script)Replace
"YOUR_AUTHORIZATION_TOKEN"with your actual API authorization token.Update
IMAGE_URLS: Replace["https://example.com/your_image.png"]with the actual URL(s) of the image(s) you want to edit.Optional Configuration: Modify
MODEL,PROMPT,ASPECT_RATIO, andIMAGE_SIZEvariables in themain()function as needed.
Usage
Run the script from your terminal:
python image_editor.pyThe script will:
- Initiate an image editing task.
- Print the task ID.
- Poll the API every 5 seconds to check the status of the task.
- Print the final status and any generated image URLs upon completion or failure.
