> ## 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.

# Görüntü Moderasyonu

> Görüntü içeriğini analiz ederek zararlı/uygunsuz içerikleri tespit eder

## Görüntü Moderasyonu API'si

Bu endpoint, görüntü içeriğinin moderasyon analizini yapar. URL olarak verilen bir görüntüyü analiz ederek uygunsuz içerikler tespit eder.

### Kullanım Senaryoları

* Kullanıcı tarafından yüklenen görsellerin güvenliğini kontrol etme
* Profil fotoğraflarının politika uyumluluğunu denetleme
* Web sitesi içeriklerindeki görsellerin uygunsuzluk kontrolü
* E-ticaret görsellerinin sınıflandırılması

### Özellikler

* Tek bir API çağrısıyla birden fazla kategori analizi
* Silah, cinsel içerik, sigara ve diğer uygunsuz içeriklerin tespiti
* Belirli modellere özgü sınıflandırma seçeneği

### Analiz Modelleri

Görüntü moderasyonu API'si şu modelleri destekler:

| Model     | Açıklama                                                |
| --------- | ------------------------------------------------------- |
| guns      | Silah, tabanca, tüfek gibi ateşli silahları tespit eder |
| sexual    | Açık cinsel içeriği tespit eder                         |
| genitalia | Müstehcen içerikleri tespit eder                        |
| smoke     | Sigara, duman gibi içerikleri tespit eder               |

### Örnek Kullanım

Tüm modeller için analiz:

```json theme={null}
{
  "url": "https://örnek-görsel-url.jpg"
}
```

Belirli modeller için analiz:

```json theme={null}
{
  "url": "https://örnek-görsel-url.jpg",
  "models": ["guns", "smoke"]
}
```

### Yanıt Değerlendirme

Analiz sonucunda, her bir model için boolean değer döner. `true` değeri, o kategorideki içeriğin görüntüde tespit edildiğini gösterir:

```json theme={null}
{
  "result": {
    "guns": true,
    "sexual": false,
    "genitalia": false,
    "smoke": false
  }
}
```

### Güvenli Kullanım İpuçları

1. Önceden kontrol edilmeyen görüntüleri sistemlerinizde gösterirken bu API'yi kullanarak bir filtreleme katmanı oluşturun
2. İçerik moderation sonuçlarını, özellikle yoğun trafik durumunda önbelleğe alarak tekrarlanan istekleri engelleyin
3. Kullanıcı içerik yükleme akışlarına entegre ederek kötü niyetli içeriklerin platformunuza girmesini engelleyin


## OpenAPI

````yaml POST /moderation/image
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/image:
    post:
      tags:
        - Moderation
      summary: Görüntü Moderasyonu
      description: Görüntü içeriğini analiz ederek zararlı/uygunsuz içerikleri tespit eder
      operationId: moderateImage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ModerationImageRequest'
      responses:
        '200':
          description: Başarılı analiz sonucu
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ModerationImageResponse'
        '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:
    ModerationImageRequest:
      type: object
      required:
        - url
      properties:
        url:
          type: string
          description: Analiz edilecek görüntünün URL'si
          example: >-
            https://t3.ftcdn.net/jpg/03/21/62/56/360_F_321625657_rauGwvaYjtbETuwxn9kpBWKDYrVUMdB4.jpg
        models:
          type: array
          description: Uygulanacak analiz modelleri (belirtilmezse tüm modeller uygulanır)
          items:
            type: string
            enum:
              - genitalia
              - guns
              - sexual
              - smoke
          example:
            - guns
    ModerationImageResponse:
      type: object
      properties:
        id:
          type: integer
          description: Moderasyon işleminin ID'si
          example: 26
        jobId:
          type: integer
          description: İşlem ID'si
          example: 123
        result:
          type: object
          properties:
            guns:
              type: boolean
              description: Görüntüde silah olup olmadığı
              example: true
            sexual:
              type: boolean
              description: Görüntüde cinsel içerik olup olmadığı
              example: false
            genitalia:
              type: boolean
              description: Görüntüde müstehcen içerik olup olmadığı
              example: false
            smoke:
              type: boolean
              description: Görüntüde sigara/duman içerik olup olmadığı
              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

````