> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# hunyuan-image-to-image

> API usage guide for hunyuan-image-to-image.

{/* source_model_id: hunyuan-image-to-image */}

{/* source_updated_at: 1780650570 */}

**Model ID**

```bash theme={null}
hunyuan-image-to-image
```

**Calling method:** sync

# Tencent Hunyuan Image-to-Image API Documentation

## Overview

Tencent Cloud's Hunyuan AI Art Image-to-Image model allows users to edit, restyle, or transform an existing image based on textual prompts. It supports detailed positive and negative text guidance to ensure the generated output aligns with user intentions.

## Authentication

All API requests require authentication using your API key. Include it in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Submit Image-to-Image Request

### Base URL

```
https://console.gmicloud.ai
```

### Endpoint

```
POST /api/v1/ie/requestqueue/apikey/requests
```

### Request Format

```bash theme={null}
curl -X POST "https://console.gmicloud.ai/api/v1/ie/requestqueue/apikey/requests" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "hunyuan-image-to-image",
    "payload": {
      "image": "https://example.com/source_image.jpg",
      "prompt": "Turn the landscape into a snowy winter scene, highly detailed.",
      "negative_prompt": "people, animals, blurry, distorted"
    }
  }'
```

### Request Parameters

| Parameter         | Type   | Required | Description                              | Default |
| ----------------- | ------ | -------- | ---------------------------------------- | ------- |
| `image`           | string | Yes      | Input image to be edited.                | null    |
| `prompt`          | string | No       | Text description or editing instruction. | ""      |
| `negative_prompt` | string | No       | What to avoid in the generated image.    | ""      |

### Response

```json theme={null}
{
  "request_id": "8fbb88gd-cd78-5132-0g2c-07c4ge944225",
  "model": "hunyuan-image-to-image",
  "status": "queued",
  "created_at": 1772184500
}
```

## Check Request Status

### Endpoint

```
GET /api/v1/ie/requestqueue/apikey/requests/{request_id}
```

### Response

```json theme={null}
{
  "request_id": "8fbb88gd-cd78-5132-0g2c-07c4ge944225",
  "model": "hunyuan-image-to-image",
  "status": "success",
  "outcome": {
    "media_urls": [
      {
        "id": "0",
        "url": "https://storage.googleapis.com/gmi-generated-assets/.../hunyuan_output_0.jpg"
      }
    ]
  }
}
```

## Request Status Values

| Status       | Description                                |
| ------------ | ------------------------------------------ |
| `queued`     | Request is waiting in the queue            |
| `processing` | Image is currently being generated         |
| `success`    | Image generation completed                 |
| `failed`     | Generation failed (check logs for details) |
| `cancelled`  | Request was manually cancelled             |

## Pricing

* **Pricing Type**: Per generation
* **Price**: \$0.08 per generation
