# Image Border and Rounded Corners: Frame, Shadow, Padding (`kotaro-project/image-border-and-rounded-corners`) Actor

Add a coloured border, rounded corners, a soft drop shadow and padding to images at public URLs, then save as PNG or WebP with a download link. Great for product cards, thumbnails and social posts. Pay per image; failed images are not charged.

- **URL**: https://apify.com/kotaro-project/image-border-and-rounded-corners.md
- **Developed by:** [KOTARO project](https://apify.com/kotaro-project) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 image editeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Image Border and Rounded Corners: Frame, Shadow, Padding

Want product photos, thumbnails or screenshots to look like neat cards? Give this tool the image addresses and get them back framed, with rounded corners and a soft shadow.

### What it does

- Adds a **border** in any colour and thickness
- Makes **rounded corners** (transparent outside the curve)
- Adds a soft **drop shadow** with your own softness, offset and colour
- Adds **padding** on a transparent or coloured background
- Saves as **PNG or WebP**, both keeping transparency

### Input

```json
{
  "imageUrls": ["https://example.com/product.jpg"],
  "borderWidth": 20,
  "borderColor": "#ffffff",
  "cornerRadius": 40,
  "shadow": true,
  "backgroundColor": "transparent"
}
```

### Output

```json
{
  "imageUrl": "https://example.com/product.jpg",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/.../records/framed-1a2b3c.png",
  "width": 1420,
  "height": 993,
  "bytes": 1203456
}
```

### Notes

- Order of work: resize (optional), border, rounded corners, shadow, padding.
- Up to 200 images per run, 50 MB each. Only public addresses are accepted.
- The sample input uses NASA photos taken from the International Space Station (public domain, no people).

### Pricing

Pay per framed image. Failed images are not charged. An empty run returns a free note.

# Actor input Schema

## `imageUrls` (type: `array`):

Public http(s) addresses of image files. Up to 200 per run, 50 MB each.

## `borderWidth` (type: `integer`):

Thickness of the frame around the image. 0 means no border.

## `borderColor` (type: `string`):

For example #ffffff, #1e293b or red.

## `cornerRadius` (type: `integer`):

How round the outer corners are. 0 keeps square corners.

## `shadow` (type: `boolean`):

Add a soft shadow under the framed image.

## `shadowBlur` (type: `integer`):

Larger values make a softer, wider shadow.

## `shadowOffset` (type: `integer`):

How far the shadow moves down and to the right. Negative moves it up and left.

## `shadowColor` (type: `string`):

Use #rrggbbaa for see-through shadows, for example #00000080.

## `padding` (type: `integer`):

Extra space around the frame, filled with the background colour.

## `backgroundColor` (type: `string`):

Colour behind the corners, shadow and padding. transparent keeps it see-through.

## `width` (type: `integer`):

Optional width of the image before the frame is added, keeping the ratio. 0 keeps the size.

## `format` (type: `string`):

Both keep the transparent rounded corners and shadow.

## `quality` (type: `integer`):

Higher keeps more detail and makes bigger WebP files.

## Actor input object example

```json
{
  "imageUrls": [
    "https://images-assets.nasa.gov/image/iss073e0532039/iss073e0532039~medium.jpg"
  ],
  "borderWidth": 20,
  "borderColor": "#ffffff",
  "cornerRadius": 40,
  "shadow": true,
  "shadowBlur": 20,
  "shadowOffset": 10,
  "shadowColor": "#00000080",
  "padding": 0,
  "backgroundColor": "transparent",
  "width": 0,
  "format": "png",
  "quality": 90
}
```

# Actor output Schema

## `results` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://images-assets.nasa.gov/image/iss073e0532039/iss073e0532039~medium.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("kotaro-project/image-border-and-rounded-corners").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": ["https://images-assets.nasa.gov/image/iss073e0532039/iss073e0532039~medium.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("kotaro-project/image-border-and-rounded-corners").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://images-assets.nasa.gov/image/iss073e0532039/iss073e0532039~medium.jpg"
  ]
}' |
apify call kotaro-project/image-border-and-rounded-corners --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,kotaro-project/image-border-and-rounded-corners"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/j3egCA2hqKBv9aw4K/builds/KPA3lk8kcrYCyVnk0/openapi.json
