change.photos ACTION
Transform Image
Transforms an image with various effects and optimizations. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's change.photos account once, then configure and run Transform Image from your backend or agent.
import { PipedreamClient } from "@pipedream/sdk"
const pd = new PipedreamClient({
projectId: process.env.PIPEDREAM_PROJECT_ID!,
clientId: process.env.PIPEDREAM_CLIENT_ID!,
clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
projectEnvironment: "production",
})
const result = await pd.actions.run({
id: "change_photos-transform-image",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
change_photos: { authProvisionId: "apn_xxxxxxx" },
imageUrl: "Image URL",
width: 10,
},
})
console.log(result)curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
-H "Content-Type: application/json" \
-H "X-PD-Environment: production" \
-H "Authorization: Bearer {access_token}" \
-d '{
"external_user_id": "{external_user_id}",
"id": "change_photos-transform-image",
"configured_props": {
"change_photos": { "authProvisionId": "apn_xxxxxxx" },
"imageUrl": "Image URL",
"width": 10
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{project_id}",
"x-pd-environment": "production",
"x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
"x-pd-app-slug": "change_photos",
},
},
},
)
const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)
const { tools } = await mcp.listTools()
// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
name: "change_photos-transform-image",
arguments: {
imageUrl: "Image URL",
width: 10,
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
imageUrl Image URL | string | URL of the image to transform Required |
width Width | integer | Desired width in pixels of the output image Optional |
height Height | integer | Desired height in pixels of the output image Optional |
format Format | string | Output image format. Default: jpeg Optional |
quality Quality | integer | Output image quality. Must be between 1 and 100. Default: 80 Optional |
fit Fit | string | How the image should fit within the dimensions. Default: contain Optional |
flip Flip | boolean | Flip the image vertically Optional |
flop Flop | boolean | Flip the image horizontally Optional |
rotate Rotate | integer | Rotation angle in degrees. Must be between -360 and 360. Default: 0 Optional |
grayscale Grayscale | boolean | Convert image to grayscale Optional |
blur Blur | string | Gaussian blur sigma value. Must be between 0.3 and 1000. Optional |
sharpen Sharpen | boolean | Apply sharpening effect Optional |
compress Compress | boolean | Apply additional compression Optional |
tintRedComponent Tint - Red Component | string | Red Component of the RGB tint to apply to the image. Must be between 0 and 255. Optional |
tintGreenComponent Tint - Green Component | string | Green Component of the RGB tint to apply to the image. Must be between 0 and 255. Optional |
tintBlueComponent Tint - Blue Component | string | Blue Component of the RGB tint to apply to the image. Must be between 0 and 255. Optional |
REFERENCE
Tool details
Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.
- Registry key
- change_photos-transform-image
- Version
- 0.0.3
- App
- change.photos
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗