Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Is that skill safe to install?
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
Are you the author of Cloudinary?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ashish7802-cloudinary)
# Cloudinary API & SDK Skill
> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18
> **Official Docs:** https://cloudinary.com/documentation/node_integration
## Overview
Cloudinary provides media storage, signed direct browser uploads, responsive image/video transformations (`f_auto,q_auto`), and CDN delivery via the `cloudinary` v2 SDK.
## Installation
```bash
npm install cloudinary
pip install cloudinary
```
## Authentication
Configure `CLOUDINARY_URL` (`cloudinary://<api_key>:<api_secret>@<cloud_name>`) or individual `CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_API_KEY`, and `CLOUDINARY_API_SECRET` variables. Always set `secure: true` for HTTPS delivery URLs.
## Core Concepts
- **Signed Direct Browser Uploads**: Generate a short-lived timestamped signature on your server via `cloudinary.utils.api_sign_request(paramsToSign, apiSecret)`, return `{ signature, timestamp, apiKey, cloudName }` to the browser, and upload directly from client to Cloudinary without proxying large files through your backend or exposing `CLOUDINARY_API_SECRET`.
- **Automatic Delivery Optimization**: Apply `fetch_format: "auto"` (`f_auto`) and `quality: "auto"` (`q_auto`) on delivery URLs to serve AVIF/WebP automatically.
- **Eager Transformations**: Pre-generate expensive video/large-image derivatives asynchronously (`eager_async: true`) during upload.
## Error Handling & Rate Limits
- Admin API endpoints have hourly rate limits (e.g., 500–2,000 req/hr depending on plan); use Upload API and Delivery URLs on hot user paths instead of polling Admin API.
- Validate uploaded file MIME types, byte size limits, and allowed folders server-side when signing upload presets.
## Security Best Practices
- Never expose `CLOUDINARY_API_SECRET` in client bundles.
- Prefer signed uploads over unsigned upload presets in authenticated apps to prevent quota abuse.
- Enable Strict Transformations for sensitive or paid transformation presets to prevent arbitrary URL parameter billing attacks.
## AI Pitfalls
- Importing `cloudinary` root instead of `import { v2 as cloudinary } from "cloudinary"`.
- Signing parameters that do not exactly match the form fields sent in the browser upload (causes `Invalid Signature` HTTP 401).
- Calling Admin API `resources()` on every page request instead of storing `public_id` in your database.
## Production Checklist
- [ ] `secure: true` enabled globally for HTTPS URLs
- [ ] Browser uploads use server-generated `api_sign_request` signatures
- [ ] `f_auto` and `q_auto` applied to delivery URLs
- [ ] `public_id` persisted in app DB (not queried via rate-limited Admin API)
## References
- [Cloudinary Node.js Integration](https://cloudinary.com/documentation/node_integration)
- [Signed Upload Authentication](https://cloudinary.com/documentation/upload_images#generating_authentication_signatures)
## Related skills
- [`cloudflare-r2`](../cloudflare-r2/SKILL.md) — works well with
- [`aws-s3`](../aws-s3/SKILL.md) — alternative to
- [`nextjs`](../nextjs/SKILL.md) — integrates with