Browse all functions
1001fx account
Carbone documents
Data & JSON
Data tables
Files & PDF
- addtextwatermark2pdf
- addwatermark2pdf
- asset2base64
- compresspdf
- convertofficedocument
- csv2array
- decryptpdf
- decryptzip
- encryptpdf
- encryptzip
- extractinvoicedata
- extractpdfdata
- getpdfinfo
- html2pdf
- insertpdfpages
- markdown2pdf
- mergepdfs
- ocrdocx
- ocrpdf
- ocrpptx
- pdf2image
- removepdfpages
- rotatepdfpages
- setpdfmetadata
- splitpdf
- uploadasset
Images
- blurimage
- convertimage
- cropimage
- extractimagedata
- extractreceiptdata
- flipimage
- generatebarcode
- generateqrcode
- getimageexif
- getimagemeta
- html2image
- html2ogimage
- maskcircleimage
- maskimage
- modifyimageexif
- ocrimage
- overlayimages
- readbarcode
- readqrcode
- removeimageexif
- resizeimage
- rotateimage
- scaleimage
- scaleimagetofit
- sharpenimage
- text2image
Playground
Spreadsheet
Stripe
YouTube
- deleteyoutubecomment
- deleteyoutubeplaylist
- deleteyoutubeplaylistitem
- deleteyoutubevideo
- fetchyoutubevideotranscription
- getyoutubevideorating
- insertyoutubecomment
- insertyoutubecommentthread
- insertyoutubeplaylist
- insertyoutubeplaylistitem
- insertyoutubevideo
- listyoutubecomments
- listyoutubecommentthreads
- listyoutubei18nlanguages
- listyoutubei18nregions
- listyoutubeplaylists
- listyoutubevideocategories
- listyoutubevideos
- markyoutubecommentasspam
- setyoutubecommentmoderationstatus
- setyoutubethumbnail
- updateyoutubecomment
- updateyoutubeplaylist
- updateyoutubeplaylistitem
- updateyoutubevideo
Guide
Long-running functions & webhooks
Make, Zapier and Power Automate stop waiting for an answer after a fixed time. Video conversion, transcription or OCR of many pages can take longer. Give the call a webhook URL: 1001fx answers at once, runs the function in the background and sends the result to your webhook when it is done.
How it works
- Call any function as usual and add two headers:
x-fx-webhook(the URL that receives the result) andx-fx-webhook-ref(your reference ID). - 1001fx checks the call as usual. Errors such as a missing parameter (
400), a wrong key (401) or too few credits (402) come back at once, without a job. - Otherwise the answer is
202with ajobId. The function runs in the background. - When it is done, 1001fx sends a
POSTwith the result to your webhook URL – also when the function failed.
Without x-fx-webhook nothing changes: the call is answered directly, exactly as before.
Costs
The function costs the same credits as a direct call, only when it succeeds. Each call with a webhook costs 1 extra credit, also when the function fails – you still get the webhook with the error. Retries of the delivery are free.
Request
The reference ID is required as soon as a webhook URL is set (up to 255 characters). It comes back unchanged in the webhook, so you can match the result to your data, for example a row ID.
curl -X POST 'https://api.1001fx.com/audiovideo/convertvideo' \
-H 'X-API-KEY: YOURSECRETAPIKEY' \
-H 'x-fx-webhook: https://hook.eu1.make.com/abc123' \
-H 'x-fx-webhook-ref: row-42' \
-H 'Content-Type: application/json' \
-d '{"url":"https://example.com/video.mov","format":"mp4"}'HTTP/1.1 202 Accepted
{
"jobId": "01JC8Z4M3Q7Y1V2X9K5T6R8N0P",
"status": "queued",
"ref": "row-42",
"statusUrl": "https://api.1001fx.com/jobs/01JC8Z4M3Q7Y1V2X9K5T6R8N0P"
}The webhook
1001fx sends a POST with Content-Type: application/json. result holds what the function answers directly (without the outer result key). Functions that return a file deliver a download URL instead; the file is kept for 48 hours.
{
"jobId": "01JC8Z4M3Q7Y1V2X9K5T6R8N0P",
"ref": "row-42",
"group": "audiovideo",
"fx": "convertvideo",
"status": "succeeded",
"statusCode": 200,
"result": {
"url": "https://files.1001fx.com/tempassets/…/01JC….mp4",
"filename": "video",
"extension": "mp4",
"contentType": "video/mp4",
"size": 18234567
},
"credits": { "function": 20, "webhook": 1, "balance": 4711 },
"createdAt": "2026-11-02T10:00:00.000Z",
"finishedAt": "2026-11-02T10:03:12.000Z",
"durationMs": 192000
}{
"jobId": "01JC8Z4M3Q7Y1V2X9K5T6R8N0P",
"ref": "row-42",
"group": "audiovideo",
"fx": "convertvideo",
"status": "failed",
"statusCode": 400,
"message": "Could not download the file",
"credits": { "function": 0, "webhook": 1, "balance": 4730 },
…
}Headers of every webhook:
x-fx-job-id– the job IDx-fx-webhook-ref– your reference IDx-fx-delivery-attempt– 1 for the first attempt, then 2, 3 …x-fx-signature– only if you created a signing secret (see below)
Delivery and retries
- Your webhook must answer with a
2xxstatus within 10 seconds. The answer body is ignored and redirects are not followed. - On a network error,
5xx,408or4291001fx tries again after 1 minute, 5 minutes, 30 minutes, 2 hours and 6 hours. Other4xxanswers end the delivery at once. - The same job can arrive twice (for example when your answer got lost). Use
jobIdto ignore duplicates. - The webhook URL must be a public
httpsaddress. - A job runs for up to 30 minutes. After that it ends with
"status": "failed","statusCode": 504andJob timeout.
Verify the signature
Create a webhook signing secret in the app under API key. From then on every webhook carriesx-fx-signature: t=<unix time>,v1=<signature>. The signature is the hex HMAC-SHA256 of t + "." + body with your secret. Without a secret there is no signature.
import { createHmac, timingSafeEqual } from 'node:crypto'
// rawBody: the request body exactly as received (string), header: x-fx-signature
function isFrom1001fx(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')))
const t = Number(parts.t)
if (!t || Math.abs(Date.now() / 1000 - t) > 300) return false // older than 5 minutes
const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex')
return parts.v1?.length === expected.length && timingSafeEqual(Buffer.from(parts.v1), Buffer.from(expected))
}Check the status
For platforms without webhooks, or if a webhook got lost: GET /jobs/<jobId> with the same API key. While the job runs you get "status": "queued" or"running", afterwards the same body as the webhook plus the delivery state. The call is free. Jobs of other keys answer 404.
curl 'https://api.1001fx.com/jobs/01JC8Z4M3Q7Y1V2X9K5T6R8N0P' -H 'X-API-KEY: YOURSECRETAPIKEY'Make: two scenarios
In Make the result arrives in a second scenario that starts with a webhook.
Scenario B – receives the result (create it first):
- Add Webhooks → Custom webhook as trigger and copy its address.
- Add the modules that process the result, for example Google Sheets → Update a row with
refas row number andresult.urlas value. - Turn the scenario on. Run scenario A once and click Redetermine data structure at the webhook, so Make knows the fields.
Scenario A – starts the function:
- Open the 1001fx module and click Show advanced settings.
- Paste the webhook address into Webhook URL (run as background job).
- Map an ID into Webhook reference ID, for example the row number from Google Sheets.
- The module now finishes at once with Job ID and Job status URL; the result arrives in scenario B.
Try it in the app
Every function has its own page in the app: the Webhook section there sends the same headers.