NAV

VectorArt. ai

shell python javascript

API Documentation

Welcome to VectorArt.ai's API docs.

Our API allows you to create vector images using AI.

Follow these steps to get started:

  1. Contact us to get a developer API key.
  2. Use the API key as a HTTP authorization header bearer token.
  3. Make a request to the Create endpoint.
  4. Make a request to the Image status endpoint.

Authentication

Obtain your API key from the account page. Use the API key as an HTTP authorization header bearer token.

Authorization: Bearer <api-key>

Endpoints

Create Image

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <api-key>" \
  -d '{"prompt":"a cute bear"}' \
  https://vectorart.ai/api/image/create
import requests

url = "https://vectorart.ai/api/image/create"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <api-key>"
}
data = {
    "prompt": "a cute bear"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const axios = require('axios');

const url = 'https://vectorart.ai/api/image/create';
const headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer <api-key>'
};
const data = {
    prompt: 'a cute bear'
};

axios.post(url, data, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error('Error:', error));

The above command returns JSON structured like this:

{
  "identifier": "a-random-identifier"
}

Generate a vector image based on a prompt.

HTTP Request POST https://vectorart.ai/api/image/create

Headers

Parameters

Name Type Required Description
prompt string Yes The prompt to generate an image from
mode string No Generation mode. One of: simple, logo, icon, transparent, artistic, isometric, pixel-art, line-art, low-poly, collection
auxMode string No If mode is collection (illustration), one of: natures-tales, cubist-kaleidoscope, environment-concepts, corporate-memphis, melancholic-magic, retro-reveries, serene-sceneries, pastel-portals, radiant-rhythms, graphic-grit, whimsical-wonders, geometric-grace, abstract-aria, urban-observations, fantasy-visions, dotted-dimensions, timeless-tales, scribbled-stories, liquid-elegance, vivid-folklore, dynamic-dystopia, noir-nostalgia, enchanted-sketches, modern-musings, wild-imaginations, witty-watercolors, fjord-fantasies, dark-dreamscapes, vibrant-collisions

Check Image Status

curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <api-key>" \
  -d '{"identifier":"<a-random-identifier>"}' \
  https://vectorart.ai/api/image/status
import requests

url = "https://vectorart.ai/api/image/status"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <api-key>"
}
data = {
    "identifier": "<a-random-identifier>"
}

response = requests.post(url, json=data, headers=headers)
print(response.json())
const axios = require('axios');

const url = 'https://vectorart.ai/api/image/status';
const headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer <api-key>'
};
const data = {
    identifier: '<a-random-identifier>'
};

axios.post(url, data, { headers })
    .then(response => console.log(response.data))
    .catch(error => console.error('Error:', error));

The above command returns JSON structured like this:

{
  "status": "done",
  "url": "svg url"
}

Check the status of a generated image.

HTTP Request

POST https://vectorart.ai/api/image/status

Headers

Parameters

Name Type Required Description
identifier string Yes The image id returned from /api/image/create

Contact us

Please contact us with any questions or requests.