Introduction
What this endpoint does
It adds color to a single black-and-white, sepia or faded photo and returns a JPEG. Colors are inferred from the picture; there is no prompt or palette.
Inputs that matter
image_url is the only field: the photo as a JPEG, PNG or WebP upload, or a direct link.
What you get back
One JPEG at roughly two to three times the input dimensions.
| Field | Value |
|---|---|
| Input | Image |
| Output | Image |
| Endpoint | Image edit |
| Controls | None beyond the photo |
| Best with | Clean scans; restore damaged prints first |
Key features & highlights
A gray rooftop portrait turned into a sunset scene
From a plain black-and-white photo, the tool painted warm skin, a brown jacket, a blue-to-orange sunset sky and lit windows across the city. None of those colors were in the file; they were inferred from shapes and tones.
From a scratched sepia print to a clean color photo
Left: the damaged scan. Middle: the same scan after Old Photo Restorer. Right: the restored file after Photo Colorizer. Coloring the cleaned picture kept the skin even and the sky smooth.
Colors are inferred from the picture
A black-and-white photo carries no color information, so every hue is the model's best reading of the scene. Treat the result as a natural-looking interpretation and keep the original next to it.
Request parameters
| Parameter | Required | Description |
|---|---|---|
image_url | Yes | The black-and-white, sepia or faded photo to colorize: a JPEG, PNG or WebP upload, or a direct link. The result is a JPEG about two to three times larger. at least 1 characters |
Pricing
$0.06 / image
Billed at a flat price per colorized photo; the larger output does not cost extra. Failed requests are not charged.
Use cases
Bringing family history to life
Give relatives a color version of a parent's or grandparent's portrait to sit next to the original in an album or on a memorial page.
History and documentary content
Colorize archive stills for a video essay, a museum caption or a social post, and keep the original alongside for comparison.
Restoration workflows
Chain it after Old Photo Restorer: repair first, colorize second, then upscale if you need a print.
Prompt guide & pro tips
Start from a clean scan
Colorizing works best on a picture without scratches or dust. If the print is damaged, run Old Photo Restorer (/models/photo-restorer-v1) first and color its output.
Send
image_urlUpload the black-and-white or sepia photo as JPEG, PNG or WebP, or link to the file directly.
Review the colors that were guessed
Hair, eye and clothing colors are inferred, not recovered. If you know the real ones, treat the result as a starting point for a manual touch-up.
Introduction
Photo Colorizer adds natural color to black-and-white, sepia and faded photos. The only input is image_url; the colors of skin, hair, clothing, sky and buildings are inferred from the shapes and tones in the picture.
Request
{
"image_url": "https://example.com/grandparents-1958.jpg"
}
What we saw in testing
A 768×1152 black-and-white portrait of a man on a rooftop came back after about 17 seconds as a 1664×2496 JPEG: warm skin, a brown jacket, a white T-shirt and an orange sunset behind a blue city skyline. A 1024×576 photo of two people at a bar came back at 2848×1600 with green and red wine bottles and a cream sweater. The woman's hair came out brown, while the color photo we had converted had red hair, which is the kind of guess to check.
We also colored a scratched sepia scan after running it through Old Photo Restorer. The restored-then-colored portrait had even skin and a clean sky.
Task flow
The call is asynchronous: create the task, poll until it finishes, then download the JPEG from SpicyAPI storage. Each request is one photo at a flat price, and a failed request is free.
Tips
- Repair scratches and dust first with Old Photo Restorer (
/models/photo-restorer-v1); damage confuses the coloring. - If you know a color for certain (a uniform, a car, a dress), fix it by hand afterwards.
- Keep the black-and-white original and label the colored copy when you publish historical images.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "spicyapi/photo-colorizer-v1/edit",
"input": {
"image_url": "https://example.com/reference.png"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.




