Jobs
Running an operation on uploaded files. A job holds one task per file it runs. Running jobs explains settings, statuses and batches.
On this page
POST/v1/estimates
The same body as POST /v1/jobs. Answers the most the job can cost, which is what starting it would reserve, and what would happen to each input, without running or reserving anything.
Request body
operationstringRequiredThe operation's ID, from
GET /v1/operations.inputsobject[]RequiredThe input files, in order. Up to the operation's
max_files.inputs[].file_idstringRequiredsettingsobjectThe operation's settings, following its
settings_schema. Leave it out for the defaults.client_referencestringYour own reference, returned with the job and its webhooks, and searchable in
GET /v1/jobs.Up to 255 characters
Returns
- 200The estimate.
14 fields
operationstringRequiredsettingsobjectRequiredThe settings with every default filled in.
reserved_creditsintegerRequiredThe most the job can cost, which starting it reserves. It's charged only what it uses.
available_creditsintegerRequiredshortfallintegerRequiredHow many credits are missing to start it.
At least 0
tasksobject[]RequiredOne per input, in order.
tasks[].statusstringRequiredwaiting: it would run.skipped: it wouldn't, forreason.One of
waitingorskippedtasks[].inputsobject[]Requiredtasks[].inputs[].file_idstringtasks[].inputs[].namestringtasks[].reserved_creditsintegertasks[].reasonstringtasks[].detailsobjecttasks[].previewobjectWhat the operation would do, such as the output format, codec and picture size.
Errors
Example
curl -X POST https://api.filesokay.com/v1/estimates \
-H "Authorization: Bearer $FILESOKAY_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "video.compress",
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
"settings": {
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
}
}
}'const res = await fetch("https://api.filesokay.com/v1/estimates", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
operation: "video.compress",
inputs: [
{
file_id: "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
settings: {
method: "target_size",
target: {
unit: "percent",
value: 50
}
}
}),
});
const estimate = await res.json();import os
import requests
res = requests.post(
"https://api.filesokay.com/v1/estimates",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
json={
"operation": "video.compress",
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
"settings": {
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
}
}
},
)
estimate = res.json(){
"available_credits": 1908,
"operation": "video.compress",
"reserved_credits": 2,
"settings": {
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
},
"resolution": "auto",
"codec": "same",
"frame_rate": "original",
"audio": "keep",
"output_format": "same"
},
"shortfall": 0,
"tasks": [
{
"status": "waiting",
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c",
"name": "lecture.mp4"
}
],
"reserved_credits": 2,
"preview": {
"output": {
"format": "mp4",
"extension": "mp4",
"file_name": "lecture-compressed.mp4"
},
"video": {
"codec": "h264",
"width": 1280,
"height": 720,
"frame_rate": "original",
"hdr": "none"
},
"smallest_bytes": 634179
}
}
]
}GET/v1/jobs
The jobs the Workspace's API keys started, newest first.
Query parameters
limitintegerHow many jobs a page holds.
Default
20· 1 to 100cursorstringThe
next_cursorof the page before.client_referencestringOnly the jobs started with this
client_reference.Up to 255 characters
Returns
- 200A page of jobs.
30 fields
jobsobject[]Requiredjobs[].idstringRequiredjobs[].operationstringRequiredjobs[].statusstringRequiredwaiting: no task is running, and at least one is still waiting to start.completed: every task completed, apart from any that were cancelled.partly_failed: some completed and some failed.failed: every task failed, apart from any that were cancelled.cancelled: cancelled before any completed.One of
waiting,processing,completed,partly_failed,failed, orcancelledjobs[].client_referencestring | nullRequiredjobs[].settingsobjectRequiredjobs[].created_atstring (date-time)Requiredjobs[].started_atstring (date-time)jobs[].finished_atstring (date-time)jobs[].reserved_creditsintegerRequiredjobs[].charged_creditsintegerRequiredjobs[].tasksobject[]RequiredOne per input, in the request's order, skipped inputs among them.
jobs[].tasks[].idstringLeft out of a skipped input, which never became a task.
jobs[].tasks[].statusstringRequiredOne of
waiting,processing,completed,failed,cancelled, orskippedjobs[].tasks[].progressintegerRequired0 to 100
jobs[].tasks[].stagestringWhat it's doing now, such as
processingoruploading.jobs[].tasks[].reasonstringWhy it failed or was skipped.
jobs[].tasks[].detailsobjectjobs[].tasks[].reserved_creditsintegerjobs[].tasks[].charged_creditsintegerjobs[].tasks[].inputsobject[]Requiredjobs[].tasks[].inputs[].file_idstringjobs[].tasks[].inputs[].namestringjobs[].tasks[].outputsobject[]Requiredjobs[].tasks[].outputs[].file_idstringRequiredjobs[].tasks[].outputs[].namestringRequiredjobs[].tasks[].outputs[].sizeintegerRequiredjobs[].tasks[].outputs[].download_urlstring (URL)The result, as a download, valid until
download_expires_at.jobs[].tasks[].outputs[].download_expires_atstring (date-time)next_cursorstring | nullRequiredSend it as
cursorfor the next page. Null on the last page.
Errors
Example
curl "https://api.filesokay.com/v1/jobs?client_reference=lecture-0412" \
-H "Authorization: Bearer $FILESOKAY_KEY"const res = await fetch("https://api.filesokay.com/v1/jobs?client_reference=lecture-0412", {
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
},
});
const page = await res.json();import os
import requests
res = requests.get(
"https://api.filesokay.com/v1/jobs?client_reference=lecture-0412",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
)
page = res.json(){
"jobs": [
{
"id": "job_a1c9531eeb00434aba0058796f1ca517",
"operation": "video.compress",
"status": "completed",
"client_reference": "lecture-0412",
"settings": {
"audio": "keep",
"codec": "same",
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
},
"frame_rate": "original",
"resolution": "auto",
"output_format": "same"
},
"created_at": "2026-12-03T09:23:14Z",
"started_at": "2026-12-03T09:23:33Z",
"finished_at": "2026-12-03T09:23:50Z",
"reserved_credits": 2,
"charged_credits": 1,
"tasks": [
{
"id": "task_3f648f64472b4ea4b88568eea9d4f88c",
"status": "completed",
"progress": 100,
"reserved_credits": 2,
"charged_credits": 1,
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c",
"name": "lecture.mp4"
}
],
"outputs": [
{
"file_id": "file_a1c8014998a14c4da72d6e6a0c74314c",
"name": "lecture-compressed.mp4",
"size": 6054914,
"download_url": "https://…",
"download_expires_at": "2026-12-06T09:23:50Z"
}
]
}
]
}
],
"next_cursor": null
}POST/v1/jobs
Runs an operation on files: one task per input that runs, with its credits reserved. An input that can't be used, or that the operation wouldn't change with these settings, is skipped with its reason and costs nothing. When no input would run, the answer is 422 nothing_to_run. Send an Idempotency-Key, so a retry never starts a second job.
Headers
Idempotency-KeystringAny unique text, such as a UUID, sent again unchanged with every retry of the same request. Kept for 24 hours.
Up to 255 characters
Request body
operationstringRequiredThe operation's ID, from
GET /v1/operations.inputsobject[]RequiredThe input files, in order. Up to the operation's
max_files.inputs[].file_idstringRequiredsettingsobjectThe operation's settings, following its
settings_schema. Leave it out for the defaults.client_referencestringYour own reference, returned with the job and its webhooks, and searchable in
GET /v1/jobs.Up to 255 characters
Returns
- 200A retry with the same Idempotency-Key and body. The job, as it is now.
- 201The new job.
28 fields
idstringRequiredoperationstringRequiredstatusstringRequiredwaiting: no task is running, and at least one is still waiting to start.completed: every task completed, apart from any that were cancelled.partly_failed: some completed and some failed.failed: every task failed, apart from any that were cancelled.cancelled: cancelled before any completed.One of
waiting,processing,completed,partly_failed,failed, orcancelledclient_referencestring | nullRequiredsettingsobjectRequiredcreated_atstring (date-time)Requiredstarted_atstring (date-time)finished_atstring (date-time)reserved_creditsintegerRequiredcharged_creditsintegerRequiredtasksobject[]RequiredOne per input, in the request's order, skipped inputs among them.
tasks[].idstringLeft out of a skipped input, which never became a task.
tasks[].statusstringRequiredOne of
waiting,processing,completed,failed,cancelled, orskippedtasks[].progressintegerRequired0 to 100
tasks[].stagestringWhat it's doing now, such as
processingoruploading.tasks[].reasonstringWhy it failed or was skipped.
tasks[].detailsobjecttasks[].reserved_creditsintegertasks[].charged_creditsintegertasks[].inputsobject[]Requiredtasks[].inputs[].file_idstringtasks[].inputs[].namestringtasks[].outputsobject[]Requiredtasks[].outputs[].file_idstringRequiredtasks[].outputs[].namestringRequiredtasks[].outputs[].sizeintegerRequiredtasks[].outputs[].download_urlstring (URL)The result, as a download, valid until
download_expires_at.tasks[].outputs[].download_expires_atstring (date-time)
Errors
Example
curl -X POST https://api.filesokay.com/v1/jobs \
-H "Authorization: Bearer $FILESOKAY_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"operation": "video.compress",
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
"settings": {
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
}
},
"client_reference": "lecture-0412"
}'const res = await fetch("https://api.filesokay.com/v1/jobs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
operation: "video.compress",
inputs: [
{
file_id: "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
settings: {
method: "target_size",
target: {
unit: "percent",
value: 50
}
},
client_reference: "lecture-0412"
}),
});
const job = await res.json();import os
import uuid
import requests
res = requests.post(
"https://api.filesokay.com/v1/jobs",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={
"operation": "video.compress",
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c"
}
],
"settings": {
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
}
},
"client_reference": "lecture-0412"
},
)
job = res.json(){
"id": "job_a1c9531eeb00434aba0058796f1ca517",
"operation": "video.compress",
"status": "waiting",
"client_reference": "lecture-0412",
"settings": {
"audio": "keep",
"codec": "same",
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
},
"frame_rate": "original",
"resolution": "auto",
"output_format": "same"
},
"created_at": "2026-12-03T09:23:14Z",
"reserved_credits": 2,
"charged_credits": 0,
"tasks": [
{
"id": "task_3f648f64472b4ea4b88568eea9d4f88c",
"status": "waiting",
"progress": 0,
"reserved_credits": 2,
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c",
"name": "lecture.mp4"
}
],
"outputs": []
}
]
}GET/v1/jobs/{id}
The job and its tasks. A completed task lists its results with download links, each valid for up to 7 days; ask again for fresh ones. Webhooks tell you when a job ends, so you needn't ask repeatedly.
Path parameters
idstringRequired
Returns
- 200The job.
28 fields
idstringRequiredoperationstringRequiredstatusstringRequiredwaiting: no task is running, and at least one is still waiting to start.completed: every task completed, apart from any that were cancelled.partly_failed: some completed and some failed.failed: every task failed, apart from any that were cancelled.cancelled: cancelled before any completed.One of
waiting,processing,completed,partly_failed,failed, orcancelledclient_referencestring | nullRequiredsettingsobjectRequiredcreated_atstring (date-time)Requiredstarted_atstring (date-time)finished_atstring (date-time)reserved_creditsintegerRequiredcharged_creditsintegerRequiredtasksobject[]RequiredOne per input, in the request's order, skipped inputs among them.
tasks[].idstringLeft out of a skipped input, which never became a task.
tasks[].statusstringRequiredOne of
waiting,processing,completed,failed,cancelled, orskippedtasks[].progressintegerRequired0 to 100
tasks[].stagestringWhat it's doing now, such as
processingoruploading.tasks[].reasonstringWhy it failed or was skipped.
tasks[].detailsobjecttasks[].reserved_creditsintegertasks[].charged_creditsintegertasks[].inputsobject[]Requiredtasks[].inputs[].file_idstringtasks[].inputs[].namestringtasks[].outputsobject[]Requiredtasks[].outputs[].file_idstringRequiredtasks[].outputs[].namestringRequiredtasks[].outputs[].sizeintegerRequiredtasks[].outputs[].download_urlstring (URL)The result, as a download, valid until
download_expires_at.tasks[].outputs[].download_expires_atstring (date-time)
Errors
Example
curl https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517 \
-H "Authorization: Bearer $FILESOKAY_KEY"const res = await fetch("https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517", {
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
},
});
const job = await res.json();import os
import requests
res = requests.get(
"https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
)
job = res.json(){
"id": "job_a1c9531eeb00434aba0058796f1ca517",
"operation": "video.compress",
"status": "completed",
"client_reference": "lecture-0412",
"settings": {
"audio": "keep",
"codec": "same",
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
},
"frame_rate": "original",
"resolution": "auto",
"output_format": "same"
},
"created_at": "2026-12-03T09:23:14Z",
"started_at": "2026-12-03T09:23:33Z",
"finished_at": "2026-12-03T09:23:50Z",
"reserved_credits": 2,
"charged_credits": 1,
"tasks": [
{
"id": "task_3f648f64472b4ea4b88568eea9d4f88c",
"status": "completed",
"progress": 100,
"reserved_credits": 2,
"charged_credits": 1,
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c",
"name": "lecture.mp4"
}
],
"outputs": [
{
"file_id": "file_a1c8014998a14c4da72d6e6a0c74314c",
"name": "lecture-compressed.mp4",
"size": 6054914,
"download_url": "https://…",
"download_expires_at": "2026-12-06T09:23:50Z"
}
]
}
]
}POST/v1/jobs/{id}/cancel
Stops the tasks still waiting or processing. A task that hadn't started costs nothing; one that had is charged for the time it ran. Cancelling an ended job changes nothing.
Path parameters
idstringRequired
Returns
- 202Cancelling. The job, as it is now.
28 fields
idstringRequiredoperationstringRequiredstatusstringRequiredwaiting: no task is running, and at least one is still waiting to start.completed: every task completed, apart from any that were cancelled.partly_failed: some completed and some failed.failed: every task failed, apart from any that were cancelled.cancelled: cancelled before any completed.One of
waiting,processing,completed,partly_failed,failed, orcancelledclient_referencestring | nullRequiredsettingsobjectRequiredcreated_atstring (date-time)Requiredstarted_atstring (date-time)finished_atstring (date-time)reserved_creditsintegerRequiredcharged_creditsintegerRequiredtasksobject[]RequiredOne per input, in the request's order, skipped inputs among them.
tasks[].idstringLeft out of a skipped input, which never became a task.
tasks[].statusstringRequiredOne of
waiting,processing,completed,failed,cancelled, orskippedtasks[].progressintegerRequired0 to 100
tasks[].stagestringWhat it's doing now, such as
processingoruploading.tasks[].reasonstringWhy it failed or was skipped.
tasks[].detailsobjecttasks[].reserved_creditsintegertasks[].charged_creditsintegertasks[].inputsobject[]Requiredtasks[].inputs[].file_idstringtasks[].inputs[].namestringtasks[].outputsobject[]Requiredtasks[].outputs[].file_idstringRequiredtasks[].outputs[].namestringRequiredtasks[].outputs[].sizeintegerRequiredtasks[].outputs[].download_urlstring (URL)The result, as a download, valid until
download_expires_at.tasks[].outputs[].download_expires_atstring (date-time)
Errors
Example
curl -X POST https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/cancel \
-H "Authorization: Bearer $FILESOKAY_KEY"const res = await fetch("https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/cancel", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
},
});
const job = await res.json();import os
import requests
res = requests.post(
"https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/cancel",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
)
job = res.json(){
"id": "job_a1c9531eeb00434aba0058796f1ca517",
"operation": "video.compress",
"status": "cancelled",
"client_reference": "lecture-0412",
"settings": {
"audio": "keep",
"codec": "same",
"method": "target_size",
"target": {
"unit": "percent",
"value": 50
},
"frame_rate": "original",
"resolution": "auto",
"output_format": "same"
},
"created_at": "2026-12-03T09:23:14Z",
"finished_at": "2026-12-03T09:23:20Z",
"reserved_credits": 2,
"charged_credits": 0,
"tasks": [
{
"id": "task_3f648f64472b4ea4b88568eea9d4f88c",
"status": "cancelled",
"progress": 0,
"reserved_credits": 2,
"charged_credits": 0,
"inputs": [
{
"file_id": "file_3cf0737aefa34b89b7b4443c9467d60c",
"name": "lecture.mp4"
}
],
"outputs": []
}
]
}DELETE/v1/jobs/{id}/files
Deletes the job's input and result files now, once it has ended. An input another running job uses is left to that job. The job and its record of credits stay.
Path parameters
idstringRequired
Returns
- 204Deleted.
Errors
Example
curl -X DELETE https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/files \
-H "Authorization: Bearer $FILESOKAY_KEY"const res = await fetch("https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/files", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.FILESOKAY_KEY}`,
},
});
console.log(res.status);import os
import requests
res = requests.delete(
"https://api.filesokay.com/v1/jobs/job_a1c9531eeb00434aba0058796f1ca517/files",
headers={
"Authorization": f"Bearer {os.environ['FILESOKAY_KEY']}",
},
)
print(res.status_code)