LOOMA / ДОКУМЕНТАЦИЯ
API embed-сервера
Справочник сгенерирован из OpenAPI текущего кода. Не выполняет запросы. Авторизация и примеры · Скачать OpenAPI JSON ↓
DELETE/document-jobs/{client_id}Delete
Delete
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
client_id | path | Да | {
"title": "Client Id",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/document-jobs/{client_id}Status
Status
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
client_id | path | Да | {
"title": "Client Id",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/document-jobs/{client_id}Upload
Upload
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
client_id | path | Да | {
"title": "Client Id",
"type": "string"
} |
model | query | Да | {
"title": "Model",
"type": "string"
} |
sha256 | query | Да | {
"title": "Sha256",
"type": "string"
} |
dpi | query | Нет | {
"default": 150,
"title": "Dpi",
"type": "integer"
} |
kind | query | Нет | {
"default": "pdf",
"title": "Kind",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/document-jobs/{client_id}/batches/{number}Result
Result
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
client_id | path | Да | {
"title": "Client Id",
"type": "string"
} |
number | path | Да | {
"title": "Number",
"type": "integer"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/document-jobs/{client_id}/controlControl
Control
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
client_id | path | Да | {
"title": "Client Id",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Тело запроса
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Control"
}
}
},
"required": true
}Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/embed/imagesEmbed Images
Embed Images
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Тело запроса
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbedImagesRequest"
}
}
},
"required": true
}Ответы
{
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingsResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/embed/nprefixGet N Prefix
Return the number of image-prefix tokens for the given model. This is the number of chat-template tokens that appear *before* the first <|image_pad|> token in the model's process_images() output. It is the same for every image and is used by the backend to correctly slice visual-patch tokens out of raw stored embeddings (which contain the full token sequence including prefix and suffix). CPU-only — no GPU inference required.
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
model | query | Да | {
"title": "Model",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/embed/queriesEmbed Queries
Embed Queries
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Тело запроса
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbedQueriesRequest"
}
}
},
"required": true
}Ответы
{
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingsResponse"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/embeddersList Available Embedders
List all registered embedders and their download state.
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/EmbedderBasicInfo"
},
"title": "Response List Available Embedders Embedders Get",
"type": "array"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/embedders/{name}Get Embedder Info
Return info for a single embedder.
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
name | path | Да | {
"title": "Name",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbedderBasicInfo"
}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/embedders/{name}/downloadDownload Embedder
Start downloading the model for an embedder (background thread).
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
name | path | Да | {
"title": "Name",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}GET/healthHealth
Health
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
}
}GET/keysList Keys
Return all key labels (the actual token values are never returned).
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}POST/keysAdd Key
Add a new API key. Changes are persisted to the keys file immediately.
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Тело запроса
{
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/KeyCreateRequest"
}
}
},
"required": true
}Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}DELETE/keys/{key}Delete Key
Remove an API key by its token value.
| Параметр | Где | Обязателен | Описание / схема |
|---|---|---|---|
key | path | Да | {
"title": "Key",
"type": "string"
} |
authorization | header | Нет | {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Authorization"
} |
Ответы
{
"200": {
"content": {
"application/json": {
"schema": {}
}
},
"description": "Successful Response"
},
"422": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
},
"description": "Validation Error"
}
}Ничего не найдено. Попробуйте другую часть пути или метод.
Схемы данных#
Control
{
"properties": {
"paused": {
"title": "Paused",
"type": "boolean"
}
},
"required": [
"paused"
],
"title": "Control",
"type": "object"
}EmbedImagesRequest
{
"properties": {
"images": {
"items": {
"type": "string"
},
"title": "Images",
"type": "array"
},
"model": {
"title": "Model",
"type": "string"
}
},
"required": [
"model",
"images"
],
"title": "EmbedImagesRequest",
"type": "object"
}EmbedQueriesRequest
{
"properties": {
"model": {
"title": "Model",
"type": "string"
},
"queries": {
"items": {
"type": "string"
},
"title": "Queries",
"type": "array"
}
},
"required": [
"model",
"queries"
],
"title": "EmbedQueriesRequest",
"type": "object"
}EmbedderBasicInfo
{
"properties": {
"description": {
"title": "Description",
"type": "string"
},
"dims_default": {
"default": 128,
"title": "Dims Default",
"type": "integer"
},
"download_error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Download Error"
},
"downloaded": {
"default": false,
"title": "Downloaded",
"type": "boolean"
},
"downloaded_bytes": {
"default": 0,
"title": "Downloaded Bytes",
"type": "integer"
},
"downloading": {
"default": false,
"title": "Downloading",
"type": "boolean"
},
"model_id": {
"default": "",
"title": "Model Id",
"type": "string"
},
"name": {
"title": "Name",
"type": "string"
},
"required_models": {
"default": [],
"items": {
"type": "string"
},
"title": "Required Models",
"type": "array"
},
"size_bytes": {
"default": 0,
"title": "Size Bytes",
"type": "integer"
},
"supports_heatmap": {
"default": true,
"title": "Supports Heatmap",
"type": "boolean"
},
"total_bytes": {
"default": 0,
"title": "Total Bytes",
"type": "integer"
}
},
"required": [
"name",
"description"
],
"title": "EmbedderBasicInfo",
"type": "object"
}EmbeddingsResponse
{
"properties": {
"embeddings": {
"items": {
"items": {
"items": {
"type": "number"
},
"type": "array"
},
"type": "array"
},
"title": "Embeddings",
"type": "array"
}
},
"required": [
"embeddings"
],
"title": "EmbeddingsResponse",
"type": "object"
}HTTPValidationError
{
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"title": "Detail",
"type": "array"
}
},
"title": "HTTPValidationError",
"type": "object"
}KeyCreateRequest
{
"properties": {
"key": {
"title": "Key",
"type": "string"
},
"label": {
"default": "",
"title": "Label",
"type": "string"
}
},
"required": [
"key"
],
"title": "KeyCreateRequest",
"type": "object"
}ValidationError
{
"properties": {
"ctx": {
"title": "Context",
"type": "object"
},
"input": {
"title": "Input"
},
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"title": "Location",
"type": "array"
},
"msg": {
"title": "Message",
"type": "string"
},
"type": {
"title": "Error Type",
"type": "string"
}
},
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError",
"type": "object"
}