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

# Kling Recognize

> Use DeerAPI to call the Kling Recognize endpoint with request details, response details, examples, and an OpenAPI playground.

## Overview

Use this endpoint to call the Kling Recognize workflow through DeerAPI. The API reference on this page shows the request schema, response schema, authentication requirements, and runnable examples for the configured endpoint.

## Before you start

Use the DeerAPI base URL and pass your API Key in the `Authorization` header:

```text theme={null}
https://api.deerapi.com
```

```text theme={null}
Authorization: Bearer $DEERAPI_KEY
```

## Model selection

Choose a current model ID from the [live pricing page](https://api.deerapi.com/pricing). Model availability changes over time, so avoid copying a model ID from an old project without checking the live list first.

## Implementation notes

* Use the OpenAPI playground for the exact request fields accepted by this endpoint.
* Keep API Keys on the server side when you build production applications.
* Log the request ID from failed calls so support can investigate the request.
* Retry `429`, `500`, and `503` responses with exponential backoff.


## OpenAPI

````yaml /api/openapi/image/kling/post-image-recognition.openapi.json POST /kling/v1/videos/image-recognize
openapi: 3.1.0
info:
  title: Image Recognize API
  version: 1.0.0
  description: >-
    Run Kling image-recognition checks and receive recognition flags
    synchronously.
servers:
  - url: https://api.deerapi.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/image-recognize:
    post:
      summary: Run Kling image recognition
      description: >-
        Submit one image and receive recognition flags such as head, face,
        cloth, or object segmentation presence.
      operationId: image_recognize
      parameters:
        - name: Content-Type
          in: header
          required: false
          description: Optional content type header.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - image
              properties:
                image:
                  type: string
                  description: >-
                    Image to analyze. Accepts an image URL or raw Base64 string
                    (no `data:` prefix). Supported formats: JPG, JPEG, PNG. Max
                    10 MB, minimum 300 px per side, aspect ratio between 1:2.5
                    and 2.5:1.
                  default: https://example.com/reference-image.jpg
              default:
                image: https://example.com/reference-image.jpg
            examples:
              Example 1:
                summary: Example 1
                value:
                  image: https://example.com/reference-image.jpg
            example:
              image: https://example.com/reference-image.jpg
      responses:
        '200':
          description: Recognition result.
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                  message:
                    type: string
                  request_id:
                    type: string
                  data:
                    type: object
                    required:
                      - task_result
                    properties:
                      task_result:
                        type: object
                        required:
                          - images
                        properties:
                          images:
                            type: array
                            items:
                              type: object
                              properties:
                                type:
                                  type: string
                                is_contain:
                                  type: boolean
                example:
                  code: 0
                  message: SUCCEED
                  data:
                    task_result:
                      images:
                        - type: head_seg
                          is_contain: true
                        - type: face_seg
                          is_contain: true
                        - type: cloth_seg
                          is_contain: true
                        - type: object_seg
                          is_contain: true
      x-codeSamples:
        - lang: Shell
          label: cURL
          source: |
            curl https://api.deerapi.com/kling/v1/videos/image-recognize \
              -H "Content-Type: application/json" \
              -H "Authorization: Bearer $DEERAPI_KEY" \
              -d '{
                "image": "https://example.com/reference-image.jpg"
              }'
        - lang: Python
          label: requests
          source: |
            import os
            import requests

            url = "https://api.deerapi.com/kling/v1/videos/image-recognize"
            headers = {
                "Authorization": "Bearer " + os.environ["DEERAPI_KEY"],
                "Content-Type": "application/json",
            }
            payload = {
              "image": "https://example.com/reference-image.jpg"
            }

            response = requests.post(url, headers=headers, json=payload)
            print(response.json())
        - lang: JavaScript
          label: fetch
          source: >
            const response = await
            fetch("https://api.deerapi.com/kling/v1/videos/image-recognize", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.DEERAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "image": "https://example.com/reference-image.jpg"
              }),
            });


            console.log(await response.json());
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Use a DeerAPI API Key as a Bearer token.

````