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

# 보안 정책

> Retrieve available SMLTP (Secure Multi-Layer Trust Protocol) security policies.
These policies determine how your data is processed and protected.


# 보안 정책 가져오기

사용 가능한 SMLTP(Secure Model Language Transfer Protocol) 보안 정책을 검색합니다.

## 엔드포인트

```
GET /smltp-policies
```

## 설명

사용 가능한 SMLTP(Secure Model Language Transfer Protocol) 보안 정책을 검색합니다. 이러한 정책은 귀하의 데이터가 처리되고 보호되는 방식을 결정합니다.

## 인증

필수: API 키

```bash theme={null}
Authorization: Bearer sk-your-api-key-here
```

## 요청

```bash theme={null}
curl -X GET "https://{customer.name}.hiperai.ai/api/external/smltp-policies" \
  -H "Authorization: Bearer sk-your-api-key-here"
```

## 응답

### 성공 응답 (200)

```json theme={null}
{
  "success": true,
  "policies": [
    {
      "id": "public",
      "name": "Public",
      "description": "For public, non-sensitive data"
    },
    {
      "id": "internal",
      "name": "Internal",
      "description": "For internal company data"
    },
    {
      "id": "confidential",
      "name": "Confidential",
      "description": "For confidential business data"
    }
  ],
  "restrictions": {
    "allowed_policies": ["public", "internal", "confidential"]
  }
}
```

### 응답 필드

| 필드             | 유형 | 설명                  | 예      |
| -------------- | -- | ------------------- | ------ |
| `success`      | 부울 | 성공적인 요청의 경우 항상 true | `true` |
| `policies`     | 배열 | 사용 가능한 보안 정책 목록     | 예 보기   |
| `restrictions` | 개체 | 정책 액세스 제한           | 예 보기   |

### 정책 개체

| 필드            | 유형  | 설명        | 예                             |
| ------------- | --- | --------- | ----------------------------- |
| `id`          | 문자열 | 고유 정책 식별자 | `"internal"`                  |
| `name`        | 문자열 | 정책 표시 이름  | `"Internal"`                  |
| `description` | 문자열 | 정책 설명     | `"For internal company data"` |

### 제한 개체

| 필드                 | 유형 | 설명           | 예                                        |
| ------------------ | -- | ------------ | ---------------------------------------- |
| `allowed_policies` | 배열 | 허용된 정책 ID 배열 | `["public", "internal", "confidential"]` |

## 오류 응답

### 401 승인되지 않음

```json theme={null}
{
  "success": false,
  "error": "Invalid API key",
  "message": "The provided API key is invalid or has been revoked"
}
```

## 사용 예

### 자바스크립트/Node.js

```javascript theme={null}
const response = await fetch('https://{customer.name}.hiperai.ai/api/external/smltp-policies', {
  headers: {
    'Authorization': 'Bearer sk-your-api-key-here'
  }
});

const data = await response.json();
console.log('Available Policies:', data.policies);
```

### 파이썬

```python theme={null}
import requests

headers = {
    'Authorization': 'Bearer sk-your-api-key-here'
}

response = requests.get('https://{customer.name}.hiperai.ai/api/external/smltp-policies', headers=headers)
data = response.json()

print('Available Policies:', data['policies'])
```

### cURL

```bash theme={null}
curl -X GET "https://{customer.name}.hiperai.ai/api/external/smltp-policies" \
  -H "Authorization: Bearer sk-your-api-key-here"
```

## 정책 유형

### 공개

* **사용 사례**: 민감하지 않은 공개 데이터
* **보안 수준**: 낮음
* **데이터 처리**: 기본 보안을 갖춘 표준 처리

### 내부

* **사용 사례**: 회사 내부 데이터
* **보안 수준**: 중간
* **데이터 처리**: 추가 보호 장치로 보안 강화

### 기밀

* **사용 사례**: 기밀 비즈니스 데이터
* **보안 수준**: 높음
* **데이터 처리**: 엄격한 데이터 처리로 보안 극대화

## 메모

* 데이터 민감도에 따라 적절한 정책을 선택하세요.
* 정책은 데이터 처리 및 보호 방법에 영향을 미칩니다.
* 채팅 완료 요청에 정책 ID 사용
* 계정 유형에 따라 일부 정책이 제한될 수 있습니다.


## OpenAPI

````yaml GET /smltp-policies
openapi: 3.0.3
info:
  title: SecureAI External API
  description: >
    SecureAI External API provides AI chat completion and image generation
    capabilities with knowledge base retrieval, 

    security policies, and comprehensive usage tracking. This API is designed
    for external developers 

    and integrations using API key authentication.


    ## Key Features

    - **RAG (Retrieval-Augmented Generation)**: Automatically search knowledge
    bases for relevant context

    - **Multi-Model Support**: OpenAI, Anthropic, Google, Meta, and other AI
    models

    - **Model Redundancy & Failover**: Caller-defined failover chains (primary +
    fallbacks) with per-attempt timeouts

    - **OpenAI-Compatible Endpoint**: Point any OpenAI SDK at `/api/external/v1`
    — no code changes

    - **Image Generation**: Generate and edit images using Google Gemini 2.5
    Flash Image

    - **Speech-to-Speech (S2S)**: Real-time voice conversations using OpenAI
    Realtime API with WebRTC

    - **Security Policies**: SMLTP policy enforcement, per-call Prompt Shield,
    and signed compliance receipts

    - **Usage Tracking**: Comprehensive usage monitoring, self-service quota,
    and rate limiting

    - **Knowledge Base Integration**: Access to personal and shared knowledge
    bases

    - **User Management**: Complete user, group, and role management
    capabilities

    - **Audit Logging**: Comprehensive activity and security audit logs


    ## Authentication

    All endpoints (except health check) require API key authentication using
    Bearer token:

    ```

    Authorization: Bearer sk-your-api-key-here

    ```


    ## Billing and Usage

    By default, API requests are billed to the user account that owns the API
    key. You can specify 

    a different user to bill by including the `user_id` parameter in your
    request. This allows for:

    - Multi-tenant applications with per-user billing

    - Flexible completion limit management

    - Per-user "Usage by Model" settings


    ## Rate Limits

    - Default: 60 requests per minute, 1000 requests per hour

    - Daily limits: 100 requests (configurable)

    - Monthly limits: 10,000 requests (configurable)


    ## Base URL

    ```

    https://secureai.hiperai.ai/api/external

    ```
  version: 1.1.0
  contact:
    name: SecureAI Support
    email: support@secureai.hiperai.ai
  license:
    name: Proprietary
    url: https://secureai.hiperai.ai/terms
servers:
  - url: https://secureai.hiperai.ai/api/external
    description: Production server
  - url: http://localhost:3010/api/external
    description: Development server
security:
  - ApiKeyAuth: []
tags:
  - name: System
    description: System health and status endpoints
  - name: Discovery
    description: Endpoints to discover available models, indexes, and policies
  - name: Chat
    description: AI chat completion endpoints
  - name: User Management
    description: Endpoints for managing user accounts and roles
  - name: Index Management
    description: Endpoints for managing knowledge base indexes
  - name: Group Management
    description: Endpoints for managing user groups
  - name: SMLTP Security
    description: Endpoints for managing SMLTP security policies and audit logs
  - name: Role Management
    description: Endpoints for managing user roles
  - name: Activity Logs
    description: Endpoints for retrieving activity logs
externalDocs:
  description: SecureAI Documentation
  url: https://secureai.hiperai.ai/docs
paths:
  /smltp-policies:
    get:
      tags:
        - Discovery
      summary: Get Security Policies
      description: >
        Retrieve available SMLTP (Secure Multi-Layer Trust Protocol) security
        policies.

        These policies determine how your data is processed and protected.
      responses:
        '200':
          description: List of available security policies
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  policies:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: internal
                        name:
                          type: string
                          example: Internal
                        description:
                          type: string
                          example: For internal company data
                  restrictions:
                    type: object
                    properties:
                      allowed_policies:
                        type: string
                        example: all
              example:
                success: true
                policies:
                  - id: public
                    name: Public
                    description: For public, non-sensitive data
                  - id: internal
                    name: Internal
                    description: For internal company data
                  - id: confidential
                    name: Confidential
                    description: For confidential business data
                restrictions:
                  allowed_policies: all
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Invalid API key
        message:
          type: string
          example: The provided API key is invalid or has been revoked
        request_id:
          type: string
          example: req-abc123
          description: Request ID for tracking (if available)
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: |
        API key authentication using Bearer token format.
        Example: `Authorization: Bearer sk-your-api-key-here`

````