Skip to main content
Execute your serverless endpoint asynchronously for long-running tasks, batch processing, or when you need to decouple request submission from result retrieval. This is ideal for tasks that take more than a few seconds to complete.

Path Parameters

  • endpointId: The unique identifier of the endpoint to execute

Request Body

Example Usage

Long-Running Document Generation

Batch Image Processing

Video Processing with Progress Tracking

Response

Returns a job object for tracking execution:

Job Status Tracking

Check Job Status

Status Response

Job Lifecycle

Status Values

  • queued: Job submitted and waiting for execution
  • running: Job is currently being processed
  • completed: Job finished successfully
  • failed: Job encountered an error
  • cancelled: Job was cancelled by user or system
  • timeout: Job exceeded maximum execution time

Progress Tracking

Jobs include progress information when available:
  • progress: Percentage completion (0-100)
  • currentStep: Current processing phase
  • estimatedCompletion: Predicted completion time
  • metadata: Task-specific progress details

Webhook Notifications

Callback Payload

When a job completes, your callback URL receives:

Webhook Security

Verify webhook authenticity using the signature header:

Error Handling

422 Unprocessable Entity

429 Too Many Requests

507 Insufficient Storage

SDK Examples

Python SDK

JavaScript SDK

Use Cases

Document Generation

  • Reports: Generate comprehensive business or technical reports
  • Presentations: Create slide decks with dynamic content
  • Legal Documents: Generate contracts, agreements, and legal briefs

Media Processing

  • Video Transcoding: Convert videos to multiple formats and resolutions
  • Image Batch Processing: Apply effects, resize, or enhance multiple images
  • Audio Processing: Transcribe, enhance, or convert audio files

Data Analysis

  • Large Dataset Processing: Analyze CSV files, databases, or data streams
  • Machine Learning: Train models or run inference on large datasets
  • Report Generation: Create insights and visualizations from data

AI Model Inference

  • Batch Predictions: Run inference on large datasets
  • Model Fine-tuning: Customize models with your data
  • Multi-modal Processing: Combine text, image, and audio processing

Best Practices

Job Management

  • Tagging: Use tags to organize and filter jobs by user, project, or category
  • Priorities: Use high priority for time-sensitive tasks, normal for batch processing
  • Timeouts: Set appropriate timeouts based on expected processing time

Webhook Implementation

  • Idempotency: Handle duplicate webhook deliveries gracefully
  • Security: Always verify webhook signatures to prevent spoofing
  • Retry Logic: Implement exponential backoff for failed webhook deliveries

Performance Optimization

  • Batch Size: Group related tasks to reduce overhead
  • Input Optimization: Compress or optimize input data to reduce transfer time
  • Caching: Cache intermediate results when processing similar requests
Async jobs are queued and processed in order of submission and priority. High-priority jobs are processed before normal priority jobs.
Large output files are automatically stored in temporary storage and deleted after 7 days. Download results promptly or use your own storage.
Use webhooks instead of polling for better performance and reduced API usage. Set up retry logic for webhook deliveries.