.png)
Cloudinary Integration Guide
Connect Cloudinary’s media APIs, upload workflows, transformation URLs, and selected processing notifications with enterprise applications through Martini.
Cloudinary integration options at a glance
Cloudinary provides REST-style Upload, Admin, Search, and Provisioning APIs for media ingestion, asset administration, metadata, folders, tags, and account operations. It also supports image, video, and raw-file uploads, large and chunked uploads, transformation and delivery URLs, and operation-specific asynchronous or bulk processing. Cloudinary notifications and callback URLs cover selected upload, transformation, and processing events rather than every asset change. Authentication uses API key and API secret credentials, signed requests, or controlled unsigned upload presets. Martini can consume these APIs, protect credentials in secrets, receive supported notifications through an API, schedule reconciliation workflows, and map Cloudinary assets into downstream systems.
Common Cloudinary integration patterns
Common Cloudinary data objects used in integrations
Authentication and security considerations
Protect API credentials and signatures
Cloudinary API keys and API secrets support server-side authentication, while signed uploads use the API secret to calculate request signatures. Store these values in protected Martini secrets or environment configuration and keep the API secret out of client-facing code and payloads.
Control upload policies
Use signed uploads or carefully restricted unsigned upload presets according to the ingestion channel. Limit permitted resource types, formats, folders, public IDs, and transformations rather than accepting unrestricted client input.
Secure callback APIs
Protect Martini APIs that receive Cloudinary notifications with appropriate authentication or validation controls. Validate payloads, correlate notifications with expected workflow state, and do not trust inbound public IDs or URLs without business validation.
Operational considerations for Cloudinary integrations
Pagination and checkpoints
Search and Admin API operations can return paginated results. Follow documented cursors or pagination fields and persist checkpoints so scheduled synchronization can resume safely.
Rate limits and retries
Cloudinary limits can vary by operation and plan. Use bounded retries with backoff for transient failures and avoid retrying non-idempotent uploads without a duplicate-prevention strategy.
Asynchronous processing
An accepted upload does not necessarily mean that every transformation or derived asset is ready. Use supported notifications or status checks before publishing delivery URLs downstream.
Idempotency and schema changes
Use deterministic public IDs, source identifiers, or correlation keys to handle duplicate notifications and repeated executions. Define mappings for missing, renamed, and newly introduced tags or metadata fields.
Testing and reconciliation
Test images, videos, raw files, large uploads, invalid formats, asynchronous transformations, notification retries, and downstream failures. Schedule reconciliation when notifications do not cover the required business change set.
Why use Martini instead of scripts or point-to-point integrations?
Centralize integration logic
Martini separates Cloudinary-specific authentication, signing, upload behavior, pagination, and response handling from downstream application logic. Reusable workflows and services reduce duplicated implementation across commerce, content, and internal applications.
Support multiple integration styles
Martini can consume Cloudinary REST APIs, expose controlled APIs for internal media ingestion, receive selected notifications, and run scheduled reconciliation workflows. This supports real-time, asynchronous, and batch-oriented designs in one integration environment.
Make transformations and rules explicit
Mappings, validation, public ID conventions, metadata rules, publishing conditions, and duplicate handling can be maintained as workflow behavior rather than scattered across scripts or point-to-point integrations.
Improve operational control
Workflow-level error handling, retries, checkpoints, logging, and monitoring provide a consistent operational model for large media libraries and asynchronous processing. This is particularly useful when Cloudinary notifications cover only selected operations.