"""Тест вебхука — отправляет генерацию с callback_url на ngrok."""
import asyncio
from runblob import RunBlob


CALLBACK_URL = "https://60b9-192-71-233-125.ngrok-free.app/webhook"


async def main():
    async with RunBlob(api_key="sk-...") as client:
        task = await client.nanobanana.generate(
            prompt="A cute orange cat on a windowsill",
            callback_url=CALLBACK_URL,
        )
        print(f"Task created: {task.task_uuid}")
        print(f"Status: {task.status}")
        print(f"Price: {task.price}")
        print(f"Callback URL: {CALLBACK_URL}")
        print(f"\nЖди webhook на сервере...")


if __name__ == "__main__":
    asyncio.run(main())
