Перейти к основному содержанию

Documentation Index

Fetch the complete documentation index at: https://docs.elumenta.ru/llms.txt

Use this file to discover all available pages before exploring further.

Вебхуки находятся в разработке. Пока используйте опрос GET /api/v2/generate/{id}.

Текущий способ: опрос

import requests, time

def ждать_результат(gen_id, api_key):
    headers = {"Authorization": f"Bearer {api_key}"}
    while True:
        r = requests.get(
            f"https://elumenta.ru/api/v2/generate/{gen_id}",
            headers=headers
        ).json()
        if r["status"] in ("completed", "failed"):
            return r
        time.sleep(5)
Когда вебхуки появятся — мы уведомим в @elumenta_news.