To much bad UI, no need gradiate background and color. Use only single color. Need light mode background color. Andhere is api base url: "api_url = f"https://botfather.cloud/Apis/ImgGen/client.php?inputText={prompt}" "must use this. And Generate Image sections not good and button also not center in Input box. And use get image by only enter propmt, so remove /img {propmt}, this is for my telegram so ignore it. We follow this "api_url = f"https://botfather.cloud/Apis/ImgGen/client.php?inputText={prompt}" " and here ks error message "if response.status_code == 200:
truncated_prompt = (prompt[:60] + '...') if len(prompt) > 60 else prompt
caption = f"<b>🖼 Generated: </b><i>{truncated_prompt}</i>"
bot.sendChatAction(
chat_id=message.chat.id,
action="upload_photo"
)
bot.sendPhoto(
chat_id=message.chat.id,
photo=response.content,
reply_to_message_id=message.message_id,
caption=caption,
parse_mode="HTML"
)
else:
bot.sendMessage(
chat_id=message.chat.id,
text="⚠️ <b>Service unavailable</b>",
parse_mode="HTML",
reply_to_message_id=message.message_id
)
except Exception as e:
bot.sendMessage(
chat_id=message.chat.id,
text="⚠️ <b>Processing error</b>",
parse_mode="HTML",
reply_to_message_id=message.message_id
)
else:
bot.sendMessage(
chat_id=message.chat.id,
text="✏️ <b>Please provide a prompt</b>\nExample: <code>/img cute cat</code>",
parse_mode="HTML",
reply_to_me
ssage_id=message.message_id
)" make sure use html and js only.
Simple Ai Image Generate Api 😐
Base Url : https://botfather.cloud/Apis/ImgGen/?prompt= <your promt>
Use the HTTP GET method with the prompt parameter.
Example : https://botfather.cloud/Apis/ImgGen/?prompt=A serene sunset over a mountain lake
- @Sowroov
Comments
Post a Comment