ForHosting KIT · Images

Black-and-white an image

Turn any photo or scan black and white with a conversion that gives green more weight than red and blue, as the eye does, so skin tones, skies and shadows keep their contrast instead of turning muddy. You are billed only on success.

Coming soonPer request + per image$0.002

This task is not available right now, so it cannot be purchased. Nothing is charged for it.

How it works & API
Use it from Web API onlyAPIEmailTelegramApp soon

Converting an image to grayscale sounds trivial until you need to do it consistently across thousands of files with different color profiles and bit depths.

Why grayscale is still a working format

Grayscale as a deliberate output is older than color photography and stayed the default for newsprint and legal scanning long after color became affordable, because it compresses smaller and reproduces more reliably on cheap hardware. That is why print shops still ask for it, legal and medical document workflows still require it, and online shops use it to preview product variants. Doing it once is easy; doing it the same way across thousands of files with different color profiles is the part that needs a dependable tool.

A conversion weighted the way the eye sees

A flat average of red, green and blue makes pictures look muddy. This conversion is weighted by luminance instead: green gets more visual weight than blue and red, the way the human eye perceives brightness, so contrast and detail survive in skin tones, skies and shadows. Typical uses include turning color scans into grayscale before archiving, showing an out-of-stock product in gray without a new photo shoot, and making placeholder images for disabled or loading states. If a job fails, it is retried three times automatically and you are only billed on success.

Why grayscale still matters

Print shops still ask for it, legal and medical document pipelines still require it, e-commerce catalogs use it to preview product variants, and plenty of design systems fall back to it for placeholder or disabled states. Anyone shipping a document pipeline, a print workflow, or a photo archive eventually needs a dependable way to strip color without babysitting the job by hand.

A short note on the format's history

Grayscale as a deliberate output format predates color photography by decades and remained the default for newsprint and legal scanning long after color became affordable, simply because it compresses smaller and reproduces more reliably on cheap hardware. That legacy is exactly why grayscale conversion is still a first-class need in modern document and print automation rather than a stylistic afterthought.

Print-ready document pipelines

Legal and government document scanners convert incoming color scans to grayscale automatically before archiving, cutting file size while meeting print and compliance requirements.

Product photo previews

E-commerce platforms generate a grayscale preview of each product photo to signal out-of-stock or discontinued variants without re-shooting anything.

Design system placeholders

UI teams batch-convert marketing imagery into grayscale placeholders for disabled or loading states so the visual language stays consistent across the product.

Photo archive normalization

Digital archives standardize scanned historical photographs to grayscale for consistent display alongside originals that were never in color.

Do I get charged if the conversion fails?

No. A failed task is never charged. The system retries automatically up to three times before returning a clear error, at no cost to you.

Can I process images in bulk?

Yes, submit one call per image and they run independently and asynchronously, so you can fan out large batches without waiting on any single job.

How long do I have to download the result?

The signed result link stays valid for 24 hours; after that, and after our standard retention window, the file is deleted and never used for training.

Why does this look better than simply removing saturation?

Because the conversion is weighted by luminance: green counts for more than blue and red, the way the eye perceives brightness. A flat average looks muddy, while this keeps contrast and detail in skin tones, skies and shadows.

Does a grayscale image take up less space?

Grayscale generally compresses smaller, which is one reason legal and government scanners convert color scans before archiving. The files shrink while still meeting print requirements.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/image/grayscale

One authenticated POST creates the task; the result comes back by webhook or a signed link. This capability is currently available through the API, not as an interactive Web tool.

curl -X POST https://api.kit.forhosting.com/image/grayscale \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://ejemplo.com/imagen.jpg"}'
{
  "image": "https://ejemplo.com/imagen.jpg"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "image.grayscale",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per image$0.005

Published price — no tokens, no invented credits. A failed task is never charged.

max_mb15
max_megapixels12
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This endpoint takes any supported image and returns a clean black-and-white version, luminance-weighted rather than a flat average, so the result actually looks right instead of muddy.

How the conversion actually works

The endpoint reads the source pixels and applies a luminance-weighted conversion, giving green more visual weight than blue and red the way the human eye perceives brightness. That single choice is why naive grayscale filters look flat while this one preserves contrast and detail in skin tones, skies and shadows alike.

What to send and what comes back

Send the image by URL or upload, call POST /image/grayscale, and you get a task_id immediately since every job runs asynchronously. When the conversion finishes you receive the file through a signed webhook, which we recommend for pipelines, or through a signed link that stays valid for 24 hours if you'd rather poll or hand it to a person.

Fitting it into a pipeline

Because every call is billed only on success, three retries happen automatically before you ever see a failed, charged request, which means you can wire this into a batch job or a document ingestion pipeline without writing your own retry logic. There is no free tier and no trial queue slowing anyone down; prepaid balance mean your job starts immediately, and a 402 response tells you plainly if it doesn't, instead of silently queuing. That predictability is what makes the endpoint safe to schedule as a recurring step rather than a manual chore someone has to remember.

What does the grayscale image API actually do?

It takes any supported image and returns a luminance-weighted black-and-white version through the POST /image/grayscale endpoint, delivered async via webhook or a 24-hour signed link.

Is there a free tier for the grayscale image API?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How much does it cost to convert an image to grayscale?

Each call is $0.002 per request plus $0.005 per image processed, billed only when the conversion succeeds.

Which image formats are supported?

The endpoint accepts the standard raster formats used across our image tools; check the current endpoint reference for the exact list before sending unusual color profiles.

How is grayscale different from a flat black-and-white average?

This endpoint uses luminance weighting, which reflects how the human eye perceives brightness, so contrast and detail hold up far better than a simple RGB average.

Read the full KIT documentation →