GET
/
v1
/
image-projects
/
{id}
Python
from magic_hour import Client
from os import getenv

client = Client(token=getenv("API_TOKEN"))
res = client.v1.image_projects.get(id="cuid-example")
{
  "id": "cuid-example",
  "name": "Example Name",
  "status": "complete",
  "image_count": 1,
  "type": "AI_IMAGE",
  "created_at": "2023-11-07T05:31:56Z",
  "enabled": true,
  "total_frame_cost": 5,
  "credits_charged": 5,
  "downloads": [
    {
      "url": "https://videos.magichour.ai/id/output.png",
      "expires_at": "2024-10-19T05:16:19.027Z"
    }
  ],
  "error": null
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".

Path Parameters

id
string
required

Unique ID of the image project. This value is returned by all of the POST APIs that create an image.

Example:

"cuid-example"

Response

Success

id
string
required

Unique ID of the image. This value can be used in the get image project API to fetch additional details such as status

Example:

"cuid-example"

name
string | null
required

The name of the image.

Example:

"Example Name"

status
enum<string>
required

The status of the image.

Available options:
draft,
queued,
rendering,
complete,
error,
canceled
Example:

"complete"

image_count
integer
required

Number of images generated

Example:

1

type
string
required

The type of the image project. Possible values are AI_HEADSHOT, AI_IMAGE, IMAGE_UPSCALER, FACE_SWAP, PHOTO_EDITOR, QR_CODE, BACKGROUND_REMOVER, CLOTHES_CHANGER, AI_MEME, FACE_EDITOR, PHOTO_COLORIZER, AI_GIF, AI_SELFIE, AI_IMAGE_EDITOR

Example:

"AI_IMAGE"

created_at
string<date-time>
required
enabled
boolean
required

Indicates whether the resource is deleted

total_frame_cost
integer
required
deprecated

Deprecated: Previously represented the number of frames (original name of our credit system) used for image generation. Use 'credits_charged' instead.

Example:

5

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.

Example:

5

downloads
object[]
required
error
object | null
required

In the case of an error, this object will contain the error encountered during video render

Example:

null