Image Projects

Head Swap

Swap a head onto a body image. Each image costs 10 credits. Output resolution depends on your subscription; you may set max_resolution lower than your plan maximum if desired.

post/v1/head-swap

Request body

namestring

Give your image a custom name for easy identification.

max_resolutioninteger

Constrains the larger dimension (height or width) of the output. Omit to use the maximum allowed for your plan (capped at 2048px). Values above your plan maximum are clamped down to your plan's maximum.

Example request

{
  "name": "My Head Swap image",
  "max_resolution": 1024,
  "assets": {
    "body_file_path": "api-assets/id/1234.png",
    "head_file_path": "api-assets/id/5678.png"
  }
}

Response

Success

idstring required

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

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",
  "credits_charged": 10
}

Changes

Changed in 2 of the 58 revisions of this API.9

    • added the non-success response with the status

      response-non-success-status-added

    • removed the Not Found enum value from the response property for the response status

      response-property-enum-value-removed

    • removed the Unauthorized enum value from the response property for the response status

      response-property-enum-value-removed

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • added the required property to the response with the status

      response-required-property-added

    • endpoint added

      endpoint-added