Image to Cartoonize Image API Last updated: 2023-03-01

Welcome to the Cartoonize Image API for Sketch My Pic. You can easily include our cartoonization service into your projects using this API. Any image can be made into a cartoon-style image using our Cartoonize Image API.

Benefits of Sketch My Pic Photo to Cartoonize Image API:

  • Images can be quickly and simply turned into cartoons using the Sketch my pic Cartoonize Image API, saving developers the time and effort of having to manually modify the photos.
  • Configurable options: The API enables programmers to alter the cartoonization options to get the desired result. This include altering the cartoon's level of detail, colour scheme, and overall design.
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive cartoonization of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the Photo to Cartoonize Image API is located at:

POST: https://sketchmypic.com/apiv1/cartoonize/

Authentication

Each call made to the Cartoonize Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Cartoonize Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(cartoon_image_b64):
                  print("saving image")
                  cartoon_image_b64 = cartoon_image_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(cartoon_image_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/cartoonize/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  cartoon_image_b64 = response.json()["response"]
                  print("some start of b64 string response", cartoon_image_b64[:12])
                  # Save the cartoon image data to a file or display it in your application
                  # to display, just put the cartoon_image_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(cartoon_image_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be cartoonized. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded cartoonized image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Cartoonize API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Pencil Sketch Image API

Welcome to the Pencil Sketch API for Sketch My Pic. You can easily include our pencil Sketch service into your own projects using this API. Any image can be made into a pencil sketch-style image using our Pencil Sketch Image API.

Benefits of Sketch My Pic Photo to Pencil Sketch API:

  • Images can be quickly and simply turned into pencil sketches using the Sketch My Pic Pencil Sketch Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the pencil sketch options to get the desired result. This includes altering the pencil sketch's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive pencil Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the Photo to Pencil Sketch Image API is located at:

POST: https://sketchmypic.com/apiv1/pencilsketch/

Authentication

Each call made to the Pencil sketch Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Pencil Sketch Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(pencil_image_b64):
                  print("saving image")
                  pencil_sketch_image_b64 = pencil_sketch_image_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(pencil_sketch_image_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/pencilsketch/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  pencil_sketch_image_b64 = response.json()["response"]
                  print("some start of b64 string response", pencil_sketch_image_b64[:12])
                  # Save the pencil sketch image data to a file or display it in your application
                  # to display, just put the pencil_sketch_image_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(pencil_sketch_image_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be pencil sketch. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded pencil sketch image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Pencil Sketch Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Colored Pencil Sketch Image API

Welcome to the Colored Pencil Sketch Image API documentation for Sketch My Pic. You can easily include our pencil Sketch service into your own projects using this API. Any image can be made into a pencil sketch-style image using our Pencil Sketch Image API.

Benefits of Sketch My Pic photo to Colored Pencil Sketch Image API:

  • Images can be quickly and simply turned into colored pencil sketches using the Sketch My Pic Colored Pencil Sketch Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the colored pencil sketch options to get the desired result. This includes altering the colored pencil sketch's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive colored pencil Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the Photo to Colored Pencil Sketch Image API is located at:

POST: https://sketchmypic.com/apiv1/coloredpencilsketch/

Authentication

Each call made to the Colored Pencil Sketch Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Colored Pencil Sketch Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(coloredpencilsketch_b64):
                  print("saving image")
                  coloredpencilsketch_b64 = coloredpencilsketchb64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(coloredpencilsketch_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/coloredpencilsketch/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  coloredpencilsketch_b64 = response.json()["response"]
                  print("some start of b64 string response", coloredpencilsketch_b64[:12])
                  # Save the colored pencil sketch image data to a file or display it in your application
                  # to display, just put the coloredpencilsketch_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(coloredpencilsketch_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be colored pencil sketch. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded colored pencil sketch image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Colored Pencil Sketch Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Black & White Image API

Welcome to the Black & White Image API documentation for Sketch My Pic. You can easily include our Black & White Image service into your own projects using this API. Any image can be made into a Black & White -style image using our Black & White Image API.

Benefits of Sketch My Pic photo to Black & White Image API:

  • Images can be quickly and simply turned into Black & White Image using the Black & White Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the Black & White Image options to get the desired result. This includes altering the Black & White Image's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive Black & White Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the photo to Black & White Image API is located at:

POST: https://sketchmypic.com/apiv1/bwsketch/

Authentication

Each call made to the Black & White Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Black & White Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(bwsketch_b64):
                  print("saving image")
                  bwsketch_b64 = bwsketch_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(bwsketch_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/bwsketch/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  bw_b64 = response.json()["response"]
                  print("some start of b64 string response", bwsketch_b64[:12])
                  # Save the Balck & White sketch image data to a file or display it in your application
                  # to display, just put the bwsketch_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(bwsketch_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be Black & White sketch. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded Black & White sketch image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Black & White Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Oil Paint Image API

Welcome to the Oil paint Image API documentation for Sketch My Pic. You can easily include our Oil paint Image service into your own projects using this API. Any image can be made into a Oil Paint sketch-style image using our Oil paint Image API.

Benefits of Sketch My Pic photo to Oil paint Image API:

  • Images can be quickly and simply turned into Oil paint sketches using the Oil paint Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the Oil paint sketch options to get the desired result. This includes altering the Oil paint sketch's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive Oil paint Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the photo to Oil Paint Image API is located at:

POST: https://sketchmypic.com/apiv1/oilpaint/

Authentication

Each call made to the Sketchmypic.com Oilpaint sketch API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Oil Paint Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(oilpaint_b64):
                  print("saving image")
                  oilpaint_b64 = oilpaint_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(oilpaint_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/oilpaint/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  oilpaint_b64 = response.json()["response"]
                  print("some start of b64 string response", oilpaint_b64[:12])
                  # Save the Oilpaint sketch image data to a file or display it in your application
                  # to display, just put the oilpaint_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(oilpaint_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be Oil paint sketch. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded Oil paint sketch image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Oil Paint Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Pixelise Image API

Welcome to the Pixelise Sketch API documentation for Sketch My Pic. You can easily include our Pixelise Image service into your own projects using this API. Any image can be made into a Pixelise sketch-style image using our Pixelise Image API.

Benefits of Sketch My Pic photo to Pixelise Image API:

  • Images can be quickly and simply turned into Pixelised image using the Pixelise Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the Pixelise options to get the desired result. This includes altering the Pixelise level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive Pixelise Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the photo to Pixelise Image API is located at:

POST: https://sketchmypic.com/pixelise/

Authentication

Each call made to the Pixelise Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Pixelise Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(pixelise_b64):
                  print("saving image")
                  pixelise_b64 = pixelise_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(pixelise_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/pixelise/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  pixelise_b64 = response.json()["response"]
                  print("some start of b64 string response", pixelise_b64[:12])
                  # Save the Pixelise image data to a file or display it in your application
                  # to display, just put the pixelise_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(pixelise_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be Pixelised. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded Pixelise image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Pixelise Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image to Pop Art Image API

Welcome to the Pop art Image API documentation for Sketch My Pic. You can easily include our Pop art Sketch service into your own projects using this API. Any image can be made into a Pop art style image using our Pop Art Image API.

Benefits of Sketch My Pic photo to Pop Art Image API:

  • Images can be quickly and simply turned into Pop art using the Pop Art Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the Pop art options to get the desired result. This includes altering the Pop art sketch's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive Pop art Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the photo to Pop Art Image API are at:

POST: https://sketchmypic.com/apiv1/popart/

Authentication

Each call made to the Pop Art Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Pop Art Image API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(popart_b64):
                  print("saving image")
                  popart_b64 = popart_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(popart_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/popart/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  popart_b64 = response.json()["response"]
                  print("some start of b64 string response", popart_b64[:12])
                  # Save the Pop art image data to a file or display it in your application
                  # to display, just put the popart_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(popart_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be Pop art. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded Pop art image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Pop Art Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

Image Water Color Image API

Welcome to the Water Color Image API documentation for Sketch My Pic. You can easily include our Water color service into your own projects using this API. Any image can be made into a Water color style image using our Water Color Image API.

Benefits of Sketch My Pic photo to Water Color Image API:

  • Images can be quickly and simply turned into Water color sketches using the Water Color Image API, saving developers the time and effort of having to manually modify the photos
  • Configurable options: The API enables programmers to alter the Water color sketch options to get the desired result. This includes altering the Water color sketch's level of detail, colour scheme, and overall design
  • Scalability: The API is made to be scalable and is capable of handling high demand for services. This makes it perfect for applications that call for extensive Water color Sketches of photos.
  • The API is cross-platform compatible since it can be incorporated into a wide range of programming languages and frameworks.

Api Endpoint

Our API endpoint for the photo to Water Color Image API is located at:

POST: https://sketchmypic.com/apiv1/watercolor/

Authentication

Each call made to the Water Color Image API must be accompanied by a token in order to authenticate. When you register for the API, you will receive your token.

Token: {your_token_here}

The Token prefix must be included before your actual token.

Usage Limits

The given trial token can initially only handle 10 queries for free. Please contact our customer service department if you need extra credits.

Supported Input Formats

The API accepts base64-encoded picture data. JPEG, PNG, and BMP image formats are all supported.

Example Code

Here's an example of how to use the Water color API in Python:

Python:


              import requests
              import base64
              
              save_file_path = "result.jpg"
              
              def save_b64_to_file(watercolor_b64):
                  print("saving image")
                  watercolor_b64 = watercolor_b64[22:]
                  # Decode the base64-encoded image data
                  image_data = base64.b64decode(watercolor_b64)
                  # Save the image to a file
                  with open(save_file_path, "wb") as f:
                      f.write(image_data)
              
              url = "https://sketchmypic.com/apiv1/watercolor/"
              token = "Token {your_token_here}"
              image_path = "original.png"
              
              with open(image_path, "rb") as f:
                  image_data = f.read()
                  image_b64 = base64.b64encode(image_data).decode('utf-8')
                  print("some starting part of b64 string of img- ", image_b64[:30])
              
              headers = {
                  "Authorization": token,
                  "Content-Type": "application/json"
              }
              
              data = {
                  "file": image_b64
              }
              
              print("sending image to server for processing")
              response = requests.POST(url, headers=headers, json=data)
              
              if response.status_code == 200:
                  print("successfully rec-d response")
                  watercolor_b64 = response.json()["response"]
                  print("some start of b64 string response", watercolor_b64[:12])
                  # Save the Water color image data to a file or display it in your application
                  # to display, just put the watercolor_b64 inside src of img tag
                  # here we are saving it to a file
                  save_b64_to_file(watercolor_b64)
              else:
                  print("Error:", response.status_code, response.content)
              

Request Parameters

Parameter Required Description
file Yes The base64-encoded image data to be Water color. The maximum size of the image should not exceed 8 MB.

Response Parameters

Parameter Description
response
  • If the request is successful, the API will return a JSON object with a response field containing the base64-encoded Water color image data.
  • If there is an error, the API will return an error response with a corresponding status code and message.

Error Codes

Error Codes Description
400 Bad request
401 Unauthorized access
402 Payment required
403 Forbidden
404 Resource not found
429 Too many requests.
500 Internal server error.

Support & Pricing

If you have any questions or issues with the Water Color Image API, please contact us at [email protected]

API Pricing
Basic Plan

5000 API calls/month (7 days free trial)

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$19.99
Per month
Standard

20,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$49.99
Per month
Premium

50,000 API calls/month

✓ Access to all APIs

✓ Email Support

✓ No Contract / Cancel Anytime

$99.99
Per month

FAQ's

Q: What image formats does the API support?

A: All popular image formats, including PNG, JPG, and GIF, are supported by the API as long as the image data is supplied in base64 format.

Q: What is base64 encoding?

A: Binary data can be represented using ASCII characters using base64 encoding. Due to its ability to transmit binary data as text, it is frequently used to encrypt data for internet transmission. By using Base64 encoding, binary data can be safely transferred in URLs and other situations where non-ASCII characters are not permitted.

Q: Is there a limit to the size of the image that can be converted?

A:Although there is no restriction on the size of the image that can be converted, larger photos will require more processing time and could slow down response times

Q: What happens if I exceed the rate limit for my token?

A: The API will produce a 429 error status code informing you that you have exceeded the rate limit if you go beyond the allowed rate for your token. Before making any requests, you must wait for the rate limit to reset.

Q: What do these APIs do?

A: All of these image processing APIs let you turn photos into many types of artwork, including cartoons, pencil sketches, black and white sketches, coloured pencil sketches, oil paintings, pixelated images, pop art, and watercolours.

Q: What input image formats are supported?

A: All popular image formats, including PNG, JPG, and GIF, are supported by the APIs as long as the image data is supplied in base64 format.

Q: What is the rate limit for these APIs?

A: Each API's rate limit is listed in the documentation for that particular API. Each API's trial token can initially only handle 10 calls; if you need extra credits, get choose a pricing plan.