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

# 检测人像图片

> 检查上传图片中是否包含人像。



## OpenAPI

````yaml /openapi.old.zh.json post /api/checkHumanImage
openapi: 3.0.3
info:
  title: Neural4D 管理接口
  description: Neural4D 管理接口规范，中文界面下使用本规范展示中文接口说明。
  version: 1.5.4
servers:
  - url: https://alb.neural4d.com:3000
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: text-to-3d
    description: 用于通过文本生成 3D 模型的接口。
    x-group: 文本生成 3D
  - name: image-to-3d
    description: 用于通过图片生成 3D 模型的接口。
    x-group: 图片生成 3D
  - name: model-management
    description: 用于查询模型、跟踪任务和转换格式的接口。
    x-group: 模型管理
  - name: media-generation
    description: 用于生成图片、视频以及查询结果的接口。
    x-group: 图片与视频生成
  - name: account-and-validation
    description: 用于校验输入图片和查询点数余额的接口。
    x-group: 账户与校验
paths:
  /api/checkHumanImage:
    post:
      tags:
        - account-and-validation
      summary: 检测人像图片
      description: 检查上传图片中是否包含人像。
      operationId: checkHumanImage
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/CheckHumanImageRequest'
            examples:
              default:
                value:
                  image: (binary)
      responses:
        '200':
          description: 检测结果
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CheckHumanImageResponse'
              examples:
                portraitDetected:
                  value:
                    statusCode: 0
                    result: true
                    message: success
                rateLimited:
                  value:
                    statusCode: -1
                    result: false
                    message: >-
                      Rate limit reached for image style detection, returning
                      false
components:
  schemas:
    CheckHumanImageRequest:
      type: object
      required:
        - image
      properties:
        image:
          type: string
          format: binary
          description: 用于检测的人像图片。支持 JPG、JPEG 和 PNG。
    CheckHumanImageResponse:
      type: object
      required:
        - statusCode
        - result
        - message
      properties:
        statusCode:
          type: integer
          enum:
            - -1
            - 0
          description: 检测状态。`0` 表示结果有效，`-1` 表示结果无效。
        result:
          type: boolean
          description: 上传图片中是否检测到人像。
        message:
          type: string
          description: 可读的人像检测结果说明。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 使用 Neural4D 网站提供的 Bearer token。
      x-default: YOUR_TOKEN

````