Get list of files
Get a list of files with or without filtering
- Parameters
- Advanced call ?
Function GetFilesList(Val URL, Val Token, Val Count = 10000, Val AdditionalParameters = "", Val AdditionalHeaders = "") Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| URL | --url | String | ✔ | OpenAI server URL |
| Token | --token | String | ✔ | OpenAI authorization token |
| Count | --limit | Number | ✖ | Maximum number of assistants returned |
| AdditionalParameters | --options | Structure Of KeyAndValue | ✖ | Additional request parameters, if necessary |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns
Map Of KeyAndValue - Processing result
| Parameter | Description |
|---|---|
| proxy | InternetProxy or a structure with fields Protocol, Host, Port, User, Password, UseOSAuthentication |
| timeout | Request execution timeout |
| adv_response | Formats the response as a complete HTTP structure with fields code, body, and headers |
| retries | Number of HTTP request send attempts on 5** status codes or internal client errors |
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
tip
Method at API documentation: List files
1C:Enterprise/OneScript code example
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We34...";
Result = OPI_OpenAI.GetFilesList(URL, Token);
- Bash
- CMD/Bat
oint openai GetFilesList \
--url "https://hut.openintegrations.dev/localai/" \
--token "***"
oint openai GetFilesList ^
--url "https://hut.openintegrations.dev/localai/" ^
--token "***"
Result
{
"data": [
{
"id": "file-34",
"object": "file",
"bytes": 2114025,
"created_at": "2026-07-19T17:07:32.135872733Z",
"filename": "d8bb15a5-fb1d-47f3-af38-2f760cf40d9c.png",
"purpose": "assistants"
}
],
"object": "list"
}