> ## 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 knowledge bases (indexes) that your API key can access.
Includes personal indexes, shared indexes, and the Zero-Knowledge option.


# 사용 가능한 지식 베이스 얻기

API 키가 액세스할 수 있는 사용 가능한 기술 자료(색인)를 검색합니다.

## 엔드포인트

```
GET /indexes
```

## 설명

API 키가 액세스할 수 있는 사용 가능한 기술 자료(색인)를 검색합니다. 개인 색인, 공유 색인 및 영지식 옵션이 포함됩니다.

## 인증

필수: API 키

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

## 요청

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

## 응답

### 성공 응답 (200)

```json theme={null}
{
  "success": true,
  "indexes": [
    {
      "id": "Zero-Knowledge",
      "name": "Zero-Knowledge",
      "type": "system",
      "description": "Direct AI responses without knowledge base retrieval"
    },
    {
      "id": "my-knowledge-base",
      "name": "my-knowledge-base",
      "type": "personal",
      "namespace": "user-namespace"
    }
  ],
  "restrictions": {
    "allowed_indexes": "all user indexes"
  }
}
```

### 응답 필드

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

### 인덱스 객체

| 필드            | 유형  | 설명                | 예                          |
| ------------- | --- | ----------------- | -------------------------- |
| `id`          | 문자열 | 고유 인덱스 식별자        | `"my-knowledge-base"`      |
| `name`        | 문자열 | 인덱스 표시 이름         | `"my-knowledge-base"`      |
| `type`        | 문자열 | 인덱스 유형            | `"personal"`               |
| `namespace`   | 문자열 | 인덱스 네임스페이스(선택 사항) | `"user-namespace"`         |
| `description` | 문자열 | 인덱스 설명(선택 사항)     | `"Direct AI responses..."` |

### 인덱스 유형

| 유형         | 설명                 |
| ---------- | ------------------ |
| `system`   | 시스템 제공 인덱스(예: 영지식) |
| `personal` | 사용자의 개인 지식 기반      |
| `general`  | 공유 지식 기반           |

### 제한 개체

| 필드                | 유형  | 설명             | 예                    |
| ----------------- | --- | -------------- | -------------------- |
| `allowed_indexes` | 문자열 | 허용된 인덱스에 대한 설명 | `"all user indexes"` |

## 오류 응답

### 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/indexes', {
  headers: {
    'Authorization': 'Bearer sk-your-api-key-here'
  }
});

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

### 파이썬

```python theme={null}
import requests

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

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

print('Available Indexes:', data['indexes'])
```

### cURL

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

## 특수 인덱스

### 영지식

`Zero-Knowledge` 인덱스는 지식베이스 검색 없이 직접적인 AI 응답을 제공하는 특수 시스템 인덱스입니다. 원할 때 이것을 사용하십시오:

* RAG가 없는 순수한 AI 응답
* AI 모델 기능 테스트
* 구체적인 맥락이 없는 일반적인 대화

## 메모

* 영지식 지수는 항상 이용 가능합니다.
* 개인 색인은 사용자가 생성합니다.
* 색인에 대한 액세스는 권한에 따라 다릅니다.
* 채팅 완료 요청 시 인덱스 ID를 사용하세요.


## OpenAPI

````yaml GET /indexes
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:
  /indexes:
    get:
      tags:
        - Discovery
      summary: Get Available Knowledge Bases
      description: >
        Retrieve available knowledge bases (indexes) that your API key can
        access.

        Includes personal indexes, shared indexes, and the Zero-Knowledge
        option.
      responses:
        '200':
          description: List of available knowledge bases
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  indexes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: my-knowledge-base
                        name:
                          type: string
                          example: my-knowledge-base
                        type:
                          type: string
                          enum:
                            - system
                            - personal
                            - general
                          example: personal
                        namespace:
                          type: string
                          example: user-namespace
                        description:
                          type: string
                          example: Direct AI responses without knowledge base retrieval
                  restrictions:
                    type: object
                    properties:
                      allowed_indexes:
                        type: string
                        example: all user indexes
              example:
                success: true
                indexes:
                  - id: Zero-Knowledge
                    name: Zero-Knowledge
                    type: system
                    description: Direct AI responses without knowledge base retrieval
                  - id: my-knowledge-base
                    name: my-knowledge-base
                    type: personal
                    namespace: user-namespace
                restrictions:
                  allowed_indexes: all user indexes
        '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`

````