SDK Overview
Canvelete (opens in a new tab) provides official SDKs for Python, TypeScript/JavaScript, Go, and a command-line interface. All SDKs offer consistent functionality with idiomatic implementations for each language.
Available SDKs
| SDK | Installation | Best For |
|---|---|---|
| Python | pip install canvelete | Data pipelines, automation, ML workflows |
| TypeScript | npm install @canveletedotcom/sdk | Web apps, Node.js, serverless |
| Go | go get github.com/Canvelete/canvelete-go | High-performance services, microservices |
| CLI | npm install -g canvelete-cli | Shell scripts, CI/CD, quick tasks |
Core Features
All SDKs support:
- Design Management — Create, read, update, delete designs
- Template Rendering — Generate images with dynamic data
- Batch Processing — Render multiple designs efficiently
- Asset Management — Upload and manage images, fonts
- Webhook Verification — Validate incoming webhook payloads
- Error Handling — Typed exceptions for different error cases
- Auto-pagination — Iterate through large result sets
Quick Comparison
# Python
from canvelete import CanveleteClient
client = CanveleteClient(api_key="cvt_xxx")
designs = client.designs.list()// TypeScript
import { CanveleteClient } from '@canveletedotcom/sdk';
const client = new CanveleteClient({ apiKey: 'cvt_xxx' });
const designs = await client.designs.list();// Go
client := canvelete.NewClient("cvt_xxx")
designs, _ := client.Designs.List(ctx, nil)# CLI
canvelete designs listAuthentication
All SDKs use API key authentication. Generate keys from your Canvelete dashboard (opens in a new tab).
Environment Variable (Recommended)
export CANVELETE_API_KEY="cvt_your_api_key"SDKs automatically read from CANVELETE_API_KEY when no key is provided explicitly.
Direct Configuration
# Python
client = CanveleteClient(api_key="cvt_xxx")
# TypeScript
const client = new CanveleteClient({ apiKey: 'cvt_xxx' });
# Go
client := canvelete.NewClient("cvt_xxx")Security
Never expose API keys in client-side code or public repositories. Use environment variables or secure secret management.
Common Operations
List Designs
# Python
designs = client.designs.list(page=1, limit=20)
for design in designs['data']:
print(design['name'])Render a Design
# Python
result = client.render.create(
design_id="design_123",
format="png",
dynamic_data={"title": "Hello World"},
output_file="output.png"
)Batch Rendering
# Python
batch = client.render.batch([
{"design_id": "design_123", "dynamic_data": {"name": "Alice"}},
{"design_id": "design_123", "dynamic_data": {"name": "Bob"}},
])Error Handling
All SDKs provide typed exceptions:
from canvelete.exceptions import (
AuthenticationError,
NotFoundError,
RateLimitError,
ValidationError
)
try:
design = client.designs.get("invalid_id")
except NotFoundError:
print("Design not found")
except AuthenticationError:
print("Invalid API key")
except RateLimitError as e:
print(f"Rate limited. Retry after {e.retry_after}s")Rate Limits
| Plan | Requests/Minute | Concurrent Renders |
|---|---|---|
| Free | 10 | 2 |
| Individual | 60 | 5 |
| Teams | 300 | 20 |
| Enterprise | Custom | Custom |
View your current usage at canvelete.com/dashboard (opens in a new tab).
Next Steps
Choose your SDK:
- Python SDK — Full documentation and examples
- TypeScript SDK — Node.js and browser support
- Go SDK — High-performance applications
- CLI — Command-line automation
Or explore the API Reference for direct HTTP access.