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

pip install vectali

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"))
allowance = client.get_allowance()

Path("logo.svg").write_text(result.svg, encoding="utf-8")
Path("logo.pdf").write_bytes(client.get_vector(result.conversion_id, "pdf"))
print(allowance.free_api_conversions.remaining)

Key Methods

Method Description
client.convert_image(image, ...) Accepts pathlib.Path (infers filename and MIME type), bytes, or a borrowed binary stream. Returns a frozen Conversion dataclass.
client.get_vector(conversion_id, vector_format="pdf") Downloads "svg", "pdf", "eps", or "dxf" as raw bytes. Free after conversion.
client.get_allowance() Returns a frozen BillingSummary dataclass with monthly allowance, granted credits, and free_api_conversions.
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.4.1).

Metadata

Release files for vectali 0.4.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.4.1
File Size Uploaded Provenance Actions
vectali-0.4.1.tar.gz 22.2 kB Without provenance Details for vectali-0.4.1.tar.gz

Built distribution (wheel)

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

Total release size: 44.2 kB

Release files / vectali-0.4.1.tar.gz

Download URL vectali-0.4.1.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bbe5e0121601ac9ba4cdbbf388fdb61d80b935bcce87f5d148a1f1edc18c9051
BLAKE2b-256 checksum
How to use checksums
7d23c5e54d68602d01bd528b92f16fc61aeb125e63bf9d21f90ff8541d550211
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.4.1-py3-none-any.whl

Download URL vectali-0.4.1-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a374339cb25334eb0c5cd112c852f056dca123fae2d744948b7d4d54f6a1002b
BLAKE2b-256 checksum
How to use checksums
90e31c1bfb8317c15366f43e8bcf6ef9b65258060543b013ff72446ceceb18f7
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.4.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