Assets API
Upload and manage images, fonts, and other assets via the Canvelete (opens in a new tab) API.
Base URL
https://api.canvelete.com/v1/assetsList Assets
GET /assetsParameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
limit | integer | Items per page (default: 20) |
type | string | Filter by type: IMAGE, FONT, VIDEO, AUDIO |
Example
curl -X GET "https://api.canvelete.com/v1/assets?type=IMAGE" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": [
{
"id": "asset_abc123",
"name": "logo.png",
"type": "IMAGE",
"url": "https://cdn.canvelete.com/assets/abc123.png",
"size": 245760,
"mimeType": "image/png",
"createdAt": "2024-01-15T10:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45
}
}Upload Asset
POST /assets/uploadBody (multipart/form-data)
| Field | Type | Description |
|---|---|---|
file | file | The file to upload |
name | string | Asset name (optional) |
type | string | Asset type: IMAGE, FONT |
Example
curl -X POST "https://api.canvelete.com/v1/assets/upload" \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@logo.png" \
-F "name=Company Logo" \
-F "type=IMAGE"Response
{
"success": true,
"data": {
"id": "asset_xyz789",
"name": "Company Logo",
"type": "IMAGE",
"url": "https://cdn.canvelete.com/assets/xyz789.png",
"size": 102400,
"mimeType": "image/png"
}
}Delete Asset
DELETE /assets/{assetId}Example
curl -X DELETE "https://api.canvelete.com/v1/assets/asset_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"Search Stock Images
Search Pixabay for free stock images:
GET /assets/stock/searchParameters
| Parameter | Type | Description |
|---|---|---|
query | string | Search query |
page | integer | Page number |
perPage | integer | Results per page (max: 50) |
Example
curl -X GET "https://api.canvelete.com/v1/assets/stock/search?query=nature" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": [
{
"id": "pixabay_123",
"previewUrl": "https://pixabay.com/preview/123.jpg",
"fullUrl": "https://pixabay.com/full/123.jpg",
"width": 1920,
"height": 1080,
"tags": ["nature", "landscape", "mountain"]
}
]
}Search Icons
Search Iconify for icons:
GET /assets/icons/searchParameters
| Parameter | Type | Description |
|---|---|---|
query | string | Search query |
page | integer | Page number |
perPage | integer | Results per page |
Example
curl -X GET "https://api.canvelete.com/v1/assets/icons/search?query=arrow" \
-H "Authorization: Bearer YOUR_API_KEY"List Fonts
GET /assets/fontsParameters
| Parameter | Type | Description |
|---|---|---|
category | string | Filter: serif, sans-serif, monospace, display |
Example
curl -X GET "https://api.canvelete.com/v1/assets/fonts?category=sans-serif" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"success": true,
"data": [
{
"name": "Inter",
"category": "sans-serif",
"weights": ["400", "500", "600", "700"],
"styles": ["normal", "italic"]
},
{
"name": "Poppins",
"category": "sans-serif",
"weights": ["300", "400", "500", "600", "700"],
"styles": ["normal", "italic"]
}
]
}Supported File Types
Images
- PNG, JPG, JPEG, GIF, WebP, SVG
Fonts
- TTF, OTF, WOFF, WOFF2
Size Limits
| Plan | Max File Size |
|---|---|
| Free | 5 MB |
| Individual | 25 MB |
| Teams | 50 MB |
| Enterprise | 100 MB |
SDK Examples
Python
from canvelete import CanveleteClient
client = CanveleteClient(api_key="YOUR_API_KEY")
# List assets
assets = client.assets.list(type="IMAGE")
# Upload asset
asset = client.assets.upload(
file_path="logo.png",
name="Company Logo"
)
# Search stock images
images = client.assets.search_stock("nature landscape")
# List fonts
fonts = client.assets.fonts(category="sans-serif")TypeScript
import { CanveleteClient } from '@canveletedotcom/sdk';
const client = new CanveleteClient({ apiKey: 'YOUR_API_KEY' });
// List assets
const assets = await client.assets.list({ type: 'IMAGE' });
// Search stock images
const images = await client.assets.searchStock('nature landscape');
// List fonts
const fonts = await client.assets.fonts({ category: 'sans-serif' });Next Steps
- Designs API — Use assets in designs
- Rendering API — Generate images
- Design Editor — Upload assets visually