mirror of
https://github.com/mudler/LocalAI.git
synced 2026-10-28 17:18:49 -04:00
* feat(schema): add Conversation schema for chat history (#9432) Persist WebUI chat conversations server-side so browser refresh, private windows, or device changes preserve user history (issue #9432). This commit adds the on-disk representation: - Conversation holds id, name, model, opaque history, MCP / sampling settings, and timestamps. - ConversationsFile is the per-user list serialised to JSON. History is stored as json.RawMessage so the server stays agnostic to React message shapes (user / assistant / thinking / tool_call / tool_result mixed with text / image_url / audio_url / file attachments). Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * feat(chathistory): add file-based per-user conversation store (#9432) File-backed persister for chat history. Each user's conversations live under {baseDir}/{userID}/conversations.json (anonymous/ when auth is disabled). Design choices: - In-memory cache backed by sync.Mutex so concurrent saves don't interleave writes. - Atomic write via tmp file + os.Rename so a crash mid-save never leaves a corrupted history. - ID validation regex blocks path-traversal payloads at the store boundary, in addition to the auth context constraint. Tests cover round-trip persistence across instances, user isolation, unsafe-ID rejection, bulk replace migration, and the anonymous fallback path. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * feat(api): expose chat conversation CRUD endpoints (#9432) Wire the chathistory store into the HTTP layer. New endpoints under /api/conversations: - GET /api/conversations list - POST /api/conversations upsert (id in body) - DELETE /api/conversations delete all - PUT /api/conversations/bulk replace entire set (localStorage migration) - GET /api/conversations/:id fetch one - PUT /api/conversations/:id upsert (id in path; path id wins over body) - DELETE /api/conversations/:id delete one All endpoints scope queries to the authenticated user via getUserID(c) - callers cannot impersonate other users by passing a user_id in the body. The endpoints are gated behind the new chat_history feature permission (default ON in APIFeatures), registered through the existing RouteFeatureRegistry so the unified feature middleware picks them up automatically. Application.ChatHistoryStore() returns nil when DisableWebUI is set or no persistence path is configured, in which case route registration is skipped entirely rather than registering handlers that always 503. Also adds the chat-history instruction entry and Swagger tag so the endpoint surfaces in /api/instructions and /swagger. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * feat(react-ui): sync chat history to server with localStorage fallback (#9432) useChat now probes /api/conversations on mount. When the endpoint responds 200, the server becomes the authoritative source: the hook merges remote conversations into local state and pushes per-chat PUT updates on each debounced save. When the endpoint 404s - older LocalAI deploys or the feature disabled - the hook silently keeps the old localStorage-only behaviour, so the change is backward-compatible. Migration: when the server is reachable but empty and the browser has local conversations with history, the hook fires a single PUT /api/conversations/bulk to seed the server. The atomic bulk endpoint avoids partial-upload states where a retry would skip already-uploaded entries. Delete operations propagate to the server when it's available; failures are silently swallowed so the local UI stays responsive on transient network errors. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * test(chathistory): rewrite tests in Ginkgo/Gomega The initial test file used the stdlib testing package (t.Fatalf / t.Errorf), which is forbidden by the forbidigo linter rule in .golangci.yml — LocalAI mandates Ginkgo/Gomega for all Go tests (see .agents/coding-style.md). Restructured the same six scenarios into Describe / Context / It blocks, with a chathistory_suite_test.go bootstrap that registers the Ginkgo fail handler. Test coverage is unchanged: basic CRUD round-trip, cross- instance persistence, user isolation, unsafe ID rejection (now via DescribeTable), bulk replace overwrite, and the anonymous fallback path. Assisted-by: Claude:claude-opus-4-7 Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * refactor(chathistory): switch store to GORM-backed authDB Addresses mudler's review on #9902. Chat history was the only per-user state in LocalAI sitting in a separate filesystem store instead of the shared GORM database — AgentStore and JobStore both live there. Move it onto Application.authDB so per-user state stays in one place. * ConversationRecord (GORM model) with composite primary key (user_id, conv_id) — React mints IDs locally with no global coordination so per-user uniqueness is the natural shape. * Store.New(db *gorm.DB) replaces Store.New(baseDir string). Save / Get / List / Delete / DeleteAll / ReplaceAll keep their signatures so HTTP handlers and the React UI are untouched. * ReplaceAll runs in a transaction with an Unscoped() pre-clear so a future retention sweep cannot resurrect a stale ID on re-upload. * gorm.DeletedAt in the schema means a future retention pruner is a one-line query — addresses the second half of the review (unbounded in-memory map). The map is gone: reads go straight to the DB. Trade-off worth flagging in the PR reply: chat history persistence now requires auth.Enabled = true (that's what initialises Application.authDB). With auth disabled the React UI transparently falls back to localStorage, the same path the original PR took on 404. Consistent with AgentStore / JobStore; if a "chat history always on" mode is preferred we can pull DB init out of auth.InitDB into a shared helper. Assisted-by: Claude:claude-opus-4-7 [Read Edit Bash] Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * refactor(schema): drop now-unused ConversationsFile envelope ConversationsFile was the JSON wrapper for the old file-based chat history store — a {Conversations: [...], UpdatedAt: ...} pair serialised to disk under {baseDir}/{userID}/conversations.json. The previous commit replaced that store with a GORM-backed one that writes rows directly as ConversationRecord, leaving the envelope without a consumer. Assisted-by: Claude:claude-opus-4-7 [Read Edit Bash] Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * test(chathistory): switch tests to testutil.SetupTestDB Mirror the AgentStore test setup: spin up a PostgreSQL 16 container via testutil.SetupTestDB(), construct a Store on top of it, exercise CRUD round-trips. The previous file-based fixtures (TempDir, filepath.Join checks) are no longer meaningful now that the store talks GORM. Tests are skipped on macOS (testcontainers needs Docker) and run on CI, same as the other GORM-backed suites in the repo. Also reframed two cases: * "unsafe IDs" → "malformed IDs" — the DB-backed store doesn't care about path traversal, but idRegex still rejects whitespace / control characters so IDs stay safe in logs and HTTP responses. * "anonymous user" no longer pins a directory path (no directory exists anymore); instead it checks the round-trip plus the per-user isolation guarantee. Added a DeleteAll round-trip to cover the bulk-clear endpoint. Assisted-by: Claude:claude-opus-4-7 [Read Edit Bash] Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> * test(chathistory): cover the conversation HTTP handlers The seven /api/conversations handlers had no tests. Inject the *chathistory.Store into the handlers instead of the whole Application and move the route table into RegisterChatHistoryRoutes, so a spec can drive the real registration and middleware chain (auth.Middleware plus the chat_history feature gate) against an in-memory SQLite auth database. The new specs cover 401 without credentials on every route, 403 when an admin revoked chat_history, the CRUD round trip, path id over body id, 400 on malformed ids and bodies, per-user isolation, bulk replace and delete-all, and that a nil store registers nothing (the UI then falls back to localStorage). The handlers' nil-store branches are gone: the routes are only registered with a store, so those branches could never run. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(chathistory): make deletions final with tombstones and versions A conversation deleted on one device came back as soon as a client with a stale copy wrote it again: Delete soft-deleted the row, and the next Save went through GORM's upsert, which cleared deleted_at and resurrected it for every device. The lookup that recovered CreatedAt also ran outside any transaction, so concurrent writers raced on it. The server is now authoritative over deletions: * Delete turns the row into a tombstone: content dropped, deleted_at set. It is idempotent, and deleting an id the server has not seen yet still records a tombstone, so a delete that overtakes the UI's in-flight debounced save of the same chat still wins. * Save runs in a transaction, refuses a tombstoned id with ErrDeleted (HTTP 410 Gone), and bumps the version with a single UPDATE ... SET version = version + 1 guarded by deleted_at IS NULL, so concurrent writers each count and a delete committed between the lookup and the write still wins. Two concurrent first writes of the same id retry once (ON CONFLICT DO NOTHING, then update). * Every row carries a server-assigned version (1 on the first save, +1 per write including the delete), returned to the client. A non-zero version tells the UI the server has seen a conversation, which is how it can tell a never-synced draft from a server-side deletion. * GET /api/conversations returns the tombstones under "deleted". * DeleteAll and ReplaceAll leave tombstones too. ReplaceAll no longer hard-deletes everything first; it upserts the payload, skips ids that were deleted (reported in "skipped"), and tombstones the rest. * createdAt/updatedAt are stored as the client sends them (only zero values are stamped), so clients compare updatedAt from their own clocks rather than against the server's. The store specs now run against PostgreSQL (testcontainers) and, with the auth tag, SQLite through auth.InitDB, since both back the auth database. The API specs cover a stale client reconnecting after a remote deletion. Swagger is regenerated with swag v1.16.6 (json.RawMessage fields get swaggertype), and the feature is documented, including that it needs user auth. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(react-ui): let the server decide which chats were deleted mergeRemoteAndLocal kept every chat that was only in the browser and let the server copy win for every shared id. A stale browser therefore uploaded chats deleted on another device as if they were new drafts, and a message sent while the list request was still in flight was replaced by the older server copy and then lost from localStorage too. The first load now reconciles with the server's tombstones and versions: * a chat the server lists under "deleted" is dropped locally; * a chat on both sides keeps the copy with the newer updatedAt, so an edit made during the load wins and is uploaded afterwards; * a chat only in the browser is uploaded only if it was never synced (no version). With a version the server has seen it and no longer has it, so it is dropped instead of resurrected (this also keeps one account's cached chats out of another account on a shared browser); * deletes made while the list is loading are queued and sent once it arrives. Saves record the version the server returns, and a 410 on save drops the chat locally instead of retrying it forever. Chats received from the server count as already sent, so adopting a server copy no longer echoes it straight back. The bulk localStorage migration is gone: it replaced the whole server set from a possibly stale browser, and the per-chat saves already upload never-synced drafts through the tombstone check. The Playwright spec drives each case against a stubbed /api/conversations that follows the server contract. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(chathistory): keep the LocalAI Assistant toggle on synced chats master's createNewChat sets localaiAssistant, but serializeChat did not send it and schema.Conversation had no field for it, so a chat with the Assistant mode on came back with it off after a reload from the server (and the local cache dropped it too). Add the field on both sides. The other fields createNewChat sets were already covered; a handler spec now round-trips all of them, and the UI spec checks the toggle on the way up and in the local cache. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(react-ui): scope chat cache per account, retry unconfirmed deletes Two gaps in the client half of server-side chat history, both found in review: The browser cache was one shared localStorage key. A draft that one account could not upload (a failed first save) stayed in it, and after that account signed out and another signed in, the reconcile kept the unversioned draft and the save pass uploaded it into the second account. The cache now lives under localai_chats_data:<user id>, Chat remounts its state when the account changes, and nothing is synced without a signed-in account. The shared key is left for browser-only use without auth and is not uploaded when signed in, because nothing tells which account it belongs to. Deletes were dropped locally and their DELETE errors swallowed; only deletes made while the first list was loading were queued, and not persisted. A delete made while the server was unreachable therefore came back with the next list. Deletes (single, delete all, and deletes on the Home page) are now kept as pending deletes in the account's cache until the server confirms them, override the server list in the reconcile, and are sent again on the next change, on the online event and on the next load. While a delete-all is pending no conversation is uploaded, so a chat started after it is not caught by it. The Playwright specs replay both review scenarios (account switch after a failed first save; delete and delete-all while offline) with counter-checks that the same account keeps and uploads its own draft and that a confirmed delete is neither re-sent nor resurrected. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(react-ui): persist cleared chats immediately Navigation cancels the debounced cache write and can restore unsynced chats after Clear all. Save the cleared list with its pending deletion before returning, and cover immediate navigation in the browser spec. Assisted-by: Codex:GPT-6 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * test(react-ui): make the chat history sync specs deterministic - "clear all persists before navigation" opened a single chat, and the menu offers no Clear all for one chat, so the spec timed out in every run. It now opens two unsynced chats and checks that neither survives. Reverting 03cd9c115's save in clearAllChats turns it red again. - "a delete the server confirmed is not sent again" reopened the page as soon as the server had the request, before the page had the answer; the unconfirmed delete was then rightly sent again (4 of 5 runs). It now waits until the cache holds no pending delete. Docs-Not-Needed: test-only change. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * fix(chathistory): keep the chat's reasoning effort on the server reasoningEffort (#12700, #12716) is part of the chat the UI syncs since the master merge, but schema.Conversation had no field for it, so the server dropped it and a reload from the server reset the setting. Add the field. The handler spec that round-trips every chat field now includes reasoningEffort. A schema test reads serializeChat in useChat.js and fails for any key the UI sends that schema.Conversation cannot hold, so the next such drift shows up as a failing test rather than in review (it reports reasoningEffort on the previous head). Swagger and docs updated. Assisted-by: Claude Code:claude-opus-5-5 Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> * test(chat): use Ginkgo for the schema drift guard The new drift guard uses testing methods forbidden by repository lint. Keep its field coverage and fail-fast parser checks in Ginkgo/Gomega. Assisted-by: nib:gpt-6.1-sol --------- Signed-off-by: TLoE419 <tloemizuchizu@gmail.com> Signed-off-by: Stefan Walcz <stefan.walcz@walcz.de> Co-authored-by: TLoE419 <tloemizuchizu@gmail.com> Co-authored-by: localai-org-maint-bot <306269227+localai-org-maint-bot@users.noreply.github.com> Co-authored-by: mudler-agent <mudler-bot@c3os.io>
10500 lines
360 KiB
Go
10500 lines
360 KiB
Go
// Package swagger Code generated by swaggo/swag. DO NOT EDIT
|
||
package swagger
|
||
|
||
import "github.com/swaggo/swag"
|
||
|
||
const docTemplate = `{
|
||
"schemes": {{ marshal .Schemes }},
|
||
"swagger": "2.0",
|
||
"info": {
|
||
"description": "{{escape .Description}}",
|
||
"title": "{{.Title}}",
|
||
"contact": {
|
||
"name": "LocalAI",
|
||
"url": "https://localai.io"
|
||
},
|
||
"license": {
|
||
"name": "MIT",
|
||
"url": "https://raw.githubusercontent.com/mudler/LocalAI/master/LICENSE"
|
||
},
|
||
"version": "{{.Version}}"
|
||
},
|
||
"host": "{{.Host}}",
|
||
"basePath": "{{.BasePath}}",
|
||
"paths": {
|
||
"/3d/animate": {
|
||
"post": {
|
||
"tags": [
|
||
"3d"
|
||
],
|
||
"summary": "Creates a 3D animation (binary glTF / GLB).",
|
||
"parameters": [
|
||
{
|
||
"description": "Named conditioning inputs and model-specific parameters",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Model3DAnimationRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/3d/generations": {
|
||
"post": {
|
||
"tags": [
|
||
"3d"
|
||
],
|
||
"summary": "Creates a 3D asset (binary glTF / GLB) from a conditioning image.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Model3DRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/3d/remesh": {
|
||
"post": {
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"model/gltf-binary"
|
||
],
|
||
"tags": [
|
||
"3d"
|
||
],
|
||
"summary": "Applies watertight print remeshing to an existing 3D asset.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "3D model name",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "Source GLB",
|
||
"name": "mesh",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "Detail size as percent of the source bounding-box diagonal (0.35–2.5; default 0.5)",
|
||
"name": "detail",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Remeshed GLB",
|
||
"schema": {
|
||
"type": "file"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/jobs": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "List agent jobs",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Filter by task ID",
|
||
"name": "task_id",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Filter by status (pending, running, completed, failed, cancelled)",
|
||
"name": "status",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Max number of jobs to return",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Set to 'true' for admin cross-user listing",
|
||
"name": "all_users",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "jobs",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Job"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/jobs/execute": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Execute an agent job",
|
||
"parameters": [
|
||
{
|
||
"description": "Job execution request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.JobExecutionRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "job created",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.JobExecutionResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/jobs/{id}": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Get an agent job",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Job ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "job",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Job"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Delete an agent job",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Job ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "message",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/jobs/{id}/cancel": {
|
||
"post": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Cancel an agent job",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Job ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "message",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/tasks": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "List agent tasks",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Set to 'true' for admin cross-user listing",
|
||
"name": "all_users",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "tasks",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Task"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Create a new agent task",
|
||
"parameters": [
|
||
{
|
||
"description": "Task definition",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Task"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "id",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/tasks/{id}": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Get an agent task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Task ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "task",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Task"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Update an agent task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Task ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Updated task definition",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Task"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "message",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Delete an agent task",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Task ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "message",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/agent/tasks/{name}/execute": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"agent-jobs"
|
||
],
|
||
"summary": "Execute an agent task by name",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Task name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Optional template parameters",
|
||
"name": "parameters",
|
||
"in": "body",
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "job created",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.JobExecutionResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/aliases": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "List model aliases",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/localai.AliasInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-logs": {
|
||
"get": {
|
||
"description": "Returns a sorted list of model IDs that have captured backend process output",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "List models with backend logs",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Model IDs with logs",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-logs/{modelId}": {
|
||
"get": {
|
||
"description": "Returns all captured log lines (stdout/stderr) for the specified model's backend process",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Get backend logs for a model",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model ID",
|
||
"name": "modelId",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Log lines",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/model.BackendLogLine"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-logs/{modelId}/clear": {
|
||
"post": {
|
||
"description": "Removes all captured log lines for the specified model's backend process",
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Clear backend logs for a model",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model ID",
|
||
"name": "modelId",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "Logs cleared"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-traces": {
|
||
"get": {
|
||
"description": "Returns a bounded, newest-first page of captured backend traces (LLM calls, embeddings, TTS, etc). The heavy body and data fields are omitted unless full=true; fetch them per-trace from /api/backend-traces/{id}. Paging metadata is returned in the X-Total-Count, X-Trace-Offset and X-Trace-Limit headers.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "List backend operation traces",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "Maximum entries to return (default 50, max 1000, 0 for all)",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Number of entries to skip (default 0)",
|
||
"name": "offset",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "Include the body and data payloads (default false)",
|
||
"name": "full",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Backend operation traces",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-traces/clear": {
|
||
"post": {
|
||
"description": "Removes all captured backend operation traces from the buffer",
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Clear backend traces",
|
||
"responses": {
|
||
"204": {
|
||
"description": "Traces cleared"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/backend-traces/{id}": {
|
||
"get": {
|
||
"description": "Returns a single captured backend trace, including the body and data payloads omitted from the list response",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Get one backend operation trace",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Trace ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Backend operation trace",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Trace not found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/branding": {
|
||
"get": {
|
||
"description": "Returns the configured instance name, tagline, and asset URLs. Public — no authentication required.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"branding"
|
||
],
|
||
"summary": "Get instance branding",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.BrandingResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/branding/asset/{kind}": {
|
||
"post": {
|
||
"description": "Upload a custom logo, horizontal logo, or favicon. The file replaces any previous override for that kind.",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"branding"
|
||
],
|
||
"summary": "Upload a branding asset",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Asset kind: logo, logo_horizontal, or favicon",
|
||
"name": "kind",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "Image file (png, jpeg, svg, webp, ico — up to 5MiB)",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.BrandingResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Remove a custom branding asset; the UI falls back to the bundled LocalAI default.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"branding"
|
||
],
|
||
"summary": "Reset a branding asset to default",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Asset kind: logo, logo_horizontal, or favicon",
|
||
"name": "kind",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.BrandingResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/conversations": {
|
||
"get": {
|
||
"description": "Returns the live conversations, newest first, and in ` + "`" + `deleted` + "`" + ` the conversations the user deleted. A client must drop any local copy whose id appears in ` + "`" + `deleted` + "`" + ` instead of uploading it again.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "List chat conversations",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ConversationList"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Stores the conversation and returns it with its new server-assigned ` + "`" + `version` + "`" + `. ` + "`" + `createdAt` + "`" + `/` + "`" + `updatedAt` + "`" + ` are kept as sent (Unix ms). Writing a conversation the user deleted returns 410 and does not bring it back.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Save a chat conversation (upsert)",
|
||
"parameters": [
|
||
{
|
||
"description": "Conversation payload",
|
||
"name": "body",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Invalid id or body",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"410": {
|
||
"description": "Deleted",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Delete all chat conversations for the current user",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/conversations/bulk": {
|
||
"put": {
|
||
"description": "Upserts every conversation in the payload and deletes the user's other live conversations. Ids the user deleted earlier are not written and are listed in ` + "`" + `skipped` + "`" + `.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Replace all chat conversations",
|
||
"parameters": [
|
||
{
|
||
"description": "Conversations",
|
||
"name": "body",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ConversationBulkRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ConversationBulkResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Invalid id or body",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/conversations/{id}": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Get a chat conversation",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Conversation ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Never existed",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"410": {
|
||
"description": "Deleted",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"put": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Save a chat conversation by id (upsert)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Conversation ID (overrides the body id)",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Conversation payload",
|
||
"name": "body",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Invalid id or body",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"410": {
|
||
"description": "Deleted",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"description": "Deletes the conversation and keeps a tombstone so no client can write it back. Deleting an unknown or already deleted id succeeds.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"chat-history"
|
||
],
|
||
"summary": "Delete a chat conversation",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Conversation ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Invalid id",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/failover": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"failover"
|
||
],
|
||
"summary": "List failover chains and the health of their targets",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.FailoverChainsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/failover/events": {
|
||
"get": {
|
||
"description": "The first event is \"snapshot\" with the full state, then \"chain.switched\" and \"target.state\" events.",
|
||
"produces": [
|
||
"text/event-stream"
|
||
],
|
||
"tags": [
|
||
"failover"
|
||
],
|
||
"summary": "Stream failover events (server-sent events)",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/failover/{chain}": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"failover"
|
||
],
|
||
"summary": "Get one failover chain",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Chain name",
|
||
"name": "chain",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/failover.ChainStatus"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/failover/{chain}/pin": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"failover"
|
||
],
|
||
"summary": "Pin a failover chain to one target",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Chain name",
|
||
"name": "chain",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Target to pin",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.FailoverPinRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/failover.ChainStatus"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"failover"
|
||
],
|
||
"summary": "Remove the pin from a failover chain",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Chain name",
|
||
"name": "chain",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/failover.ChainStatus"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/instructions": {
|
||
"get": {
|
||
"description": "Returns a compact list of instruction areas with descriptions and URLs for detailed guides",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"instructions"
|
||
],
|
||
"summary": "List available API instruction areas",
|
||
"responses": {
|
||
"200": {
|
||
"description": "instructions list with hint",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/instructions/{name}": {
|
||
"get": {
|
||
"description": "Returns a markdown guide (default) or filtered OpenAPI fragment (format=json) for a named instruction",
|
||
"produces": [
|
||
"application/json",
|
||
"text/markdown"
|
||
],
|
||
"tags": [
|
||
"instructions"
|
||
],
|
||
"summary": "Get an instruction's API guide or OpenAPI fragment",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Instruction name (e.g. chat-inference, config-management)",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Response format: json for OpenAPI fragment, omit for markdown",
|
||
"name": "format",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "instruction documentation",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.APIInstructionResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "instruction not found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/config-json/{name}": {
|
||
"patch": {
|
||
"description": "Deep-merges the JSON patch body into the existing model config",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Partially update a model configuration",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "success message",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/config-metadata": {
|
||
"get": {
|
||
"description": "Returns config field metadata. Use ?section=\u003cid\u003e to filter by section, or omit for a section index.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "List model configuration field metadata",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Section ID to filter (e.g. 'general', 'llm', 'parameters') or 'all' for everything",
|
||
"name": "section",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Section index or filtered field metadata",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/config-metadata/autocomplete/{provider}": {
|
||
"get": {
|
||
"description": "Returns runtime-resolved values for dynamic providers (backends, models)",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Get dynamic autocomplete values for a config field",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Provider name (backends, models, models:chat, models:tts, models:transcript, models:vad)",
|
||
"name": "provider",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "values array",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/storage": {
|
||
"get": {
|
||
"description": "Per-model disk usage, shared-file relations and missing references under the models path",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Report model storage usage on disk",
|
||
"responses": {
|
||
"200": {
|
||
"description": "storage report",
|
||
"schema": {
|
||
"$ref": "#/definitions/gallery.StorageIndex"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/toggle-pinned/{name}/{action}": {
|
||
"put": {
|
||
"description": "Pin or unpin a model. Pinned models stay loaded and are excluded from automatic eviction.",
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Toggle model pinned status",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Action: 'pin' or 'unpin'",
|
||
"name": "action",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/vram-estimate": {
|
||
"post": {
|
||
"description": "Estimates VRAM based on model weight files at multiple context sizes",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Estimate VRAM usage for a model",
|
||
"parameters": [
|
||
{
|
||
"description": "VRAM estimation parameters",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/modeladmin.VRAMRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "VRAM estimate",
|
||
"schema": {
|
||
"$ref": "#/definitions/modeladmin.VRAMResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/{id}/load-cancel": {
|
||
"post": {
|
||
"description": "Cancels the load attempt named by ` + "`" + `job_id` + "`" + ` and stops its remote work. 200 means the attempt is gone or the worker confirmed the stop. 202 means the cancel is recorded and the stop is pending; the model is released after ` + "`" + `retry_after` + "`" + ` seconds regardless. 409 means a different attempt is current and carries its ` + "`" + `current_job_id` + "`" + `. Repeating the call is safe and does not extend the hold.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Cancel one distributed model load.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "The exact attempt to cancel",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadCancelRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Stopped, or no such load any more",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadCancelResponse"
|
||
}
|
||
},
|
||
"202": {
|
||
"description": "Cancel recorded; stop pending",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadCancelResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"401": {
|
||
"description": "Unauthorized",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"403": {
|
||
"description": "Forbidden",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Unknown model",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"409": {
|
||
"description": "A different attempt is current",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadCancelResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/{id}/load-status": {
|
||
"get": {
|
||
"description": "Returns the live state of a distributed cold load: job id, phase, node, byte progress, ETA, lease freshness, and for a failed attempt the cause, whether the stop is pending and when the model is released. 404 means no load exists for the model. A database error is 503, never an empty answer. This is the same ` + "`" + `loading` + "`" + ` object the 503 response carries while a model is still staging.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Report the progress of an in-flight model load.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Live load progress",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadingStatus"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "No load is running for this model",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"503": {
|
||
"description": "The job table could not be read",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/models/{name}/{action}": {
|
||
"put": {
|
||
"description": "Enable or disable a model from being loaded on demand. Disabled models remain installed but cannot be loaded.",
|
||
"tags": [
|
||
"config"
|
||
],
|
||
"summary": "Toggle model enabled/disabled status",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Action: 'enable' or 'disable'",
|
||
"name": "action",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/motion/sessions": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"motion"
|
||
],
|
||
"summary": "Create a motion capture session",
|
||
"parameters": [
|
||
{
|
||
"description": "Model, output profile and source clock origin",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.MotionSessionRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.MotionSessionInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/motion/sessions/{id}": {
|
||
"get": {
|
||
"tags": [
|
||
"motion"
|
||
],
|
||
"summary": "Get motion session status",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Session ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.MotionSessionInfo"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"motion"
|
||
],
|
||
"summary": "Close a motion session",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Session ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/motion/sessions/{id}/poses": {
|
||
"get": {
|
||
"tags": [
|
||
"motion"
|
||
],
|
||
"summary": "Stream motion frames and poses over a duplex WebSocket",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Session ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"101": {
|
||
"description": "Switching Protocols"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/motion/sessions/{id}/tickets": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"motion"
|
||
],
|
||
"summary": "Issue a motion WebSocket ticket (30 seconds, single use)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Session ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "Browser origin",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.MotionTicketRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/auth.WebSocketTicketResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/nodes/models": {
|
||
"get": {
|
||
"tags": [
|
||
"Nodes"
|
||
],
|
||
"summary": "List all loaded models cluster-wide",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/nodes.NodeModel"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/nodes/{id}/max-replicas-per-model": {
|
||
"put": {
|
||
"tags": [
|
||
"Nodes"
|
||
],
|
||
"summary": "Update a node's max replicas per model",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Node ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "New value",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.UpdateMaxReplicasPerModelRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "value must be \u003e= 1",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "node not found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"Nodes"
|
||
],
|
||
"summary": "Reset a node's max replicas per model to the worker default",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Node ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "node not found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/nodes/{id}/vram-budget": {
|
||
"put": {
|
||
"tags": [
|
||
"Nodes"
|
||
],
|
||
"summary": "Update a node's VRAM allocation budget",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Node ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "New value (\\",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.UpdateVRAMBudgetRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "invalid budget",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "node not found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"tags": [
|
||
"Nodes"
|
||
],
|
||
"summary": "Reset a node's VRAM budget to the worker default",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Node ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "node not found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/p2p": {
|
||
"get": {
|
||
"tags": [
|
||
"p2p"
|
||
],
|
||
"summary": "Returns available P2P nodes",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.P2PNodesResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/p2p/token": {
|
||
"get": {
|
||
"tags": [
|
||
"p2p"
|
||
],
|
||
"summary": "Show the P2P token",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/pii/analyze": {
|
||
"post": {
|
||
"description": "Runs the configured PII detectors (NER and/or pattern tiers) over the supplied text and returns the matched entity spans with the policy action that would fire. Detection only — the text is not modified and no block is enforced. Select detectors explicitly via ` + "`" + `detectors` + "`" + `, or pass a consuming ` + "`" + `model` + "`" + ` to use its effective policy: the model's own ` + "`" + `pii.detectors` + "`" + `, else the instance-wide ` + "`" + `pii_default_detectors` + "`" + `. A model with PII disabled, or enabled with nothing to scan with, is a 400. The raw matched value is never returned; admins may set ` + "`" + `reveal:true` + "`" + ` for the audit hash prefix.",
|
||
"tags": [
|
||
"pii"
|
||
],
|
||
"summary": "Detect PII entities in a string (no mutation).",
|
||
"parameters": [
|
||
{
|
||
"description": "text + detector selection",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.PIIAnalyzeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Detected entities",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.PIIAnalyzeResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/pii/redact": {
|
||
"post": {
|
||
"description": "Runs the configured PII detectors over the text and applies each detector model's policy: masked spans are replaced with ` + "`" + `[REDACTED:\u003cid\u003e]` + "`" + `, allow spans pass through, and a single block action causes a 400 (type ` + "`" + `pii_blocked` + "`" + `) carrying the offending entities — the text is never returned in that case. Select detectors via ` + "`" + `detectors` + "`" + `, or a consuming ` + "`" + `model` + "`" + `'s effective policy (its own ` + "`" + `pii.detectors` + "`" + `, else the instance-wide ` + "`" + `pii_default_detectors` + "`" + `; PII must be enabled on the model). Records audit events (origin ` + "`" + `pii_redact` + "`" + `) visible at /api/pii/events.",
|
||
"tags": [
|
||
"pii"
|
||
],
|
||
"summary": "Redact PII in a string by applying the configured policy.",
|
||
"parameters": [
|
||
{
|
||
"description": "text + detector selection",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.PIIAnalyzeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Redacted text + entities",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.PIIRedactResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/router/decide": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"router"
|
||
],
|
||
"summary": "Classify a prompt against a router model's policies (decision oracle)",
|
||
"parameters": [
|
||
{
|
||
"description": "decide params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterDecideRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterDecideResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"503": {
|
||
"description": "Service Unavailable",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/router/{name}/corpus": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"router"
|
||
],
|
||
"summary": "Seed the KNN routing corpus with labelled example prompts",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "router model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "labelled exemplars",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterCorpusAddRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterCorpusAddResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"delete": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"router"
|
||
],
|
||
"summary": "Clear a router's KNN corpus",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "router model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterCorpusClearResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/router/{name}/corpus/stats": {
|
||
"get": {
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"router"
|
||
],
|
||
"summary": "Inspect a router's KNN corpus (label counts only, never texts)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "router model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.RouterCorpusStatsResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/traces": {
|
||
"get": {
|
||
"description": "Returns a bounded, newest-first page of captured API exchange traces. Request and response bodies plus headers are omitted unless full=true; fetch them per-trace from /api/traces/{id}. Paging metadata is returned in the X-Total-Count, X-Trace-Offset and X-Trace-Limit headers.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "List API request/response traces",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "Maximum entries to return (default 50, max 1000, 0 for all)",
|
||
"name": "limit",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Number of entries to skip (default 0)",
|
||
"name": "offset",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "Include request/response bodies and headers (default false)",
|
||
"name": "full",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Traced API exchanges",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/traces/clear": {
|
||
"post": {
|
||
"description": "Removes all captured API request/response traces from the buffer",
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Clear API traces",
|
||
"responses": {
|
||
"204": {
|
||
"description": "Traces cleared"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/traces/summary": {
|
||
"get": {
|
||
"description": "Returns request, failure and latency totals over a recent window, plus a bucketed series for sparklines. Exists so callers wanting three numbers do not have to fetch the whole trace list and count it themselves.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Summarize recent API traces",
|
||
"parameters": [
|
||
{
|
||
"type": "integer",
|
||
"description": "Window in hours (default 24, max 168)",
|
||
"name": "hours",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Counted trace totals",
|
||
"schema": {
|
||
"$ref": "#/definitions/middleware.TraceSummary"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/traces/{id}": {
|
||
"get": {
|
||
"description": "Returns a single captured API exchange, including the request and response bodies omitted from the list response",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Get one API trace",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Trace ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Traced API exchange",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Trace not found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/voice-profiles": {
|
||
"get": {
|
||
"description": "List saved voice-cloning references without exposing filesystem paths.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"audio",
|
||
"voice-profiles"
|
||
],
|
||
"summary": "List voice profiles",
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.VoiceProfileListResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"post": {
|
||
"description": "Save a consent-confirmed PCM WAV reference clip and exact transcript for voice cloning. Admin-only.",
|
||
"consumes": [
|
||
"multipart/form-data",
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"audio",
|
||
"voice-profiles"
|
||
],
|
||
"summary": "Create a voice profile",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Display name",
|
||
"name": "name",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Optional description",
|
||
"name": "description",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Optional language tag",
|
||
"name": "language",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Exact transcript of the reference clip",
|
||
"name": "transcript",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "Confirms authorization to clone the voice",
|
||
"name": "consent_confirmed",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "16-bit PCM WAV, preferably mono 24 kHz, 1-120 seconds, up to 50 MiB",
|
||
"name": "audio",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"201": {
|
||
"description": "Created",
|
||
"schema": {
|
||
"$ref": "#/definitions/voiceprofile.Profile"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
},
|
||
"413": {
|
||
"description": "Request Entity Too Large",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/voice-profiles/{id}": {
|
||
"delete": {
|
||
"description": "Permanently remove a saved voice-cloning profile. Admin-only.",
|
||
"tags": [
|
||
"audio",
|
||
"voice-profiles"
|
||
],
|
||
"summary": "Delete a voice profile",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Voice profile UUID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/api/voice-profiles/{id}/audio": {
|
||
"get": {
|
||
"description": "Stream the saved reference WAV for an authenticated TTS user.",
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"audio",
|
||
"voice-profiles"
|
||
],
|
||
"summary": "Preview voice profile audio",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Voice profile UUID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/audio/transform": {
|
||
"post": {
|
||
"description": "Runs an audio-in / audio-out transform conditioned on an optional auxiliary reference signal. Concrete transforms include AEC + noise suppression + dereverberation (LocalVQE), voice conversion (reference = target speaker), and pitch shifting. The backend determines the operation; pass model-specific tuning via repeated ` + "`" + `params[\u003ckey\u003e]=\u003cvalue\u003e` + "`" + ` form fields.",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Transform audio (echo cancellation, noise suppression, voice conversion, etc.)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "model",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "primary input audio file",
|
||
"name": "audio",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "auxiliary reference audio (loopback for AEC, target voice for conversion, etc.)",
|
||
"name": "reference",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "wav | mp3 | ogg | flac",
|
||
"name": "response_format",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "desired output sample rate in Hz; omit for the backend's own rate, otherwise 8000-192000",
|
||
"name": "sample_rate",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "transformed audio file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/audio/transformations": {
|
||
"post": {
|
||
"description": "Runs an audio-in / audio-out transform conditioned on an optional auxiliary reference signal. Concrete transforms include AEC + noise suppression + dereverberation (LocalVQE), voice conversion (reference = target speaker), and pitch shifting. The backend determines the operation; pass model-specific tuning via repeated ` + "`" + `params[\u003ckey\u003e]=\u003cvalue\u003e` + "`" + ` form fields.",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Transform audio (echo cancellation, noise suppression, voice conversion, etc.)",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "model",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "primary input audio file",
|
||
"name": "audio",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "auxiliary reference audio (loopback for AEC, target voice for conversion, etc.)",
|
||
"name": "reference",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "wav | mp3 | ogg | flac",
|
||
"name": "response_format",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "desired output sample rate in Hz; omit for the backend's own rate, otherwise 8000-192000",
|
||
"name": "sample_rate",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "transformed audio file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/audio/transformations/stream": {
|
||
"get": {
|
||
"description": "Streams binary PCM frames in (interleaved stereo: ch0=audio, ch1=reference) and out (mono). The model must support the audio_transform use case. Any-to-any models such as liquid-audio use the OpenAI Realtime API instead. The first message must be a JSON ` + "`" + `session.update` + "`" + ` envelope describing model + sample format + frame size + backend params. Server emits binary PCM on the same cadence.",
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Bidirectional realtime audio transform over WebSocket.",
|
||
"responses": {}
|
||
}
|
||
},
|
||
"/backend/load": {
|
||
"post": {
|
||
"description": "Loads the named model (or, for a realtime pipeline, all of its sub-models) into memory so subsequent requests pay no cold-start cost. The inverse of /backend/shutdown.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Pre-load a model into memory",
|
||
"parameters": [
|
||
{
|
||
"description": "Model to load",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Model loaded",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Missing model name",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadResponse"
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Load failed (Loaded lists any sub-models that did load)",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelLoadResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backend/monitor": {
|
||
"get": {
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Backend monitor endpoint",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Name of the model to monitor",
|
||
"name": "model",
|
||
"in": "query",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/proto.StatusResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backend/shutdown": {
|
||
"post": {
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Backend shutdown endpoint",
|
||
"parameters": [
|
||
{
|
||
"description": "Backend statistics request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.BackendMonitorRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {}
|
||
}
|
||
},
|
||
"/backends": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "List all Backends",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.GalleryBackend"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/apply": {
|
||
"post": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Install backends to LocalAI.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.GalleryBackend"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.BackendResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/available": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "List all available Backends",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.GalleryBackend"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/delete/{name}": {
|
||
"post": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "delete backends from LocalAI.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Backend name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.BackendResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/galleries": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "List all Galleries",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/config.Gallery"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/jobs": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Returns all the jobs status progress",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/galleryop.OpStatus"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/jobs/{uuid}": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Returns the job status",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/galleryop.OpStatus"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/known": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "List all known Backends (importer registry + curated pref-only + installed-on-disk)",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.KnownBackend"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/upgrade/{name}": {
|
||
"post": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Upgrade a backend",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Backend name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.BackendResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/upgrades": {
|
||
"get": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Get available backend upgrades",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/gallery.UpgradeInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/backends/upgrades/check": {
|
||
"post": {
|
||
"tags": [
|
||
"backends"
|
||
],
|
||
"summary": "Force backend upgrade check",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/gallery.UpgradeInfo"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/branding/asset/{kind}": {
|
||
"get": {
|
||
"description": "Serves the admin-uploaded logo, horizontal logo, or favicon. 404 when no override is set.",
|
||
"produces": [
|
||
"image/*"
|
||
],
|
||
"tags": [
|
||
"branding"
|
||
],
|
||
"summary": "Serve a custom branding asset",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Asset kind: logo, logo_horizontal, or favicon",
|
||
"name": "kind",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK"
|
||
},
|
||
"404": {
|
||
"description": "Not Found"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/metrics": {
|
||
"get": {
|
||
"produces": [
|
||
"text/plain"
|
||
],
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Prometheus metrics endpoint",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Prometheus metrics",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/apply": {
|
||
"post": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Install models to LocalAI.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.GalleryModel"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.GalleryResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/available": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "List installable models.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.Metadata"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/delete/{name}": {
|
||
"post": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "delete models to LocalAI.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model name",
|
||
"name": "name",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.GalleryResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/galleries": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "List all Galleries",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/config.Gallery"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/import": {
|
||
"post": {
|
||
"description": "Writes the posted model configuration. A config referencing\nremote assets (download_files entries, URI-valued model/mmproj)\nis enqueued on the gallery job queue and answered with a job id\nplus status URL to poll, like a gallery install; a config with\nno downloads is written synchronously and answered with a\nplain success response. A queued import runs the gallery\ninstaller, which also adds recommended inference defaults the\nconfig leaves unset and installs the backend when automatic\nbackend installation is enabled; the synchronous path stores\nthe body as posted.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Import a model from a raw YAML or JSON configuration",
|
||
"parameters": [
|
||
{
|
||
"description": "model configuration (YAML or JSON body)",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"type": "object"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "remote assets present: job id and status URL",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.GalleryResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "invalid or incomplete configuration",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.ModelResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/jobs": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Returns all the jobs status progress",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/galleryop.OpStatus"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/models/jobs/{uuid}": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "Returns the job status",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/galleryop.OpStatus"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/system": {
|
||
"get": {
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Show the LocalAI instance information",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemInformationResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tokenMetrics": {
|
||
"get": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"tokenize"
|
||
],
|
||
"summary": "Get TokenMetrics for Active Slot.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "generated audio/wav file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/tts": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Generates audio from the input text.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.TTSRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "generated audio/wav file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/audio/classification": {
|
||
"post": {
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Classify sound events in audio (audio tagging).",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "model",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "audio file",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "number of top tags to return (0 = backend default)",
|
||
"name": "top_k",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "drop tags scoring below this value",
|
||
"name": "threshold",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SoundClassificationResult"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/audio/diarization": {
|
||
"post": {
|
||
"description": "JSON accepts model, file (raw base64 audio), include_text, include_speaker_profiles, include_sounds and response_format. Profiles require voice-recognition permission and json or verbose_json; unsupported backends return 501.",
|
||
"consumes": [
|
||
"multipart/form-data",
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Identify speakers in audio (who spoke when).",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "model",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "audio file",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "exact speaker count (\u003e0 forces; 0 = auto)",
|
||
"name": "num_speakers",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "lower bound when auto-detecting",
|
||
"name": "min_speakers",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "upper bound when auto-detecting",
|
||
"name": "max_speakers",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "clustering distance threshold when num_speakers is unknown",
|
||
"name": "clustering_threshold",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "discard segments shorter than this (seconds)",
|
||
"name": "min_duration_on",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "merge gaps shorter than this (seconds)",
|
||
"name": "min_duration_off",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "audio language hint (only meaningful for backends that bundle ASR)",
|
||
"name": "language",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "export portable biometric profiles (voice-recognition permission; JSON formats only)",
|
||
"name": "include_speaker_profiles",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "include per-segment transcript when the backend supports it",
|
||
"name": "include_text",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "include closed sound events (start, end, label, confidence) when the model has a sound_model companion; otherwise 501 include_sounds_unsupported (JSON formats only)",
|
||
"name": "include_sounds",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "json (default), verbose_json, or rttm",
|
||
"name": "response_format",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DiarizationResult"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/audio/speech": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Generates audio from the input text.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.TTSRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "generated audio/wav file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/audio/transcriptions": {
|
||
"post": {
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Transcribes audio into the input language.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "model",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "file",
|
||
"name": "file",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "number",
|
||
"description": "sampling temperature",
|
||
"name": "temperature",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
},
|
||
"collectionFormat": "csv",
|
||
"description": "timestamp granularities (word, segment)",
|
||
"name": "timestamp_granularities",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "boolean",
|
||
"description": "stream partial results as SSE",
|
||
"name": "stream",
|
||
"in": "formData"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/audio/voices": {
|
||
"get": {
|
||
"description": "List named voices and their language and gender metadata. Use the optional model query parameter to filter the response.",
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "List text-to-speech voices",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Installed model name",
|
||
"name": "model",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/localai.TTSVoicesResponse"
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ErrorResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/chat/completions": {
|
||
"post": {
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Generate a chat completions for a given prompt and model.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/completions": {
|
||
"post": {
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Generate completions for a given prompt and model.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/decisions": {
|
||
"post": {
|
||
"description": "Uses the same local decision and NER execution as SystemOne. Supports inline images on capable backends; confidence is not OpenAI calibrated.",
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"systemone"
|
||
],
|
||
"summary": "Answer ordered predicate, choice and score questions.",
|
||
"parameters": [
|
||
{
|
||
"description": "input + questions + model",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DecisionsRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DecisionsResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/depth": {
|
||
"post": {
|
||
"tags": [
|
||
"depth"
|
||
],
|
||
"summary": "Estimates per-pixel depth (and optionally pose/points) from an image.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DepthRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DepthResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/detection": {
|
||
"post": {
|
||
"tags": [
|
||
"detection"
|
||
],
|
||
"summary": "Detects objects in the input image.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DetectionRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DetectionResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/detokenize": {
|
||
"post": {
|
||
"tags": [
|
||
"tokenize"
|
||
],
|
||
"summary": "Detokenize the input.",
|
||
"parameters": [
|
||
{
|
||
"description": "Request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DetokenizeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.DetokenizeResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/edits": {
|
||
"post": {
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "OpenAI edit endpoint",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/embeddings": {
|
||
"post": {
|
||
"tags": [
|
||
"embeddings"
|
||
],
|
||
"summary": "Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/analyze": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Analyze demographic attributes (age, gender, ...) of faces.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceAnalyzeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceAnalyzeResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/embed": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Extract a face embedding from an image.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceEmbedRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceEmbedResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/forget": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Remove a previously-registered face by ID.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceForgetRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/identify": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Identify a face against the registered database (1:N recognition).",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceIdentifyRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceIdentifyResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/register": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Register a face for 1:N identification.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceRegisterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceRegisterResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/face/verify": {
|
||
"post": {
|
||
"tags": [
|
||
"face-recognition"
|
||
],
|
||
"summary": "Verify that two images depict the same person.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceVerifyRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.FaceVerifyResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/images/generations": {
|
||
"post": {
|
||
"tags": [
|
||
"images"
|
||
],
|
||
"summary": "Creates an image given a prompt.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/images/inpainting": {
|
||
"post": {
|
||
"description": "Perform image inpainting. Accepts multipart/form-data with ` + "`" + `image` + "`" + ` and ` + "`" + `mask` + "`" + ` files.",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"images"
|
||
],
|
||
"summary": "Image inpainting",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model identifier",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Text prompt guiding the generation",
|
||
"name": "prompt",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Number of inference steps (default 25)",
|
||
"name": "steps",
|
||
"in": "formData"
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "Original image file",
|
||
"name": "image",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "Mask image file (white = area to inpaint)",
|
||
"name": "mask",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/images/upscale": {
|
||
"post": {
|
||
"description": "Upscale an image using a specified model (e.g. stable-diffusion-x4-upscaler). Accepts multipart/form-data.",
|
||
"consumes": [
|
||
"multipart/form-data"
|
||
],
|
||
"produces": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"images"
|
||
],
|
||
"summary": "Image upscaling",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Upscaler model identifier (e.g. stable-diffusion-x4-upscaler)",
|
||
"name": "model",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "file",
|
||
"description": "Input image file",
|
||
"name": "image",
|
||
"in": "formData",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Upscale factor: integer from 1 to 16; must match the model native scale",
|
||
"name": "scale",
|
||
"in": "formData",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"500": {
|
||
"description": "Internal Server Error",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/mcp/chat/completions": {
|
||
"post": {
|
||
"tags": [
|
||
"mcp"
|
||
],
|
||
"summary": "MCP chat completions with automatic tool execution",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/messages": {
|
||
"post": {
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Generate a message response for the given messages and model.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.AnthropicRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.AnthropicResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/models": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "List and describe the various models available in the API.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelsDataResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/models/capabilities": {
|
||
"get": {
|
||
"tags": [
|
||
"models"
|
||
],
|
||
"summary": "List available models enriched with capabilities and input/output modalities.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModelCapabilitiesResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/moderations": {
|
||
"post": {
|
||
"tags": [
|
||
"moderation"
|
||
],
|
||
"summary": "Classify text for potentially harmful content.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModerationRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ModerationResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/rerank": {
|
||
"post": {
|
||
"tags": [
|
||
"rerank"
|
||
],
|
||
"summary": "Reranks a list of phrases by relevance to a given text query.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.JINARerankRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.JINARerankResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/responses": {
|
||
"post": {
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Create a response using the Open Responses API",
|
||
"parameters": [
|
||
{
|
||
"description": "Request body",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenResponsesRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ORResponseResource"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/responses/{id}": {
|
||
"get": {
|
||
"description": "Retrieve a response by ID. Can be used for polling background responses or resuming streaming responses.",
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Get a response by ID",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Response ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"type": "string",
|
||
"description": "Set to 'true' to resume streaming",
|
||
"name": "stream",
|
||
"in": "query"
|
||
},
|
||
{
|
||
"type": "integer",
|
||
"description": "Sequence number to resume from (for streaming)",
|
||
"name": "starting_after",
|
||
"in": "query"
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ORResponseResource"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/responses/{id}/cancel": {
|
||
"post": {
|
||
"description": "Cancel a background response if it's still in progress",
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Cancel a response",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Response ID",
|
||
"name": "id",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ORResponseResource"
|
||
}
|
||
},
|
||
"400": {
|
||
"description": "Bad Request",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
},
|
||
"404": {
|
||
"description": "Not Found",
|
||
"schema": {
|
||
"type": "object",
|
||
"additionalProperties": true
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/slots/restore": {
|
||
"post": {
|
||
"description": "Loads the prompt cache that a save call returned an ID for into one slot of a llama-cpp model. The ID must have been issued for this model. The state is only as fresh as the save. Admin only.",
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Restore a slot's prompt cache by ID.",
|
||
"parameters": [
|
||
{
|
||
"description": "Request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SlotCacheRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SlotCacheResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/slots/save": {
|
||
"post": {
|
||
"description": "Writes the prompt cache (KV state) of one slot of a llama-cpp model under the directory set by the model's slot_save_path option, and returns an ID for it. The server issues the ID; the client cannot choose a name or a path. The server keeps at most 32 saves per model and deletes the oldest one beyond that. Admin only.",
|
||
"tags": [
|
||
"inference"
|
||
],
|
||
"summary": "Save a slot's prompt cache.",
|
||
"parameters": [
|
||
{
|
||
"description": "Request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SlotCacheRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SlotCacheResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/sound-generation": {
|
||
"post": {
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Generates audio from the input text.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.ElevenLabsSoundGenerationRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/systemone": {
|
||
"post": {
|
||
"description": "Runs zero-shot NER over the supplied state and answers each question. Question types: noul (binary entity presence), choice (pick one option), score (pick one level).",
|
||
"tags": [
|
||
"systemone"
|
||
],
|
||
"summary": "Answer structured-extraction questions over state text.",
|
||
"parameters": [
|
||
{
|
||
"description": "state + questions",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOneRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOneResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/systemone/permute": {
|
||
"post": {
|
||
"description": "Re-runs one choice question under n_perm option orders. Reports per-order probabilities, argmax stability, and spread.",
|
||
"tags": [
|
||
"systemone"
|
||
],
|
||
"summary": "Re-run a choice question under multiple option orders.",
|
||
"parameters": [
|
||
{
|
||
"description": "request + question + n_perm + seed",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOnePermuteRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOnePermuteResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/systemone/separate": {
|
||
"post": {
|
||
"description": "Runs N independent NER passes, one per question, against the same state. Response shape matches /v1/systemone.",
|
||
"tags": [
|
||
"systemone"
|
||
],
|
||
"summary": "Answer each question in a separate NER pass.",
|
||
"parameters": [
|
||
{
|
||
"description": "state + questions",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOneRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "OK",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.SystemOneResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/text-to-speech/{voice-id}": {
|
||
"post": {
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Generates audio from the input text.",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Account ID",
|
||
"name": "voice-id",
|
||
"in": "path",
|
||
"required": true
|
||
},
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.TTSRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/tokenMetrics": {
|
||
"get": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"produces": [
|
||
"audio/x-wav"
|
||
],
|
||
"tags": [
|
||
"tokenize"
|
||
],
|
||
"summary": "Get TokenMetrics for Active Slot.",
|
||
"responses": {
|
||
"200": {
|
||
"description": "generated audio/wav file",
|
||
"schema": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/tokenize": {
|
||
"post": {
|
||
"tags": [
|
||
"tokenize"
|
||
],
|
||
"summary": "Tokenize the input.",
|
||
"parameters": [
|
||
{
|
||
"description": "Request",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.TokenizeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.TokenizeResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/analyze": {
|
||
"post": {
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Analyze demographic attributes (age, gender, emotion) from a voice clip.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceAnalyzeRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceAnalyzeResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/embed": {
|
||
"post": {
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Extract a speaker embedding from an audio clip.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceEmbedRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceEmbedResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/forget": {
|
||
"post": {
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Remove a previously-registered speaker by ID.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceForgetRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"204": {
|
||
"description": "No Content"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/identify": {
|
||
"post": {
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Identify a speaker against the registered database (1:N recognition).",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceIdentifyRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceIdentifyResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/register": {
|
||
"post": {
|
||
"description": "Supply either audio or speaker_profiles plus an explicit numeric speaker_slot. The selected model must expose matching trusted encoder metadata for portable enrollment. Registrations are global and ephemeral, with a fresh ID for each request.",
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Register a speaker for 1:N identification.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceRegisterRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceRegisterResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/v1/voice/verify": {
|
||
"post": {
|
||
"tags": [
|
||
"voice-recognition"
|
||
],
|
||
"summary": "Verify that two audio clips were spoken by the same person.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceVerifyRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VoiceVerifyResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/vad": {
|
||
"post": {
|
||
"consumes": [
|
||
"application/json"
|
||
],
|
||
"tags": [
|
||
"audio"
|
||
],
|
||
"summary": "Detect voice fragments in an audio stream",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VADRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/proto.VADResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/video": {
|
||
"post": {
|
||
"tags": [
|
||
"video"
|
||
],
|
||
"summary": "Creates a video from a prompt and optional image or audio conditioning.",
|
||
"parameters": [
|
||
{
|
||
"description": "query params",
|
||
"name": "request",
|
||
"in": "body",
|
||
"required": true,
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.VideoRequest"
|
||
}
|
||
}
|
||
],
|
||
"responses": {
|
||
"200": {
|
||
"description": "Response",
|
||
"schema": {
|
||
"$ref": "#/definitions/schema.OpenAIResponse"
|
||
}
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"/ws/backend-logs/{modelId}": {
|
||
"get": {
|
||
"description": "Opens a WebSocket connection for real-time backend log streaming. Sends an initial batch of existing lines (type \"initial\"), then streams new lines as they appear (type \"line\"). Supports ping/pong keepalive.",
|
||
"tags": [
|
||
"monitoring"
|
||
],
|
||
"summary": "Stream backend logs via WebSocket",
|
||
"parameters": [
|
||
{
|
||
"type": "string",
|
||
"description": "Model ID",
|
||
"name": "modelId",
|
||
"in": "path",
|
||
"required": true
|
||
}
|
||
],
|
||
"responses": {}
|
||
}
|
||
}
|
||
},
|
||
"definitions": {
|
||
"auth.WebSocketTicketResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"expires_at": {
|
||
"type": "string"
|
||
},
|
||
"ticket": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"config.Gallery": {
|
||
"type": "object",
|
||
"properties": {
|
||
"artifact_verification": {
|
||
"description": "ArtifactVerification overrides Verification only for the gallery OCI artifact.\nBackend images keep their separate Verification policy.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/config.GalleryVerification"
|
||
}
|
||
]
|
||
},
|
||
"mirrors": {
|
||
"description": "Mirrors are tried in order when URL cannot be fetched. They are a\nfallback for availability, not a load-balancing pool: the primary is\nalways preferred, and a mirror is only consulted after the one before\nit fails. Any URI the gallery loader understands works here\n(https://, github:, file://, oci://).",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"verification": {
|
||
"$ref": "#/definitions/config.GalleryVerification"
|
||
}
|
||
}
|
||
},
|
||
"config.GalleryVerification": {
|
||
"type": "object",
|
||
"properties": {
|
||
"identity": {
|
||
"type": "string"
|
||
},
|
||
"identity_regex": {
|
||
"type": "string"
|
||
},
|
||
"issuer": {
|
||
"type": "string"
|
||
},
|
||
"issuer_regex": {
|
||
"type": "string"
|
||
},
|
||
"not_before": {
|
||
"description": "NotBefore is an RFC3339 timestamp. Empty disables the time check.",
|
||
"type": "string"
|
||
},
|
||
"source_repository": {
|
||
"description": "SourceRepository is an https URL compared exactly against the\ncertificate's source-repository extension. Empty skips the check.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"config.TTSVoice": {
|
||
"type": "object",
|
||
"properties": {
|
||
"gender": {
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"failover.ChainState": {
|
||
"type": "string",
|
||
"enum": [
|
||
"primary",
|
||
"fallback",
|
||
"degraded"
|
||
],
|
||
"x-enum-varnames": [
|
||
"ChainPrimary",
|
||
"ChainFallback",
|
||
"ChainDegraded"
|
||
]
|
||
},
|
||
"failover.ChainStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"active": {
|
||
"type": "string"
|
||
},
|
||
"active_since": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"pinned": {
|
||
"type": "string"
|
||
},
|
||
"state": {
|
||
"$ref": "#/definitions/failover.ChainState"
|
||
},
|
||
"targets": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/failover.TargetStatus"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"failover.Kind": {
|
||
"type": "string",
|
||
"enum": [
|
||
"local",
|
||
"remote"
|
||
],
|
||
"x-enum-varnames": [
|
||
"KindLocal",
|
||
"KindRemote"
|
||
]
|
||
},
|
||
"failover.TargetState": {
|
||
"type": "string",
|
||
"enum": [
|
||
"healthy",
|
||
"down",
|
||
"recovering",
|
||
"missing"
|
||
],
|
||
"x-enum-varnames": [
|
||
"StateHealthy",
|
||
"StateDown",
|
||
"StateRecovering",
|
||
"StateMissing"
|
||
]
|
||
},
|
||
"failover.TargetStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"consecutive_ok": {
|
||
"type": "integer"
|
||
},
|
||
"kind": {
|
||
"$ref": "#/definitions/failover.Kind"
|
||
},
|
||
"last_error": {
|
||
"type": "string"
|
||
},
|
||
"last_probe": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"state": {
|
||
"$ref": "#/definitions/failover.TargetState"
|
||
},
|
||
"warm": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"functions.Function": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"parameters": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"strict": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"functions.Item": {
|
||
"type": "object",
|
||
"properties": {
|
||
"properties": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"functions.JSONFunctionStructure": {
|
||
"type": "object",
|
||
"properties": {
|
||
"$defs": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"anyOf": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/functions.Item"
|
||
}
|
||
},
|
||
"oneOf": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/functions.Item"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"functions.Tool": {
|
||
"type": "object",
|
||
"properties": {
|
||
"function": {
|
||
"$ref": "#/definitions/functions.Function"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gallery.File": {
|
||
"type": "object",
|
||
"properties": {
|
||
"filename": {
|
||
"type": "string"
|
||
},
|
||
"sha256": {
|
||
"type": "string"
|
||
},
|
||
"uri": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gallery.GalleryBackend": {
|
||
"type": "object",
|
||
"properties": {
|
||
"alias": {
|
||
"type": "string"
|
||
},
|
||
"backend": {
|
||
"description": "Backend is the resolved backend engine for this model (e.g. \"llama-cpp\").\nPopulated at load time from overrides, inline config, or the URL-referenced config file.",
|
||
"type": "string"
|
||
},
|
||
"capabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"description": "AdditionalFiles are used to add additional files to the model",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.File"
|
||
}
|
||
},
|
||
"gallery": {
|
||
"description": "Gallery is a reference to the gallery which contains the model",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/config.Gallery"
|
||
}
|
||
]
|
||
},
|
||
"icon": {
|
||
"type": "string"
|
||
},
|
||
"installed": {
|
||
"description": "Installed is used to indicate if the model is installed or not",
|
||
"type": "boolean"
|
||
},
|
||
"license": {
|
||
"type": "string"
|
||
},
|
||
"mirrors": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"sha256": {
|
||
"description": "SHA256 is the expected sha256 of the backend tarball at URI / Mirrors.\nEmpty disables the integrity check; OCI URIs carry their own digest.",
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"description": "Size is an optional hardcoded model size string (e.g. \"500MB\", \"14.5GB\").\nUsed when the size cannot be estimated automatically.",
|
||
"type": "string"
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"uri": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"urls": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gallery.Metadata": {
|
||
"type": "object",
|
||
"properties": {
|
||
"backend": {
|
||
"description": "Backend is the resolved backend engine for this model (e.g. \"llama-cpp\").\nPopulated at load time from overrides, inline config, or the URL-referenced config file.",
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"description": "AdditionalFiles are used to add additional files to the model",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.File"
|
||
}
|
||
},
|
||
"gallery": {
|
||
"description": "Gallery is a reference to the gallery which contains the model",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/config.Gallery"
|
||
}
|
||
]
|
||
},
|
||
"icon": {
|
||
"type": "string"
|
||
},
|
||
"installed": {
|
||
"description": "Installed is used to indicate if the model is installed or not",
|
||
"type": "boolean"
|
||
},
|
||
"license": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"size": {
|
||
"description": "Size is an optional hardcoded model size string (e.g. \"500MB\", \"14.5GB\").\nUsed when the size cannot be estimated automatically.",
|
||
"type": "string"
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"urls": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"gallery.ModelStorage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"files": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"missing": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"shared_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"size_bytes": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"gallery.NodeDriftInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"digest": {
|
||
"type": "string"
|
||
},
|
||
"node_id": {
|
||
"type": "string"
|
||
},
|
||
"node_name": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gallery.StorageFile": {
|
||
"type": "object",
|
||
"properties": {
|
||
"missing": {
|
||
"type": "boolean"
|
||
},
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"path": {
|
||
"description": "Path is relative to the models directory.",
|
||
"type": "string"
|
||
},
|
||
"size_bytes": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"gallery.StorageIndex": {
|
||
"type": "object",
|
||
"properties": {
|
||
"errors": {
|
||
"description": "Errors carries per-config failures (malformed YAML, path escapes),\nreported rather than fatal so one broken config cannot blank the\nwhole report.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"files": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.StorageFile"
|
||
}
|
||
},
|
||
"models": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.ModelStorage"
|
||
}
|
||
},
|
||
"total_bytes": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"gallery.UpgradeInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"available_digest": {
|
||
"type": "string"
|
||
},
|
||
"available_version": {
|
||
"type": "string"
|
||
},
|
||
"backend_name": {
|
||
"type": "string"
|
||
},
|
||
"installed_digest": {
|
||
"type": "string"
|
||
},
|
||
"installed_version": {
|
||
"type": "string"
|
||
},
|
||
"node_drift": {
|
||
"description": "NodeDrift lists nodes whose installed version or digest differs from\nthe cluster majority. Non-empty means the cluster has diverged and an\nupgrade will realign it. Empty in single-node mode.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.NodeDriftInfo"
|
||
}
|
||
},
|
||
"reason": {
|
||
"description": "Reason says why the backend is flagged when version and digest alone\nwould not flag it: the backend failed a request in a way that shows it\nis older than the server. Empty for ordinary version or digest upgrades.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"gallery.Variant": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"description": "Model is the name of a gallery entry that declares no variants of its own.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"galleryop.NodeProgress": {
|
||
"type": "object",
|
||
"properties": {
|
||
"current": {
|
||
"type": "string"
|
||
},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"file_name": {
|
||
"type": "string"
|
||
},
|
||
"node_id": {
|
||
"type": "string"
|
||
},
|
||
"node_name": {
|
||
"type": "string"
|
||
},
|
||
"percentage": {
|
||
"type": "number"
|
||
},
|
||
"phase": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"total": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"galleryop.OpStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cancellable": {
|
||
"description": "Cancellable is true if the operation can be cancelled",
|
||
"type": "boolean"
|
||
},
|
||
"cancelled": {
|
||
"description": "Cancelled is true if the operation was cancelled",
|
||
"type": "boolean"
|
||
},
|
||
"current_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"deletion": {
|
||
"description": "Deletion is true if the operation is a deletion",
|
||
"type": "boolean"
|
||
},
|
||
"downloaded_size": {
|
||
"type": "string"
|
||
},
|
||
"file_name": {
|
||
"type": "string"
|
||
},
|
||
"file_size": {
|
||
"type": "string"
|
||
},
|
||
"gallery_element_name": {
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"nodes": {
|
||
"description": "Nodes is the per-node breakdown for a fanned-out backend install.\nPopulated by DistributedBackendManager (per-node terminal status)\nand by the Phase 2 progress bridge (per-byte ticks). The\n/api/operations handler surfaces this so the UI can render an\nexpandable per-node view of an in-flight install.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/galleryop.NodeProgress"
|
||
}
|
||
},
|
||
"phase": {
|
||
"type": "string"
|
||
},
|
||
"processed": {
|
||
"type": "boolean"
|
||
},
|
||
"progress": {
|
||
"type": "number"
|
||
},
|
||
"total_bytes": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"localai.APIInstructionResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"swagger_fragment": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"localai.AliasInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"target": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.BrandingResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"favicon_url": {
|
||
"type": "string"
|
||
},
|
||
"instance_name": {
|
||
"type": "string"
|
||
},
|
||
"instance_tagline": {
|
||
"type": "string"
|
||
},
|
||
"logo_horizontal_url": {
|
||
"type": "string"
|
||
},
|
||
"logo_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.FailoverChainsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"chains": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/failover.ChainStatus"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"localai.FailoverPinRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"target": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.GalleryBackend": {
|
||
"type": "object",
|
||
"properties": {
|
||
"force": {
|
||
"description": "Force reinstalls the backend even when it is already installed and\nrunnable. Off by default so apply stays idempotent for supervising\napps that ensure their backend on every boot.",
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.GalleryModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"backend": {
|
||
"description": "Backend is the resolved backend engine for this model (e.g. \"llama-cpp\").\nPopulated at load time from overrides, inline config, or the URL-referenced config file.",
|
||
"type": "string"
|
||
},
|
||
"config_file": {
|
||
"description": "config_file is read in the situation where URL is blank - and therefore this is a base config.",
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"description": "AdditionalFiles are used to add additional files to the model",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.File"
|
||
}
|
||
},
|
||
"gallery": {
|
||
"description": "Gallery is a reference to the gallery which contains the model",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/config.Gallery"
|
||
}
|
||
]
|
||
},
|
||
"icon": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"installed": {
|
||
"description": "Installed is used to indicate if the model is installed or not",
|
||
"type": "boolean"
|
||
},
|
||
"license": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"overrides": {
|
||
"description": "Overrides are used to override the configuration of the model located at URL",
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"size": {
|
||
"description": "Size is an optional hardcoded model size string (e.g. \"500MB\", \"14.5GB\").\nUsed when the size cannot be estimated automatically.",
|
||
"type": "string"
|
||
},
|
||
"tags": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
},
|
||
"urls": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"variant": {
|
||
"description": "Variant installs one specific build of an entry that declares variants,\nnamed as it appears in the entry's ` + "`" + `variants` + "`" + ` list (see the ` + "`" + `variants` + "`" + `\nand ` + "`" + `auto_variant` + "`" + ` fields of the gallery listing). Leave it empty to let\nLocalAI auto-select the largest build this host can actually run.",
|
||
"type": "string"
|
||
},
|
||
"variants": {
|
||
"description": "Variants is an optional, UNORDERED list of alternative builds of the same\nmodel (other backends such as MLX or vLLM, other quantizations) that the\ninstaller may pick instead of this entry's own payload. Authoring is\ndeliberately dumb: name the models, and the selector works out which one\nthis host should get.\n\nThe entry itself is always the last resort, so an entry carrying variants\nstays a complete, installable entry and older LocalAI releases, which drop\nthis key, install it exactly as before.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/gallery.Variant"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"localai.ModelResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"config": {},
|
||
"config_revision": {
|
||
"type": "string"
|
||
},
|
||
"details": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"error": {
|
||
"type": "string"
|
||
},
|
||
"filename": {
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"pending_cleanup": {
|
||
"type": "integer"
|
||
},
|
||
"success": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"localai.MotionSessionInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"frames": {
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"poses": {
|
||
"type": "integer"
|
||
},
|
||
"profile": {
|
||
"type": "string"
|
||
},
|
||
"time_origin": {
|
||
"type": "string"
|
||
},
|
||
"upload_accepted": {
|
||
"type": "integer"
|
||
},
|
||
"upload_dropped": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"localai.MotionSessionRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"profile": {
|
||
"type": "string"
|
||
},
|
||
"time_origin": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.MotionTicketRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"origin": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.TTSModelVoices": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"voices": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/config.TTSVoice"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"localai.TTSVoicesResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/localai.TTSModelVoices"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"localai.UpdateMaxReplicasPerModelRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"value": {
|
||
"description": "Value is the new per-model replica cap on this node. Must be \u003e= 1.",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"localai.UpdateVRAMBudgetRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"value": {
|
||
"description": "Value is the VRAM cap (\"80%\" or \"12GB\"). Empty string clears the cap.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"localai.VoiceProfileListResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/voiceprofile.Profile"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"middleware.TraceBucket": {
|
||
"type": "object",
|
||
"properties": {
|
||
"count": {
|
||
"type": "integer"
|
||
},
|
||
"errors": {
|
||
"type": "integer"
|
||
},
|
||
"start": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"middleware.TraceSummary": {
|
||
"type": "object",
|
||
"properties": {
|
||
"buckets": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/middleware.TraceBucket"
|
||
}
|
||
},
|
||
"errors": {
|
||
"type": "integer"
|
||
},
|
||
"p95_ms": {
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
},
|
||
"window_hours": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"model.BackendLogLine": {
|
||
"type": "object",
|
||
"properties": {
|
||
"stream": {
|
||
"description": "\"stdout\" or \"stderr\"",
|
||
"type": "string"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
},
|
||
"timestamp": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"modeladmin.VRAMRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"context_size": {
|
||
"type": "integer"
|
||
},
|
||
"gpu_layers": {
|
||
"type": "integer"
|
||
},
|
||
"kv_quant_bits": {
|
||
"type": "integer"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"modeladmin.VRAMResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"context_length": {
|
||
"type": "integer"
|
||
},
|
||
"context_note": {
|
||
"type": "string"
|
||
},
|
||
"model_max_context": {
|
||
"type": "integer"
|
||
},
|
||
"size_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"size_display": {
|
||
"type": "string"
|
||
},
|
||
"vram_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"vram_display": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"nodes.NodeModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"address": {
|
||
"description": "gRPC address for this replica's backend process",
|
||
"type": "string"
|
||
},
|
||
"backend_type": {
|
||
"description": "e.g. \"llama-cpp\"; used by reconciler to replicate loads",
|
||
"type": "string"
|
||
},
|
||
"cleanup_attempts": {
|
||
"type": "integer"
|
||
},
|
||
"cleanup_error": {
|
||
"type": "string"
|
||
},
|
||
"cleanup_next_retry_at": {
|
||
"type": "string"
|
||
},
|
||
"config_revision": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"effective_options_hash": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"in_flight": {
|
||
"description": "number of active requests on this replica",
|
||
"type": "integer"
|
||
},
|
||
"last_used": {
|
||
"type": "string"
|
||
},
|
||
"loading_by": {
|
||
"description": "frontend ID that triggered loading",
|
||
"type": "string"
|
||
},
|
||
"model_name": {
|
||
"type": "string"
|
||
},
|
||
"node_id": {
|
||
"type": "string"
|
||
},
|
||
"replica_index": {
|
||
"type": "integer"
|
||
},
|
||
"state": {
|
||
"description": "staging, loading, loaded, unloading, idle",
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"proto.MemoryUsageData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"breakdown": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer",
|
||
"format": "int64"
|
||
}
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"proto.SpeakerEncoder": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dimension": {
|
||
"type": "integer"
|
||
},
|
||
"family": {
|
||
"description": "embedding space of the encoder; empty when the backend cannot tell",
|
||
"type": "string"
|
||
},
|
||
"identity": {
|
||
"description": "sha256 of loaded GGUF bytes",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"proto.StatusResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"memory": {
|
||
"$ref": "#/definitions/proto.MemoryUsageData"
|
||
},
|
||
"speaker_encoder": {
|
||
"description": "trusted metadata from the loaded server encoder, never request data",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/proto.SpeakerEncoder"
|
||
}
|
||
]
|
||
},
|
||
"state": {
|
||
"$ref": "#/definitions/proto.StatusResponse_State"
|
||
}
|
||
}
|
||
},
|
||
"proto.StatusResponse_State": {
|
||
"type": "integer",
|
||
"format": "int32",
|
||
"enum": [
|
||
0,
|
||
1,
|
||
2,
|
||
-1
|
||
],
|
||
"x-enum-varnames": [
|
||
"StatusResponse_UNINITIALIZED",
|
||
"StatusResponse_BUSY",
|
||
"StatusResponse_READY",
|
||
"StatusResponse_ERROR"
|
||
]
|
||
},
|
||
"proto.VADResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"segments": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/proto.VADSegment"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"proto.VADSegment": {
|
||
"type": "object",
|
||
"properties": {
|
||
"end": {
|
||
"type": "number"
|
||
},
|
||
"start": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.APIError": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"param": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnimationInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicContentBlock": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"input": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"is_error": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"signature": {
|
||
"type": "string"
|
||
},
|
||
"source": {
|
||
"$ref": "#/definitions/schema.AnthropicImageSource"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
},
|
||
"thinking": {
|
||
"type": "string"
|
||
},
|
||
"tool_use_id": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicImageSource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "string"
|
||
},
|
||
"media_type": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicMessage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {},
|
||
"role": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"max_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"messages": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.AnthropicMessage"
|
||
}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"stop_sequences": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"stream": {
|
||
"type": "boolean"
|
||
},
|
||
"system": {
|
||
"type": "string"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"thinking": {
|
||
"description": "Thinking gates extended-thinking output. We only surface thinking\ncontent blocks when the client explicitly opts in, matching Anthropic's\nAPI where thinking is off unless requested.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.AnthropicThinkingParam"
|
||
}
|
||
]
|
||
},
|
||
"tool_choice": {},
|
||
"tools": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.AnthropicTool"
|
||
}
|
||
},
|
||
"top_k": {
|
||
"type": "integer"
|
||
},
|
||
"top_p": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.AnthropicContentBlock"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"type": "string"
|
||
},
|
||
"stop_reason": {
|
||
"type": "string"
|
||
},
|
||
"stop_sequence": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"$ref": "#/definitions/schema.AnthropicUsage"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicThinkingParam": {
|
||
"type": "object",
|
||
"properties": {
|
||
"budget_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"description": "\"enabled\" | \"disabled\"",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicTool": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"input_schema": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.AnthropicUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.BackendMonitorRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.BackendResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"status_url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.Choice": {
|
||
"type": "object",
|
||
"properties": {
|
||
"delta": {
|
||
"$ref": "#/definitions/schema.Message"
|
||
},
|
||
"finish_reason": {
|
||
"type": "string"
|
||
},
|
||
"index": {
|
||
"type": "integer"
|
||
},
|
||
"logprobs": {
|
||
"$ref": "#/definitions/schema.Logprobs"
|
||
},
|
||
"message": {
|
||
"$ref": "#/definitions/schema.Message"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.CompressionMetadata": {
|
||
"type": "object",
|
||
"properties": {
|
||
"compressed_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"compressor": {
|
||
"type": "string"
|
||
},
|
||
"dropped_turns": {
|
||
"type": "integer"
|
||
},
|
||
"original_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"overflow_recoveries": {
|
||
"type": "integer"
|
||
},
|
||
"summary_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ConvTokenUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"completion": {
|
||
"type": "integer"
|
||
},
|
||
"prompt": {
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.Conversation": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clientMCPServers": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object"
|
||
}
|
||
},
|
||
"contextSize": {
|
||
"type": "integer"
|
||
},
|
||
"createdAt": {
|
||
"type": "integer"
|
||
},
|
||
"history": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "object"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"localaiAssistant": {
|
||
"description": "LocalAIAssistant wires the chat to the in-process admin MCP server\n(the LocalAI Assistant mode of the Chat page).",
|
||
"type": "boolean"
|
||
},
|
||
"mcpMode": {
|
||
"type": "boolean"
|
||
},
|
||
"mcpResources": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"mcpServers": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"reasoningEffort": {
|
||
"description": "ReasoningEffort is the chat's reasoning_effort choice ('' = model config,\n'none' also hides reasoning traces).",
|
||
"type": "string"
|
||
},
|
||
"systemPrompt": {
|
||
"type": "string"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"tokenUsage": {
|
||
"$ref": "#/definitions/schema.ConvTokenUsage"
|
||
},
|
||
"topK": {
|
||
"type": "number"
|
||
},
|
||
"topP": {
|
||
"type": "number"
|
||
},
|
||
"updatedAt": {
|
||
"type": "integer"
|
||
},
|
||
"version": {
|
||
"description": "Version is assigned by the server: 1 on the first save, +1 on every\nlater write including the delete. Clients use a non-zero version to\ntell a conversation the server has seen from a never-synced draft.\nIgnored on input.",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ConversationBulkRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conversations": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ConversationBulkResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"count": {
|
||
"type": "integer"
|
||
},
|
||
"skipped": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ConversationList": {
|
||
"type": "object",
|
||
"properties": {
|
||
"conversations": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Conversation"
|
||
}
|
||
},
|
||
"deleted": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ConversationTombstone"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ConversationTombstone": {
|
||
"type": "object",
|
||
"properties": {
|
||
"deletedAt": {
|
||
"description": "Unix milliseconds",
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"version": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionAnswer": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choice": {
|
||
"description": "Choice preserves the selected string or boolean value. Swagger 2 uses a loose object placeholder for this union.",
|
||
"type": "object"
|
||
},
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"probabilities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DecisionProbability"
|
||
}
|
||
},
|
||
"probability": {
|
||
"type": "number"
|
||
},
|
||
"score": {
|
||
"type": "number"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionChoice": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"value": {
|
||
"description": "Value is a string or boolean choice. Swagger 2 uses a loose object placeholder for this union.",
|
||
"type": "object"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionLevel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionProbability": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"probability": {
|
||
"type": "number"
|
||
},
|
||
"value": {
|
||
"description": "Value is a string or boolean for choices, or a zero-based integer for score levels. Swagger 2 uses a loose object placeholder for this union.",
|
||
"type": "object"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionQuestion": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choices": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DecisionChoice"
|
||
}
|
||
},
|
||
"instructions": {
|
||
"type": "string"
|
||
},
|
||
"levels": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DecisionLevel"
|
||
}
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"input_tokens_details": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"output_tokens_details": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionsRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input": {
|
||
"description": "Input is a text string or an array of user messages. Swagger 2 uses a loose object placeholder for this union.",
|
||
"type": "object"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"questions": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DecisionQuestion"
|
||
}
|
||
},
|
||
"safety_identifier": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DecisionsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"answers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DecisionAnswer"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"$ref": "#/definitions/schema.DecisionUsage"
|
||
}
|
||
}
|
||
},
|
||
"schema.DepthRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dst": {
|
||
"description": "optional output directory for exports (glb/colmap)",
|
||
"type": "string"
|
||
},
|
||
"exports": {
|
||
"description": "requested exports: \"glb\", \"colmap\"",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"image": {
|
||
"description": "URL or base64-encoded image to analyze",
|
||
"type": "string"
|
||
},
|
||
"include_confidence": {
|
||
"description": "return the per-pixel confidence map (DualDPT)",
|
||
"type": "boolean"
|
||
},
|
||
"include_depth": {
|
||
"description": "return the per-pixel depth map",
|
||
"type": "boolean"
|
||
},
|
||
"include_points": {
|
||
"description": "back-project to a 3D point cloud (DualDPT)",
|
||
"type": "boolean"
|
||
},
|
||
"include_pose": {
|
||
"description": "return camera extrinsics/intrinsics (DualDPT)",
|
||
"type": "boolean"
|
||
},
|
||
"include_sky": {
|
||
"description": "return the per-pixel sky map (mono models)",
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"points_conf_thresh": {
|
||
"description": "keep points with confidence \u003e= this threshold",
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.DepthResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"description": "width*height row-major confidence (DualDPT)",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"depth": {
|
||
"description": "width*height row-major metric depth",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"export_paths": {
|
||
"description": "paths written for the requested exports",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"extrinsics": {
|
||
"description": "12 floats, 3x4 row-major (world-to-camera)",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"height": {
|
||
"type": "integer"
|
||
},
|
||
"intrinsics": {
|
||
"description": "9 floats, 3x3 row-major",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"is_metric": {
|
||
"description": "depth is in metric units",
|
||
"type": "boolean"
|
||
},
|
||
"num_points": {
|
||
"description": "number of 3D points",
|
||
"type": "integer"
|
||
},
|
||
"point_colors": {
|
||
"description": "base64-encoded num_points*3 uint8 rgb",
|
||
"type": "string"
|
||
},
|
||
"points": {
|
||
"description": "num_points*3 xyz, world space",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"sky": {
|
||
"description": "width*height row-major sky map (mono)",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"width": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.Detection": {
|
||
"type": "object",
|
||
"properties": {
|
||
"class_name": {
|
||
"type": "string"
|
||
},
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"height": {
|
||
"type": "number"
|
||
},
|
||
"mask": {
|
||
"description": "base64-encoded PNG segmentation mask",
|
||
"type": "string"
|
||
},
|
||
"width": {
|
||
"type": "number"
|
||
},
|
||
"x": {
|
||
"type": "number"
|
||
},
|
||
"y": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.DetectionRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"boxes": {
|
||
"description": "Box coordinates as [x1,y1,x2,y2,...] quads",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"image": {
|
||
"description": "URL or base64-encoded image to analyze",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"points": {
|
||
"description": "Point coordinates as [x,y,label,...] triples (label: 1=pos, 0=neg)",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"prompt": {
|
||
"description": "Text prompt (for SAM 3 PCS mode)",
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"description": "Detection confidence threshold",
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.DetectionResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"detections": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Detection"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.DetokenizeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"tokens": {
|
||
"description": "token IDs to convert back to text",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.DetokenizeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"description": "detokenized text",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DiarizationResult": {
|
||
"type": "object",
|
||
"properties": {
|
||
"duration": {
|
||
"type": "number"
|
||
},
|
||
"language": {
|
||
"type": "string"
|
||
},
|
||
"num_speakers": {
|
||
"type": "integer"
|
||
},
|
||
"segments": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DiarizationSegment"
|
||
}
|
||
},
|
||
"sounds": {
|
||
"description": "Sounds is present only when the request set include_sounds. An empty\nlist then means the model ran and heard no event; omitzero keeps a nil\nlist (not requested) out of the payload while an empty one stays.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DiarizationSound"
|
||
}
|
||
},
|
||
"speaker_profiles": {
|
||
"$ref": "#/definitions/schema.SpeakerProfiles"
|
||
},
|
||
"speakers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.DiarizationSpeaker"
|
||
}
|
||
},
|
||
"task": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DiarizationSegment": {
|
||
"type": "object",
|
||
"properties": {
|
||
"end": {
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"description": "Name is the registered speaker this segment was matched to, and NameScore\nthe cosine similarity of the match. Both are omitted when the backend did\nnot identify the speaker. Speaker stays the normalized SPEAKER_NN label.",
|
||
"type": "string"
|
||
},
|
||
"name_score": {
|
||
"type": "number"
|
||
},
|
||
"speaker": {
|
||
"type": "string"
|
||
},
|
||
"start": {
|
||
"type": "number"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.DiarizationSound": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"end": {
|
||
"type": "number"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"start": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.DiarizationSpeaker": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"segment_count": {
|
||
"type": "integer"
|
||
},
|
||
"total_speech_duration": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.ElevenLabsSoundGenerationRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bpm": {
|
||
"type": "integer"
|
||
},
|
||
"caption": {
|
||
"type": "string"
|
||
},
|
||
"do_sample": {
|
||
"type": "boolean"
|
||
},
|
||
"duration_seconds": {
|
||
"type": "number"
|
||
},
|
||
"expansion_model": {
|
||
"type": "string"
|
||
},
|
||
"instrumental": {
|
||
"description": "Simple mode: use text as description; optional instrumental / vocal_language",
|
||
"type": "boolean"
|
||
},
|
||
"keyscale": {
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"type": "string"
|
||
},
|
||
"lyrics": {
|
||
"type": "string"
|
||
},
|
||
"model_id": {
|
||
"type": "string"
|
||
},
|
||
"params": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"prompt_influence": {
|
||
"type": "number"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
},
|
||
"think": {
|
||
"description": "Advanced mode",
|
||
"type": "boolean"
|
||
},
|
||
"timesignature": {
|
||
"type": "string"
|
||
},
|
||
"vocal_language": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ErrorResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"error": {
|
||
"$ref": "#/definitions/schema.APIError"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceAnalysis": {
|
||
"type": "object",
|
||
"properties": {
|
||
"age": {
|
||
"type": "number"
|
||
},
|
||
"antispoof_score": {
|
||
"type": "number"
|
||
},
|
||
"dominant_emotion": {
|
||
"type": "string"
|
||
},
|
||
"dominant_gender": {
|
||
"type": "string"
|
||
},
|
||
"dominant_race": {
|
||
"type": "string"
|
||
},
|
||
"emotion": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float32"
|
||
}
|
||
},
|
||
"face_confidence": {
|
||
"type": "number"
|
||
},
|
||
"gender": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float32"
|
||
}
|
||
},
|
||
"is_real": {
|
||
"description": "Liveness fields — see FaceVerifyResponse for why these are pointers.",
|
||
"type": "boolean"
|
||
},
|
||
"race": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float32"
|
||
}
|
||
},
|
||
"region": {
|
||
"$ref": "#/definitions/schema.FacialArea"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceAnalyzeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"actions": {
|
||
"description": "subset of {\"age\",\"gender\",\"emotion\",\"race\"}",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"anti_spoofing": {
|
||
"type": "boolean"
|
||
},
|
||
"img": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceAnalyzeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"faces": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.FaceAnalysis"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceEmbedRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"img": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceEmbedResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dim": {
|
||
"type": "integer"
|
||
},
|
||
"embedding": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceForgetRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceIdentifyMatch": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"distance": {
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"match": {
|
||
"description": "true when distance \u003c= threshold",
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceIdentifyRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"img": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"description": "optional cutoff on distance",
|
||
"type": "number"
|
||
},
|
||
"top_k": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceIdentifyResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"matches": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.FaceIdentifyMatch"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceRegisterRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"embedding": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"img": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"registered_at": {
|
||
"description": "original enrollment time when replaying a saved embedding",
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"description": "vector store model; empty = local-store default",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceRegisterResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"registered_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceVerifyRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"anti_spoofing": {
|
||
"type": "boolean"
|
||
},
|
||
"img1": {
|
||
"type": "string"
|
||
},
|
||
"img2": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.FaceVerifyResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"distance": {
|
||
"type": "number"
|
||
},
|
||
"img1_antispoof_score": {
|
||
"type": "number"
|
||
},
|
||
"img1_area": {
|
||
"$ref": "#/definitions/schema.FacialArea"
|
||
},
|
||
"img1_is_real": {
|
||
"description": "Liveness fields are only populated when the request set\nanti_spoofing=true. Pointers keep them fully absent from the\nJSON response otherwise, so callers can tell \"not checked\"\napart from \"checked and fake\" (which would collapse to zero\nvalues with plain bool+omitempty).",
|
||
"type": "boolean"
|
||
},
|
||
"img2_antispoof_score": {
|
||
"type": "number"
|
||
},
|
||
"img2_area": {
|
||
"$ref": "#/definitions/schema.FacialArea"
|
||
},
|
||
"img2_is_real": {
|
||
"type": "boolean"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"processing_time_ms": {
|
||
"type": "number"
|
||
},
|
||
"threshold": {
|
||
"type": "number"
|
||
},
|
||
"verified": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"schema.FacialArea": {
|
||
"type": "object",
|
||
"properties": {
|
||
"h": {
|
||
"type": "number"
|
||
},
|
||
"w": {
|
||
"type": "number"
|
||
},
|
||
"x": {
|
||
"type": "number"
|
||
},
|
||
"y": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.FunctionCall": {
|
||
"type": "object",
|
||
"properties": {
|
||
"arguments": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.GalleryResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"estimated_size_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"estimated_size_display": {
|
||
"type": "string"
|
||
},
|
||
"estimated_vram_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"estimated_vram_display": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"type": "string"
|
||
},
|
||
"uuid": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.InputTokensDetails": {
|
||
"type": "object",
|
||
"properties": {
|
||
"image_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"text_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.Item": {
|
||
"type": "object",
|
||
"properties": {
|
||
"b64_json": {
|
||
"type": "string"
|
||
},
|
||
"index": {
|
||
"type": "integer"
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"description": "Images",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.JINADocumentResult": {
|
||
"type": "object",
|
||
"properties": {
|
||
"document": {
|
||
"$ref": "#/definitions/schema.JINAText"
|
||
},
|
||
"index": {
|
||
"type": "integer"
|
||
},
|
||
"relevance_score": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.JINARerankRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"backend": {
|
||
"type": "string"
|
||
},
|
||
"documents": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"query": {
|
||
"type": "string"
|
||
},
|
||
"top_n": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.JINARerankResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"results": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.JINADocumentResult"
|
||
}
|
||
},
|
||
"usage": {
|
||
"$ref": "#/definitions/schema.JINAUsageInfo"
|
||
}
|
||
}
|
||
},
|
||
"schema.JINAText": {
|
||
"type": "object",
|
||
"properties": {
|
||
"text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.JINAUsageInfo": {
|
||
"type": "object",
|
||
"properties": {
|
||
"prompt_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.Job": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audios": {
|
||
"description": "List of audio URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"completed_at": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"error": {
|
||
"description": "Error message if failed",
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"description": "List of file URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"id": {
|
||
"description": "UUID",
|
||
"type": "string"
|
||
},
|
||
"images": {
|
||
"description": "Multimedia content (for manual execution)\nCan contain URLs or base64-encoded data URIs",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"parameters": {
|
||
"description": "Template parameters",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"result": {
|
||
"description": "Agent response",
|
||
"type": "string"
|
||
},
|
||
"started_at": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "pending, running, completed, failed, cancelled",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.JobStatus"
|
||
}
|
||
]
|
||
},
|
||
"task_id": {
|
||
"description": "Reference to Task",
|
||
"type": "string"
|
||
},
|
||
"traces": {
|
||
"description": "Execution traces (reasoning, tool calls, tool results)",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.JobTrace"
|
||
}
|
||
},
|
||
"triggered_by": {
|
||
"description": "\"manual\", \"cron\", \"api\"",
|
||
"type": "string"
|
||
},
|
||
"videos": {
|
||
"description": "List of video URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"webhook_error": {
|
||
"description": "Error if webhook failed",
|
||
"type": "string"
|
||
},
|
||
"webhook_sent": {
|
||
"description": "Webhook delivery tracking",
|
||
"type": "boolean"
|
||
},
|
||
"webhook_sent_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.JobExecutionRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audios": {
|
||
"description": "List of audio URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"files": {
|
||
"description": "List of file URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"images": {
|
||
"description": "Multimedia content (optional, for manual execution)\nCan contain URLs or base64-encoded data URIs",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"parameters": {
|
||
"description": "Optional, for templating",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"task_id": {
|
||
"description": "Required",
|
||
"type": "string"
|
||
},
|
||
"videos": {
|
||
"description": "List of video URLs or base64 strings",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.JobExecutionResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"job_id": {
|
||
"description": "unique job identifier",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "initial status (pending)",
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"description": "URL to poll for job status",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.JobStatus": {
|
||
"type": "string",
|
||
"enum": [
|
||
"pending",
|
||
"running",
|
||
"completed",
|
||
"failed",
|
||
"cancelled"
|
||
],
|
||
"x-enum-varnames": [
|
||
"JobStatusPending",
|
||
"JobStatusRunning",
|
||
"JobStatusCompleted",
|
||
"JobStatusFailed",
|
||
"JobStatusCancelled"
|
||
]
|
||
},
|
||
"schema.JobTrace": {
|
||
"type": "object",
|
||
"properties": {
|
||
"arguments": {
|
||
"description": "Tool arguments or result data",
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"content": {
|
||
"description": "The actual trace content",
|
||
"type": "string"
|
||
},
|
||
"timestamp": {
|
||
"description": "When this trace occurred",
|
||
"type": "string"
|
||
},
|
||
"tool_name": {
|
||
"description": "Tool name (for tool_call/tool_result)",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "\"reasoning\", \"tool_call\", \"tool_result\", \"status\"",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.KnownBackend": {
|
||
"type": "object",
|
||
"properties": {
|
||
"auto_detect": {
|
||
"type": "boolean"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"installed": {
|
||
"description": "Installed is true when the backend is currently present on disk — i.e. it\nappears in gallery.ListSystemBackends(systemState). Importer-registered or\ncurated pref-only backends default to false unless they also show up on\ndisk. The import form uses this to warn users that submitting an import\nmay trigger an automatic backend download.",
|
||
"type": "boolean"
|
||
},
|
||
"modality": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.LogprobContent": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bytes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "integer"
|
||
},
|
||
"logprob": {
|
||
"type": "number"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"top_logprobs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.LogprobContent"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.Logprobs": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.LogprobContent"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.LogprobsValue": {
|
||
"type": "object",
|
||
"properties": {
|
||
"enabled": {
|
||
"description": "true if logprobs should be returned",
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"schema.Message": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"description": "The message content"
|
||
},
|
||
"function_call": {
|
||
"description": "A result of a function call"
|
||
},
|
||
"name": {
|
||
"description": "The message name (used for tools calls)",
|
||
"type": "string"
|
||
},
|
||
"reasoning": {
|
||
"description": "Reasoning content extracted from \u003cthinking\u003e...\u003c/thinking\u003e tags",
|
||
"type": "string"
|
||
},
|
||
"role": {
|
||
"description": "The message role",
|
||
"type": "string"
|
||
},
|
||
"tool_call_id": {
|
||
"type": "string"
|
||
},
|
||
"tool_calls": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ToolCall"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.Model3DAnimationRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"inputs": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/schema.AnimationInput"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"params": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"response_format": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.Model3DRequest": {
|
||
"description": "3D asset generation request body. Generation is image-conditioned",
|
||
"type": "object",
|
||
"properties": {
|
||
"background": {
|
||
"description": "background handling: auto|keep|black|white",
|
||
"type": "string"
|
||
},
|
||
"cfg_scale": {
|
||
"description": "classifier-free guidance scale (backend default 7.5)",
|
||
"type": "number"
|
||
},
|
||
"image": {
|
||
"description": "conditioning image: URL, base64, or data URI (required)",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"params": {
|
||
"description": "backend-specific generation parameters",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"quality": {
|
||
"description": "mesh pipeline: auto|coarse|512|1024",
|
||
"type": "string"
|
||
},
|
||
"response_format": {
|
||
"description": "output format (url or b64_json)",
|
||
"type": "string"
|
||
},
|
||
"seed": {
|
||
"description": "random seed; \u003c=0 picks a random seed",
|
||
"type": "integer"
|
||
},
|
||
"step": {
|
||
"description": "flow sampling steps (backend default 12)",
|
||
"type": "integer"
|
||
},
|
||
"texture_steps": {
|
||
"description": "texture flow sampling steps (backend default 12)",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelCapabilities": {
|
||
"type": "object",
|
||
"properties": {
|
||
"capabilities": {
|
||
"description": "Capabilities are canonical usecase strings (e.g. chat, vision, transcript,\ntts, embeddings, image, video) plus the modifiers \"tools\" and \"thinking\".",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"context_size": {
|
||
"description": "ContextSize is the effective context window in tokens the backend will\nrun with: the configured context_size, or the default when unset. 0 means\nthe value is unknown (e.g. a loose file with no config). Clients can use\nthis to size their context budget for auto-compaction and pruning.",
|
||
"type": "integer"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"input_modalities": {
|
||
"description": "InputModalities is the subset of {text,image,audio,video} the model accepts.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
},
|
||
"output_modalities": {
|
||
"description": "OutputModalities is the subset of {text,image,audio,video} the model produces.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"three_d_operations": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ThreeDOperation"
|
||
}
|
||
},
|
||
"upscale_scale": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelCapabilitiesResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ModelCapabilities"
|
||
}
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelLoadCancelRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"job_id": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelLoadCancelResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"current_job_id": {
|
||
"type": "string"
|
||
},
|
||
"job_id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"retry_after": {
|
||
"type": "integer"
|
||
},
|
||
"state": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelLoadRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelLoadResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"loaded": {
|
||
"description": "Loaded lists the model names actually resident in memory after the call.\nFor a pipeline model these are its sub-models, not the pipeline name.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"message": {
|
||
"description": "Message is a short human-readable status (\"model loaded\", or an error).",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelLoadingStatus": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bytes_sent": {
|
||
"type": "integer"
|
||
},
|
||
"cancel_requested": {
|
||
"description": "CancelRequested is true when an administrator cancelled the attempt.",
|
||
"type": "boolean"
|
||
},
|
||
"eta_seconds": {
|
||
"description": "ETASeconds is omitted rather than guessed until enough bytes have moved\nfor the observed rate to mean anything. A confidently wrong ETA on a\ntwenty-minute wait is worse than none.",
|
||
"type": "integer"
|
||
},
|
||
"file_index": {
|
||
"type": "integer"
|
||
},
|
||
"job_id": {
|
||
"description": "JobID names the load attempt. A cancel must quote it: it is the\nprecondition that keeps a cancel from hitting a replacement attempt.",
|
||
"type": "string"
|
||
},
|
||
"last_error": {
|
||
"description": "LastError is the cause of a failed attempt.",
|
||
"type": "string"
|
||
},
|
||
"lease_expires_in": {
|
||
"description": "LeaseExpiresIn is the seconds left on the owner's lease. It is negative\nwhen the lease already ran out, which means the owner is gone.",
|
||
"type": "integer"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"node": {
|
||
"type": "string"
|
||
},
|
||
"progress": {
|
||
"type": "number"
|
||
},
|
||
"retry_after": {
|
||
"description": "RetryAfter is the seconds until a new load may start, for a failed attempt.",
|
||
"type": "integer"
|
||
},
|
||
"state": {
|
||
"type": "string"
|
||
},
|
||
"stop_deadline": {
|
||
"type": "string"
|
||
},
|
||
"stopping": {
|
||
"description": "Stopping is true while the remote work of a failed attempt is not yet\nconfirmed ended. StopDeadline is when the model is released regardless.",
|
||
"type": "boolean"
|
||
},
|
||
"total_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"total_files": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModelsDataResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.OpenAIModel"
|
||
}
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModerationRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ModerationResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"results": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ModerationResult"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ModerationResult": {
|
||
"type": "object",
|
||
"properties": {
|
||
"categories": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "boolean"
|
||
}
|
||
},
|
||
"category_applied_input_types": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"category_scores": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
},
|
||
"flagged": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"schema.MultimediaSourceConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"headers": {
|
||
"description": "Custom headers for HTTP request (e.g., Authorization)",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": {
|
||
"description": "\"image\", \"video\", \"audio\", \"file\"",
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"description": "URL to fetch from",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.NodeData": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"lastSeen": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"serviceID": {
|
||
"type": "string"
|
||
},
|
||
"tunnelAddress": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORAnnotation": {
|
||
"type": "object",
|
||
"properties": {
|
||
"end_index": {
|
||
"type": "integer"
|
||
},
|
||
"start_index": {
|
||
"type": "integer"
|
||
},
|
||
"title": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "url_citation",
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORContentPart": {
|
||
"type": "object",
|
||
"properties": {
|
||
"annotations": {
|
||
"description": "REQUIRED for output_text - must always be present (use [])",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORAnnotation"
|
||
}
|
||
},
|
||
"detail": {
|
||
"description": "low|high|auto for images",
|
||
"type": "string"
|
||
},
|
||
"file_data": {
|
||
"type": "string"
|
||
},
|
||
"file_url": {
|
||
"type": "string"
|
||
},
|
||
"filename": {
|
||
"type": "string"
|
||
},
|
||
"image_url": {
|
||
"type": "string"
|
||
},
|
||
"logprobs": {
|
||
"description": "REQUIRED for output_text - must always be present (use [])",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORLogProb"
|
||
}
|
||
},
|
||
"refusal": {
|
||
"type": "string"
|
||
},
|
||
"text": {
|
||
"description": "REQUIRED for output_text - must always be present (even if empty)",
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "input_text|input_image|input_file|output_text|refusal",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORError": {
|
||
"type": "object",
|
||
"properties": {
|
||
"code": {
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"type": "string"
|
||
},
|
||
"param": {
|
||
"type": "string"
|
||
},
|
||
"type": {
|
||
"description": "invalid_request|not_found|server_error|model_error|too_many_requests",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORFunctionTool": {
|
||
"type": "object",
|
||
"properties": {
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"parameters": {
|
||
"type": "object",
|
||
"additionalProperties": {}
|
||
},
|
||
"strict": {
|
||
"description": "Always include in response",
|
||
"type": "boolean"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORIncompleteDetails": {
|
||
"type": "object",
|
||
"properties": {
|
||
"reason": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORInputTokensDetails": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cached_tokens": {
|
||
"description": "Always include, even if 0",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORItemField": {
|
||
"type": "object",
|
||
"properties": {
|
||
"arguments": {
|
||
"type": "string"
|
||
},
|
||
"call_id": {
|
||
"description": "Function call fields",
|
||
"type": "string"
|
||
},
|
||
"content": {
|
||
"description": "string or []ORContentPart for messages"
|
||
},
|
||
"encrypted_content": {
|
||
"description": "Provider-specific encrypted content",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"description": "Present for all output items",
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"output": {
|
||
"description": "Function call output fields"
|
||
},
|
||
"role": {
|
||
"description": "Message fields",
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "in_progress|completed|incomplete",
|
||
"type": "string"
|
||
},
|
||
"summary": {
|
||
"description": "Reasoning fields (for type == \"reasoning\")",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORContentPart"
|
||
}
|
||
},
|
||
"type": {
|
||
"description": "message|function_call|function_call_output|reasoning|item_reference",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORLogProb": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bytes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"logprob": {
|
||
"type": "number"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
},
|
||
"top_logprobs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORTopLogProb"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.OROutputTokensDetails": {
|
||
"type": "object",
|
||
"properties": {
|
||
"reasoning_tokens": {
|
||
"description": "Always include, even if 0",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORReasoning": {
|
||
"type": "object",
|
||
"properties": {
|
||
"effort": {
|
||
"type": "string"
|
||
},
|
||
"summary": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORReasoningParam": {
|
||
"type": "object",
|
||
"properties": {
|
||
"effort": {
|
||
"description": "\"none\"|\"low\"|\"medium\"|\"high\"|\"xhigh\"",
|
||
"type": "string"
|
||
},
|
||
"summary": {
|
||
"description": "\"auto\"|\"concise\"|\"detailed\"",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORResponseResource": {
|
||
"type": "object",
|
||
"properties": {
|
||
"background": {
|
||
"type": "boolean"
|
||
},
|
||
"completed_at": {
|
||
"description": "Required: present as number or null",
|
||
"type": "integer"
|
||
},
|
||
"created_at": {
|
||
"type": "integer"
|
||
},
|
||
"error": {
|
||
"description": "Always present, null if no error",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORError"
|
||
}
|
||
]
|
||
},
|
||
"frequency_penalty": {
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"incomplete_details": {
|
||
"description": "Always present, null if complete",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORIncompleteDetails"
|
||
}
|
||
]
|
||
},
|
||
"instructions": {
|
||
"type": "string"
|
||
},
|
||
"max_output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"max_tool_calls": {
|
||
"description": "nullable",
|
||
"type": "integer"
|
||
},
|
||
"metadata": {
|
||
"description": "Metadata and operational flags",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"object": {
|
||
"description": "always \"response\"",
|
||
"type": "string"
|
||
},
|
||
"output": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORItemField"
|
||
}
|
||
},
|
||
"parallel_tool_calls": {
|
||
"type": "boolean"
|
||
},
|
||
"presence_penalty": {
|
||
"type": "number"
|
||
},
|
||
"previous_response_id": {
|
||
"type": "string"
|
||
},
|
||
"prompt_cache_key": {
|
||
"description": "nullable",
|
||
"type": "string"
|
||
},
|
||
"reasoning": {
|
||
"description": "nullable",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORReasoning"
|
||
}
|
||
]
|
||
},
|
||
"safety_identifier": {
|
||
"description": "Safety and caching",
|
||
"type": "string"
|
||
},
|
||
"service_tier": {
|
||
"type": "string"
|
||
},
|
||
"status": {
|
||
"description": "in_progress|completed|failed|incomplete",
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"description": "Sampling parameters (always required)",
|
||
"type": "number"
|
||
},
|
||
"text": {
|
||
"description": "Text format configuration",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORTextConfig"
|
||
}
|
||
]
|
||
},
|
||
"tool_choice": {},
|
||
"tools": {
|
||
"description": "Tool-related fields",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORFunctionTool"
|
||
}
|
||
},
|
||
"top_logprobs": {
|
||
"description": "Default to 0",
|
||
"type": "integer"
|
||
},
|
||
"top_p": {
|
||
"type": "number"
|
||
},
|
||
"truncation": {
|
||
"description": "Truncation and reasoning",
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"description": "Usage statistics",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORUsage"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"schema.ORTextConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"format": {
|
||
"$ref": "#/definitions/schema.ORTextFormat"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORTextFormat": {
|
||
"type": "object",
|
||
"properties": {
|
||
"type": {
|
||
"description": "\"text\" or \"json_schema\"",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORTopLogProb": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bytes": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"logprob": {
|
||
"type": "number"
|
||
},
|
||
"token": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ORUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"input_tokens_details": {
|
||
"description": "Always present",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.ORInputTokensDetails"
|
||
}
|
||
]
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"output_tokens_details": {
|
||
"description": "Always present",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.OROutputTokensDetails"
|
||
}
|
||
]
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.OpenAIModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.OpenAIRequest": {
|
||
"type": "object",
|
||
"required": [
|
||
"file"
|
||
],
|
||
"properties": {
|
||
"backend": {
|
||
"type": "string"
|
||
},
|
||
"batch": {
|
||
"description": "Custom parameters - not present in the OpenAI API",
|
||
"type": "integer"
|
||
},
|
||
"clip_skip": {
|
||
"description": "Diffusers",
|
||
"type": "integer"
|
||
},
|
||
"echo": {
|
||
"type": "boolean"
|
||
},
|
||
"encoding_format": {
|
||
"description": "Embedding encoding format: \"float\" (default) or \"base64\" (OpenAI Node.js SDK default)",
|
||
"type": "string"
|
||
},
|
||
"file": {
|
||
"description": "whisper",
|
||
"type": "string"
|
||
},
|
||
"files": {
|
||
"description": "Multiple input images for img2img or inpainting",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"frequency_penalty": {
|
||
"type": "number"
|
||
},
|
||
"function_call": {
|
||
"description": "might be a string or an object"
|
||
},
|
||
"functions": {
|
||
"description": "A list of available functions to call",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/functions.Function"
|
||
}
|
||
},
|
||
"grammar": {
|
||
"description": "A grammar to constrain the LLM output",
|
||
"type": "string"
|
||
},
|
||
"grammar_json_functions": {
|
||
"$ref": "#/definitions/functions.JSONFunctionStructure"
|
||
},
|
||
"ignore_eos": {
|
||
"type": "boolean"
|
||
},
|
||
"include_sounds": {
|
||
"type": "boolean"
|
||
},
|
||
"include_speaker_profiles": {
|
||
"type": "boolean"
|
||
},
|
||
"include_text": {
|
||
"type": "boolean"
|
||
},
|
||
"input": {},
|
||
"instruction": {
|
||
"description": "Edit endpoint",
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"description": "Also part of the OpenAI official spec",
|
||
"type": "string"
|
||
},
|
||
"logit_bias": {
|
||
"description": "Map of token IDs to bias values (-100 to 100)",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
},
|
||
"logprobs": {
|
||
"description": "OpenAI API logprobs parameters\nlogprobs: boolean - if true, returns log probabilities of each output token\ntop_logprobs: integer 0-20 - number of most likely tokens to return at each token position",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.LogprobsValue"
|
||
}
|
||
]
|
||
},
|
||
"max_completion_tokens": {
|
||
"description": "MaxCompletionTokens is the modern alias for max_tokens\n(OpenAI deprecated max_tokens; gpt-5 / o-series reject it).\nAccepted on the wire so up-to-date clients can use the new\nname; the request middleware collapses it into Maxtokens so\ninternal code reads exactly one field.",
|
||
"type": "integer"
|
||
},
|
||
"max_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"messages": {
|
||
"description": "Messages is read only by chat/completion API calls",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Message"
|
||
}
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"min_p": {
|
||
"type": "number"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"model_base_name": {
|
||
"type": "string"
|
||
},
|
||
"n": {
|
||
"description": "Also part of the OpenAI official spec. use it for returning multiple results",
|
||
"type": "integer"
|
||
},
|
||
"n_keep": {
|
||
"type": "integer"
|
||
},
|
||
"negative_prompt": {
|
||
"description": "NegativePrompt for image generation (matches Stable Diffusion WebUI /\nvLLM-Omni conventions). Combined, comma-separated, with any \"|\"-suffixed\nnegative tags in Prompt.",
|
||
"type": "string"
|
||
},
|
||
"negative_prompt_scale": {
|
||
"type": "number"
|
||
},
|
||
"pooling": {
|
||
"description": "Pooling is a LocalAI extension for /v1/embeddings: how the backend's\nper-token vectors are reduced to a single embedding. \"\" or \"backend\"\nleaves pooling to the inference backend (the pre-existing behavior);\n\"mean\", \"last\" and \"decayed_mean\" pool Go-side from raw per-token\nvectors (the backend must run with the \"pooling:none\" option, which\nmodel configs get automatically when this is set).",
|
||
"type": "string"
|
||
},
|
||
"pooling_half_life_tokens": {
|
||
"description": "PoolingHalfLifeTokens is a LocalAI extension for /v1/embeddings: the\nhalf-life (in tokens) of the \"decayed_mean\" pooling scheme — a token's\nweight halves every this-many positions counting back from the end of\nthe conversation. Defaults to 256 when unset.",
|
||
"type": "integer"
|
||
},
|
||
"presence_penalty": {
|
||
"type": "number"
|
||
},
|
||
"prompt": {
|
||
"description": "Prompt is read only by completion/image API calls"
|
||
},
|
||
"quality": {
|
||
"description": "Image (not supported by OpenAI)",
|
||
"type": "string"
|
||
},
|
||
"reasoning_effort": {
|
||
"type": "string"
|
||
},
|
||
"ref_images": {
|
||
"description": "Reference images for models that support them (e.g., Flux Kontext)",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"repeat_last_n": {
|
||
"type": "integer"
|
||
},
|
||
"repeat_penalty": {
|
||
"type": "number"
|
||
},
|
||
"response_format": {
|
||
"description": "whisper/image"
|
||
},
|
||
"rope_freq_base": {
|
||
"type": "number"
|
||
},
|
||
"rope_freq_scale": {
|
||
"type": "number"
|
||
},
|
||
"seed": {
|
||
"type": "integer"
|
||
},
|
||
"size": {
|
||
"description": "image",
|
||
"type": "string"
|
||
},
|
||
"step": {
|
||
"type": "integer"
|
||
},
|
||
"stop": {},
|
||
"stream": {
|
||
"type": "boolean"
|
||
},
|
||
"stream_options": {
|
||
"description": "StreamOptions opts into OpenAI streaming extensions, e.g. include_usage.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.StreamOptions"
|
||
}
|
||
]
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"tfz": {
|
||
"type": "number"
|
||
},
|
||
"tokenizer": {
|
||
"description": "RWKV (?)",
|
||
"type": "string"
|
||
},
|
||
"tool_choice": {},
|
||
"tools": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/functions.Tool"
|
||
}
|
||
},
|
||
"top_k": {
|
||
"type": "integer"
|
||
},
|
||
"top_logprobs": {
|
||
"description": "Number of top logprobs per token (0-20)",
|
||
"type": "integer"
|
||
},
|
||
"top_p": {
|
||
"description": "Common options between all the API calls, part of the OpenAI spec",
|
||
"type": "number"
|
||
},
|
||
"translate": {
|
||
"description": "Only for audio transcription",
|
||
"type": "boolean"
|
||
},
|
||
"typical_p": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.OpenAIResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choices": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Choice"
|
||
}
|
||
},
|
||
"created": {
|
||
"type": "integer"
|
||
},
|
||
"data": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.Item"
|
||
}
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"metadata": {
|
||
"type": "object"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"object": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"description": "Usage is intentionally a pointer with omitempty: per the OpenAI\nchat-completion streaming spec, intermediate chunks must not carry\na ` + "`" + `usage` + "`" + ` field. Marshalling a value-typed usage would emit\n` + "`" + `\"usage\":{\"prompt_tokens\":0,...}` + "`" + ` on every chunk and break\nOpenAI-SDK consumers that filter on a truthy ` + "`" + `result.usage` + "`" + `\n(continuedev/continue, Kilo Code, Roo Code, etc.).",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.OpenAIUsage"
|
||
}
|
||
]
|
||
}
|
||
}
|
||
},
|
||
"schema.OpenAIUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"completion_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"compression_meta": {
|
||
"$ref": "#/definitions/schema.CompressionMetadata"
|
||
},
|
||
"input_tokens": {
|
||
"description": "Fields for image generation API compatibility",
|
||
"type": "integer"
|
||
},
|
||
"input_tokens_details": {
|
||
"$ref": "#/definitions/schema.InputTokensDetails"
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"prompt_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"timing_prompt_processing": {
|
||
"description": "Extra timing data, disabled by default as is't not a part of OpenAI specification",
|
||
"type": "number"
|
||
},
|
||
"timing_token_generation": {
|
||
"type": "number"
|
||
},
|
||
"total_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.OpenResponsesRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"allowed_tools": {
|
||
"description": "Restrict which tools can be invoked",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"background": {
|
||
"description": "Run request in background",
|
||
"type": "boolean"
|
||
},
|
||
"frequency_penalty": {
|
||
"description": "Frequency penalty (-2.0 to 2.0)",
|
||
"type": "number"
|
||
},
|
||
"include": {
|
||
"description": "What to include in response",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"input": {
|
||
"description": "string or []ORItemParam"
|
||
},
|
||
"instructions": {
|
||
"type": "string"
|
||
},
|
||
"logit_bias": {
|
||
"description": "OpenAI-compatible extensions (not in Open Responses spec)",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
},
|
||
"max_output_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"max_tool_calls": {
|
||
"description": "Maximum number of tool calls",
|
||
"type": "integer"
|
||
},
|
||
"metadata": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"parallel_tool_calls": {
|
||
"description": "Allow parallel tool calls",
|
||
"type": "boolean"
|
||
},
|
||
"presence_penalty": {
|
||
"description": "Presence penalty (-2.0 to 2.0)",
|
||
"type": "number"
|
||
},
|
||
"previous_response_id": {
|
||
"type": "string"
|
||
},
|
||
"reasoning": {
|
||
"$ref": "#/definitions/schema.ORReasoningParam"
|
||
},
|
||
"service_tier": {
|
||
"description": "\"auto\"|\"default\"|priority hint",
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"description": "Whether to store the response",
|
||
"type": "boolean"
|
||
},
|
||
"stream": {
|
||
"type": "boolean"
|
||
},
|
||
"temperature": {
|
||
"type": "number"
|
||
},
|
||
"text_format": {
|
||
"description": "Additional parameters from spec"
|
||
},
|
||
"tool_choice": {
|
||
"description": "\"auto\"|\"required\"|\"none\"|{type:\"function\",name:\"...\"}"
|
||
},
|
||
"tools": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ORFunctionTool"
|
||
}
|
||
},
|
||
"top_logprobs": {
|
||
"description": "Number of top logprobs to return",
|
||
"type": "integer"
|
||
},
|
||
"top_p": {
|
||
"type": "number"
|
||
},
|
||
"truncation": {
|
||
"description": "\"auto\"|\"disabled\"",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.P2PNodesResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"federated_nodes": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.NodeData"
|
||
}
|
||
},
|
||
"llama_cpp_nodes": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.NodeData"
|
||
}
|
||
},
|
||
"mlx_nodes": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.NodeData"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.PIIAnalyzeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"detectors": {
|
||
"description": "Detectors names the detector models to run (NER and/or pattern). Takes\nprecedence over Model.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"description": "Model is a consuming model whose effective PII policy (own\npii.detectors, else the instance default detectors; PII must be\nenabled) is used when Detectors is empty.",
|
||
"type": "string"
|
||
},
|
||
"reveal": {
|
||
"description": "Reveal includes the per-entity hash_prefix in the response. Honoured\nonly for admin callers; ignored otherwise. The raw matched value is\nnever returned regardless.",
|
||
"type": "boolean"
|
||
},
|
||
"text": {
|
||
"description": "Text is the string to scan. Bounded only by the server's global HTTP\nbody limit.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.PIIAnalyzeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"blocked": {
|
||
"type": "boolean"
|
||
},
|
||
"correlation_id": {
|
||
"type": "string"
|
||
},
|
||
"entities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.PIIEntity"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.PIIEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"action": {
|
||
"type": "string"
|
||
},
|
||
"end": {
|
||
"type": "integer"
|
||
},
|
||
"entity_type": {
|
||
"type": "string"
|
||
},
|
||
"hash_prefix": {
|
||
"type": "string"
|
||
},
|
||
"score": {
|
||
"type": "number"
|
||
},
|
||
"source": {
|
||
"type": "string"
|
||
},
|
||
"start": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.PIIRedactResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"blocked": {
|
||
"type": "boolean"
|
||
},
|
||
"correlation_id": {
|
||
"type": "string"
|
||
},
|
||
"entities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.PIIEntity"
|
||
}
|
||
},
|
||
"masked": {
|
||
"type": "boolean"
|
||
},
|
||
"redacted_text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterCorpusAddRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"entries": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.RouterCorpusEntry"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterCorpusAddResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"added": {
|
||
"description": "Added is how many entries were embedded, persisted, and indexed.",
|
||
"type": "integer"
|
||
},
|
||
"label_counts": {
|
||
"description": "LabelCounts is the per-label exemplar count after the call.",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"router": {
|
||
"type": "string"
|
||
},
|
||
"skipped": {
|
||
"description": "Skipped counts entries whose text was already in the corpus —\nduplicates are rejected rather than double-weighted.",
|
||
"type": "integer"
|
||
},
|
||
"total": {
|
||
"description": "Total is the corpus size after the call.",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterCorpusClearResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cleared": {
|
||
"type": "integer"
|
||
},
|
||
"router": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterCorpusEntry": {
|
||
"type": "object",
|
||
"properties": {
|
||
"labels": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterCorpusStatsResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"embedding_model": {
|
||
"type": "string"
|
||
},
|
||
"embedding_models": {
|
||
"description": "EmbeddingModels lists the embedder fingerprints present in the\npersisted corpus; more than one means part of the corpus is\npending re-embedding on the next load.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"label_counts": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "integer"
|
||
}
|
||
},
|
||
"router": {
|
||
"type": "string"
|
||
},
|
||
"store_name": {
|
||
"type": "string"
|
||
},
|
||
"total": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterDecideNeighbor": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"similarity": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterDecideRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input": {
|
||
"description": "Input is the user-visible prompt text to classify. Required.\nSchema-shape extraction (chat-message concatenation, etc.) is\nthe caller's responsibility — matches the Probe contract used\nby the in-band middleware.",
|
||
"type": "string"
|
||
},
|
||
"router": {
|
||
"description": "Router is the name of the router model (a ModelConfig with a\n` + "`" + `router:` + "`" + ` block). Required.",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.RouterDecideResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cache_similarity": {
|
||
"description": "CacheSimilarity carries the cosine similarity of the cache hit\n(0 when not cached).",
|
||
"type": "number"
|
||
},
|
||
"cached": {
|
||
"description": "Cached is true when the decision came from the L2 embedding\ncache rather than a fresh classifier run.",
|
||
"type": "boolean"
|
||
},
|
||
"candidate": {
|
||
"description": "Candidate is the model that would be routed to. Empty when no\ncandidate covers Labels AND no fallback is configured.",
|
||
"type": "string"
|
||
},
|
||
"classifier": {
|
||
"description": "Classifier is the classifier name that produced the decision\n(e.g. \"score\").",
|
||
"type": "string"
|
||
},
|
||
"fallback": {
|
||
"description": "Fallback is true when Candidate is the router's configured\nfallback because no candidate covered Labels. Lets callers\ndistinguish \"matched\" from \"fell back\" without comparing names.",
|
||
"type": "boolean"
|
||
},
|
||
"labels": {
|
||
"description": "Labels is the set of active policy labels.",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"latency_ms": {
|
||
"description": "LatencyMs is the classifier's wall-clock cost.",
|
||
"type": "integer"
|
||
},
|
||
"nearest_similarity": {
|
||
"description": "NearestSimilarity is the cosine similarity of the closest KNN\ncorpus entry — populated by the knn classifier even when the\ndecision fell back because the probe was out of corpus range.\n0 for other classifiers.",
|
||
"type": "number"
|
||
},
|
||
"neighbors": {
|
||
"description": "Neighbors lists the corpus entries the knn classifier retrieved,\nby descending similarity, including ones below the similarity\ngate. Empty for other classifiers.",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.RouterDecideNeighbor"
|
||
}
|
||
},
|
||
"router": {
|
||
"description": "Router echoes the requested router model.",
|
||
"type": "string"
|
||
},
|
||
"score": {
|
||
"description": "Score is the top label's softmax probability (the\nclassifier-side confidence signal).",
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.SlotCacheRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"description": "restore only: an ID issued by a save for this model",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"slot": {
|
||
"description": "slot id, 0 is the first slot",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.SlotCacheResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"action": {
|
||
"description": "\"save\" or \"restore\"",
|
||
"type": "string"
|
||
},
|
||
"duration_ms": {
|
||
"description": "time the backend spent",
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"description": "issued by the save, sent back to restore",
|
||
"type": "string"
|
||
},
|
||
"message": {
|
||
"description": "for example the IDs a save pruned",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"n_bytes": {
|
||
"description": "bytes written or read",
|
||
"type": "integer"
|
||
},
|
||
"n_tokens": {
|
||
"description": "tokens saved or restored",
|
||
"type": "integer"
|
||
},
|
||
"slot": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.SoundClassification": {
|
||
"type": "object",
|
||
"properties": {
|
||
"index": {
|
||
"type": "integer"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"score": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.SoundClassificationResult": {
|
||
"type": "object",
|
||
"properties": {
|
||
"detections": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SoundClassification"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SpeakerEncoder": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dimension": {
|
||
"type": "integer"
|
||
},
|
||
"family": {
|
||
"description": "Family is the embedding space of the encoder. The server fills it from the\nloaded encoder; exported profiles do not carry it and it is not matched.",
|
||
"type": "string"
|
||
},
|
||
"identity": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SpeakerProfile": {
|
||
"type": "object",
|
||
"properties": {
|
||
"clean_duration": {
|
||
"type": "number"
|
||
},
|
||
"embedding": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"intervals": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SpeakerProfileInterval"
|
||
}
|
||
},
|
||
"speaker": {
|
||
"type": "integer"
|
||
},
|
||
"unavailable_reason": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SpeakerProfileInterval": {
|
||
"type": "object",
|
||
"properties": {
|
||
"end": {
|
||
"type": "number"
|
||
},
|
||
"start": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.SpeakerProfiles": {
|
||
"type": "object",
|
||
"properties": {
|
||
"encoder": {
|
||
"$ref": "#/definitions/schema.SpeakerEncoder"
|
||
},
|
||
"speakers": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SpeakerProfile"
|
||
}
|
||
},
|
||
"version": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.StreamOptions": {
|
||
"type": "object",
|
||
"properties": {
|
||
"include_usage": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"schema.SysInfoModel": {
|
||
"type": "object",
|
||
"properties": {
|
||
"backend": {
|
||
"description": "Backend is the engine serving this model. The loader knows only the ID,\nso it is resolved from the model's config; empty when the model was\nloaded without one (a loose file, or a config since removed).",
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"process": {
|
||
"description": "Process is the backend process serving the model on this host. Absent\nwhen the model has no local process (a distributed worker holds it) or\nthe process could not be read.",
|
||
"allOf": [
|
||
{
|
||
"$ref": "#/definitions/schema.SysInfoProcess"
|
||
}
|
||
]
|
||
},
|
||
"size_vram": {
|
||
"description": "SizeVRAM is DRM-accounted resident device memory in bytes. Nil means\nthe backend process tree has no complete supported reading.",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.SysInfoProcess": {
|
||
"type": "object",
|
||
"properties": {
|
||
"cpu_percent": {
|
||
"description": "CPUPercent is the share of the whole host's CPU used since the previous\nreading, 0-100. Absent on the first reading of a process.",
|
||
"type": "number"
|
||
},
|
||
"memory_percent": {
|
||
"type": "number"
|
||
},
|
||
"pid": {
|
||
"type": "integer"
|
||
},
|
||
"rss_bytes": {
|
||
"description": "RSSBytes is resident host memory. Weights offloaded to a GPU are not\nin it.",
|
||
"type": "integer"
|
||
},
|
||
"started_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemInformationResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"backends": {
|
||
"description": "available backend engines",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"loaded_models": {
|
||
"description": "currently loaded models",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SysInfoModel"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOneAnswer": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choice": {
|
||
"type": "string"
|
||
},
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"entities": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SystemOneEntity"
|
||
}
|
||
},
|
||
"legend": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"noul": {
|
||
"type": "number"
|
||
},
|
||
"probabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
},
|
||
"score": {
|
||
"type": "number"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOneEntity": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"end": {
|
||
"type": "integer"
|
||
},
|
||
"start": {
|
||
"type": "integer"
|
||
},
|
||
"text": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOnePermuteRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"n_perm": {
|
||
"type": "integer"
|
||
},
|
||
"question": {
|
||
"type": "string"
|
||
},
|
||
"request": {
|
||
"$ref": "#/definitions/schema.SystemOneRequest"
|
||
},
|
||
"seed": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOnePermuteResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"argmax_stable": {
|
||
"type": "boolean"
|
||
},
|
||
"runs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.SystemOnePermuteRun"
|
||
}
|
||
},
|
||
"spread": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOnePermuteRun": {
|
||
"type": "object",
|
||
"properties": {
|
||
"choice": {
|
||
"type": "string"
|
||
},
|
||
"latency_ms": {
|
||
"type": "number"
|
||
},
|
||
"order": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"probabilities": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float64"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOneRequest": {
|
||
"type": "object"
|
||
},
|
||
"schema.SystemOneResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"answers": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"$ref": "#/definitions/schema.SystemOneAnswer"
|
||
}
|
||
},
|
||
"latency_ms": {
|
||
"type": "number"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"usage": {
|
||
"$ref": "#/definitions/schema.SystemOneUsage"
|
||
}
|
||
}
|
||
},
|
||
"schema.SystemOneUsage": {
|
||
"type": "object",
|
||
"properties": {
|
||
"input_tokens": {
|
||
"type": "integer"
|
||
},
|
||
"output_tokens": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.TTSRequest": {
|
||
"description": "TTS request body",
|
||
"type": "object",
|
||
"properties": {
|
||
"backend": {
|
||
"description": "backend engine override",
|
||
"type": "string"
|
||
},
|
||
"input": {
|
||
"description": "text input",
|
||
"type": "string"
|
||
},
|
||
"instructions": {
|
||
"description": "Instructions is a free-form, per-request style/voice description. It maps to\nthe OpenAI ` + "`" + `instructions` + "`" + ` field and is forwarded to the backend so expressive\nTTS models (e.g. Qwen3-TTS CustomVoice/VoiceDesign) can vary tone or designed\nvoice per request instead of only via the static YAML option.",
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"description": "(optional) language to use with TTS model",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"params": {
|
||
"description": "Params carries optional, backend-specific per-request generation parameters\n(LocalAI extension, e.g. Chatterbox exaggeration/cfg_weight/temperature).",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"response_format": {
|
||
"description": "(optional) output format",
|
||
"type": "string"
|
||
},
|
||
"sample_rate": {
|
||
"description": "(optional) desired output sample rate",
|
||
"type": "integer"
|
||
},
|
||
"speed": {
|
||
"description": "Speed is the OpenAI ` + "`" + `speed` + "`" + ` field (0.25-4.0). It is a pointer so an\nexplicit ` + "`" + `\"speed\": 0` + "`" + ` (invalid, rejected with 400) is distinguishable\nfrom an omitted field (left at the backend default). It is normalised\ninto Params[\"speed\"] so it reaches the backend over the same channel as\nthe other per-request generation parameters.",
|
||
"type": "number"
|
||
},
|
||
"stream": {
|
||
"description": "(optional) enable streaming TTS",
|
||
"type": "boolean"
|
||
},
|
||
"voice": {
|
||
"description": "voice audio file or speaker id",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.Task": {
|
||
"type": "object",
|
||
"properties": {
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"cron": {
|
||
"description": "Optional cron expression",
|
||
"type": "string"
|
||
},
|
||
"cron_parameters": {
|
||
"description": "Parameters to use when executing cron jobs",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"description": {
|
||
"description": "Optional description",
|
||
"type": "string"
|
||
},
|
||
"enabled": {
|
||
"description": "Can be disabled without deletion",
|
||
"type": "boolean"
|
||
},
|
||
"id": {
|
||
"description": "UUID",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"description": "Model name (must have MCP config)",
|
||
"type": "string"
|
||
},
|
||
"multimedia_sources": {
|
||
"description": "Multimedia sources (for cron jobs)\nURLs to fetch multimedia content from when cron job executes\nEach source can have custom headers for authentication/authorization",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.MultimediaSourceConfig"
|
||
}
|
||
},
|
||
"name": {
|
||
"description": "User-friendly name",
|
||
"type": "string"
|
||
},
|
||
"prompt": {
|
||
"description": "Template prompt (supports Go template .param syntax)",
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"webhooks": {
|
||
"description": "Webhook configuration (for notifications).\nSupports multiple webhook endpoints.\nWebhooks can handle both success and failure cases using template variables:\n.Job (Job object), .Task (Task object), .Result (if successful),\n.Error (if failed), .Status (job status string).",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.WebhookConfig"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ThreeDInput": {
|
||
"type": "object",
|
||
"properties": {
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"max_bytes": {
|
||
"type": "integer"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"required": {
|
||
"type": "boolean"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.ThreeDOperation": {
|
||
"type": "object",
|
||
"properties": {
|
||
"endpoint": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"inputs": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ThreeDInput"
|
||
}
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"output": {
|
||
"type": "string"
|
||
},
|
||
"parameters": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.ThreeDParameter"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ThreeDParameter": {
|
||
"type": "object",
|
||
"properties": {
|
||
"advanced": {
|
||
"type": "boolean"
|
||
},
|
||
"default": {
|
||
"type": "string"
|
||
},
|
||
"label": {
|
||
"type": "string"
|
||
},
|
||
"max": {
|
||
"type": "number"
|
||
},
|
||
"min": {
|
||
"type": "number"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"options": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.TokenizeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"content": {
|
||
"description": "text to tokenize",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.TokenizeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"tokens": {
|
||
"description": "token IDs",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.ToolCall": {
|
||
"type": "object",
|
||
"properties": {
|
||
"function": {
|
||
"$ref": "#/definitions/schema.FunctionCall"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"index": {
|
||
"type": "integer"
|
||
},
|
||
"type": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VADRequest": {
|
||
"description": "VAD request body",
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"description": "raw audio samples as float32 PCM",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VideoReference": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"description": "optional audio paired with this video",
|
||
"type": "string"
|
||
},
|
||
"fps": {
|
||
"description": "frame rate of the source frames; 0 means the backend default",
|
||
"type": "integer"
|
||
},
|
||
"frames": {
|
||
"description": "ordered frame images: URL, base64 or data URI",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.VideoRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"description": "URL or base64 audio for audio-conditioned generation",
|
||
"type": "string"
|
||
},
|
||
"cfg_scale": {
|
||
"description": "classifier-free guidance scale",
|
||
"type": "number"
|
||
},
|
||
"end_image": {
|
||
"description": "URL or base64 of the last frame",
|
||
"type": "string"
|
||
},
|
||
"fps": {
|
||
"description": "frames per second",
|
||
"type": "integer"
|
||
},
|
||
"height": {
|
||
"description": "output height in pixels",
|
||
"type": "integer"
|
||
},
|
||
"input_reference": {
|
||
"description": "reference image or video URL",
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"negative_prompt": {
|
||
"description": "things to avoid in the output",
|
||
"type": "string"
|
||
},
|
||
"num_frames": {
|
||
"description": "total number of frames to generate",
|
||
"type": "integer"
|
||
},
|
||
"params": {
|
||
"description": "backend-specific generation parameters",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"prompt": {
|
||
"description": "text description of the video to generate",
|
||
"type": "string"
|
||
},
|
||
"ref_audios": {
|
||
"description": "reference audio clips (WAV); exclusive with start_image/end_image",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"ref_images": {
|
||
"description": "reference images (URL, base64 or data URI); exclusive with start_image/end_image",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"ref_videos": {
|
||
"description": "reference videos as frame lists; exclusive with start_image/end_image",
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.VideoReference"
|
||
}
|
||
},
|
||
"response_format": {
|
||
"description": "output format (url or b64_json)",
|
||
"type": "string"
|
||
},
|
||
"seconds": {
|
||
"description": "duration in seconds (alternative to num_frames)",
|
||
"type": "string"
|
||
},
|
||
"seed": {
|
||
"description": "random seed for reproducibility",
|
||
"type": "integer"
|
||
},
|
||
"size": {
|
||
"description": "WxH shorthand (e.g. \"512x512\")",
|
||
"type": "string"
|
||
},
|
||
"start_image": {
|
||
"description": "URL or base64 of the first frame",
|
||
"type": "string"
|
||
},
|
||
"step": {
|
||
"description": "number of diffusion steps",
|
||
"type": "integer"
|
||
},
|
||
"width": {
|
||
"description": "output width in pixels",
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceAnalysis": {
|
||
"type": "object",
|
||
"properties": {
|
||
"age": {
|
||
"type": "number"
|
||
},
|
||
"dominant_emotion": {
|
||
"type": "string"
|
||
},
|
||
"dominant_gender": {
|
||
"type": "string"
|
||
},
|
||
"emotion": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float32"
|
||
}
|
||
},
|
||
"end": {
|
||
"type": "number"
|
||
},
|
||
"gender": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "number",
|
||
"format": "float32"
|
||
}
|
||
},
|
||
"start": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceAnalyzeRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"actions": {
|
||
"description": "subset of {\"age\",\"gender\",\"emotion\"}",
|
||
"type": "array",
|
||
"items": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"audio": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceAnalyzeResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"segments": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.VoiceAnalysis"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceEmbedRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceEmbedResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"dim": {
|
||
"type": "integer"
|
||
},
|
||
"embedding": {
|
||
"type": "array",
|
||
"items": {
|
||
"type": "number"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceForgetRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceIdentifyMatch": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"distance": {
|
||
"type": "number"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"match": {
|
||
"type": "boolean"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceIdentifyRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"store": {
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"type": "number"
|
||
},
|
||
"top_k": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceIdentifyResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"matches": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/schema.VoiceIdentifyMatch"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceRegisterRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"type": "string"
|
||
},
|
||
"labels": {
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"speaker_profiles": {
|
||
"$ref": "#/definitions/schema.SpeakerProfiles"
|
||
},
|
||
"speaker_slot": {
|
||
"type": "integer"
|
||
},
|
||
"store": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceRegisterResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"registered_at": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceVerifyRequest": {
|
||
"type": "object",
|
||
"properties": {
|
||
"anti_spoofing": {
|
||
"type": "boolean"
|
||
},
|
||
"audio1": {
|
||
"type": "string"
|
||
},
|
||
"audio2": {
|
||
"type": "string"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"threshold": {
|
||
"type": "number"
|
||
}
|
||
}
|
||
},
|
||
"schema.VoiceVerifyResponse": {
|
||
"type": "object",
|
||
"properties": {
|
||
"confidence": {
|
||
"type": "number"
|
||
},
|
||
"distance": {
|
||
"type": "number"
|
||
},
|
||
"model": {
|
||
"type": "string"
|
||
},
|
||
"processing_time_ms": {
|
||
"type": "number"
|
||
},
|
||
"threshold": {
|
||
"type": "number"
|
||
},
|
||
"verified": {
|
||
"type": "boolean"
|
||
}
|
||
}
|
||
},
|
||
"schema.WebhookConfig": {
|
||
"type": "object",
|
||
"properties": {
|
||
"headers": {
|
||
"description": "Custom headers (e.g., Authorization)",
|
||
"type": "object",
|
||
"additionalProperties": {
|
||
"type": "string"
|
||
}
|
||
},
|
||
"method": {
|
||
"description": "HTTP method (POST, PUT, PATCH) - default: POST",
|
||
"type": "string"
|
||
},
|
||
"payload_template": {
|
||
"description": "Optional template for payload",
|
||
"type": "string"
|
||
},
|
||
"url": {
|
||
"description": "Webhook endpoint URL",
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"voiceprofile.AudioMetadata": {
|
||
"type": "object",
|
||
"properties": {
|
||
"bit_depth": {
|
||
"type": "integer"
|
||
},
|
||
"channels": {
|
||
"type": "integer"
|
||
},
|
||
"duration_ms": {
|
||
"type": "integer"
|
||
},
|
||
"mime_type": {
|
||
"type": "string"
|
||
},
|
||
"sample_rate": {
|
||
"type": "integer"
|
||
},
|
||
"size_bytes": {
|
||
"type": "integer"
|
||
}
|
||
}
|
||
},
|
||
"voiceprofile.Profile": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"$ref": "#/definitions/voiceprofile.AudioMetadata"
|
||
},
|
||
"consent_confirmed_at": {
|
||
"type": "string"
|
||
},
|
||
"created_at": {
|
||
"type": "string"
|
||
},
|
||
"description": {
|
||
"type": "string"
|
||
},
|
||
"id": {
|
||
"type": "string"
|
||
},
|
||
"language": {
|
||
"type": "string"
|
||
},
|
||
"name": {
|
||
"type": "string"
|
||
},
|
||
"references": {
|
||
"type": "array",
|
||
"items": {
|
||
"$ref": "#/definitions/voiceprofile.ReferenceMetadata"
|
||
}
|
||
},
|
||
"transcript": {
|
||
"type": "string"
|
||
},
|
||
"updated_at": {
|
||
"type": "string"
|
||
},
|
||
"voice": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
},
|
||
"voiceprofile.ReferenceMetadata": {
|
||
"type": "object",
|
||
"properties": {
|
||
"audio": {
|
||
"$ref": "#/definitions/voiceprofile.AudioMetadata"
|
||
},
|
||
"transcript": {
|
||
"type": "string"
|
||
}
|
||
}
|
||
}
|
||
},
|
||
"securityDefinitions": {
|
||
"BearerAuth": {
|
||
"type": "apiKey",
|
||
"name": "Authorization",
|
||
"in": "header"
|
||
}
|
||
}
|
||
}`
|
||
|
||
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
||
var SwaggerInfo = &swag.Spec{
|
||
Version: "2.0.0",
|
||
Host: "",
|
||
BasePath: "/",
|
||
Schemes: []string{"http", "https"},
|
||
Title: "LocalAI API",
|
||
Description: "The LocalAI Rest API.",
|
||
InfoInstanceName: "swagger",
|
||
SwaggerTemplate: docTemplate,
|
||
LeftDelim: "{{",
|
||
RightDelim: "}}",
|
||
}
|
||
|
||
func init() {
|
||
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
||
}
|