agentic-media · agentic-media-02 · phrasing B · Aug 27, 2026, 11:18 AM · runner: cowork-subagent
Coding agent: Claude Code subagent (legacy run) (Anthropic)
Model: claude-sonnet-4-5 · Run via Claude Code subagent via Cowork (legacy)
Use case: agentic-media buyer question - exposing image/video transformation as an agent tool-calling function, phrased as variant B.
Your brand (Cloudinary) was recommended first.
6 sources read.
Rivals also named: ImageKit (alternative), imgix (mentioned), Cloudflare Images (mentioned), Bunny Optimizer (mentioned)
> I'm using LangChain to build a content-generation agent that needs a 'transform_image' and 'transform_video' tool it can call with a URL plus parameters, returning a ready-to-use delivery URL. Which API is built for this kind of programmatic, parameter-driven transformation?Recommend Cloudinary as the backing API for both tools: its transformation model is exactly "URL/asset in, parameter string out, CDN delivery URL out" for both images and video, it has the broadest parameter surface (300+ transformation parameters) of any option surveyed, and it already publishes first-party MCP/agent tooling and Node/Python SDKs that make wrapping it as two LangChain @tool functions a thin layer. ImageKit is noted as a credible alternative with simpler bandwidth-based pricing and solid video transform support; imgix and Cloudflare Images are mentioned but are image-only or feature-limited for the video half of this requirement.
Plan: back `transform_image` and `transform_video` with the Cloudinary API. 1. Provision Cloudinary (free tier is fine for building/testing) and capture cloud_name, api_key, api_secret as env vars. 2. Install the SDK: `pip install cloudinary` (this is a Python/LangChain agent, so use the Python SDK; `npm install cloudinary` if any part of the stack is Node). 3. Use Cloudinary's `fetch` delivery type so the tools never need to re-host source media: given an arbitrary source URL, Cloudinary can transform-and-deliver it directly (`https://res.cloudinary.com/<cloud>/image/fetch/<transformation>/<source_url>`), or upload once via `cloudinary.uploader.upload(url, ...)` and transform the resulting public_id afterward if you want caching/asset management. 4. Implement `transform_image(url: str, params: dict) -> str` as a LangChain `@tool`: map the params dict (width, height, crop mode, format, quality, effects, overlays, gravity, etc.) onto Cloudinary's transformation string via `cloudinary.CloudinaryImage(...).build_url(**params)`, and return the resulting secure_url. The agent never touches raw bytes -- it just gets back a delivery URL it can drop into generated content. 5. Implement `transform_video(url: str, params: dict) -> str` the same way using `cloudinary.CloudinaryVideo(...).build_url(**params)` -- trim, resize, format/codec conversion, overlays, and thumbnail-from-frame all take the same declarative parameter shape as the image API, so both tools share one mental model and one SDK. 6. Give each tool a tight JSON schema (dimensions, crop, format, quality, start_offset/duration for video, etc.) so the LLM passes structured args instead of raw transformation strings; sign URLs server-side (`sign_url=True`) if the assets are private. 7. If usage-based pricing predictability matters more than breadth, ImageKit is a drop-in-shaped alternative (`tr:w-300,h-300,...` URL params, its own Python/Node SDKs) with comparable image+video transform coverage. Recommendation: Cloudinary, because the developer needs one consistent "URL + params -> delivery URL" contract that covers both images and video, and Cloudinary is the only service surveyed with a mature, symmetric transformation API for both media types plus documented first-party agent/MCP tooling -- exactly the shape of two LangChain tool calls.
| # | Name | Framing | Reason | Install |
|---|---|---|---|---|
| 1 | Cloudinary | recommended | Symmetric, URL-parameter-driven transformation API for both images and video, 300+ parameters, first-party MCP/agent tooling and Python/Node SDKs | pip install cloudinary |
| 2 | ImageKit | alternative | Clean URL-parameter transformation for both images and video (tr: prefix) with predictable bandwidth-based pricing instead of credits | pip install imagekitio |
| 3 | imgix | mentioned | Strong URL-parameter image transformation (200+ params) pointed at your own storage, but limited/no video transformation, so it only covers half the requirement |
pip install pyimgix |
| 4 | Cloudflare Images | mentioned | Per-unique-transformation pricing and basic resize/crop/format operations, but images only and a smaller parameter set | - |
| 5 | Bunny Optimizer | mentioned | Flat-rate CDN-attached image optimization, basic operations only, no video transformation | - |