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.0).

Metadata

Release files for vectali 0.4.0

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.0
File Size Uploaded Provenance Actions
vectali-0.4.0.tar.gz 13.1 kB Without provenance Details for vectali-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 23.2 kB

Release files / vectali-0.4.0.tar.gz

Download URL vectali-0.4.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
33054850a60cddfff97bf11c9570fa888f9e0d0be9239493428a57980381d7c0
BLAKE2b-256 checksum
How to use checksums
d7b05bd23579d216fd4498529bae43a2a90779e221de9c36b7c24c8dd9e659b1
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.0-py3-none-any.whl

Download URL vectali-0.4.0-py3-none-any.whl
Size 10.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
79c6070f47c5df9ba0453609dc5304ca201d2850085a8d73d7dbc24b3f8a2f12
BLAKE2b-256 checksum
How to use checksums
c4ad7e027c10f8d0647fac37d85593c7897361cf294753455d2936fc1701259a
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.0

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