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

# 内容审核

> 检查文本内容是否违反使用政策



## OpenAPI

````yaml /api.json post /v1/moderations
openapi: 3.0.1
info:
  title: TKHub API
  description: TKHub 平台 API 接口文档
  version: 1.0.0
servers:
  - url: https://api.tkhub.ai
    description: 生产环境
  - url: https://api-test.tkhub.ai
    description: 测试环境
security:
  - bearerAuth: []
paths:
  /v1/moderations:
    post:
      tags:
        - Moderations
      summary: 内容审核
      description: 检查文本内容是否违反使用政策
      operationId: createModeration
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModerationRequest'
        required: true
      responses:
        '200':
          description: 成功审核
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationResponse'
          headers: {}
      deprecated: false
      security:
        - BearerAuth: []
components:
  schemas:
    ModerationRequest:
      type: object
      required:
        - input
      properties:
        input:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
        model:
          type: string
          example: text-moderation-latest
    ModerationResponse:
      type: object
      properties:
        id:
          type: string
        model:
          type: string
        results:
          type: array
          items:
            type: object
            properties:
              flagged:
                type: boolean
              categories:
                type: object
                properties: {}
              category_scores:
                type: object
                properties: {}
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: |
        使用 Bearer Token 认证。
        格式: `Authorization: Bearer sk-xxxxxx`

````