Bearer YOUR_API_KEYList projects
/images/projectsReturns all projects for the authenticated account.
curl -H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects[
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My App",
"slug": "my-app-a1b2c3",
"plan": "free",
"createdAt": "2026-03-20T10:00:00.000Z"
}
]Create a project
/images/projectsCreates a new image project with a unique slug.
Request Body
namestringrequiredProject name (1–100 chars)curl -X POST \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"name": "My App"}' \
https://app.spronta.com/api/images/projects{
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "My App",
"slug": "my-app-a1b2c3",
"plan": "free",
"createdAt": "2026-03-20T10:00:00.000Z"
}Get project details
/images/projects/{projectId}Returns a project with usage stats.
Path Parameters
projectIdstring · uuidrequiredProject IDcurl -H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}{
"id": "123e4567-...",
"name": "My App",
"slug": "my-app-a1b2c3",
"plan": "free",
"stats": {
"imageCount": 42,
"totalSize": 104857600
}
}Update a project
/images/projects/{projectId}Update project name or custom domain.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
namestringNew name (1–100 chars)customDomainstring | nullCustom CDN domain (max 253 chars)curl -X PATCH \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"name": "Renamed App"}' \
https://app.spronta.com/api/images/projects/{projectId}{
"id": "123e4567-...",
"name": "Renamed App",
"slug": "my-app-a1b2c3",
"updatedAt": "2026-03-20T12:00:00.000Z"
}Delete a project
/images/projects/{projectId}Permanently deletes the project and all its images.
Path Parameters
projectIdstring · uuidrequiredProject IDcurl -X DELETE \
-H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}{ "deleted": true }Initiate upload
/images/projects/{projectId}/uploadReturns a presigned URL. Upload your file there via PUT, then call confirm.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
filenamestringrequiredOriginal filename (1–255 chars)contentTypestringrequiredMIME type (e.g. image/jpeg)fileSizeintegerrequiredFile size in bytes (max 50MB)curl -X POST \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"filename":"hero.jpg","contentType":"image/jpeg","fileSize":2048576}' \
https://app.spronta.com/api/images/projects/{projectId}/upload{
"imageId": "987fcdeb-51a2-...",
"uploadUrl": "https://storage.example.com/presigned...",
"r2Key": "123e4567/987fcdeb/hero.jpg"
}Confirm upload
/images/projects/{projectId}/upload/confirmFinalizes the upload. Computes blurhash, detects dimensions, returns CDN URL.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
imageIdstring · uuidrequiredImage ID from initiate stepwidthintegerOverride detected widthheightintegerOverride detected heightcurl -X POST \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"imageId":"987fcdeb-51a2-..."}' \
https://app.spronta.com/api/images/projects/{projectId}/upload/confirm{
"id": "987fcdeb-...",
"filename": "hero.jpg",
"width": 1920,
"height": 1080,
"blurhash": "LEHV6nWB2yk8pyo0adR*.7kCMdnj",
"uploadStatus": "confirmed",
"url": "https://cdn.spronta.com/my-project/987fcdeb-..."
}List images
/images/projects/{projectId}/imagesReturns paginated images for a project.
Path Parameters
projectIdstring · uuidrequiredProject IDQuery Parameters
limitintegerMax results, 1–100 (default 50)offsetintegerPagination offset (default 0)curl -H "Authorization: Bearer spronta_img_..." \
"https://app.spronta.com/api/images/projects/{projectId}/images?limit=20"[
{
"id": "987fcdeb-...",
"filename": "hero.jpg",
"width": 1920,
"height": 1080,
"blurhash": "LEHV6nWB2yk8...",
"altText": "Product hero",
"tags": ["hero", "product"],
"url": "https://cdn.spronta.com/my-project/987fcdeb-..."
}
]Update image metadata
/images/projects/{projectId}/images/{imageId}Update alt text and tags for an image.
Path Parameters
projectIdstring · uuidrequiredProject IDimageIdstring · uuidrequiredImage IDRequest Body
altTextstring | nullAlt text (max 1000 chars)tagsstring[]Tags (max 50 items, each max 100 chars)curl -X PATCH \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"altText":"Updated alt text","tags":["hero","homepage"]}' \
https://app.spronta.com/api/images/projects/{projectId}/images/{imageId}{
"id": "987fcdeb-...",
"altText": "Updated alt text",
"tags": ["hero", "homepage"],
"updatedAt": "2026-03-20T12:00:00.000Z"
}Delete an image
/images/projects/{projectId}/images/{imageId}Permanently deletes the image from storage and database.
Path Parameters
projectIdstring · uuidrequiredProject IDimageIdstring · uuidrequiredImage IDcurl -X DELETE \
-H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}/images/{imageId}{ "deleted": true }List presets
/images/projects/{projectId}/presetsReturns all transform presets for a project.
Path Parameters
projectIdstring · uuidrequiredProject IDcurl -H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}/presets[
{
"id": "abc12345-...",
"name": "thumbnail",
"transforms": {
"width": 200,
"height": 200,
"fit": "cover",
"gravity": "face"
}
}
]Create a preset
/images/projects/{projectId}/presetsCreate a named transform preset. Use in CDN URLs with ?t=name.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
namestringrequiredUnique name (alphanumeric, hyphens, underscores, 1–64 chars)transformsobjectrequiredTransform parameters (width, height, fit, format, quality, etc.)curl -X POST \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"name":"thumbnail","transforms":{"width":200,"height":200,"fit":"cover","gravity":"face"}}' \
https://app.spronta.com/api/images/projects/{projectId}/presets{
"id": "abc12345-...",
"name": "thumbnail",
"transforms": {
"width": 200,
"height": 200,
"fit": "cover",
"gravity": "face",
"format": "webp",
"quality": 80
},
"createdAt": "2026-03-20T10:00:00.000Z"
}Get a preset
/images/projects/{projectId}/presets/{presetId}Returns a single preset by ID.
Path Parameters
projectIdstring · uuidrequiredProject IDpresetIdstring · uuidrequiredPreset IDcurl -H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}/presets/{presetId}{
"id": "abc12345-...",
"name": "thumbnail",
"transforms": { "width": 200, "height": 200, "fit": "cover" }
}Update a preset
/images/projects/{projectId}/presets/{presetId}Update a preset's name or transforms.
Path Parameters
projectIdstring · uuidrequiredProject IDpresetIdstring · uuidrequiredPreset IDRequest Body
namestringNew nametransformsobjectNew transforms (replaces existing)curl -X PATCH \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"name":"thumb-v2","transforms":{"width":300,"height":300,"fit":"cover"}}' \
https://app.spronta.com/api/images/projects/{projectId}/presets/{presetId}{
"id": "abc12345-...",
"name": "thumb-v2",
"transforms": { "width": 300, "height": 300, "fit": "cover" },
"updatedAt": "2026-03-20T12:00:00.000Z"
}Delete a preset
/images/projects/{projectId}/presets/{presetId}Permanently deletes a preset.
Path Parameters
projectIdstring · uuidrequiredProject IDpresetIdstring · uuidrequiredPreset IDcurl -X DELETE \
-H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}/presets/{presetId}{ "deleted": true }Get signing config
/images/projects/{projectId}/signingReturns the current signing configuration. Secret is masked.
Path Parameters
projectIdstring · uuidrequiredProject IDcurl -H "Authorization: Bearer spronta_img_..." \
https://app.spronta.com/api/images/projects/{projectId}/signing{
"enabled": true,
"requireSignedUrls": false,
"signingSecret": "spronta_sign_...abcd"
}Enable or disable signing
/images/projects/{projectId}/signingSet enabled:true to generate a new secret (shown once). Set enabled:false to disable.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
enabledbooleantrue = generate new secret, false = disablerequireSignedUrlsbooleanWhen true, unsigned CDN URLs return 403curl -X POST \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"enabled": true}' \
https://app.spronta.com/api/images/projects/{projectId}/signing{
"enabled": true,
"requireSignedUrls": false,
"signingSecret": "spronta_sign_a1b2c3d4e5f6..."
}Generate a signed URL
/images/projects/{projectId}/signingServer-side HMAC-SHA256 signed URL generation. Requires signing to be enabled.
Path Parameters
projectIdstring · uuidrequiredProject IDRequest Body
pathstringrequiredImage path (e.g. /my-project/hero.jpg)paramsobjectTransform params as key-value stringsexpiresInintegerExpiration in seconds (60–604800)curl -X PUT \
-H "Authorization: Bearer spronta_img_..." \
-H "Content-Type: application/json" \
-d '{"path":"/my-project/hero.jpg","params":{"w":"800","f":"webp"},"expiresIn":3600}' \
https://app.spronta.com/api/images/projects/{projectId}/signing{
"url": "/my-project/hero.jpg?exp=1711152000&f=webp&w=800&s=a1b2c3...",
"signature": "a1b2c3d4e5f6...",
"expiresAt": 1711152000
}Get usage metrics
/images/projects/{projectId}/usageReturns per-day request, bandwidth, and transform metrics.
Path Parameters
projectIdstring · uuidrequiredProject IDQuery Parameters
daysintegerLookback period, 1–90 (default 30)curl -H "Authorization: Bearer spronta_img_..." \
"https://app.spronta.com/api/images/projects/{projectId}/usage?days=7"{
"daily": [
{
"date": "2026-03-15",
"requests": 12450,
"bandwidth": 524288000,
"transforms": 8320
}
],
"totals": {
"requests": 12450,
"bandwidth": 524288000,
"transforms": 8320
}
}