# Colorize black-and-white photos with DeepAI's colorizer API

DeepAI's image colorizer adds color to a black-and-white photo and returns a link to the colorized version. Each photo costs $0.01. Send `POST https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/api/colorizer` with `{"image": "<photo URL>"}`, pay the 402 price quote over x402 or MPP, and retry the same request.

## At a glance

- **Endpoint:** `POST https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/api/colorizer`, one photo per request
- **Body:** JSON `{"image": "<URL of the photo>"}`, or `multipart/form-data` with the file in `image`
- **Price:** $0.01
- **Payment:** each request answers with a 402 price quote, paid from a wallet over x402 or MPP. No account or API key is needed.
- **Card:** card pays a pay-as-you-go call only when that call costs $0.50 or more. To pay by card, buy Credits from $0.50.
- **Response:** JSON with `id` (the job identifier) and `output_url` (a link to the colorized image)
- **Full purchase flow:** [the buyer skill](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/SKILL.md)

## Colorize one photo

1. Send the photo's URL. The example uses a public-domain NASA photo:

   ```bash
   curl -sS -X POST https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/api/colorizer \
     -H 'Content-Type: application/json' \
     -d '{"image": "https://images-assets.nasa.gov/image/LRC-1958-B701_P-03376/LRC-1958-B701_P-03376~medium.jpg"}'
   ```

   The storefront answers with a 402 price quote, with the exact amount in `payment.amountUsd`.

2. Pay the quote with your x402 or MPP client and retry the identical request with the payment proof attached. [The buyer skill](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/SKILL.md) covers the steps for each rail.

3. Read the response:

   ```json
   {"id": "<job id>", "output_url": "<link to the colorized image>"}
   ```

   The example request paid $0.01 for one photo and returned a JSON object with `id` and `output_url`.

4. Fetch `output_url` and save the file next to the original scan, so the color version stays paired with its source.

To send a local file instead of a URL, use a multipart upload:

```bash
curl -sS -X POST https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/api/colorizer -F image=@scan-001.jpg
```

## Colorize an archive of scans

Each request takes one `image`, so a set of scans is one request per photo, and each request gets its own 402 quote and payment. You cannot reuse a payment for a different photo.

For each scan, store the source file name with the returned `id` and `output_url`. This record lets you check which photos are done before you resend anything.

| Archive size | Cost |
| --- | --- |
| 1 photo | $0.01 |
| 100 photos | $1 |
| 1,000 photos | $10 |

For a large run, you can buy prepaid Credits instead of paying each 402, and calls then draw down that balance. Buying Credits needs an agent credential from [auth.md](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/auth.md); [the buyer skill](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/SKILL.md) has the steps.

## Limits

- The request takes one field, `image`.
- Each request colorizes one photo.
- A paid response carries a `zc-billing` header with `chargedUsd`, what the request was charged.
- If a request times out after you pay, check whether that photo was delivered before you pay again. A settled payment cannot be spent a second time.

## Errors

| Response | Meaning | Action |
| --- | --- | --- |
| `402` with a `payment` block | The price quote for this photo | Pay it and retry the same request, or stop |
| `400 invalid_request` | The request body is malformed | Fix the JSON, which needs `image` |
| `settlement_failed` | The payment did not settle. `settlementReason` says why, for example `insufficient_funds`. | Fix the wallet, then send a fresh request for a new quote |
| `409 payment_request_mismatch` | A payment was reused for a different request | Request a new 402 for each photo |
| `payment_consumed` | That payment was already settled | Check the photo's delivery before paying again |
| `usage_exhausted` | The Credits balance is used up | Top up with `POST https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/extend` and `{"amountUsd": "..."}` |

Once a paid call reaches DeepAI's API, the storefront passes back DeepAI's own status code and body, including its errors.

## Frequently asked questions

### Can DeepAI colorize a batch of photos in one API call?

No. Each request colorizes one photo, so an archive of scans is a series of requests. Each request is quoted and paid on its own.

### How much does it cost to colorize old photos with DeepAI?

Each photo costs $0.01, so an archive costs the number of photos times that price. The 402 states the exact amount before you pay.

### Does the DeepAI colorizer API need an API key?

No. Pay-as-you-go calls are paid per request over x402 or MPP, with no account or key. You need an agent identity only to buy Credits.

### Can I pay for photo colorization by card?

Card pays a single pay-as-you-go call only when that call costs $0.50 or more. For smaller per-photo calls, buy Credits by card from $0.50 and let each call draw down the balance.

### Can I upload an image file instead of sending a URL?

Yes. Send the file as `multipart/form-data` in the `image` field to the same endpoint. The price per photo is the same.

## Keep reading

- [Buyer skill](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/SKILL.md): the full purchase flow
- [How to pay](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/payment.md): x402, MPP, card and Credits
- [Image colorizer service](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/services/image-colorizer): prices by plan
- [Colorizer API reference](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/services/image-colorizer/openapi.json): the exact request and response schema
- [Error reference](https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/errors.md): every error code and what to do

---

Updated 2026-10-16. All DeepAI guides: https://deepai.pay.zeroclick.io/guides.md. Storefront: https://deepai.pay.zeroclick.io/zcj/4zq0jk6ggdei/llms.txt.
