latestOpenAPI 3.0.2raw.githubusercontent.com2026-08-19360490.3 KB

6735d97aa720

Image Projects

Get image details

Check the progress of a image project. The downloads field is populated after a successful render.

Statuses

  • queued — waiting to start
  • rendering — in progress
  • complete — ready; see downloads
  • error — a failure occurred (see error)
  • canceled — user canceled
  • draft — not used
get/v1/image-projects/{id}

Path parameters

idstring required
Example:cuid-example

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

Response

Success

idstring required

Unique ID of the image. Use it with the Get image Project API to fetch status and downloads.

namestring nullable required

The name of the image.

status'draft' | 'queued' | 'rendering' | 'complete' | 'error' | 'canceled' required

The status of the image.

  • draft - the project was created but has not been submitted for rendering
  • queued - the job is waiting for an available server
  • rendering - the job is being processed; the image.started webhook event fires when rendering begins
  • complete - the job finished successfully; fires image.completed
  • error - the job failed during processing; fires image.errored
  • canceled - the job was manually canceled (for example from the Magic Hour web app)

Note: rendering, complete, and error have matching webhook events; canceled does not - a canceled job emits no webhook event, so poll this endpoint to detect cancellation.

image_countinteger required

Number of images generated

typestring required

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

created_atstring date-time required
enabledboolean required

Whether this resource is active. If false, it is deleted.

credits_chargedinteger 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 response

{
  "id": "cuid-example",
  "name": "Example Name",
  "status": "complete",
  "image_count": 1,
  "type": "AI_IMAGE",
  "credits_charged": 5,
  "downloads": [
    {
      "url": "https://videos.magichour.ai/id/output.png",
      "expires_at": "2024-10-19T05:16:19.027Z"
    }
  ],
  "error": {
    "message": "Please use an image with a detectable face",
    "code": "no_source_face"
  }
}