SDKs
Overview

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

SDKInstallationBest For
Pythonpip install canveleteData pipelines, automation, ML workflows
TypeScriptnpm install @canveletedotcom/sdkWeb apps, Node.js, serverless
Gogo get github.com/Canvelete/canvelete-goHigh-performance services, microservices
CLInpm install -g canvelete-cliShell 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 list

Authentication

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")

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

PlanRequests/MinuteConcurrent Renders
Free102
Individual605
Teams30020
EnterpriseCustomCustom

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.