TinyPNG connects to a Nagent workspace with an API key. Once it is connected, agents can call 5 TinyPNG actions, such as "Get TinyPNG Compression Count", "Shrink and get image ID" and "Compress and Store Image in Azure". Nothing is enabled on connect: each action is allowed one at a time, and an action with side effects runs or waits for a person according to the agent's level.
Every operation an agent can call against TinyPNG, with input parameters and output schema.
TINYPNG_GET_COMPRESSION_COUNTTool to retrieve the number of compressions made this month. Use when you need to monitor your TinyPNG API usage.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TINYPNG_SHRINK_AND_GET_IMAGE_IDTool to shrink an image and return its TinyPNG image ID. Use when you need only the compressed image identifier from the API response Location header.
Input parameters
Publicly accessible URL of the image to compress.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TINYPNG_TINIFY_COMPRESS_AND_STORE_IN_AZURECompress an image using the Tinify API and upload the optimized result directly to Azure Blob Storage in a single operation. The image is first compressed by Tinify, then uploaded to the specified Azure Blob URL using the provided SAS token. Use this when you need to optimize images and store them in Azure without intermediate steps. Supports JPEG, PNG, and WebP image formats.
Input parameters
Publicly accessible URL of the source image to compress. Supports JPEG, PNG, and WebP formats.
Full Azure Blob Storage URL with a valid SAS (Shared Access Signature) token that has write permissions. The URL should include the target container, blob path, and SAS query parameters (sv, se, sr, sp, sig). Required SAS permissions: Write (w) and Create (c).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TINYPNG_TINIFY_OUTPUTTool to retrieve a compressed image by its image ID. Use after compressing an image to download the result.
Input parameters
Identifier for the uploaded and compressed image (returned by the TinyPNG shrink API).
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
TINYPNG_TRANSFORM_IMAGETool to transform a compressed image by resizing, converting format, preserving metadata, or storing to cloud storage. Use when you have an image ID from a previous compression and need to apply transformations.
Input parameters
The unique identifier for the compressed image output, obtained from the Location header of the compress response.
Cloud storage options to save image directly to S3 or GCS. Each upload counts as additional compression.
Options for resizing the image.
Options for converting the image format.
Metadata to preserve: 'copyright', 'creation', 'location' (JPEG only). Does not count as additional compression.
Transformation options for stylistic changes.
Output
Data from the action execution
Error if any occurred during the execution of the action
Whether or not the action execution was successful or not
Agents can call 5 TinyPNG actions on Nagent, including "Get TinyPNG Compression Count", "Shrink and get image ID" and "Compress and Store Image in Azure". Get TinyPNG Compression Count: Retrieve the number of compressions made this month. Each action is listed on this page with its input parameters and its output.
TinyPNG connects with an API key, under your workspace's own connection. Nothing is enabled on connect: each action is allowed one at a time and can be scoped to the agents that need it.
It returns data, error and successful.