Pixio API Development
Learn how to interact with the Pixio API to trigger workflows and upload files
Prerequisite: You should have Node.js (version 18.10.0 or higher) and an API token from the Pixio dashboard.
Step 1: Install the Pixio API SDK
To start interacting with the Pixio API, you need to install the Pixio SDK using npm or yarn:
Step 2: Configure API Key
Once the SDK is installed, create a .env
file in your project to securely store your Pixio API key.
Step 3: Set up the Pixio API Client
Next, set up the Pixio API client in your code:
Step 4: Running a Workflow
You can trigger a workflow by making a POST request to the /run
endpoint with the deployment ID and input data:
Step 5: Retrieve Workflow Output
After triggering the workflow, you can retrieve the output using the run_id
:
Custom Ports
Pixio API calls are generally executed on standard ports. If you are working in a local development environment and need to customize the port for running your Node.js app:
Common Errors
If you encounter any errors such as EADDRINUSE
or other port-related issues, make sure that no other services are running on the same port.
Pixio API Versions
To ensure compatibility with the latest Pixio API features, keep the SDK up-to-date:
Deployment
If you have any issues please contact us.
Troubleshooting
If you run into any issues while working with the Pixio API, here are a few troubleshooting steps:
Invalid API Key
Invalid API Key
.env
file is correctly set up with your Pixio API key. Regenerate the API key if needed from the dashboard. Token Expired or Invalid
Token Expired or Invalid
API Response Errors
API Response Errors
npm install
or yarn install
. For further details on the Pixio API, check out the API Reference.