Make a job
POST /v1/jobs
Make a job: convert an upload, a base64 file or a file at a URL.
The job starts at once and is answered while it runs: wait for it with GET /v1/jobs/{id}, its event stream, or a webhook. Credits are held now and charged only if it succeeds.
API key with the convert scope.
Request
curl -X POST "https://api.formatjet.com/v1/jobs" \ -H "Authorization: Bearer $FORMATJET_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D" }, "steps": [ { "op": "convert", "to": "pdf" } ] }'Headers
| Field | Type | Description |
|---|---|---|
Idempotency-Key | string | Up to 255 printable ASCII characters, such as a UUID. A repeat of the same request within 24 hours gets the first one’s successful answer again (Idempotent-Replayed: true); the same key with a different request is a 409. |
Body
application/json
| Field | Type | Description |
|---|---|---|
input | object | The file. Send this or inputs. One of 3 shapes; their fields are below. |
input.upload_id | string | Up to 40 characters. |
input.base64 | string | Up to 13981020 characters. |
input.filename | string | Up to 255 characters. |
input.url | string | An http or https URL we fetch the file from; never logged. Private addresses, and video and social platforms, are refused. Up to 2048 characters. |
inputs | object[] | Two to 20 files joined into one output, in order (merge-pdf, image-to-pdf): uploads or base64, up to 10 MB of base64 in all. Send this or input. One of 2 shapes; their fields are below. |
inputs[].upload_id | string | Up to 40 characters. |
inputs[].base64 | string | Up to 13981020 characters. |
inputs[].filename | string | Up to 255 characters. |
steps | object[] | Up to 5 steps, each converting what the step before made: the job’s output is the last step’s. Send this or recipe. |
steps[].op required | "convert" | |
steps[].conversion | string | A conversion’s slug from GET /v1/operations, such as word-to-pdf Up to 100 characters. |
steps[].from | string (a format ID) | What the file is; detected from its bytes when left out |
steps[].to | string (a format ID) | The format to make, when conversion is left out |
steps[].options | object (map) | The conversion’s options (options_schema in GET /v1/operations) |
recipe | string | A recipe’s ID (rcp_…, POST /v1/recipes): its steps and output name. Send this or steps. Up to 40 characters. |
output | object | |
output.ttl | integer | Seconds the output is kept after completion (default 86400) |
output.filename | string | Up to 255 characters. |
metadata | object (map) | Up to 20 string values, 2 KB in all; returned with the job |
webhook | string | A URL that gets this job’s events besides your webhook endpoints, signed with your organization’s job-webhook secret (dashboard, Webhooks). HTTPS on a public host name. Up to 2048 characters. |
{ "input": { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D" }, "steps": [ { "op": "convert", "to": "pdf" } ]}{ "input": { "base64": "UEsDBBQABgAIAAAAIQ…", "filename": "report.docx" }, "steps": [ { "op": "convert", "conversion": "word-to-pdf" } ], "metadata": { "invoice": "INV-1042" }}{ "input": { "url": "https://formatjet.com/docs/samples/report.pdf" }, "steps": [ { "op": "convert", "to": "md" } ], "webhook": "https://example.com/formatjet/events"}{ "input": { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D" }, "steps": [ { "op": "convert", "conversion": "word-to-pdf" }, { "op": "convert", "conversion": "pdf-to-markdown" } ]}{ "input": { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D" }, "recipe": "rcp_01JBXA7M2P4R6T8V0X2Z4B6D8F"}{ "inputs": [ { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D" }, { "upload_id": "up_01JBXA3S8V0W2X4Y6Z8A0B2C4D" } ], "steps": [ { "op": "convert", "conversion": "merge-pdf" } ]}Responses
201 Created
The job, running
| Field | Type | Description |
|---|---|---|
id | string | |
status | "created" | "awaiting_upload" | "queued" | "processing" | "completed" | "failed" | "canceled" | awaiting_upload while a URL input is being fetched |
mode | "live" | "test" | |
conversion | string | |
progress | number | |
steps | object[] | Every step in order: each converts what the step before made, and the last makes the output |
steps[].op | "convert" | |
steps[].conversion | string | |
steps[].from | string (a format ID) | |
steps[].to | string (a format ID) | |
steps[].options | object (map) | |
steps[].status | "created" | "awaiting_upload" | "queued" | "processing" | "completed" | "failed" | "canceled" | |
steps[].credits | number | null | What the step costs if the job succeeds; null once the job’s details have expired |
steps[].units | number | null | The pages or minutes the step counted (1 for a step priced per file); null until measured |
steps[].engine | string | null | |
steps[].engine_version | string | null | |
input | object | The file, or the first of inputs |
input.upload_id | string | |
input.format | string (a format ID) | |
input.bytes | number | null | |
input.filename | string | null | |
inputs | object[] | Every input in order, input first: more than one when the job joins files. Empty once the job’s details have expired. |
inputs[].upload_id | string | |
inputs[].format | string (a format ID) | |
inputs[].bytes | number | null | |
inputs[].filename | string | null | |
outputs | object[] | |
outputs[].id | string | |
outputs[].filename | string | null | |
outputs[].bytes | number | |
outputs[].mime | string | |
outputs[].url | string | null | Null once the file is deleted |
outputs[].expires_at | string | null | |
outputs[].deleted_at | string | null | When the file was deleted from storage; null until then |
estimate | object | What the job costs, and what that counts (P3-2) |
estimate.credits | number | What the job costs if it succeeds. A conversion priced per page or minute counts one unit until the file is measured, then what its pages or minutes cost |
estimate.unit | "file" | "page" | "output_minute" | "audio_minute" | What the conversion is priced by |
estimate.units | number | null | Units counted: 1 for a conversion priced per file; the pages to read or started minutes once the file is measured, null until then |
credits | number | Credits charged: only for a job that succeeded |
engine | string | null | |
engine_version | string | null | |
error | object | null | |
error.code | string | |
error.detail | string | |
metadata | object (map) | |
created_at | string | |
finished_at | string | null | |
links | object | |
links.self | string | |
links.events | string |
{ "id": "job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D", "status": "completed", "mode": "live", "conversion": "word-to-pdf", "progress": 100, "steps": [ { "op": "convert", "conversion": "word-to-pdf", "from": "docx", "to": "pdf", "options": {}, "status": "completed", "credits": 2, "units": 1, "engine": "office", "engine_version": "libreoffice-25.8+runner-7" } ], "input": { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D", "format": "docx", "bytes": 48213, "filename": "report.docx" }, "inputs": [ { "upload_id": "up_01JBXA3Q6M2T8V4W9Y5Z7B1C3D", "format": "docx", "bytes": 48213, "filename": "report.docx" } ], "outputs": [ { "id": "file_01JBXA3R2N5P7Q9S1T3V5W7X9Z", "filename": "report.pdf", "bytes": 61874, "mime": "application/pdf", "url": "https://<account>.r2.cloudflarestorage.com/formatjet-files-us/out/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D/file_01JBXA3R2N5P7Q9S1T3V5W7X9Z?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Signature=…", "expires_at": "2026-10-25T10:00:06.000Z", "deleted_at": null } ], "estimate": { "credits": 2, "unit": "file", "units": 1 }, "credits": 2, "engine": "office", "engine_version": "libreoffice-25.8+runner-7", "error": null, "metadata": {}, "created_at": "2026-10-24T10:00:02.000Z", "finished_at": "2026-10-24T10:00:06.000Z", "links": { "self": "https://api.formatjet.com/v1/jobs/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D", "events": "https://api.formatjet.com/v1/jobs/job_01JBXA3Q6M2T8V4W9Y5Z7B1C3D/events" }}Errors
Problem documents (application/problem+json); see Errors.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The body failed validation, or an upload isn’t ready. |
| 401 | unauthorized | No API key, or one that’s unknown or revoked. |
| 402 | insufficient_credits | Not enough credits for the job. |
| 403 | forbidden | The key lacks the convert scope, or the plan has no API. |
| 404 | not_found | No such upload. |
| 409 | idempotency_conflict | The Idempotency-Key was used for a different request in the last 24 hours, or its first request is still running. |
| 413 | file_too_large | Larger than the plan, test mode or the engine takes. |
| 422 | unsupported_conversion | A conversion we can’t run for this file. |
| 429 | rate_limited | Over the rate limit, or as many jobs running as the plan allows: wait Retry-After seconds. |