LOOMA / ДОКУМЕНТАЦИЯ

API embed-сервера

Справочник сгенерирован из OpenAPI текущего кода. Не выполняет запросы. Авторизация и примеры · Скачать OpenAPI JSON ↓

DELETE/document-jobs/{client_id}Delete

Delete

ПараметрГдеОбязателенОписание / схема
client_idpathДа
{
  "title": "Client Id",
  "type": "string"
}
authorizationheaderНет
{
  "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_idpathДа
{
  "title": "Client Id",
  "type": "string"
}
authorizationheaderНет
{
  "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_idpathДа
{
  "title": "Client Id",
  "type": "string"
}
modelqueryДа
{
  "title": "Model",
  "type": "string"
}
sha256queryДа
{
  "title": "Sha256",
  "type": "string"
}
dpiqueryНет
{
  "default": 150,
  "title": "Dpi",
  "type": "integer"
}
kindqueryНет
{
  "default": "pdf",
  "title": "Kind",
  "type": "string"
}
authorizationheaderНет
{
  "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_idpathДа
{
  "title": "Client Id",
  "type": "string"
}
numberpathДа
{
  "title": "Number",
  "type": "integer"
}
authorizationheaderНет
{
  "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_idpathДа
{
  "title": "Client Id",
  "type": "string"
}
authorizationheaderНет
{
  "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

ПараметрГдеОбязателенОписание / схема
authorizationheaderНет
{
  "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.

ПараметрГдеОбязателенОписание / схема
modelqueryДа
{
  "title": "Model",
  "type": "string"
}
authorizationheaderНет
{
  "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

ПараметрГдеОбязателенОписание / схема
authorizationheaderНет
{
  "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.

ПараметрГдеОбязателенОписание / схема
authorizationheaderНет
{
  "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.

ПараметрГдеОбязателенОписание / схема
namepathДа
{
  "title": "Name",
  "type": "string"
}
authorizationheaderНет
{
  "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).

ПараметрГдеОбязателенОписание / схема
namepathДа
{
  "title": "Name",
  "type": "string"
}
authorizationheaderНет
{
  "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).

ПараметрГдеОбязателенОписание / схема
authorizationheaderНет
{
  "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.

ПараметрГдеОбязателенОписание / схема
authorizationheaderНет
{
  "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.

ПараметрГдеОбязателенОписание / схема
keypathДа
{
  "title": "Key",
  "type": "string"
}
authorizationheaderНет
{
  "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"
}
Нашли неточность? Сообщите на GitHub ↗