Skip to main content
Use these backend functions to subscribe to runs and streams from your server-side code or other tasks.

Overview

There are three main categories of functionality:
  • Subscribe functions - Subscribe to run updates using async iterators
  • Metadata - Update and subscribe to run metadata in real-time
  • Streams - Read and consume real-time streaming data from your tasks
To learn how to emit streams from your tasks, see our Realtime Streams documentation.

Authentication

All backend functions support both server-side and client-side authentication:
  • Server-side: Use your API key (automatically handled in tasks)
  • Client-side: Generate a Public Access Token with appropriate scopes
See our authentication guide for detailed information on creating and using tokens.

Quick example

Subscribe to a run: