Toon Me API

The Toonme API is a powerful tool that transforms ordinary images into fun cartoon-style images with just a few clicks. With its advanced algorithms and cutting-edge technology, the Toonme API can help businesses and individuals add a touch of creativity and playfulness to their digital content effortlessly.

Introducing the Toonme API, a powerful image-processing tool that transforms your photos into cartoon-style illustrations in seconds! With our API, you can easily integrate the Toonme technology into your own software, app, or website and offer your users a fun and unique way to enhance their photos.

Our state-of-the-art algorithm uses advanced machine learning techniques to analyze and identify the key features of your images and then applies a range of cartoon effects to create stunning illustrations that are sure to impress. From simple line drawings to full-color cartoons, the Toonme API offers a wide range of styles and effects to choose from, giving your users the flexibility to create the perfect look for their images.

Our API is incredibly easy to use, with simple and intuitive methods that allow you to quickly integrate our technology into your existing software. Whether you’re building a photo editing app, a social media platform, or a website that allows users to upload and share images, the Toonme API is the perfect tool to add a touch of creativity and fun.

Some of the key features of the Toonme API include:

  • Fast and reliable image processing

  • A wide range of cartoon styles and effects to choose from

  • Simple and intuitive API methods for easy integration

  • Scalable and flexible architecture that can handle large volumes of requests

  • Robust error handling and support for a variety of image formats

  • With the Toonme API, you can give your users a powerful and fun tool to enhance their photos and express their creativity. So why wait? Sign up today and start exploring the possibilities of the Toonme API!

Using the API

Subscribe to API at: https://toonme-api.magicapi.com/

Go to products and sign up for a Product. For testing sign up for the "free" plan (Required No Credit Card). After that, you can get an API key from the left sidebar "API Keys" page.

Toonifying an image

You can directly send an image URL to toonify it. You can pass any style using the "id" parameter. See below for all available styles.

Please replace 'your-api-key' with your API key from Toonify-API Dashboard.

Request:

curl --location 'https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/' \
--header 'x-magicapi-key: your-api-key' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'image_url=https://telegra.ph/file/f4b77c970783ccdd9e4b9.png' \
--data-urlencode 'id=591'

Response:

{
    "image_process_response": {
        "request_id": "44422884-02ea-4951-b33c-deb5936f0d87",
        "status": "OK",
        "description": null,
        "err_code": "0"
    }
}

This will return a "request_id". You need to then use this request_id to get the processed image using the below request.:

Request

curl --location 'https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/result/' \
--header 'x-magicapi-key: your-api-key' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'request_id=e52dcfb5-c6d3-45bf-8b04-9c898ae4ea61'

Response

{
    "image_process_response": {
        "request_id": "e52dcfb5-c6d3-45bf-8b04-9c898ae4ea61",
        "status": "OK",
        "result_url": "https://worker-images.ws.pho.to/i1/17A1278A-93D5-43BE-B48D-D58984979843.jpg",
        "result_url_alt": "https://worker-images.ws.pho.to/i1/17A1278A-93D5-43BE-B48D-D58984979843.jpg",
        "limited_image_url": "https://worker-images.ws.pho.to/i1/D5ECA32B-4AC7-4CEE-B30D-61001370E854.jpg",
        "nowm_image_url": "https://worker-images.ws.pho.to/i1/17A1278A-93D5-43BE-B48D-D58984979843.jpg",
        "duration": "1421.159029ms",
        "total_duration": "1424.340010ms"
    }
}

Example code in PHP

Toonify Request

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'image_url=https%3A%2F%2Ftelegra.ph%2Ffile%2Ff4b77c970783ccdd9e4b9.png&id=491',
  CURLOPT_HTTPHEADER => array(
    'x-magicapi-key: your-api-key',
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Get Result Request

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/result/',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => 'request_id=e52dcfb5-c6d3-45bf-8b04-9c898ae4ea61',
  CURLOPT_HTTPHEADER => array(
    'x-magicapi-key: your-api-key',
    'Content-Type: application/x-www-form-urlencoded'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Javascript(Fetch)

Toonify Request:

var myHeaders = new Headers();
myHeaders.append("x-magicapi-key", "your-api-key");
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

var urlencoded = new URLSearchParams();
urlencoded.append("image_url", "https://telegra.ph/file/f4b77c970783ccdd9e4b9.png");
urlencoded.append("id", "491");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: urlencoded,
  redirect: 'follow'
};

fetch("https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Get Result Request

var myHeaders = new Headers();
myHeaders.append("x-magicapi-key", "your-api-key");
myHeaders.append("Content-Type", "application/x-www-form-urlencoded");

var urlencoded = new URLSearchParams();
urlencoded.append("request_id", "e52dcfb5-c6d3-45bf-8b04-9c898ae4ea61");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: urlencoded,
  redirect: 'follow'
};

fetch("https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/result/", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));

Python

Toonify Request

import requests

url = "https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/"

payload = 'image_url=https%3A%2F%2Ftelegra.ph%2Ffile%2Ff4b77c970783ccdd9e4b9.png&id=491'
headers = {
  'x-magicapi-key': 'your-api-key',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Get Results Request

import requests

url = "https://api.magicapi.dev/api/v1/toonme-api/free/toonme/v1/result/"

payload = 'request_id=e52dcfb5-c6d3-45bf-8b04-9c898ae4ea61'
headers = {
  'x-magicapi-key': 'your-api-key',
  'Content-Type': 'application/x-www-form-urlencoded'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)

Available Styles

You can choose any style by passing "id" in the toonify request.

Template IDOriginal imageResult imageType

491

Standard

493

Standard

494

Standard

497

Standard

499

Standard

500

Standard

501

Standard

502

Standard

503

Standard

504

Standard

512

Standard

513

Standard

515

Standard

516

Standard

517

Standard

518

Standard

519

Standard

520

Standard

521

Standard

522

Standard

523

Standard

524

Standard

525

Standard

526

Standard

527

Standard

529

Standard

530

Standard

531

Standard

538

Standard

543

Standard

544

Standard

546

Standard

547

Standard

549

Standard

550

Standard

551

Standard

552

Standard

553

Standard

557

Standard

560

Standard

561

Standard

563

Standard

564

Standard

565

Standard

566

Standard

567

Standard

568

Standard

569

Standard

570

Standard

571

Standard

577

Standard

578

Standard

579

Standard

580

Standard

581

Standard

582

Standard

583

Standard

584

Standard

585

Standard

586

Standard

587

Standard

588

Standard

589

Standard

590

Standard

592

Standard

597

Standard

599

Standard

600

Standard

601

Standard

602

Standard

603

Standard

606

Standard

607

Standard

608

Standard

609

Standard

610

Standard

611

Standard

612

Standard

613

Standard

616

Standard

619

Standard

621

Standard

623

Standard

624

Standard

625

Standard

628

Standard

629

Standard

630

Standard

631

Standard

633

Standard

635

Standard

636

Standard

637

Standard

638

Standard

639

Standard

640

Standard

641

Standard

644

Standard

645

Standard

646

Standard

647

Standard

648

Standard

649

Standard

651

Standard

652

Standard

653

Standard

654

Standard

655

Standard

656

Standard

657

Standard

658

Standard

659

Standard

660

Standard

661

Standard

662

Standard

663

Standard

664

Standard

665

Standard

666

Standard

667

Standard

668

Standard

669

Standard

670

Standard

671

Standard

672

Standard

673

Standard

674

Standard

675

Standard

676

Standard

677

Standard

678

Standard

679

Standard

682

Standard

683

Standard

684

Standard

685

Standard

686

Standard

687

Standard

689

Standard

690

Standard

691

Standard

692

Standard

693

Standard

694

Standard

695

Standard

696

Standard

697

Standard

698

Standard

699

Standard

700

Standard

701

Standard

702

Standard

703

Standard

704

Standard

705

Standard

706

Standard

707

Standard

708

Standard

709

Standard

710

Standard

711

Standard

712

Standard

713

Standard

715

Standard

716

Standard

717

Standard

718

Standard

719

Standard

720

Standard

721

Standard

722

Standard

723

Standard

724

Standard

725

Standard

726

Standard

727

Standard

728

Standard

729

Standard

730

Standard

732

Standard

733

Standard

734

Standard

736

Standard

737

Standard

739

Standard

740

Standard

741

Standard

742

Standard

743

Standard

744

Standard

748

Standard

749

Standard

750

Standard

751

Standard

752

Standard

753

Standard

754

Standard

755

Standard

769

Standard

770

Standard

771

Standard

772

Standard

774

Standard

775

Standard

776

Standard

777

Standard

779

Standard

782

Standard

783

Standard

784

Standard

785

Standard

786

Standard

787

Standard

788

Standard

789

Standard

790

Standard

791

Standard

792

Standard

793

Standard

794

Standard

795

Standard

809

Standard

812

Standard

813

Standard

813

Standard

819

Standard

820

Standard

821

Standard

824

Standard

825

Standard

826

Standard

827

Standard

827

Standard

828

Standard

829

Standard

830

Standard

831

Standard

832

Standard

833

Standard

834

Standard

836

Standard

837

Standard

838

Standard

839

Standard

840

Standard

841

Standard

842

Standard

843

Standard

844

Standard

845

Standard

846

Standard

847

Standard

848

Standard

849

Standard

850

Standard

851

Standard

854

Standard

855

Standard

856

Standard

857

Standard

858

Standard

859

Standard

860

Standard

861

Standard

862

Standard

863

Standard

864

Standard

865

Standard

866

Standard

867

Standard

868

Standard

869

Standard

870

Standard

871

Standard

872

Standard

873

Standard

876

Standard

877

Standard

878

Standard

879

Standard

880

Standard

881

Standard

882

Standard

883

Standard

884

Standard

885

Standard

886

Standard

887

Standard

888

Standard

889

Standard

890

Standard

891

Standard

892

Standard

893

Standard

894

Standard

895

Standard

896

Standard

897

Standard

898

Standard

899