# Advanced Toon Me API

Advanced Image Processing APIs

URL: <https://toonme-api.magicapi.com/product/group/clrsdohhu0004ju09h58ld00o>

### Toonify API (/toonify) <a href="#toonify-api-toonify" id="toonify-api-toonify"></a>

Convert any image into a cartoon character. Powered by advanced Deep Neural Net models that apply advanced techniques to convert an image.

Each image looks as if an expert graphic designer created it.

To toonify an image, simply pass the URL of that image in the request:

**Request:**

```
curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/toonme-api/advanced-image-processing/toonify' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://casediy.s3.us-west-1.amazonaws.com/seller/1/user/2024-01-22/mr2tJnwA42ky3XXN9xEp1B1XVoxqmRMXbVcjey62hxKB73h3q8A3bkZExnxJxcjk.png"
}'
```

**Response:**

The request will return a request Id. The image processing may take around 15 seconds.

```
{
  "request_id": "kbpqettbaukkf2dsggn7ctlyru"
}
```

To get the processed image, you need to call the "predictions" API.

Request:

```
curl -X 'GET' \
  'https://api.magicapi.dev/api/v1/toonme-api/advanced-image-processing/predictions/kbpqettbaukkf2dsggn7ctlyru' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: your-api-key'
```

Response:

```
{
  "status": "succeeded",
  "image_url": "https://replicate.delivery/pbxt/QLOXVNw5mr6FIFm8ulQs6Jfe64tufOgKi2VVDmJencrcvRfRC/output.png"
}
```

Example Input Image:

<figure><img src="/files/2Vj15W1nJYiHhE74sEp5" alt="" width="563"><figcaption></figcaption></figure>

Toonified Image:

<figure><img src="/files/tDqm6E5jDNGExPeVzbOP" alt="" width="563"><figcaption></figcaption></figure>

### Example 2:

<figure><img src="/files/1EtrES2VuuyHn3cYaek3" alt="" width="375"><figcaption></figcaption></figure>

**Toonified Image:**

<figure><img src="/files/gjvRzfAMUwzQ7QUHfAHD" alt="" width="375"><figcaption></figcaption></figure>

### Background Removal API

This API used an advanced neural net model to remove background from any image.

Request:

```
curl -X 'POST' \
  'https://api.magicapi.dev/api/v1/toonme-api/advanced-image-processing/remove-background' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://media.gq-magazine.co.uk/photos/5d139edc073ae67dd58adfae/master/pass/Sloane-Street-GQ-13Apr_getty_b.jpg"
}'
```

Response:

```
{
  "request_id": "zalw34lb3v6kstveqi7suhmeym"
}
```

To get the processed image, you need to call the "predictions" API.

Request:

```
curl -X 'GET' \
  'https://api.magicapi.dev/api/v1/toonme-api/advanced-image-processing/predictions/zalw34lb3v6kstveqi7suhmeym' \
  -H 'accept: application/json' \
  -H 'x-magicapi-key: your-api-key'
```

Response:

```
{
  "status": "succeeded",
  "image_url": "https://replicate.delivery/pbxt/QLOXVNw5mr6FIFm8ulQs6Jfe64tufOgKi2VVDmJencrcvRfRC/output.png"
}
```

**Example**

<figure><img src="/files/dvIB0QcvDycq0DHRXR3j" alt="" width="375"><figcaption></figcaption></figure>

Background Removed Image:\ <br>

<figure><img src="/files/cLydVc1Ju1fkz7Ir8uKa" alt="" width="375"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magicapi.com/api-providers/advanced-toon-me-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
