Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add optional webhook after job finished #5276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pawelkania
Copy link

Add optional webhook after job finished, allow to send prompt_id with api request

api params to send:

{
   "prompt": "json - comfyui workflow exported as api format",
   "prompt_id": "uuidv4", # optional - you can use it to reference your db record for job - webhook will contain this uuid
   "webhook_url": "url to send results from comfyui after job is complete",
}

Comfyui will rspond to webhook url with params:

{
  "prompt_id": "uuidv4 you provided during job creation (or autogenerated in comfyui during job creation)",
  "execution_time": 32.7151094869987, # (in seconds)
  "status": "success/error",
  "result": {"outputs": {}} # same format as in history endpoint
}

… api request

api params to send:
```
{
   "prompt": "json - comfyui workflow exported as api format",
   "prompt_id": "uuidv4", # optional - you can use it to reference your db record for job - webhook will contain this uuid
   "webhook_url": "url to send results from comfyui after job is complete",
}
```

Comfyui will rspond to webhook url with params:
```
{
  "prompt_id": "uuidv4 you provided during job creation (or autogenerated in comfyui during job creation)",
  "execution_time": 32.7151094869987, # (in seconds)
  "status": "success/error",
  "result": {"outputs": {}} # same format as in history endpoint
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant