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

# Verfügbare Modelle

> Retrieve available AI models based on your API key permissions and user license.
Models are categorized as 'standard' or 'premium' based on your subscription tier.


# Verfügbare Modelle abrufen

Rufen Sie verfügbare KI-Modelle basierend auf Ihren API-Schlüsselberechtigungen und Ihrer Benutzerlizenz ab.

## Endpunkt

```
GET /models
```

## Beschreibung

Rufen Sie verfügbare KI-Modelle basierend auf Ihren API-Schlüsselberechtigungen und Ihrer Benutzerlizenz ab.

## Authentifizierung

Erforderlich: API-Schlüssel

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

## Parameter

| Parameter  | Geben Sie    | ein Erforderlich | Beschreibung                  | Beispiel   |
| ---------- | ------------ | ---------------- | ----------------------------- | ---------- |
| `provider` | Zeichenfolge | Nein             | Modelle nach Anbieter filtern | `"openai"` |

## Anfrage

### Grundlegende Anfrage

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

### Nach Anbieter filtern

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

## Antwort

### Erfolgsantwort (200)

```json theme={null}
{
  "success": true,
  "models": [
    {
      "id": "openai/gpt-5-nano",
      "name": "openai/gpt-5-nano",
      "provider": "openai"
    },
    {
      "id": "anthropic/claude-sonnet-4.6",
      "name": "anthropic/claude-sonnet-4.6",
      "provider": "anthropic"
    }
  ],
  "user_license": "Pro",
  "restrictions": {
    "allowed_models": "all"
  },
  "filters": {
    "provider": "openai"
  }
}
```

### Antwortfelder

| Feld           | Geben Sie       | ein Beschreibung                      | Beispiel       |
| -------------- | --------------- | ------------------------------------- | -------------- |
| `success`      | boolescher Wert | Bei erfolgreichen Anfragen immer wahr | `true`         |
| `models`       | Array           | Liste der verfügbaren Modelle         | Siehe Beispiel |
| `user_license` | Zeichenfolge    | Lizenzstufe des Benutzers             | `"Pro"`        |
| `restrictions` | Objekt          | Modellzugriffsbeschränkungen          | Siehe Beispiel |
| `filters`      | Objekt          | Angewandte Filter                     | Siehe Beispiel |

### Modellobjekt

| Feld       | Geben Sie    | ein Beschreibung         | Beispiel              |
| ---------- | ------------ | ------------------------ | --------------------- |
| `id`       | Zeichenfolge | Eindeutige Modellkennung | `"openai/gpt-5-nano"` |
| `name`     | Zeichenfolge | Modellanzeigename        | `"openai/gpt-5-nano"` |
| `provider` | Zeichenfolge | Modellanbieter           | `"openai"`            |

### Restrictions-Objekt

| Feld             | Geben Sie    | ein Beschreibung    | Beispiel |
| ---------------- | ------------ | ------------------- | -------- |
| `allowed_models` | Zeichenfolge | Modellzugriffsebene | `"all"`  |

### Filtert Objekt

| Feld       | Geben Sie    | ein Beschreibung           | Beispiel   |
| ---------- | ------------ | -------------------------- | ---------- |
| `provider` | Zeichenfolge | Angewandter Anbieterfilter | `"openai"` |

## Fehlerantworten

### 401 Nicht autorisiert

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

### 429 Ratenlimit überschritten

```json theme={null}
{
  "success": false,
  "error": "Rate limit exceeded",
  "message": "Please reduce your request rate",
  "reset_time": "2024-01-15T11:00:00.000Z"
}
```

## Beispielverwendung

### JavaScript/Node.js

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

const data = await response.json();
console.log('Available Models:', data.models);
console.log('User License:', data.user_license);
```

### Python

```python theme={null}
import requests

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

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

print('Available Models:', data['models'])
print('User License:', data['user_license'])
```

### Nach Anbieter filtern

```python theme={null}
import requests

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

params = {
    'provider': 'openai'
}

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

print('OpenAI Models:', data['models'])
```

### cURL

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

# Filter by provider
curl -X GET "https://{customer.name}.hiperai.ai/api/external/models?provider=openai" \
  -H "Authorization: Bearer sk-your-api-key-here"
```

## LLM-Buckets (aktuell)

Das Chat-System klassifiziert Modelle in zwei Ausführungsbereiche:

* `standard` Eimer
* `premium` Eimer

Diese Referenz basiert auf der aktiven Backend-Bucket-Zuordnung.

### Standardeimer

* `openai/gpt-oss-120b`
* `openai/gpt-5-nano`
* `google/gemini-3.1-flash-lite-preview`
* `google/gemini-3-flash-preview`
* `deepseek/deepseek-r1-distill-llama-70b`
* `deepseek/deepseek-r1`
* `deepseek/deepseek-v3.2`
* `meta-llama/llama-3.3-70b-instruct`
* `meta-llama/llama-4-maverick`
* `meta-llama/llama-4-scout`
* `mistralai/mistral-7b-instruct`
* `mistralai/mistral-nemo`
* `mistralai/ministral-14b-2512`
* `mistralai/mistral-large-2512`
* `x-ai/grok-3-mini`
* `qwen/qwen3-235b-a22b-2507`
* `qwen/qwen3-coder`
* `qwen/qwen3-coder-next`
* `qwen/qwen3.5-397b-a17b`

### Premium-Eimer

* `anthropic/claude-3.7-sonnet`
* `anthropic/claude-sonnet-4.6`
* `anthropic/claude-opus-4.6`
* `openai/o4-mini-high`
* `openai/o4-mini`
* `openai/gpt-5.2`
* `openai/gpt-5.3-codex`
* `openai/gpt-5.1`
* `google/gemini-3.1-pro-preview`
* `x-ai/grok-4`

## Verfügbare Anbieter

* **OpenAI**
* **Anthropisch**
* **Google**
* **Meta**
* **Mistral**
* **DeepSeek**
* **xAI**
* **Qwen**

## Notizen

* Die verfügbaren Modelle hängen von Ihrer Abonnementstufe ab
* Einige Modelle können aufgrund Ihrer Lizenz eingeschränkt sein
* Verwenden Sie den Anbieterfilter, um Modelle von bestimmten Anbietern zu erhalten
* Die Antwort enthält Ihre aktuelle Lizenzstufe und Einschränkungen
* API-Schlüsselbeschränkungen (`allowedModels`) können die Modellliste weiter reduzieren


## OpenAPI

````yaml GET /models
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:
  /models:
    get:
      tags:
        - Discovery
      summary: Get Available Models
      description: >
        Retrieve available AI models based on your API key permissions and user
        license.

        Models are categorized as 'standard' or 'premium' based on your
        subscription tier.
      parameters:
        - name: provider
          in: query
          description: Filter models by provider (e.g., 'openai', 'anthropic', 'google')
          required: false
          schema:
            type: string
      responses:
        '200':
          description: List of available models
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  models:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: openai/gpt-4.1-mini
                        name:
                          type: string
                          example: openai/gpt-4.1-mini
                        provider:
                          type: string
                          example: openai
                  user_license:
                    type: string
                    example: Growth
                  restrictions:
                    type: object
                    properties:
                      allowed_models:
                        type: string
                        example: all
                  filters:
                    type: object
                    properties:
                      provider:
                        type: string
                        nullable: true
                        example: openai
              example:
                success: true
                models:
                  - id: openai/gpt-4.1-mini
                    name: openai/gpt-4.1-mini
                    provider: openai
                  - id: anthropic/claude-sonnet-4
                    name: anthropic/claude-sonnet-4
                    provider: anthropic
                user_license: Growth
                restrictions:
                  allowed_models: all
                filters:
                  provider: openai
        '401':
          description: Invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
      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)
    RateLimitError:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          example: Rate limit exceeded
        message:
          type: string
          example: Please reduce your request rate
        reset_time:
          type: string
          format: date-time
          example: '2024-01-15T11:00:00.000Z'
          description: When the rate limit will reset
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: |
        API key authentication using Bearer token format.
        Example: `Authorization: Bearer sk-your-api-key-here`

````