Create Task

View Markdown

Create a new task.


POST
/tasks

Authorization

AuthorizationRequiredBearer <token>

See API Security for more details.

In: header

Request Body

application/jsonRequired

The request body should contain a properly formatted JSON object with one of url or file_id, plus a kind. See Tasks for more details.

urlstring
Format: "uri"
file_idstring
kindRequiredstring
Value in: "ingest" | "video" | "image" | "audio" | "chapters" | "subtitles" | "thumbnails" | "nsfw" | "speech" | "description" | "outline" | "prompt" | "workflow" | "conditions" | "http"
filenamestring
folderstring
refstring
webhook_urlstring
Format: "uri"

Header Parameters

Accept-Versionstring

Specifies the API Version

Default: "2025-08-20"Value in: "2025-08-20" | "latest"

Response Body

Success

idRequiredstring
objectRequiredstring
kindRequiredstring
Value in: "ingest" | "video" | "image" | "audio" | "chapters" | "subtitles" | "thumbnails" | "nsfw" | "speech" | "description" | "outline" | "prompt" | "workflow" | "conditions" | "http"
inputobject
optionsobject
outputobject
statusRequiredstring
Value in: "pending" | "waiting" | "processing" | "ready" | "completed" | "failed" | "error" | "cancelled"
progressinteger
Minimum: 0Maximum: 100
errorstring
created_bystring
createdRequiredstring
Format: "date-time"
updatedRequiredstring
Format: "date-time"
parent_idstring
workflowarray<unknown>
resultsobject
const body = {
  file_id: "file_abcdefgh1234",
  kind: "image",
  width: 320,
  format: "png",
  ref: "thumbnail"
};

const task = await fetch("https://api.ittybit.com/tasks", {
  method: "POST",
  headers: { "Authorization": "Bearer ITTYBIT_API_KEY" },
  body: JSON.stringify(body)
})
{
  "id": "task_abcdefgh1234",
  "object": "task",
  "kind": "image",
  "input": {
    "id": "file_abcdefgh1234",
    "object": "source",
    "kind": "video",
    "type": "video/mp4",
    "width": 1920,
    "height": 1080,
    "duration": 123.45,
    "filesize": 12345678,
    "url": "https://you.ittybit.net/file_abcdefgh1234",
    "ref": "original"
  },
  "options": {
    "width": 320,
    "format": "png",
    "ref": "thumbnail"
  },
  "output": null,
  "status": "pending",
  "created": "2025-01-01T01:23:45Z",
  "updated": "2025-01-01T01:23:45Z"
}