> ## Documentation Index
> Fetch the complete documentation index at: https://ailabtools.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# AI Cartoon Generator API

> AI Cartoon Generator API turns photos into cartoon, anime, and stylized illustrations with multiple AI art styles.

export const effects = [{
  value: "3d_fairytale",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/3d_fairytale.webp"
}, {
  value: "ancient_chinese",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/ancient_chinese.webp"
}, {
  value: "anime_genz",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/anime_genz.webp"
}, {
  value: "apocalyptic_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/apocalyptic_comic.webp"
}, {
  value: "clay_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/clay_cartoon.webp"
}, {
  value: "colored_pencil",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/colored_pencil.webp"
}, {
  value: "colorful_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/colorful_cartoon.webp"
}, {
  value: "cyberpunk_anime",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/cyberpunk_anime.webp"
}, {
  value: "dark_fantasy",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/dark_fantasy.webp"
}, {
  value: "dunhuang_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/dunhuang_comic.webp"
}, {
  value: "elegant_chinese",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/elegant_chinese.webp"
}, {
  value: "elf_fantasy",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/elf_fantasy.webp"
}, {
  value: "epic_battle_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/epic_battle_comic.webp"
}, {
  value: "fairy_tale_princess",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/fairy_tale_princess.webp"
}, {
  value: "fashion_illustration",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/fashion_illustration.webp"
}, {
  value: "fantasy_anime",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/fantasy_anime.webp"
}, {
  value: "felt_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/felt_cartoon.webp"
}, {
  value: "fresh_illustration",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/fresh_illustration.webp"
}, {
  value: "future_technology",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/future_technology.webp"
}, {
  value: "gongbi_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/gongbi_comic.webp"
}, {
  value: "graffiti_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/graffiti_comic.webp"
}, {
  value: "idol_anime",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/idol_anime.webp"
}, {
  value: "ink_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/ink_comic.webp"
}, {
  value: "ink_line_art",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/ink_line_art.webp"
}, {
  value: "korean_webtoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/korean_webtoon.webp"
}, {
  value: "low_poly_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/low_poly_cartoon.webp"
}, {
  value: "magical_girl",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/magical_girl.webp"
}, {
  value: "mecha_anime",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/mecha_anime.webp"
}, {
  value: "noir_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/noir_comic.webp"
}, {
  value: "oil_paint_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/oil_paint_comic.webp"
}, {
  value: "paper_cut_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/paper_cut_cartoon.webp"
}, {
  value: "paper_cut_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/paper_cut_comic.webp"
}, {
  value: "pastel_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/pastel_comic.webp"
}, {
  value: "pixel_art",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/pixel_art.webp"
}, {
  value: "pop_art",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/pop_art.webp"
}, {
  value: "retro_anime_90s",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/retro_anime_90s.webp"
}, {
  value: "retro_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/retro_comic.webp"
}, {
  value: "romantic_webtoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/romantic_webtoon.webp"
}, {
  value: "rubber_hose",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/rubber_hose.webp"
}, {
  value: "seinen_manga",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/seinen_manga.webp"
}, {
  value: "shojo_manga",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/shojo_manga.webp"
}, {
  value: "shonen_manga",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/shonen_manga.webp"
}, {
  value: "space_opera",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/space_opera.webp"
}, {
  value: "sports_manga",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/sports_manga.webp"
}, {
  value: "steampunk_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/steampunk_comic.webp"
}, {
  value: "sticker_cartoon",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/sticker_cartoon.webp"
}, {
  value: "storybook",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/storybook.webp"
}, {
  value: "superhero_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/superhero_comic.webp"
}, {
  value: "vampire_comic",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/vampire_comic.webp"
}, {
  value: "watercolor_anime",
  image: "https://ai-resource.ailabtools.com/ai-anime-generator/effects/watercolor_anime.webp"
}];

## Query Task

<Tip>
  This is an asynchronous task API. The submission request returns only `task_id`.

  Use `task_id` to call [Querying Async Task Results](/docs/ai-common/async-task-results/api) and retrieve the final result. Async task results remain available for 24 hours. Query every 5 seconds.
</Tip>

| Field         | Type     | Description        |
| :------------ | :------- | :----------------- |
| `data`        | `object` | Final result data. |
| +`result_url` | `array`  | Result image URL.  |

```json theme={null}
{
  "data": {
    "result_url": ""
  }
}
```

<Tip>
  All result URLs are temporarily available and will expire after 24 hours.
</Tip>

## Submit Task

### `effect`

The following enum values are supported for `effect`.

<Expandable>
  <div className="mt-2 grid grid-cols-2 lg:grid-cols-4 align-center gap-2">
    {effects.map((item) => (
            <div key={item.value} className="rounded-xl">
              <img className="w-full mt-0 mb-2 aspect-square object-contain rounded-xl" src={item.image} alt={item.value} />
              <code className="block break-all text-center text-xs">{item.value}</code>
            </div>
          ))}
  </div>
</Expandable>


## OpenAPI

````yaml POST /api/image/effects/ai-anime-generator
openapi: 3.0.0
info:
  title: AILabAPI
  description: >-
    [<b>AILabTools</b>](https://www.ailabtools.com) is an advanced tool that
    offers a vast array of simple and flexible API endpoints to suit your
    specific needs. With just one [<b>API
    KEY</b>](https://www.ailabtools.com/doc/get-api-key), you can easily call
    any of the endpoints and integrate them quickly into your application or
    workflow, allowing for smooth and efficient operations. 
     
    [<b>AILabTools</b>](https://www.ailabtools.com) is continuously evolving,
    and you can anticipate even more API endpoints being added in the future,
    further enhancing its capabilities and usefulness for your artificial
    intelligence and machine learning requirements.
  version: 1.0.0
servers:
  - url: https://www.ailabapi.com
    description: Production server
security:
  - apiKeyAuth: []
tags:
  - name: AI IMAGE
  - name: AI IMAGE > Image Enhancement
  - name: AI IMAGE > Image Effects
  - name: AI IMAGE > Image Editing
  - name: AI IMAGE > Image Scoring
  - name: AI BACKGROUND REMOVAL
  - name: AI BACKGROUND REMOVAL > Portrait
  - name: AI BACKGROUND REMOVAL > General
  - name: AI PORTRAIT
  - name: AI PORTRAIT > Portrait Effects
  - name: AI PORTRAIT > Portrait Enhance
  - name: AI PORTRAIT > Portrait Editing
  - name: AI PORTRAIT > Portrait Analysis
  - name: AI COMMON
paths:
  /api/image/effects/ai-anime-generator:
    post:
      tags:
        - AI IMAGE > Image Effects
      summary: AI Cartoon Generator
      description: >-
        AI Cartoon Generator API turns photos into cartoon, anime, and stylized
        illustrations with multiple AI art styles.
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - image
                - effect
              properties:
                image:
                  type: string
                  format: binary
                  description: |-
                    - Image format: `JPEG` `JPG` `PNG` 
                    - Image size: No more than 5 MB. 
                    - Image resolution: Less than 4096x4096px.
                effect:
                  type: string
                  description: >-
                    Effects. See [Supported effect
                    values](/docs/ai-image/effects/ai-anime-generator/api#effect).
                  enum:
                    - 3d_fairytale
                    - ancient_chinese
                    - anime_genz
                    - apocalyptic_comic
                    - clay_cartoon
                    - colored_pencil
                    - colorful_cartoon
                    - cyberpunk_anime
                    - dark_fantasy
                    - dunhuang_comic
                    - elegant_chinese
                    - elf_fantasy
                    - epic_battle_comic
                    - fairy_tale_princess
                    - fashion_illustration
                    - fantasy_anime
                    - felt_cartoon
                    - fresh_illustration
                    - future_technology
                    - gongbi_comic
                    - graffiti_comic
                    - idol_anime
                    - ink_comic
                    - ink_line_art
                    - korean_webtoon
                    - low_poly_cartoon
                    - magical_girl
                    - mecha_anime
                    - noir_comic
                    - oil_paint_comic
                    - paper_cut_cartoon
                    - paper_cut_comic
                    - pastel_comic
                    - pixel_art
                    - pop_art
                    - retro_anime_90s
                    - retro_comic
                    - romantic_webtoon
                    - rubber_hose
                    - seinen_manga
                    - shojo_manga
                    - shonen_manga
                    - space_opera
                    - sports_manga
                    - steampunk_comic
                    - sticker_cartoon
                    - storybook
                    - superhero_comic
                    - vampire_comic
                    - watercolor_anime
                    - wuxia_comic
                    - xianxia_anime
                    - zombie_comic
      responses:
        '200':
          headers:
            Content-Type:
              schema:
                type: string
                example: application/json
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/PublicResponseFields'
                  - type: object
                    properties:
                      task_id:
                        $ref: '#/components/schemas/AsyncTaskId'
              example:
                request_id: ''
                log_id: ''
                error_detail:
                  code: ''
                  code_message: ''
                  message: ''
                task_id: ''
          description: Success
components:
  schemas:
    PublicResponseFields:
      type: object
      required:
        - request_id
        - log_id
        - error_detail
      properties:
        request_id:
          type: string
          description: Request ID for debugging.
        log_id:
          type: string
          description: Log ID for debugging.
        error_detail:
          $ref: '#/components/schemas/ErrorDetail'
    AsyncTaskId:
      type: string
      description: >-
        Task ID for querying [Querying Async Task
        Results](/docs/ai-common/async-task-results/api).
    ErrorDetail:
      type: object
      required:
        - code
        - code_message
        - message
      properties:
        code:
          type: string
          description: >-
            Error Code. See [Error
            Codes](/docs/response-description#error-codes).
        code_message:
          type: string
          description: Error summary.
        message:
          type: string
          description: Detailed error message.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: ailabapi-api-key
      description: API Key for authentication

````