---
title: "Photo Colorizer"
method: POST
path: "/v1/photo-colorizer"
tags: ["Image Projects"]
---

# Photo Colorizer

`POST /v1/photo-colorizer`

## Request

- Base URL: `https://api.magichour.ai`
- URL: `https://api.magichour.ai/v1/photo-colorizer`
- Auth: HTTP bearer

Colorize image. Each image costs 10 credits.

## Request body

- object
  - `name` string: Give your image a custom name for easy identification.
  - `assets` object, required: Provide the assets for photo colorization
    - `image_file_path` string, required: The image used to generate the colorized image. This value is either - a direct URL to the file. The URL path must end in a supported file extension. - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.

## Response `200`

Success

- object: Success
  - `id` string, required: Unique ID of the image. Use it with the [Get image Project API](https://docs.magichour.ai/api-reference/image-projects/get-image-details) to fetch status and downloads.
  - `credits_charged` integer, required: The amount of credits deducted from your account to generate the image. We charge credits right when the request is made. If an error occurred while generating the image(s), credits will be refunded and this field will be updated to include the refund.

## Other responses

- `400`: Invalid Request
- `401`: Unauthorized
- `402`: Payment Required
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

## Changes

- **2026-09-02** `9aeb9397c62a`: 8 info
  - added the non-success response with the status `500`
  - removed the `Not Found` enum value from the `message` response property for the response status `404`
  - removed the `Unauthorized` enum value from the `message` response property for the response status `401`
  - added the required property `code` to the response with the `400` status
  - …4 more
- **2026-03-06** `1f72d520ddc6`: 1 info
  - added the non-success response with the status `402`
- **2026-01-24** `a342af4ecbcf`: 1 breaking
  - removed the required property `frame_cost` from the response with the `200` status

[Operation history](https://skmtc.dev/magichourhq/apis/magic-hour-api/changes/v1/photo-colorizer/post.md)

---

[API](https://skmtc.dev/magichourhq/apis/magic-hour-api.md) - [All operations](https://skmtc.dev/magichourhq/apis/magic-hour-api/llms.txt) - [OpenAPI document](https://skmtc.dev/magichourhq/apis/magic-hour-api/revisions/2ee5927306a9?raw)
