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

# Kling Image v2

### Model parameters

* Model IDs: `kling-image-v2` and `kling-image-v2-1`
* Pricing: Check the [model marketplace](https://geekai.co/models?platform=kling\&type=image) for current prices.
* Endpoint: `https://geekai.co/api/v1/images/generations`
* Parameters: [Image generation API](https://docs.geekai.co/en/api/image/generations.md)
* Authentication: [Get an API key](https://docs.geekai.co/en/docs/quick_start.md)

> [!NOTE]
>
> These models do not support the following common image generation parameters:
>
> * `size`
> * `seed`
> * `quality`
> * `style_preset`
> * `response_format`
> * `output_format`
> * `mask`
> * `watermark`
> * `background`
>
> See also the [official Kling Image v2 API reference](https://app.klingai.com/cn/dev/document-api/apiReference/model/imageGeneration).

`kling-image-v2` supports these `aspect_ratio` values: `1:1`, `16:9`, `4:3`, `3:2`, `2:3`, `3:4`, `9:16`, and `21:9`.

To supply a Base64-encoded reference image, pass the encoded string directly in `image`. Do not include a data URL prefix such as `data:image/png;base64,`.

### Text to image

Generate an image from a text description:

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $GEEKAI_API_KEY" \
--data '{
    "model":"kling-image-v2",
    "prompt": "Draw a cute kitten.",
    "negative_prompt": "low quality",
    "aspect_ratio": "4:3",
    "n": 1
}'
```

The JSON response contains the generated image URL:

```json theme={null}
{
    "model": "kling-image-v2",
    "created": 1768456368,
    "task_id": "5b36a98e-e202-43f8-8a28-cecdc83020b8",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2026/01/15/c07071e78203f406b0a607a2120adc11.png"
        }
    ]
}
```

### Image to image

**Single reference image**

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $GEEKAI_API_KEY" \
--data '{
    "model":"kling-image-v2",
    "prompt": "Change the color of the woman's outfit to green.",
    "image": "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimage_1.png",
    "aspect_ratio": "16:9"
}'
```

As above, the JSON response contains the generated image URL:

```json theme={null}
{
    "model": "kling-image-v2",
    "created": 1768987803,
    "task_id": "72580c6b-7733-4fbb-9661-f50c0e25280a",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2026/01/21/d5c09e54706a09cbb6271236e9d95fe1.png"
        }
    ]
}
```

**Multiple reference images**

```bash theme={null}
curl --location --request POST 'https://geekai.co/api/v1/images/generations' \
--header 'Content-Type: application/json' \
--header "Authorization: Bearer $GEEKAI_API_KEY" \
--data '{
    "model":"kling-image-v2",
    "prompt": "Dress the woman in image 2 in the outfit worn by the woman in image 1.",
    "image": [
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_imagesToimage_1.png",
        "https://ark-project.tos-cn-beijing.volces.com/doc_image/seedream4_5_imagesToimage_2.png"
    ],
    "aspect_ratio": "16:9"
}'
```

As above, the JSON response contains the generated image URL:

```json theme={null}
{
    "model": "kling-image-v2",
    "created": 1768892618,
    "task_id": "f48dea70-364a-4d57-8412-85b4c1528c02",
    "task_status": "succeed",
    "data": [
        {
            "url": "https://static.geekai.co/image/2026/01/20/146eb9ad496351cbaf9b7554ac08f06f.png"
        }
    ]
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.