Skip to main content

How to Use Cheapest Inference with Activepieces (The Smart & Cheap Way)

Welcome! This guide will show you how to connect your cheapestinference.com account to Activepieces to run powerful, low-cost AI jobs. We will use the Webhook method, which is the most efficient and robust way to handle asynchronous tasks.

🤔 Why Not Just One Flow? (Polling vs. Webhooks)

You might see other apps use “Polling” (checking for a result every 10 seconds). We don’t do that, for one simple reason: it costs you money.
  • Polling: A 2-minute job could cost you 12+ tasks in Activepieces (1 submit + 12 checks).
  • Webhooks (This Guide): The entire process costs exactly 2 tasks (1 to send, 1 to receive).
This method aligns with our promise: to be the cheapest option available. It’s a tiny bit more setup for a massive cost saving.

⚙️ The 2-Flow Setup: An Overview

We will create two simple flows:
  1. Flow A (The “Receiver”): This flow listens for completed jobs. It has one trigger: On Job Completed.
  2. Flow B (The “Sender”): This flow starts the job. It has one action: Submit Inference Job.
Flow B will tell Flow A where to send the result. Let’s build it!

Prerequisites

Before you start, you’ll need:
  1. An Activepieces account.
  2. A Cheapest Inference account and your API Key.
  3. A sample file URL to test with (e.g., a public URL to an .mp3 file for a transcription test).

🚀 Part 1: Create Flow A (The “Receiver”)

This flow will catch the finished job from Cheapest Inference.
  1. In Activepieces, click “New Flow”.
  2. Click the “Trigger” box.
  3. Search for and select Cheapest Inference.
  4. Choose the trigger: On Job Completed.
  5. Activepieces will now show you a Webhook URL. This is critical. 🔗 Click the “Copy” icon to copy this URL. We will need it in Part 3.
  6. (Optional) To test, click “Load Data” and Activepieces will show you the sampleData (what a real result will look like). This helps you build the rest of your flow.
  7. Add a simple action to see the result. For example, add the “Send Email” action and map the data from the trigger:
    • Subject: AI Job Complete: {{trigger.job_id}}
    • Body: Result: {{trigger.output.transcription}}
  8. IMPORTANT: Click “Publish” on your flow. It must be “live” to listen for the webhook.
Flow A is now live and waiting for data.

🔒 Part 2: Connect Your Cheapest Inference Account

You only need to do this once.
  1. Go to Flow B (or any flow) and add the Submit Inference Job action.
  2. In the “Connection” dropdown, click ”+ New Connection”.
  3. A popup will ask for your API Key.
  4. Paste in your API Key from your cheapestinference.com dashboard.
  5. Click “Save”. Your account is now securely connected to Activepieces.

🚀 Part 3: Create Flow B (The “Sender”)

This flow will start the AI job.
  1. Create a new, separate flow.
  2. For this test, let’s use a manual trigger. Click “Trigger” and select “Manually” (under “Core”).
  3. Click “Add Step” (+) and select “Action”.
  4. Search for and select Cheapest Inference.
  5. Choose the action: Submit Inference Job.
  6. Configure the action:
    • Connection: Select the account you just added in Part 2.
    • Model ID: Enter the ID of the model you want to use. (e.g., whisper-large-v3)
    • Input File URL: Paste the public URL of your test file. (e.g., https://example.com/my-audio.mp3)
    • Webhook URL: pasting the URL from Flow A Paste the unique Webhook URL you copied from Flow A.

🏁 Part 4: Run Your Test!

You’re all set. Let’s test the full circle.
  1. Go to Flow B (the “Sender” flow).
  2. Click “Test Flow”. This will manually trigger the flow and submit your job to Cheapest Inference.
  3. You should see a “Success” message. The output will show your job_id and status: "pending".
  4. Now, wait a few moments (depending on your job size).
  5. Go to Flow A (the “Receiver” flow) and click on the “Runs” tab.
  6. Success! You will see a new run that was triggered by the webhook. If you set up the email action, you will receive an email with your transcription.

What’s Next?

You can now make Flow B’s trigger anything you want!
  • Trigger: New File in Google Drive
  • Action: Submit Inference Job (with Flow A’s webhook)
…and Flow A will automatically catch the result and save it to a database, send a Slack message, or anything else you can dream of. Happy building!