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 ID
Original image
Result image
Type

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

Standard

901

Standard

902

Standard

903

Standard

904

Standard

907

Standard

908

Standard

909

Standard

910

Standard

911

Standard

912

Standard

913

Standard

914

Standard

915

Standard

916

Standard

917

Standard

918

Standard

919

Standard

920

Standard

921

Standard

922

Standard

923

Standard

924

Standard

925

Standard

926

Standard

927

Standard

928

Standard

929

Standard

930

Standard

931

Standard

932

Standard

933

Standard

934

Standard

935

Standard

936

Standard

937

Standard

938

Standard

939

Standard

940

Standard

941

Standard

942

Standard

943

Standard

944

Standard

945

Standard

946

Standard

947

Standard

948

Standard

949

Standard

950

Standard

951

Standard

952

Standard

953

Standard

954

Standard

955

Standard

956

Standard

957

Standard

958

Standard

959

Standard

960

Standard

961

Standard

962

Standard

963

Standard

964

Standard

965

Standard

966

Standard

967

Standard

968

Standard

969

Standard

972

Standard

973

Standard

974

Standard

975

Standard

976

Standard

977

Standard

979

Standard

981

Standard

982

Standard

983

Standard

984

Standard

985

Standard

987

Standard

988

Standard

989

Standard

991

Standard

992

Standard

993

Standard

994

Standard

995

Standard

996

Standard

997

Standard

998

Standard

999

Standard

1000

Standard

1001

Standard

1002

Standard

1003

Standard

1004

Standard

1005

Standard

1006

Standard

1007

Standard

1009

Standard

1010

Standard

1011

Standard

1012

Standard

1013

Standard

1014

Standard

1015

Standard

1016

Standard

1017

Standard

1021

Standard

1025

Standard

1026

Standard

1027

Standard

1028

Standard

1029

Standard

1030

Standard

1031

Standard

1032

Standard

1033

Standard

1034

Standard

1035

Standard

1036

Standard

1037

Standard

1038

Standard

1039

Standard

1040

Standard

1041

Standard

1042

Standard

1043

Standard

1044

Standard

1045

Standard

1046

Standard

1047

Standard

1048

Standard

1049

Standard

1050

Standard

1051

Standard

1052

Standard

1053

Standard

1054

Standard

1055

Standard

1056

Standard

1057

Standard

1058

Standard

1059

Standard

1060

Standard

1061

Standard

1062

Standard

1063

Standard

1064

Standard

1065

Standard

1066

Standard

1067

Standard

1068

Standard

1069

Standard

1071

Standard

1072

Standard

1073

Standard

1075

Standard

1076

Standard

1080

Standard

1081

Standard

1082

Standard

1096

Standard

1097

Standard

1100

Standard

1101

Standard

1102

Standard

1103

Standard

1104

Standard

1105

Standard

1106

Standard

1107

Standard

1108

Standard

1109

Standard

1110

Standard

1111

Standard

1112

Standard

1113

Standard

1114

Standard

1115

Standard

1116

Standard

1117

Standard

1118

Standard

1120

Standard

1121

Standard

1122

Standard

1123

Standard

1124

Standard

1125

Standard

1126

Standard

1127

Standard

1128

Standard

1129

Standard

1130

Standard

1131

Standard

1132

Standard

1133

Standard

Last updated