# Cartoon-Yourself

#### Transform Your Photos with the Cartoon Yourself API

**Developer Portal :** <https://api.market/store/ailabtools/cartoon-yourself>

**Cartoon Yourself API** is the ultimate tool for transforming your personal photos into captivating cartoon images, enhanced with advanced artistic effects. By leveraging cutting-edge GAN technology, this API can convert faces and entire images into stunning 3D game styles, adding depth and spatial realism perfect for game expos, cosplay events, and large-scale gaming tournaments.

**Key Features**

* **Cartoon Transformation**: Automatically convert photos into cartoon-style images, preserving unique user-specific features for a personalized result.
* **Headshot Sketch**: Detects the head region in an image and generates a high-quality 512x512 pixel sketch, ideal for avatars and artistic portraits.
* **3D Game Effects**: Creates detailed 3D cartoon effects that provide a three-dimensional feel, suitable for promotional activities.
* **EffectGAN Technology**: Utilizes sophisticated generative adversarial networks to deliver unique artistic transformations, including Ukiyo-e, Pop Art, Pixar, American comic, angel, and demon styles.

Whether you're looking to create personalized avatars, enhance interactive marketing campaigns, or add artistic flair to digital content, the Cartoon Yourself API offers seamless integration, high performance, and exceptional scalability. Empower your applications with advanced image transformation capabilities, delivering visually appealing and unique cartoon effects tailored to modern digital experiences.

**Application Scenarios**

* **Protect Privacy**: Transforming people into cartoons can help protect their privacy by preventing the identification of individuals in the original images.
* **Social Entertainment**: Turn your photos into cartoon characters to create a cute atmosphere and share them with friends.
* **Personalized Avatars**: Generate secondary cartoon images with unique personality characteristics for use in avatars across various internet applications.
* **Interactive Marketing**: Enhance activity scenarios such as festivals, exhibitions, and marketing promotions, attracting users to interact, participate, and share.

**Features and Advantages**

* **Reproduce Character Expressions**: Based on deep learning algorithms, it recognizes character gender, expressions, and other features, restoring them in cartoon avatars.
* **Full Body Cartoon**: Avoid embarrassing scenes with full-body cartoon transformations compared to face-only cartoons.
* **Multi-Person Mode**: Capable of handling couple photos, family photos, and group photos.
* **Excellent Algorithm**: Based on massive data training and polished through actual business scenarios, ensuring superior results.
* **Realistic Image**: Multi-dimensional preservation of user characteristics, defining delicate beauty and extreme beauty in portrait caricature images.
* **Business-Driven**: Continually iterates to meet business needs, optimizing the effect continuously.

Unlock the potential of your photos with the Cartoon Yourself API, also known as **Toonify API** and **Cartoonify API**, and experience the power of cutting-edge image transformation technology. Enhance your digital content, protect privacy, and engage users like never before. For those looking for an even more accessible solution, explore the **Free Toonify API** option to start creating stunning cartoon effects at no cost.

If you're also interested in routing solutions, check out the **Trueway Routing API**, known for being a much more affordable alternative to other mapping APIs.

#### Categories and Types of Cartoonization

The Cartoon Yourself API offers a variety of cartoonization types, each suited to different artistic needs:

**Full-Body Cartoonization**

* **Japanese Manga (I)**: `jpcartoon`
* **Japanese Manga (II)**: `anime`
* **Chinese Fine Brushwork Painting**: `claborate`
* **Hong Kong-Style Comic**: `hongkong`
* **Comic**: `comic`
* **3D Animation**: `animation3d`
* **Hand-Painted**: `handdrawn`
* **Pencil Drawing (I)**: `sketch`
* **Pencil Drawing (II)**: `full`
* **Artistic Effects**: `artstyle`
* **Retro Cartoon**: `classic_cartoon`
* **Moe Manga**: `tccartoon`
* **China Comics**: `hkcartoon`

**Facial Cartoonization**

* **3D Cartoon**: `3d_cartoon`
* **Pixar**: `pixar`
* **Pixar Pro**: `pixar_plus`
* **Angel**: `angel`
* **Angel Pro**: `angel_plus`
* **Demon**: `demon`
* **Ukiyo-e**: `ukiyoe_cartoon`
* **American Manga**: `amcartoon`
* **World Famous Paintings**: `famous`
* **3D Effects**: `3d`
* **3D Game Effects**: `3d_game`

**Avatar Cartoonization**

* **Popper**: `bopu_cartoon`
* **Western**: `western`
* **Avatar**: `avatar`
* **Japanese Manga (Portrait)**: `jpcartoon_head`
* **Pencil Drawing (Head)**: `head`

### Request and Response&#x20;

#### Request

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X 'POST' \
  'https://prod.api.market/api/v1/ailabtools/cartoon-yourself/portrait/effects/portrait-animation' \
  -H 'accept: application/json' \
  -H 'x-api-market-key: API_KEY' \
  -H 'Content-Type: multipart/form-data' \
  -F 'image=@Shahrukh_khan.png;type=image/png' \
  -F 'type=pixar'
```

{% endtab %}

{% tab title="Nodejs" %}

```bash
const FormData = require('form-data');
const fetch = require('node-fetch');
const formData = new FormData();

formData.append('image', 'null');
formData.append('type', 'pixar');

let url = 'https://prod.api.market/api/v1/ailabtools/cartoon-yourself/portrait/effects/portrait-animation';

let options = {
  method: 'POST',
  headers: {
    'x-api-market-key': 'SOME_STRING_VALUE',
    'content-type': 'multipart/form-data; boundary=---011000010111000001101001'
  }
};

options.body = formData;

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));
```

{% endtab %}

{% tab title="Python" %}
{% code overflow="wrap" %}

```bash
import http.client

conn = http.client.HTTPSConnection("api.magicapi.dev")

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nnull\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npixar\r\n-----011000010111000001101001--\r\n\r\n"

headers = {
    'x-api-market-key': "SOME_STRING_VALUE",
    'content-type': "multipart/form-data; boundary=---011000010111000001101001"
    }

conn.request("POST", "/api/v1/ailabtools/cartoon-yourself/portrait/effects/portrait-animation", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code overflow="wrap" %}

```java
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001");
RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"image\"\r\n\r\nnull\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"type\"\r\n\r\npixar\r\n-----011000010111000001101001--\r\n\r\n");
Request request = new Request.Builder()
  .url("https://prod.api.market/api/v1/ailabtools/cartoon-yourself/portrait/effects/portrait-animation")
  .post(body)
  .addHeader("x-api-market-key", "SOME_STRING_VALUE")
  .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001")
  .build();

Response response = client.newCall(request).execute();
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Response

```bash
{
  "data": {
    "image_url": "https://ai-result-001.ailabtools.com/faceBody/generateHumanAnimeStyle/2024-07-12/054013-a2f86213-f590-2a3f-0de2-6e9735ee8bd9-1720762813.png"
  },
  "error_code": 0,
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "log_id": "20240712134009D4D355A1362F35C5D461",
  "request_id": "20240712134009D4D355A1362F35C5D461"
}
```

### Rendered images

### Full-Body Cartoonization

**Original Image**

![Original Image](https://ai-resource.ailabtools.com/cartoon-yourself/doc/OriginalImage-2.webp)

**Result Images**

| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-jpcartoon-1.webp" alt="Japanese Manga (I)"><br>Japanese Manga (I)</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-anime-1.webp" alt="Japanese Manga (II)"><br>Japanese Manga (II)</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-claborate-1.webp" alt="Chinese fine brushwork painting"><br>Chinese fine brushwork painting</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-hongkong-1.webp" alt="Hong Kong-style comic style"><br>Hong Kong-style comic style</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-comic-1.webp" alt="Comic"><br>Comic</p>                          |
| -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-animation3d-1.webp" alt="3D Animation"><br>3D Animation</p>           | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-handdrawn-1.webp" alt="hand-painted"><br>hand-painted</p>           | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-sketch-1.webp" alt="Pencil drawing (I)"><br>Pencil drawing (I)</p>                              | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-full-1.webp" alt="Pencil drawing (II)"><br>Pencil drawing (II)</p>                     | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-artstyle-1.webp" alt="Artistic effects"><br>Artistic effects</p> |
| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-classic_cartoon-1.webp" alt="Retro Cartoon"><br>Retro Cartoon</p>     | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-tccartoon-1.webp" alt="Moe Manga"><br>Moe Manga</p>                 | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-hkcartoon-1.webp" alt="China Comics"><br>China Comics</p>                                       |                                                                                                                                                                           |                                                                                                                                                     |

### Facial Cartoonization

**Original Image**

![Original Image](https://ai-resource.ailabtools.com/cartoon-yourself/doc/OriginalImage-2.webp)

**Result Images**

| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-3d_cartoon-1.webp" alt="3D cartoon"><br>3D cartoon</p>                     | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-pixar-1.webp" alt="Pixar"><br>Pixar</p>        | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-pixar_plus-1.webp" alt="Pixar Pro"><br>Pixar Pro</p>          | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-angel-1.webp" alt="Angel"><br>Angel</p>                       |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-angel_plus-1.webp" alt="Angel Pro"><br>Angel Pro</p>                       | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-demon-1.webp" alt="Demon"><br>Demon</p>        | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-ukiyoe_cartoon-1.webp" alt="Ukiyo-e"><br>Ukiyo-e</p>          | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-amcartoon-1.webp" alt="American Manga"><br>American Manga</p> |
| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-famous-1.webp" alt="World famous paintings"><br>World famous paintings</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-3d-1.webp" alt="3D Effects"><br>3D Effects</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-3d_game-1.webp" alt="3D game effects"><br>3D game effects</p> |                                                                                                                                                  |

#### Avatar Cartoonization

**Original Image**

![Original Image](https://ai-resource.ailabtools.com/cartoon-yourself/doc/OriginalImage-2.webp)

**Result Images**

| <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-bopu_cartoon-1.webp" alt="Popper"><br>Popper</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-western-1.webp" alt="Western"><br>Western</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-avatar-1.webp" alt="Avatar"><br>Avatar</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-jpcartoon_head-1.webp" alt="Japanese Manga (portrait)"><br>Japanese Manga (portrait)</p> | <p><img src="https://ai-resource.ailabtools.com/cartoon-yourself/doc/ResultImage-2-head-1.webp" alt="Pencil drawing (head)"><br>Pencil drawing (head)</p> |
| ----------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |

**Developer Portal :** <https://api.market/store/ailabtools/cartoon-yourself>


---

# 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.api.market/api-product-docs/ailabtools/cartoon-yourself.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.
