---
title: "Bakes a batch of data with a recipe"
method: POST
path: "/batch/bake"
tags: ["Batch Operations"]
---

# Bakes a batch of data with a recipe

`POST /batch/bake`

Bake a recipe defined in JSON over an array of input data. To obtain a JSON-formatted recipe, build a recipe on  [CyberChef](https://gchq.github.io/CyberChef/) and click save. Select "clean JSON" and copy the output.
Input data must be in the form of an array. All items will be baked individually  and an individual result object provided for each in the response
The Recipe property in the payload is designed so that you only need to provide arguments for operations if they are required, or you want to change them from the default. For more information on accepted recipe formats, see the [bake section of the Node API docs](https://github.com/gchq/CyberChef/wiki/Node-API#bake)

## Request body

- union
  - SingleOpBatchRecipe
    - `input` object
    - `recipe` Operation
      - `op` string, required
      - `args` union
        - object[]
        - ArgObject
  - MultiOpBatchRecipe
    - `input` string[]
    - `recipe` Operation[]
      - `op` string, required
      - `args` union
        - object[]
        - ArgObject

## Response `200`

Inputs were syntactically valid, individual bakes may or may not have succeeded

- union[]
  - union
    - SuccessfulBakeResult
      - `success` boolean
      - `value` string
      - `type` string
    - UnsuccessfulBakeResult
      - `success` boolean
      - `error` string

## Other responses

- `400` — Bad request, most often a syntactically invalid recipe

---

[API](https://skmtc.net/gchq/apis/cyberchef-api.md) · [All operations](https://skmtc.net/gchq/apis/cyberchef-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gchq/cyberchef-api/versions/6f033ed6592d/schema)
