Skip to main content
You can programmatically execute and manage batch jobs using the Blaxel API and TypeScript SDK.
The code examples in this section assume that your batch job has already been successfully deployed on Blaxel.

Dispatch job execution

Dispatch a job and wait for execution to start:
Time units in the TypeScript SDK are specified in milliseconds.

Dispatch job execution with tasks

Dispatch a new job with tasks:

Get execution details

Get full execution details:

Get status

The possible job states are:
Get only the job status (faster than retrieving full execution details):

List executions

List all executions for a job:

Wait for completion

Poll until execution completes:
When polling:
  • adjust the interval based on the expected task duration
  • set the maxWait timeout longer than the expected total task duration

Override environment and memory for a single job execution

Override memory and/or environment variables for a single job execution, without modifying the deployed job configuration:
  • Memory overrides are expressed in MB and are downward-only: the value must be <= the memory configured at deployment time. For example, if the job is deployed with 4096 MB, execution overrides must be <= 4096 MB.
  • env supports multiple environment variables
  • memory and env can be set independently or together
  • Overrides apply only to the current execution

Complete example

Here is a complete example:

Deploy a job

Learn how to deploy your AI batch jobs on Blaxel as a serverless auto-scalable endpoint.
Last modified on May 14, 2026