Skip to main content
Vectali

Vectali Python SDK

Official zero-dependency Python client for converting raster artwork to clean SVG, PDF, EPS, and DXF vectors. Requires Python 3.10+ (standard library only, ships py.typed for mypy and Pyright).

Documentation · Code Examples · API Keys · Pricing

Install

Install directly from this GitHub release (v0.3.1):

pip install "git+https://github.com/vectali/vectali-python.git@v0.3.1"

Every Vectali account includes 3 free hosted API trial conversions so you can test end-to-end before choosing a plan.

Quickstart

import os
from pathlib import Path
from vectali import Vectali

client = Vectali(os.environ["VECTALI_API_KEY"])
result = client.convert_image(Path("logo.png"))

Path("logo.svg").write_text(result["svg"], encoding="utf-8")
Path("logo.pdf").write_bytes(client.get_vector(result["conversion_id"], vector_format="pdf"))

Key Methods

Method Description
client.convert_image(image, ...) Accepts pathlib.Path (infers filename and MIME type), bytes, or a borrowed binary stream. Returns typed Conversion dict.
client.get_vector(conversion_id, vector_format="pdf") Downloads "svg", "pdf", "eps", or "dxf" as raw bytes. Free after conversion.
client.get_allowance() Returns typed BillingSummary dict including monthly allowance, granted credits, and freeApiConversions.
Vectali().health() Public health check; works without an API key and sends no Authorization header.
  • VectaliError exposes status, details, request_id, and retry_after.
  • Borrowed binary streams passed to convert_image are never closed by the SDK.

Limits & Billing

Limit Value
Input formats PNG, JPG, GIF, BMP, WebP
Output formats SVG, PDF, EPS, DXF
Max file size 10 MiB
Max resolution 4,000,000 pixels (4096 px max per side)
Billing 3 free hosted trial conversions included; 1 credit per successful conversion, downloads are free
  • Idempotent retries: Every conversion accepts an Idempotency-Key (auto-generated UUID v4 if omitted). Reuse the same key and image bytes after an uncertain network error to avoid double-charging.
  • No automatic retries: Failed requests raise a structured error with HTTP status, X-Vectali-Request-Id, and Retry-After.
  • Server-side only: Keep VECTALI_API_KEY in server environment variables, never in browser code, prompts, or Git.
  • Safe transport defaults: 260-second timeout, redirects disabled, and cookies ignored.

Apache-2.0 · Source & tests in vectali/api-tooling (v0.3.1).

Metadata

Release files for vectali 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vectali 0.3.1
File Size Uploaded Provenance Actions
vectali-0.3.1.tar.gz 13.3 kB Without provenance Details for vectali-0.3.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vectali 0.3.1
File Interpreter ABI Platform Actions
vectali-0.3.1-py3-none-any.whl Python 3 none any Details for vectali-0.3.1-py3-none-any.whl

Total release size: 24.3 kB

Release files / vectali-0.3.1.tar.gz

Download URL vectali-0.3.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5e1393782ff4a1673e42c4a2c0fd0e9bf0a553fb5b35e95ee9f3c98845948de4
BLAKE2b-256 checksum
How to use checksums
a946831e02bc8b98c9d5acdf7a39bfeada0b731c0d29062178bb96d8afd67053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / vectali-0.3.1-py3-none-any.whl

Download URL vectali-0.3.1-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
388c9a374999e2bd3a4a40431902f79753ebb9e74f2dbb9fedcf3301e8ec8b0d
BLAKE2b-256 checksum
How to use checksums
a88781b5ee6cf56a59aaa418d46ec63771731c179dcb965b3d8ac36b03fb0f49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for vectali 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page