Skip to content

leggetter/asynchronous-ai

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Asynchronous APIs with Hookdeck

There are many use cases where we're not trying to build real-time ChatGPT-like experiences, so the underlying technology should support asynchronous mechanisms such as callback to enable applications to work more efficiently.

Examples include:

  • Processing or generating large text documents, images, or video.
  • Batch processing inputs.
  • Piping the output from an AI process to another service with no synchronous response required.

In these situations, you don't want to hold a connection open to an API and await a response. Instead, you want to receive a callback when the process has completed.

All of these scenarios represent the need to manage asynchronous messaging.

AI platforms with Asynchronous AI support

  • OpenAI: OpenAI webhooks allow you to receive real-time notifications about events in the API, such as when a batch completes, a background response is generated, or a fine-tuning job finishes.
  • Replicate: webhook callbacks for persisting prediction data and files, sending notifications when long-running predictions finish, and creating model pipelines.
  • AssemblyAI: get notified when your transcripts are ready.
  • Deepgram: return transcripts to a callback URL sent to Deepgram's API.
  • ElevenLabs: ElevenLabs supports post-call webhooks for transcription completion, and various voice lifecycle updates such as scheduled removal, withdrawal, and final removal of shared voices.

AI adjacent platforms that enable Asynchronous AI

  • Hookdeck is an event gateway platform that supports ingesting events from platforms, localhost development, and routing events to other services.
  • n8n: receive data from apps and services when an event occurs. It's a trigger node, which means it can start an n8n workflow. This allows services to connect to n8n and run a workflow.
  • Resend: Email API that developers love offering webhook callbacks for various email events.
  • Twilio
    • Programmable SMS: Webhooks for inbound SMS. Note that to support asynchronous workflows, you'll need to follow the "Messaging without responding" workflow.
    • Programmable Voice: notifications about call status progress and trigger call workflows via webhook callbacks.

Examples

Replicate & Resend

Generate images with Replicate, receive the images on localhost, and in parallel send an email with an image with Resend.

Hookdeck connection: Replicate to Resend and the Hookdeck CLI

➡️ Replicate & Resend example

About

Exploring the use cases around Asynchronous AI

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •