# Manga Colorizer — AI Comic Page Coloring (`muhammadafzal/manga-colorizer`) Actor

Colorize black-and-white manga and comic pages with AI while preserving panels, line art, speech bubbles, text, and composition.

- **URL**: https://apify.com/muhammadafzal/manga-colorizer.md
- **Developed by:** [Muhammad Afzal](https://apify.com/muhammadafzal) (community)
- **Categories:** AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $55.00 / 1,000 lite 1k colorized pages

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Manga Colorizer — AI Comic Page Coloring

Colorize black-and-white manga and comic pages with AI while preserving the original panels, line art, speech bubbles, lettering, expressions, and composition.

Manga Colorizer is designed for creators, translators, publishers, restoration projects, and fans who have the right to process their source images. Give it public PNG, JPEG, or WebP URLs and it saves downloadable colorized files in the run's key-value store. Leave the URL list empty to run a self-contained sample. Every successful page also produces a compact dataset row for automations and AI agents.

> **FREE plan limit:** Apify FREE users can colorize **1 picture per run**. Paid Apify users can colorize up to 10 pictures per run. A FREE user who submits more than one picture receives a clear `REJECTED` result before any image is sent to OpenRouter, so no image-result charge is incurred.

### What it produces

| Field | Description |
|---|---|
| `outputUrl` | Download URL for the generated color page |
| `sourceUrl` | Original public image URL |
| `outputKey` | Image key in the run's key-value store |
| `style` | Applied color direction |
| `model` | Image model used through OpenRouter |
| `resolution` | Requested 1K or 2K tier |
| `sourceWidth`, `sourceHeight` | Decoded source dimensions |
| `outputWidth`, `outputHeight` | Generated image dimensions |
| `providerCostUsd` | Upstream cost when OpenRouter reports it |
| `createdAt` | ISO 8601 creation time |

The dataset contains successful business results only. Download, validation, or provider errors go into the `OUTPUT` summary instead of being mixed into colorized-page rows.

### When to use it

Use this Actor when you need to:

- colorize one manga illustration, or a batch of up to 10 pages on a paid Apify plan;
- test multiple palette directions without manually painting flat colors;
- produce downloadable image assets for an authorized comic workflow;
- connect colorized page results to Make, Zapier, the Apify API, or an AI agent.

Do not use it for private or login-protected source URLs, SVG/GIF/PDF files, more than 10 pages per run, pixel-perfect archival recoloring, or artwork you do not have permission to modify. Generative image models can occasionally alter small visual details despite the preservation prompt; review outputs before publication.

### Input

| Property | Required | Default | Notes |
|---|---:|---|---|
| `imageUrls` | Yes | empty (built-in sample) | FREE plan: 0–1 public URL. Paid plans: 0–10. PNG/JPEG/WebP, at most 10 MB each |
| `style` | Yes | `natural` | `natural`, `vibrant`, `pastel`, `anime`, `cinematic`, or `custom` |
| `customInstructions` | No | empty | Palette or character details; required for `custom` style |
| `model` | Yes | Nano Banana 2 Lite | Lite is lower-cost and supports 1K only |
| `resolution` | Yes | `1K` | `2K` requires the standard Nano Banana 2 model |

Example:

```json
{
  "imageUrls": [
    "https://commons.wikimedia.org/wiki/Special:Redirect/file/Manga_page_publicdomainq.png?width=960"
  ],
  "style": "anime",
  "customInstructions": "Cool moonlit background; keep the main character's scarf crimson.",
  "model": "google/gemini-3.1-flash-lite-image",
  "resolution": "1K"
}
```

Run through the API:

```bash
curl -X POST "https://api.apify.com/v2/acts/muhammadafzal~manga-colorizer/runs?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"imageUrls":["https://example.com/manga-page.png"],"style":"natural","model":"google/gemini-3.1-flash-lite-image","resolution":"1K"}'
```

Do not place real tokens in shared scripts, logs, or public repositories. Use an authorization header or your platform's secret manager in production.

### Output example

```json
{
  "sourceUrl": "https://example.com/manga-page.png",
  "outputKey": "colorized-001.png",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/colorized-001.png",
  "style": "natural",
  "model": "google/gemini-3.1-flash-lite-image",
  "resolution": "1K",
  "sourceWidth": 960,
  "sourceHeight": 1168,
  "outputWidth": 768,
  "outputHeight": 1024,
  "format": "png",
  "providerCostUsd": 0.04,
  "chargeEvent": "colorized-page-lite-1k",
  "eventPriceUsd": 0.055,
  "createdAt": "2026-08-27T12:00:00.000Z"
}
```

### Pricing

This Actor uses pay per event. Apify charges synthetic events automatically; the code does not manually charge either event.

| Event | Price | Trigger |
|---|---:|---|
| Actor start | $0.00005 | Starting a run, up to the memory-based multiplier defined by Apify |
| Lite 1K colorized page | $0.055 | Nano Banana 2 Lite, 1K |
| Standard 1K colorized page | $0.095 | Nano Banana 2, 1K |
| Standard 2K colorized page | $0.14 | Nano Banana 2, 2K |

One Lite 1K page costs approximately **$0.05505** in Actor events at up to 1 GB memory. Five Lite pages cost approximately **$0.27505**. A Standard 2K page costs approximately **$0.14005**. Failed downloads and failed generations do not trigger a page event. Each successful image and dataset row is delivered before its matching custom event is charged.

### Reliability and limits

- FREE Apify users are limited to one picture per run because image generation uses the Actor owner's OpenRouter API key. Paid Apify users may process up to 10 pictures per run.
- The account tier is read from trusted Apify runtime variables. Users do not select or declare their own tier in Actor input.
- Source downloads allow at most three redirects and time out after 30 seconds.
- Local, private, reserved, credential-bearing, and non-standard-port URLs are rejected to reduce server-side request forgery risk.
- Inputs are decoded and validated before they are sent to the image model. The limit is 10 MB and 40 megapixels per source.
- Provider calls use bounded retries for timeouts, rate limits, and temporary 5xx responses.
- Pages are processed sequentially to keep cost, memory, and provider load predictable.
- Valid partial results are preserved. The `OUTPUT` record reports `COMPLETED`, `PARTIAL`, `FAILED`, `REJECTED`, or `BLOCKED`, with actionable warnings.
- The closest supported output aspect ratio is selected. Exact source pixel dimensions are not guaranteed.

The default uses the account-owned OpenRouter integration configured by the Actor owner. Users never need to submit a provider API key.

### Legal and privacy

Only process images you own, that are public domain, or that you are otherwise authorized to modify. You are responsible for copyright, privacy, personality-rights, and platform-policy compliance. Public source images and generated outputs are sent to the configured image provider for processing. Avoid pages containing sensitive personal information. Generated images may include provider provenance or watermarking mechanisms.

For support, open the Actor run and share the run ID plus the redacted `OUTPUT` summary. Never share access tokens or private image URLs.

# Actor input Schema

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

Use this for public PNG, JPEG, or WebP manga page URLs. FREE Apify users may submit 1 picture per run; paid users may submit up to 10. Leave it empty to colorize the built-in sample page. Each remote file may be up to 10 MB; login-protected, private-network, SVG, GIF, and PDF URLs are not supported.

## `style` (type: `string`):

Use this to choose the palette and rendering direction. Natural is balanced, vibrant is saturated, pastel is soft, anime uses modern cel coloring, cinematic uses dramatic grading, and custom follows your custom instructions.

## `customInstructions` (type: `string`):

Use this for optional palette or character guidance, for example “blue night lighting; the hero has red hair.” It is required when Color style is Custom. Do not paste API keys or private information.

## `model` (type: `string`):

Use Nano Banana 2 Lite for the default low-cost 1K workflow. Choose Nano Banana 2 for higher fidelity or 2K output. This is not a text-only model selector.

## `resolution` (type: `string`):

Use 1K for the Lite model and inexpensive tests. Use 2K only with Nano Banana 2 for a larger output; the output aspect ratio follows the source page as closely as the provider supports.

## Actor input object example

```json
{
  "imageUrls": [],
  "style": "natural",
  "customInstructions": "",
  "model": "google/gemini-3.1-flash-lite-image",
  "resolution": "1K"
}
```

# Actor output Schema

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

One structured row per successfully colorized page.

## `images` (type: `string`):

Colorized PNG, JPEG, or WebP files stored by this run.

## `summary` (type: `string`):

Completion status, counts, billing semantics, and warnings.

# 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": [],
    "style": "natural",
    "model": "google/gemini-3.1-flash-lite-image",
    "resolution": "1K"
};

// Run the Actor and wait for it to finish
const run = await client.actor("muhammadafzal/manga-colorizer").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": [],
    "style": "natural",
    "model": "google/gemini-3.1-flash-lite-image",
    "resolution": "1K",
}

# Run the Actor and wait for it to finish
run = client.actor("muhammadafzal/manga-colorizer").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": [],
  "style": "natural",
  "model": "google/gemini-3.1-flash-lite-image",
  "resolution": "1K"
}' |
apify call muhammadafzal/manga-colorizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,muhammadafzal/manga-colorizer"
        }
    }
}

```

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/DBOqJWGZk1WhIDSdR/builds/uZP7oHmv8K5iCiX9M/openapi.json
