n8n Integration
Technical documentation for dryAPI APIs, integration guides, and operational references.
This guide explains how to integrate dryAPI with n8n to automate AI-powered workflows such as image generation, video transcription, and more.
NOTE
For a simpler, no-code experience, use the dryAPI Community Node instead. It handles webhook-based waiting, binary downloads, and error handling automatically — with just one node. The guide below covers the manual HTTP Request approach, which works with both self-hosted n8n and n8n Cloud.
What is n8n?
n8n is an open-source workflow automation tool that allows you to connect different services and APIs together. With dryAPI's HTTP API, you can build powerful automation workflows that generate images, transcribe videos, create speech, and more — all without writing code.
Prerequisites
Before you begin, ensure you have:
- An n8n instance (self-hosted or n8n Cloud)
- A dryAPI API key from the dryAPI Dashboard
- Basic understanding of n8n workflows
Authentication Setup
All dryAPI endpoints require Bearer token authentication. In n8n, configure this once and reuse it across your workflow:
- In your HTTP Request node, set Authentication to
Generic Credential Type - Set Generic Auth Type to
Bearer Auth - Create a new credential with your dryAPI API key as the token
Example Workflow: Text-to-Image Generation
This example demonstrates a complete workflow that generates an image from a text prompt using dryAPI's asynchronous job model.
Workflow Overview
The workflow follows dryAPI's queued execution model:
- Submit job — POST request to start image generation
- Poll status — Check job status in a loop
- Check completion — Verify if
result_urlexists - Download result — Fetch the generated image
+---------------------+
| Manual Trigger |
+----------+----------+
|
v
+---------------------+
| HTTP Request | POST /api/v1/client/txt2img
| (Submit Job) |
+----------+----------+
|
v
+---------------------+
| HTTP Request1 |<-----------+
| (Check Status) | |
+----------+----------+ |
| |
v |
+---------------------+ |
| If | |
| (result_url exists) | |
+----------+----------+ |
| |
+-----+-----+ |
| | |
True False |
| | |
v v |
+----------+ +----------+ |
| HTTP | | Wait |----------+
| Request2 | | (3 sec) |
|(Download)| +----------+
+----------+Step 1: Trigger Node
Add a Manual Trigger (or any trigger like Webhook, Schedule) to start the workflow.
Step 2: Submit Generation Request (HTTP Request)
Add an HTTP Request node with the following configuration:
| Setting | Value |
|---|---|
| Method | POST |
| URL | https://api.dryapi.dev/api/v1/client/txt2img |
| Authentication | Generic Credential Type |
| Generic Auth Type | Bearer Auth |
| Bearer Auth | Select your dryAPI credential |
| Send Body | Enabled (toggle ON) |
| Body Content Type | JSON |
| Specify Body | Using JSON |
JSON Body:
{
"seed": 1312321313,
"loras": [],
"model": "zimageturbo-int8",
"steps": 8,
"width": 1024,
"height": 1024,
"prompt": "Red Bull F1 car from 2025",
"guidance": 3.5,
"negative_prompt": null
}The response will contain a request_id:
{
"data": {
"request_id": "c08a339c-73e5-4d67-a4d5-231302fbff9a"
}
}Step 3: Poll Job Status (HTTP Request1)
Add a second HTTP Request node to check the job status:
| Setting | Value |
|---|---|
| Method | GET |
| URL | https://api.dryapi.dev/api/v1/client/request-status/{{ $node["HTTP Request"].json.data.request_id }} |
| Authentication | Generic Credential Type |
| Generic Auth Type | Bearer Auth |
| Bearer Auth | Select your dryAPI credential |
NOTE
The URL uses n8n expression syntax to reference the
request_idfrom the previous node.
The response includes job status:
{
"data": {
"status": "done",
"progress": 100,
"result_url": "https://depinprod.s3.pl-waw.scw.cloud/depin-result/..."
}
}Step 4: Check if Result is Ready (If Node)
Add an If node to check whether the job has completed:
| Setting | Value |
|---|---|
| Conditions | |
| Value 1 | {{ $json.data.result_url }} |
| Operation | exists |
Connect the outputs:
- True → HTTP Request2 (download result)
- False → Wait node (retry loop)
Step 5: Wait Before Retry (Wait Node)
Add a Wait node for the False branch:
| Setting | Value |
|---|---|
| Resume | After Time Interval |
| Wait Amount | 3 |
| Wait Unit | Seconds |
WARNING
Connect the Wait node output back to HTTP Request1 to create the polling loop.
Step 6: Download Result (HTTP Request2)
Add a final HTTP Request node for the True branch:
| Setting | Value |
|---|---|
| Method | GET |
| URL | {{ $json.data.result_url }} |
| Authentication | None |
| Options → Response → Response Format | File |
| Options → Response → Put Output in Field | data |
The generated image is now available in your workflow for further processing (save to disk, upload to cloud storage, send via email, etc.).
Tips & Best Practices
Polling Interval
Adjust the Wait node timing based on task type:
| Task Type | Recommended Wait |
|---|---|
| Text-to-Image | 2–5 seconds |
| Image-to-Image | 2–5 seconds |
| Text-to-Video | 10–30 seconds |
| Audio-to-Video | 10–30 seconds |
| Text-to-Music | 10–30 seconds |
| Video Transcription | 5–15 seconds |
| Audio Transcription | 3–10 seconds |
Error Handling
Add error handling to your workflow:
- Check for
status: "error"in the polling response - Set a maximum number of loop iterations to avoid infinite loops (use a counter with Set node)
- Use n8n's built-in Error Trigger node for workflow-level error handling
Reusable Credentials
Create a single Bearer Auth credential named "dryAPI" and reuse it across all HTTP Request nodes.
Other Endpoints
Use the same polling pattern for all dryAPI endpoints:
| Service | POST Endpoint |
|---|---|
| Text-to-Image | /api/v1/client/txt2img |
| Image-to-Image | /api/v1/client/img2img |
| Text-to-Video | /api/v1/client/txt2video |
| Image-to-Video | /api/v1/client/img2video |
| Text-to-Speech | /api/v1/client/txt2audio |
| Text-to-Music | /api/v1/client/txt2music |
| Audio-to-Video | /api/v1/client/aud2video |
| Video-to-Text (URL) | /api/v1/client/vid2txt |
| Video-to-Text (File) | /api/v1/client/videofile2txt |
| Audio-to-Text (File) | /api/v1/client/audiofile2txt |
| Audio-to-Text (X Spaces) | /api/v1/client/aud2txt |
| Background Removal | /api/v1/client/img-rmbg |
| OCR (Image-to-Text) | /api/v1/client/img2txt |
| Text-to-Embedding | /api/v1/client/txt2embedding |
All endpoints follow the same pattern:
POSTto submit the job → receiverequest_idGET /api/v1/client/request-status/{request_id}→ poll status- When
status: "done"→ useresult_urlorresult
Resources
- n8n Documentation
- dryAPI Community Node
- dryAPI API Reference
- Execution Modes & HTTP Queue
- Model Selection