Save a recipe
POST /v1/recipes
Save a recipe: steps and an output name to run on files.
Run it with recipe on POST /v1/jobs, or ?recipe= on POST /v1/convert. Its steps are checked now as a job's are, and again for each file. At most 100 recipes an organization. Recipes need Pro or an API plan. Test keys have them on any plan.
API key with the convert scope.
Request
curl -X POST "https://api.formatjet.com/v1/recipes" \ -H "Authorization: Bearer $FORMATJET_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Word documents to Markdown", "steps": [ { "op": "convert", "conversion": "word-to-pdf" }, { "op": "convert", "conversion": "pdf-to-markdown" } ], "output_name": "{name}-text" }'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 |
|---|---|---|
name required | string | Up to 100 characters. |
steps required | object[] | Up to 5 steps, as POST /v1/jobs takes them. The first names its conversion, or to with from; no step may hold a password. |
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) |
output_name | string | null | The output’s name without its extension: text and {name}, the input’s name, such as {name}-small. Null for the input’s name. Up to 100 characters. |
{ "name": "Word documents to Markdown", "steps": [ { "op": "convert", "conversion": "word-to-pdf" }, { "op": "convert", "conversion": "pdf-to-markdown" } ], "output_name": "{name}-text"}Responses
201 Created
The recipe
| Field | Type | Description |
|---|---|---|
id | string | |
name | string | |
steps | object[] | |
steps[].op | "convert" | |
steps[].conversion | string | |
steps[].from | string | |
steps[].to | string | |
steps[].options | object (map) | |
output_name | string | null | |
created_at | string | |
updated_at | string |
{ "id": "rcp_01JBXA7M2P4R6T8V0X2Z4B6D8F", "name": "Word documents to Markdown", "steps": [ { "op": "convert", "conversion": "word-to-pdf" }, { "op": "convert", "conversion": "pdf-to-markdown" } ], "output_name": "{name}-text", "created_at": "2026-11-16T09:00:00.000Z", "updated_at": "2026-11-16T09:00:00.000Z"}Errors
Problem documents (application/problem+json); see Errors.
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | The body failed validation, or a step can’t follow the one before. |
| 401 | unauthorized | No API key, or one that’s unknown or revoked. |
| 403 | forbidden | Recipes need Pro or an API plan. Test keys have them on any plan. Or the organization has 100 recipes already. |
| 409 | idempotency_conflict | The Idempotency-Key was used for a different request in the last 24 hours, or its first request is still running. |
| 422 | unsupported_conversion | A step names a conversion we can’t run. |
| 429 | rate_limited | More requests than the plan allows in 10 seconds: wait Retry-After seconds. |