﻿---
sidebar_position: 1
description: Get model list and other functions to work with OpenAI in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, OpenAI]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Get model list
 Receives a list of available models



`Function GetModelList(Val URL, Val Token, Val AdditionalHeaders = "") Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | URL | --url | String | &#x2714; | OpenAI server URL |
  | Token | --token | String | &#x2714; | OpenAI authorization token |
  | AdditionalHeaders | --headers | Map Of KeyAndValue | &#x2716; | Additional request headers, if necessary |

  
  Returns:  Map Of KeyAndValue - Processing result

<br/>

:::tip
Method at API documentation: [List models](https://platform.openai.com/docs/api-reference/models/list)
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"
    URL   = FunctionParameters["OpenAI_URL"];
    Token = FunctionParameters["OpenAI_Token"];

    Result = OPI_OpenAI.GetModelList(URL, Token);
```
 

 <Tabs>
  
    <TabItem value="bash" label="Bash" default>
        ```bash
            oint openai GetModelList \
             --url "https://api.athenaeum.digital:1122/" \
             --token "***"
        ```
    </TabItem>
  
    <TabItem value="bat" label="CMD/Bat" default>
        ```batch
            oint openai GetModelList ^
             --url "https://api.athenaeum.digital:1122/" ^
             --token "***"
        ```
    </TabItem>
</Tabs>


```json title="Result"
{
 'data': [
  {
   'id': 'gpt-4.1',
   'created': 1744316542,
   'object': 'model',
   'owned_by': 'gpt'
  },
  {
   'id': 'claude-opus-4',
   'created': 1747936802,
   'object': 'model',
   'owned_by': 'claude'
  },
  {
   'id': 'claude-3.7-sonnet',
   'created': 1740427203,
   'object': 'model',
   'owned_by': 'claude'
  },
  {
   'id': 'minimax-01',
   'created': 1736920499,
   'object': 'model',
   'owned_by': 'other'
  },
  {
   'id': 'minimax-m1',
   'created': 1750204803,
   'object': 'model',
   'owned_by': 'minimax'
  },
  {
   'id': 'deepseek-r1',
   'created': 1737388803,
   'object': 'model',
   'owned_by': 'deepseek'
  },
  {
   'id': 'grok-3-beta',
   'created': 1744243202,
   'object': 'model',
   'owned_by': 'grok'
  },
  {
   'id': 'nova-pro-v1',
   'created': 1733439604,
   'object': 'model',
   'owned_by': 'amazon'
  },
  {
   'id': 'sonar-reasoning',
   'created': 1738134002,
   'object': 'model',
   'owned_by': 'perplexity'
  },
  {
   'id': 'gemini-2.5-flash-preview:thinking',
   'created': 1744920004,
   'object': 'model',
   'owned_by': 'google-gemini'
  },
  {
   'id': 'gemini-2.5-flash-preview-05-20',
   'created': 1747767603,
   'object': 'model',
   'owned_by': 'google-gemini'
  },
  {
   'id': 'gemini-2.5-pro-preview',
   'created': 1746547203,
   'object': 'model',
   'owned_by': 'google-gemini'
  },
  {
   'id': 'gemini-2.5-flash',
   'created': 1750179603,
   'object': 'model',
   'owned_by': 'google-gemini'
  },
  {
   'id': 'gemini-2.5-flash-lite-preview-06-17',
   'created': 1750186802,
   'object': 'model',
   'owned_by': 'google-gemini'
  },
  {
   'id': 'qwq-32b',
   'created': 1734379204,
   'object': 'model',
   'owned_by': 'qwen'
  },
  {
   'id': 'eva-llama-3.33-70b',
   'created': 1734379204,
   'object': 'model',
   'owned_by': 'qwen'
  },
  {
   'id': 'llama-4-maverick:free',
   'created': 1743901202,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'llama-guard-3-8b',
   'created': 1739404802,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'llama-3.3-8b-instruct:free',
   'created': 1747346402,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'llama-4-maverick',
   'created': 1743883204,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'llama-3.1-nemotron-ultra-253b-v1:free',
   'created': 1744117203,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'deepseek-v3-base:free',
   'created': 1743274804,
   'object': 'model',
   'owned_by': 'deepseek'
  },
  {
   'id': 'llama-guard-4-12b',
   'created': 1745978402,
   'object': 'model',
   'owned_by': 'llama'
  },
  {
   'id': 'magistral-medium-2506',
   'created': 1749567602,
   'object': 'model',
   'owned_by': 'mistralai'
  },
  {
   'id': 'mistral-small-3.1-24b-instruct:free',
   'created': 1742410805,
   'object': 'model',
...
```
