Skip to main content
Prerequisites — Node.js 18.10.0 or higher, an API token from the Pixio dashboard, and a deployed workflow with a deployment_id.

1. Install the SDK

2. Store your key

Put the token in a .env file — never in source control.
Add .env to .gitignore before your first commit. A leaked token can run workflows on your account.

3. Create the client

If that returns your projects, your token works.

4. Run a workflow

Pass the deployment_id and whatever inputs your graph expects:
The call returns as soon as the run is queued. It does not wait for the result.

5. Retrieve the output

Use the run_id to fetch the run:
The response includes a status. Keep polling until it’s success:
Wait for success, not merely for running to end. A run passes through uploading after execution finishes but before outputs are readable.

Keeping the SDK current

Local development notes

If you’re running a local server alongside the SDK and hit a port clash:
An EADDRINUSE error means something else already holds that port — change the port or stop the other process.

Next

Workflows & deployments

How versions and deployments work, and how to ship changes safely.

Files & uploads

Feed images and other media into a run.

Running a workflow

Inputs, polling, and output handling in depth.

Troubleshooting

Token errors, failed runs, and stuck jobs.