Google’s highest quality image generation model.
Google’s highest quality image generation model.
आपके अनुरोध की लागत 0.054 प्रति रन होगी। $10 के साथ आप इस मॉडल को लगभग 185 बार चला सकते हैं।
आगे आप यह कर सकते हैं:
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": "google/imagen4-ultra",
"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()अपने मॉडल अनुरोध इतिहास तक पहुंचने के लिए आपको साइन इन करना होगा।
साइन इन करेंFine detail rendering: Superior clarity for intricate elements like fabrics, water droplets, and animal fur
Style versatility: Excels in both photorealistic and abstract styles
Resolution flexibility: Creates images in various aspect ratios up to 2K resolution
Typography improvements: Significantly enhanced text rendering capabilities for greeting cards, posters, and comics
Fast variant: Upcoming version promises up to 10x faster generation compared to Imagen 3