---
title: "Performs magic on some input"
method: POST
path: "/magic"
tags: ["Single Operations"]
---

# Performs magic on some input

`POST /magic`

Take some input data and optional arguments for the [Magic operation](https://github.com/gchq/CyberChef/wiki/Automatic-detection-of-encoded-data-using-CyberChef-Magic) and return JSON of results of automatic encoding detection of the inputted data.

## Request body

- MagicInput
  - `input` unknown
  - `args` union
    - object[]
    - ArgObject

## Response `200`

Magic operation ran successfully

- MagicResponse
  - `type` integer
  - `value` MagicResponseItem[]
    - `recipe` object[]
    - `data` string
    - `languageScores` object[]
    - `matchingOps` object[]
    - `useful` boolean

## Changes

- **2025-02-26** `07f31d47280a` — 1 info
  - api tag `Single Operations` added
- **2024-08-01** `3f87085d6c08` — 2 breaking, 2 info
  - the `args/oneOf[#/components/schemas/ArgArray]/items/` request property type/format changed from ``/`` to `object`/``
  - the response's body type/format changed from `string`/`` to `object`/`` for status `200`
  - added the optional property `type` to the response with the `200` status
  - added the optional property `value` to the response with the `200` status
- **2020-06-26** `1fa50f3ebb4b` — 1 info
  - endpoint added
- **2019-09-09** `2557f63f69e2` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/gchq/apis/cyberchef-api/changes/magic/post.md)

---

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