Skip to main content

AILabTools API - AI Cartoon Generator - API:V1.1.0(DEPRECATED)


draft: true

Important Announcement: API Version Update Notice

Dear Developers,

We are thrilled to announce that our API is receiving a major update! The new version will introduce a host of improvements and feature enhancements to enhance your development experience and meet your needs.

However, along with the rollout of the new version, we must also inform you that the old version of the API will no longer receive maintenance and support. This means that we will no longer release new features, fix known issues, or provide technical support for the old version of the API.

We strongly encourage you to upgrade to the latest version of the API as soon as possible to ensure that your applications continue to operate smoothly and to take advantage of the latest features and optimizations.

If you have any questions or need assistance regarding this change, please feel free to contact our support team ([email protected]). We are committed to assisting you and ensuring a smooth transition.

Once again, thank you for your support and trust in our API.

Best Regards,

AILabTools Support Team

Request

  • URL: https://www.ailabapi.com/api/image/effects/ai-anime-generator
  • Method: POST
  • Content-Type: multipart/form-data

Image requirements

  • Image format: JPEG PNG JPG BMP WEBP
  • Image size: No more than 10 MB.
  • Can support any resolution output, to ensure the generation quality, it is recommended that the image resolution does not exceed 1280x720px.
FieldRequiredTypeDescription
ailabapi-api-keyYESstringApplication API KEY. Get API KEY

Body

FieldRequiredTypeScopeDefaultDescription
task_typeYESstring
  • async
  • asyncTask Type.
  • async: Asynchronous tasks.
  • imageYESfile
    typeYESstringStyle. Range of values

    The range of type values.

    CategoryValueDescription
    defaultAuto
    Male photoboy-0Basic I
    boy-1Literary I
    boy-2Literary II
    boy-3Sports
    boy-4Beautification
    boy-5Mature and steady
    boy-6Ink wash painting
    boy-7Oil painting
    boy-8Detail enhancement
    boy-9Sunny boy
    boy-10Skin beautification
    boy-11Face slimming
    boy-12Aestheticism
    boy-13Violet
    boy-14Marvel
    boy-15Makoto Shinkai
    boy-16Zelda
    boy-17Genshin Impact
    boy-18Japanese kimono
    boy-19Saint Seiya
    boy-20Chinese Hanfu
    boy-21Yoshihiro Togashi
    boy-22Akira Toriyama
    boy-23One Piece
    boy-24Smile I
    boy-25Smile II
    boy-26Basic II
    boy-27Big eyes
    Male group photoboys-0Basic I
    boys-1Basic II
    Photos of womengirl-0Sweet
    girl-1Loli
    girl-2Beautification I
    girl-3Beautification + Big eyes
    girl-4Beautification + Smile
    girl-5Beautification II
    girl-6Gaming
    girl-7Anime, comics and games (ACG)
    girl-8ACG + Big eyes
    girl-9ACG + Smile
    girl-10ACG + Big eyes + Smile
    girl-11Detail enhancement I
    girl-12Color sketch
    girl-13Pure
    girl-14Detail enhancement II
    girl-15Genshin Impact
    girl-16Zelda
    girl-17Oil painting
    girl-18Makoto Shinkai
    girl-19The Snow Queen
    girl-20Alice in Wonderland
    girl-21Work attire
    girl-22Retro girl
    girl-23Chinese Hanfu
    girl-24Violet
    girl-25Elf
    girl-26Saint Seiya
    girl-27Wuxia
    Group photo of womengirls-0Basic
    girls-1Chinese Hanfu
    girls-2Beautification
    girls-3Detail enhancement
    Group photo of multiple peoplepeople-0Basic I
    people-1Basic II
    people-2Basic III
    Animalspet-0Basic I
    pet-1Basic II
    pet-2Basic III
    Landscapesscene-0Basic
    scene-1Ed Mell
    scene-2Jessica Rossier
    scene-3Violet
    scene-4Ian McQue
    scene-5Alice in Wonderland

    Response

    Processing Flow
    1. Handle Public Parameters:

      First, parse and validate the Public Parameters, checking the status code or response message to ensure the request is successful and no errors are present.

    2. Handle Business Parameters:

      If the public parameters are valid and no exceptions are found, proceed to process the business logic in the Business Parameters.

    Public Parameters

    Viewing Public Parameters and Error Codes

    Business Parameters

    FieldTypeScopeDescription
    task_typestring
  • async
  • Task Type.
  • async: Asynchronous tasks.
  • task_idstringAsynchronous task ID.
    Please use this field when calling the Querying Async Task Results API.

    Example

    {
    "request_id": "",
    "log_id": "",
    "error_code": 0,
    "error_code_str": "",
    "error_msg": "",
    "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
    },
    "task_type": "",
    "task_id": ""
    }
    tip

    This API is asynchronous, please keep task_id and call Querying Async Task Results to get the final results.

    Asynchronous task results are valid for 24 hours. It is recommended that asynchronous task results be queried every 5 seconds.

    Querying Async Task Results Response

    Processing Flow
    1. Handle Public Parameters:

      First, parse and validate the Public Parameters, checking the status code or response message to ensure the request is successful and no errors are present.

    2. Handle Business Parameters:

      If the public parameters are valid and no exceptions are found, proceed to process the business logic in the Business Parameters.

    Public Parameters

    Viewing Public Parameters and Error Codes

    Business Parameters

    FieldTypeScopeDescription
    task_statusinteger
  • 0
  • 1
  • 2
  • Asynchronous task status.
  • 0: The task is queued.
  • 1: Asynchronous processing.
  • 2: Processing was successful.
  • dataobjectThe content of the result data returned.
    +statusstring
  • QUEUING
  • PROCESSING
  • PROCESS_SUCCESS
  • PROCESS_FAILED
  • TIMEOUT_FAILED
  • LIMIT_RETRY_FAILED
  • Asynchronous task status.
  • QUEUING: Task queuing in progress.
  • PROCESSING: Asynchronous processing in progress.
  • PROCESS_SUCCESS: processing success.
  • PROCESS_FAILED: Processing failed.
  • TIMEOUT_FAILED: The task timed out and did not finish processing.
  • LIMIT_RETRY_FAILED: The maximum number of processing failure retries has been exceeded.
  • +result_urlstringResult URL address.
    tip

    The URL address is a temporary address, valid for 24 hours, and will not be accessible after it expires. If you need to save the file for a long time or permanently, please visit the URL address within 24 hours and download the file to your own storage space.

    Example

    {
    "error_code": 0,
    "error_code_str": "",
    "error_msg": "",
    "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
    },
    "task_status": 0,
    "data": {
    "status": "",
    "result_url": ""
    }
    }

    Code example

    If you'd like to see the actual effects, please visit the experience page for a trial.