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/fi7il1lnuln1/api/colorizer with {"image": "<photo URL>"} and a free agent credential from auth.md, 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/fi7il1lnuln1/api/colorizer, one photo per request - Body: JSON
{"image": "<URL of the photo>"}, ormultipart/form-datawith the file inimage - Price: $0.01
- Credential: an agent credential on every call, paid retries included, sent as
Authorization: Bearer <token>, or asZC-Agent-Authorization: Bearer <token>beside an MPP payment. Registering one at auth.md is free and can be anonymous, and its steps leave the access token inACCESS_TOKEN, as the examples below use. - Payment: each request answers with a 402 price quote, paid from a wallet over x402 or MPP.
- 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) andoutput_url(a link to the colorized image) - Full purchase flow: the buyer skill
Colorize one photo
Send the photo's URL. The example uses a public-domain NASA photo:
curl -sS -X POST https://deepai.pay.zeroclick.io/zcj/fi7il1lnuln1/api/colorizer \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -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.Pay the quote with your x402 or MPP client and retry the identical request with the payment proof attached and the same bearer. The buyer skill covers the steps for each rail.
Read the response:
{"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
idandoutput_url.Fetch
output_urland 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:
curl -sS -X POST https://deepai.pay.zeroclick.io/zcj/fi7il1lnuln1/api/colorizer -H "Authorization: Bearer $ACCESS_TOKEN" -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 uses the same credential; the buyer skill has the steps.
Limits
- The request takes one field,
image. - Each request colorizes one photo.
- A paid response carries a
zc-billingheader withchargedUsd, 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/fi7il1lnuln1/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 DeepAI account or API key, but every call carries a free agent credential from auth.md, registered once and anonymously if you like. Pay-as-you-go calls are then paid per request over x402 or MPP.
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: the full purchase flow
- How to pay: x402, MPP, card and Credits
- Image colorizer service: prices by plan
- Colorizer API reference: the exact request and response schema
- Error reference: every error code and what to do