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

# Modelos Disponibles en la API

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


# Obtener modelos disponibles

Recupere los modelos de IA disponibles según los permisos de su clave API y su licencia de usuario.

## Endpoint

```
GET /models
```

## Descripción

Recupere los modelos de IA disponibles según los permisos de su clave API y su licencia de usuario.

## Autenticación

Requerido: Clave API

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

## Parámetros

| Parámetro | Tipo | Requerido | Descripción | Ejemplo |
| - | - | - | - | - |
| `provider` | cadena | No | Filtrar modelos por proveedor | `"openai"` |

## Solicitud

### Solicitud básica

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

### Filtrar por proveedor

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

## Respuesta

### Respuesta exitosa (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"
  }
}
```

### Campos de respuesta

| Campo | Tipo | Descripción | Ejemplo |
| - | - | - | - |
| `success` | booleano | Siempre es cierto para solicitudes exitosas | `true` |
| `models` | matriz | Lista de modelos disponibles | Ver ejemplo |
| `user_license` | cadena | Nivel de licencia de usuario | `"Pro"` |
| `restrictions` | objeto | Restricciones de acceso al modelo | Ver ejemplo |
| `filters` | objeto | Filtros aplicados | Ver ejemplo |

### Objeto modelo

| Campo | Tipo | Descripción | Ejemplo |
| - | - | - | - |
| `id` | cadena | Identificador de modelo único | `"openai/gpt-5-nano"` |
| `name` | cadena | Nombre para mostrar del modelo | `"openai/gpt-5-nano"` |
| `provider` | cadena | Proveedor de modelos | `"openai"` |

### Objeto de restricciones

| Campo | Tipo | Descripción | Ejemplo |
| - | - | - | - |
| `allowed_models` | cadena | Nivel de acceso al modelo | `"all"` |

### Objeto de filtros

| Campo | Tipo | Descripción | Ejemplo |
| - | - | - | - |
| `provider` | cadena | Filtro de proveedor aplicado | `"openai"` |

## Respuestas de error

### 401 No autorizado

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

### 429 Límite de tasa excedido

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

## Ejemplo de uso

### 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);
```

### Pitón

```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'])
```

### Filtrar por proveedor

```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'])
```

### rizo

```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"
```

## Depósitos de LLM (actuales)

El sistema de chat clasifica los modelos en dos grupos de ejecución:

* cubo `standard`
* cubo `premium`

Esta referencia se basa en la asignación de depósitos de backend activos.

### Cucharón estándar

* `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`

### Cubo premium

* `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`

## Proveedores disponibles

* **AI abierta**
* **Anthropic**
* **Google**
* **Meta**
* **Mistral**
* **búsqueda profunda**
* **xAI**
* **Qwen**

## Notas

* Los modelos disponibles dependen de su nivel de suscripción
* Algunos modelos pueden estar restringidos según su licencia
* Utilice el filtro de proveedores para obtener modelos de proveedores específicos
* La respuesta incluye su nivel de licencia actual y sus restricciones.
* Las restricciones de clave API (`allowedModels`) pueden reducir aún más la lista de modelos


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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.