Documentation

Illustrating Reference

1. Illustrating

API Endpoint: https://api.pictographic.io/illustrating

To use the API, send a POST request to the endpoint and ensure your requests are authenticated with your Api-Key included in the headers under the Api-Key field. field. Also, ensure the request body is formatted in JSON and includes parameters like paragraph, color, styles, and type to customize the API response.

Body Schema:

- paragraph : Enter the paragraph or an article to find the best images for the content.

- styles : The styles of the images to return. Should be an array of the 'Essential (notion)', 'Lined (lined)', 'Old School (oldschool)', 'Purple (purple)', '3d (isometric-modern)', 'Memphis (flat-modern)', 'Ink Pen (inkmodern)', 'Illustrative (flatcool)', 'Cutie π (cartoon-cute)', 'Cartoon (cartoon-black-white)', 'Sketchy (isometric-sketch)', 'Blocky (minimal-line)', 'Simple (black-and-white-line)', .

- color : The colors of the images to return.

- type : Type of return images (.png or .svg)

2. CDN/ Color Change

You can utilize the CDN to modify the color of the SVG images. Our current version support color change for Essential (notion), Ink Pen (inkmodern), Lined (lined) and Cartoon (cartoon-black-white).

Grab your SVG image URL from the API response and change the color by appending the color code to the URL. The URL should be in the format: https://api.pictographic.io/images/{style}/{file_id}?color={color} where {style} is the style of image, file_id is the ID of the image and color is the color you want to change the image to.

You can check all the valid color name codes from the W3Schools website. Or you can use the hexadecimal color code (without #) You can also change the color of the image to multiple colors by separating the colors with a comma.

For example, if you want to change the color of the image with the style Ink Pen (inkmodern), ID u2swADiuLrzwnWX14prd to red and orange, you can modify thes URL: https://api.pictographic.io/images/inkmodern/u2swADiuLrzwnWX14prd.svg?color=red,orange

POST
/illustrating

API-KEY

Paragraph

Styles

Essential (notion)
Lined (lined)
Old School (oldschool)
Purple (purple)
3d (isometric-modern)
Memphis (flat-modern)
Ink Pen (inkmodern)
Illustrative (flatcool)
Cutie π (cartoon-cute)
Cartoon (cartoon-black-white)
Sketchy (isometric-sketch)
Blocky (minimal-line)
Simple (black-and-white-line)

Color

Type

import requests
import json
response = requests.post(
    "https://api.pictographic.io/illustrating",
    headers={
        "Api-Key": "qicN7r5q3QR5w3inowCKwc38Kat586",
        "Content-Type": "application/json",
    },
    data=json.dumps({
        "paragraph": "",
        "styles": [],
        "color":[ "#000000", "#FFFF00" ],
        "type": "svg"
    })
)
if response.status_code == 200:
    with open("./pictographic-response.json", 'wb') as file:
        file.write(response.content)
else:
    raise Exception(str(response.json()))
Copy