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

# İçerik Moderasyonu

> Metin içeriğini analiz ederek içerikteki zararlı ifadeleri tespit eder

## İçerik Moderasyonu API'si

Bu endpoint, metinlerde zararlı içerik olup olmadığını kontrol eder ve ayrıntılı bir analiz sonucu döndürür.

### Kullanım Senaryoları

* Kullanıcı yorumlarının platformunuza uygun olup olmadığını denetlemek
* Forum gönderilerini otomatik olarak moderasyon sürecinden geçirmek
* Eğitim içeriklerinin güvenliğini sağlamak
* Sosyal medya etkileşimlerini analiz etmek

### Sınıflandırma Kategorileri

API yanıtındaki skorlar ve bayraklar, metni aşağıdaki kategorilerde değerlendirir:

| Kategori    | Açıklama                                      |
| ----------- | --------------------------------------------- |
| NEUTRAL     | İçeriğin zararlı olmadığı anlamına gelir      |
| SEXUAL      | Cinsel içerik tespiti                         |
| HATE        | Nefret söylemi tespiti                        |
| SELF\_HARM  | Kendine zarar vermeyle ilgili içerik tespiti  |
| BAD\_HABITS | Zararlı alışkanlıklarla ilgili içerik tespiti |

### Skor Değerlerine Göre Yorumlama

* 0.0 - 0.3: Düşük risk
* 0.3 - 0.7: Orta risk
* 0.7 - 1.0: Yüksek risk

Her bir kategori için 0 ile 1 arasında bir skor değeri döndürülür. İçerik belirli bir eşiği geçtiğinde ilgili bayrak 'true' değerine sahip olur.


## OpenAPI

````yaml POST /moderation
openapi: 3.1.0
info:
  title: Detectivision API
  description: Detectivision içerik moderasyonu API'si
  version: 1.0.0
servers:
  - url: https://dev-api.detectivision.ai/api/v1
security:
  - apiKeyAuth: []
paths:
  /moderation:
    post:
      tags:
        - Moderation
      summary: İçerik Moderasyonu
      description: Metin içeriğini analiz ederek içerikteki zararlı ifadeleri tespit eder
      operationId: moderateContent
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModerationRequest'
      responses:
        '200':
          description: Başarılı analiz sonucu
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationResponse'
        '400':
          description: Hatalı istek
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Yetkilendirme hatası
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ModerationRequest:
      type: object
      required:
        - type
        - input
      properties:
        type:
          type: string
          description: Moderasyon türü
          enum:
            - text_moderation
            - image_moderation
            - video_moderation
            - audio_moderation
            - live_stream_moderation
          example: text_moderation
        input:
          type: string
          description: Analiz edilecek metin içeriği
          example: selam
    ModerationResponse:
      type: object
      properties:
        id:
          type: integer
          description: Moderasyon işleminin ID'si
          example: 25
        jobId:
          type: integer
          description: İşlem ID'si
          example: 122
        result:
          type: object
          properties:
            language:
              type: string
              description: Tespit edilen dil
              example: tr
            scores:
              type: object
              properties:
                NEUTRAL:
                  type: number
                  description: Nötr içerik skoru
                  format: float
                  example: 0.9886459112167358
                SEXUAL:
                  type: number
                  description: Cinsel içerik skoru
                  format: float
                  example: 0.0022032149136066437
                HATE:
                  type: number
                  description: Nefret söylemi skoru
                  format: float
                  example: 0.001250135712325573
                SELF_HARM:
                  type: number
                  description: Kendine zarar verme içeriği skoru
                  format: float
                  example: 0.001079669571481645
                BAD_HABITS:
                  type: number
                  description: Kötü alışkanlıklar içeriği skoru
                  format: float
                  example: 0.00073793507181108
            flags:
              type: object
              properties:
                NEUTRAL:
                  type: boolean
                  description: İçeriğin nötr olup olmadığını belirtir
                  example: true
                SEXUAL:
                  type: boolean
                  description: İçeriğin cinsel içerikli olup olmadığını belirtir
                  example: false
                HATE:
                  type: boolean
                  description: İçeriğin nefret söylemi içerip içermediğini belirtir
                  example: false
                SELF_HARM:
                  type: boolean
                  description: İçerikte kendine zarar verme teması olup olmadığını belirtir
                  example: false
                BAD_HABITS:
                  type: boolean
                  description: >-
                    İçerikte kötü alışkanlıklardan bahsedilip bahsedilmediğini
                    belirtir
                  example: false
        createdAt:
          type: integer
          description: İşlemin oluşturulduğu zaman (Unix timestamp)
          example: 1742201764
        updatedAt:
          type: integer
          description: İşlemin son güncellendiği zaman (Unix timestamp)
          example: 1742201764
    Error:
      type: object
      properties:
        error:
          type: string
          description: Hata kodu
          example: invalid_request
        message:
          type: string
          description: Hata mesajı
          example: Geçersiz istek parametreleri
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: API-Key

````