Supports multiple image inputs and outputs, allowing for precise modification of text within images, addition, deletion, or movement of objects, alteration of subject actions, transfer of image styles, and enhancement of image details.
Supports multiple image inputs and outputs, allowing for precise modification of text within images, addition, deletion, or movement of objects, alteration of subject actions, transfer of image styles, and enhancement of image details.
आपके अनुरोध की लागत 0.021 प्रति रन होगी। $10 के साथ आप इस मॉडल को लगभग 476 बार चला सकते हैं।
आगे आप यह कर सकते हैं:
import requests
import time
# Step 1: Start image generation
generate_url = "https://api.atlascloud.ai/api/v1/model/generateImage"
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer $ATLASCLOUD_API_KEY"
}
data = {
"model": "alibaba/qwen-image/edit-plus",
"prompt": "A beautiful landscape with mountains and lake",
"width": 512,
"height": 512,
"steps": 20,
"guidance_scale": 7.5
}
generate_response = requests.post(generate_url, headers=headers, json=data)
generate_result = generate_response.json()
prediction_id = generate_result["data"]["id"]
# Step 2: Poll for result
poll_url = f"https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}"
def check_status():
while True:
response = requests.get(poll_url, headers={"Authorization": "Bearer $ATLASCLOUD_API_KEY"})
result = response.json()
if result["data"]["status"] == "completed":
print("Generated image:", result["data"]["outputs"][0])
return result["data"]["outputs"][0]
elif result["data"]["status"] == "failed":
raise Exception(result["data"]["error"] or "Generation failed")
else:
# Still processing, wait 2 seconds
time.sleep(2)
image_url = check_status()अपने मॉडल अनुरोध इतिहास तक पहुंचने के लिए आपको साइन इन करना होगा।
साइन इन करेंAn advanced image editing model from Alibaba Cloud, offering precise control and high-quality results. Qwen-Image Edit Plus supports multi-image input and output, enabling complex tasks such as precise text modification, object addition/deletion/movement, action change, style transfer, and detail enhancement.
prompt_extend) for better results.To achieve the best results, follow these guidelines:
messages array with role: user.content array: 1-3 images ({"image": "..."}) + 1 text instruction ({"text": "..."}).n), resolution (size), and other options.messages structure containing images and text.