<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav" -->

---
title: Asynchronous AI: Why Event Callbacks Are the Future of...
description: Generative AI APIs often experience significant latency, making traditional synchronous responses impractical. To address these challenges, event-driven...
canonical: https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Asynchronous AI: Why Event Callbacks Are the Future of GenAI APIs | daily.dev
og:description: Generative AI APIs often experience significant latency, making traditional synchronous responses impractical. To address these challenges, event-driven...
og:url: https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav
og:image: https://api.daily.dev/og/posts/pzb3lLQAv.png
og:image:alt: Asynchronous AI: Why Event Callbacks Are the Future of GenAI APIs
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Asynchronous AI: Why Event Callbacks Are the Future of GenAI APIs

**[Community Picks](https://daily.dev/sources/community)** · 8 min read · 15 upvotes · 2 comments

## Summary

Generative AI APIs often experience significant latency, making traditional synchronous responses impractical. To address these challenges, event-driven architectures and asynchronous techniques such as event callbacks, webhooks, and streaming protocols like SSE or WebSockets are suggested. These methods can improve both developer and end-user experiences by accommodating the longer response times typical in AI applications. Discover why reshaping developer experiences with asynchronous AI is essential as these APIs become more integral to business operations.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://hookdeck.com/blog/asynchronous-ai>

## Community discussion

Top comments from developers on daily.dev.

**@lutze** · 1 upvotes

> Tools need to perform predictably within the operating context they're used, and also be used only in operating contexts where they can be useful.
>
> If a tool like an LLM cannot respond within a predicable and reasonable response window, it's great to find other ways of interacting with them to create predicability and reliability. That's, in fact, a core purpose of engineering.
>
> It's also good to consider if they're the right tool to be used to solve a problem.

---

Tags: [#ai](https://daily.dev/tags/ai), [#webdev](https://daily.dev/tags/webdev), [#machine-learning](https://daily.dev/tags/machine-learning), [#devops](https://daily.dev/tags/devops)

[View this post on daily.dev](https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Asynchronous AI: Why Event Callbacks Are the Future of GenAI APIs","url":"https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav"},"datePublished":"2024-07-08T16:12:52.925Z","dateModified":"2024-08-23T15:20:06.276Z","description":"Generative AI APIs often experience significant latency, making traditional synchronous responses impractical. To address these challenges, event-driven...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/56700f529178c3abf913cf6ca33a212c?_a=AQAEuiZ","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/56700f529178c3abf913cf6ca33a212c?_a=AQAEuiZ","isAccessibleForFree":true,"articleSection":"Community Picks","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Community Picks","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1655817725/logos/community","url":"https://daily.dev/sources/community"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":15},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":"ai,webdev,machine-learning,devops","timeRequired":"PT8M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Community Picks","item":"https://daily.dev/sources/community"},{"@type":"ListItem","position":3,"name":"Asynchronous AI: Why Event Callbacks Are the Future of GenAI APIs"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/asynchronous-ai-why-event-callbacks-are-the-future-of-genai-apis-pzb3llqav","comment":[{"@type":"Comment","text":"Tools need to perform predictably within the operating context they’re used, and also be used only in operating contexts where they can be useful.\nIf a tool like an LLM cannot respond within a predicable and reasonable response window, it’s great to find other ways of interacting with them to create predicability and reliability. That’s, in fact, a core purpose of engineering.\nIt’s also good to consider if they’re the right tool to be used to solve a problem.","datePublished":"2024-08-27T09:48:10.719Z","url":"https://daily.dev/posts/pzb3lLQAv#c-JwAzeQdW6","author":{"@type":"Person","name":"Matthew","url":"https://daily.dev/lutze","image":"https://avatars.githubusercontent.com/u/376108?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

