feat(swagger): update swagger (#9085)

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: mudler <2420543+mudler@users.noreply.github.com>
This commit is contained in:
LocalAI [bot]
2026-03-20 21:45:03 +01:00
committed by GitHub
parent 73bdc3b50d
commit f7e3aab4fc
3 changed files with 0 additions and 2127 deletions

View File

@@ -22,493 +22,6 @@ const docTemplate = `{
"host": "{{.Host}}",
"basePath": "{{.BasePath}}",
"paths": {
"/api/agent/jobs": {
"get": {
"description": "Get a list of agent jobs, optionally filtered by task_id and status",
"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": "Limit number of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "List of jobs",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.Job"
}
}
}
}
}
},
"/api/agent/jobs/execute": {
"post": {
"description": "Create and execute a new agent job",
"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": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/jobs/{id}": {
"get": {
"description": "Get an agent job by ID",
"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 details",
"schema": {
"$ref": "#/definitions/schema.Job"
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete an agent job by ID",
"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": "Job deleted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/jobs/{id}/cancel": {
"post": {
"description": "Cancel a running or pending agent job",
"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": "Job cancelled",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Job cannot be cancelled",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks": {
"get": {
"description": "Get a list of all agent tasks",
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "List all agent tasks",
"responses": {
"200": {
"description": "List of tasks",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.Task"
}
}
}
}
},
"post": {
"description": "Create a new reusable agent task with prompt template and configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "Create a new agent task",
"parameters": [
{
"description": "Task definition",
"name": "task",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.Task"
}
}
],
"responses": {
"201": {
"description": "Task created",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks/{id}": {
"get": {
"description": "Get an agent task by ID",
"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 details",
"schema": {
"$ref": "#/definitions/schema.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Update an existing agent task",
"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": "task",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.Task"
}
}
],
"responses": {
"200": {
"description": "Task updated",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete an agent task by ID",
"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": "Task deleted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks/{name}/execute": {
"post": {
"description": "Execute an agent task by its name (convenience endpoint). Parameters can be provided in the request body as a JSON object with string values.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "Execute a task by name",
"parameters": [
{
"type": "string",
"description": "Task name",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Template parameters (JSON object with string values)",
"name": "request",
"in": "body",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
],
"responses": {
"201": {
"description": "Job created",
"schema": {
"$ref": "#/definitions/schema.JobExecutionResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/p2p": {
"get": {
"summary": "Returns available P2P nodes",
@@ -2335,203 +1848,6 @@ const docTemplate = `{
}
}
},
"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": {
"type": "string"
},
"status": {
"type": "string"
},
"url": {
"description": "URL to check 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": true
},
"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.LogprobContent": {
"type": "object",
"properties": {
@@ -2645,26 +1961,6 @@ const docTemplate = `{
}
}
},
"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": {
@@ -3585,66 +2881,6 @@ const docTemplate = `{
}
}
},
"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 {{.param}} syntax)",
"type": "string"
},
"updated_at": {
"type": "string"
},
"webhooks": {
"description": "Webhook configuration (for notifications)\nSupport multiple webhook endpoints\nWebhooks can handle both success and failure cases using template variables:\n- {{.Job}} - Job object with all fields\n- {{.Task}} - Task object\n- {{.Result}} - Job result (if successful)\n- {{.Error}} - Error message (if failed, empty string if successful)\n- {{.Status}} - Job status string",
"type": "array",
"items": {
"$ref": "#/definitions/schema.WebhookConfig"
}
}
}
},
"schema.TokenizeRequest": {
"type": "object",
"properties": {
@@ -3753,30 +2989,6 @@ const docTemplate = `{
}
}
},
"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"
}
}
},
"services.GalleryOpStatus": {
"type": "object",
"properties": {

View File

@@ -15,493 +15,6 @@
},
"basePath": "/",
"paths": {
"/api/agent/jobs": {
"get": {
"description": "Get a list of agent jobs, optionally filtered by task_id and status",
"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": "Limit number of results",
"name": "limit",
"in": "query"
}
],
"responses": {
"200": {
"description": "List of jobs",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.Job"
}
}
}
}
}
},
"/api/agent/jobs/execute": {
"post": {
"description": "Create and execute a new agent job",
"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": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/jobs/{id}": {
"get": {
"description": "Get an agent job by ID",
"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 details",
"schema": {
"$ref": "#/definitions/schema.Job"
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete an agent job by ID",
"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": "Job deleted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/jobs/{id}/cancel": {
"post": {
"description": "Cancel a running or pending agent job",
"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": "Job cancelled",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Job cannot be cancelled",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Job not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks": {
"get": {
"description": "Get a list of all agent tasks",
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "List all agent tasks",
"responses": {
"200": {
"description": "List of tasks",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/schema.Task"
}
}
}
}
},
"post": {
"description": "Create a new reusable agent task with prompt template and configuration",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "Create a new agent task",
"parameters": [
{
"description": "Task definition",
"name": "task",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.Task"
}
}
],
"responses": {
"201": {
"description": "Task created",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"500": {
"description": "Internal server error",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks/{id}": {
"get": {
"description": "Get an agent task by ID",
"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 details",
"schema": {
"$ref": "#/definitions/schema.Task"
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"put": {
"description": "Update an existing agent task",
"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": "task",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/schema.Task"
}
}
],
"responses": {
"200": {
"description": "Task updated",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
},
"delete": {
"description": "Delete an agent task by ID",
"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": "Task deleted",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/agent/tasks/{name}/execute": {
"post": {
"description": "Execute an agent task by its name (convenience endpoint). Parameters can be provided in the request body as a JSON object with string values.",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"agent-jobs"
],
"summary": "Execute a task by name",
"parameters": [
{
"type": "string",
"description": "Task name",
"name": "name",
"in": "path",
"required": true
},
{
"description": "Template parameters (JSON object with string values)",
"name": "request",
"in": "body",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
],
"responses": {
"201": {
"description": "Job created",
"schema": {
"$ref": "#/definitions/schema.JobExecutionResponse"
}
},
"400": {
"description": "Invalid request",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
},
"404": {
"description": "Task not found",
"schema": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
}
}
},
"/api/p2p": {
"get": {
"summary": "Returns available P2P nodes",
@@ -2328,203 +1841,6 @@
}
}
},
"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": {
"type": "string"
},
"status": {
"type": "string"
},
"url": {
"description": "URL to check 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": true
},
"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.LogprobContent": {
"type": "object",
"properties": {
@@ -2638,26 +1954,6 @@
}
}
},
"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": {
@@ -3578,66 +2874,6 @@
}
}
},
"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 {{.param}} syntax)",
"type": "string"
},
"updated_at": {
"type": "string"
},
"webhooks": {
"description": "Webhook configuration (for notifications)\nSupport multiple webhook endpoints\nWebhooks can handle both success and failure cases using template variables:\n- {{.Job}} - Job object with all fields\n- {{.Task}} - Task object\n- {{.Result}} - Job result (if successful)\n- {{.Error}} - Error message (if failed, empty string if successful)\n- {{.Status}} - Job status string",
"type": "array",
"items": {
"$ref": "#/definitions/schema.WebhookConfig"
}
}
}
},
"schema.TokenizeRequest": {
"type": "object",
"properties": {
@@ -3746,30 +2982,6 @@
}
}
},
"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"
}
}
},
"services.GalleryOpStatus": {
"type": "object",
"properties": {

View File

@@ -557,150 +557,6 @@ definitions:
total_tokens:
type: integer
type: object
schema.Job:
properties:
audios:
description: List of audio URLs or base64 strings
items:
type: string
type: array
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
items:
type: string
type: array
id:
description: UUID
type: string
images:
description: |-
Multimedia content (for manual execution)
Can contain URLs or base64-encoded data URIs
items:
type: string
type: array
parameters:
additionalProperties:
type: string
description: Template parameters
type: object
result:
description: Agent response
type: string
started_at:
type: string
status:
allOf:
- $ref: '#/definitions/schema.JobStatus'
description: pending, running, completed, failed, cancelled
task_id:
description: Reference to Task
type: string
traces:
description: Execution traces (reasoning, tool calls, tool results)
items:
$ref: '#/definitions/schema.JobTrace'
type: array
triggered_by:
description: '"manual", "cron", "api"'
type: string
videos:
description: List of video URLs or base64 strings
items:
type: string
type: array
webhook_error:
description: Error if webhook failed
type: string
webhook_sent:
description: Webhook delivery tracking
type: boolean
webhook_sent_at:
type: string
type: object
schema.JobExecutionRequest:
properties:
audios:
description: List of audio URLs or base64 strings
items:
type: string
type: array
files:
description: List of file URLs or base64 strings
items:
type: string
type: array
images:
description: |-
Multimedia content (optional, for manual execution)
Can contain URLs or base64-encoded data URIs
items:
type: string
type: array
parameters:
additionalProperties:
type: string
description: Optional, for templating
type: object
task_id:
description: Required
type: string
videos:
description: List of video URLs or base64 strings
items:
type: string
type: array
type: object
schema.JobExecutionResponse:
properties:
job_id:
type: string
status:
type: string
url:
description: URL to check job status
type: string
type: object
schema.JobStatus:
enum:
- pending
- running
- completed
- failed
- cancelled
type: string
x-enum-varnames:
- JobStatusPending
- JobStatusRunning
- JobStatusCompleted
- JobStatusFailed
- JobStatusCancelled
schema.JobTrace:
properties:
arguments:
additionalProperties: true
description: Tool arguments or result data
type: object
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
type: object
schema.LogprobContent:
properties:
bytes:
@@ -776,20 +632,6 @@ definitions:
object:
type: string
type: object
schema.MultimediaSourceConfig:
properties:
headers:
additionalProperties:
type: string
description: Custom headers for HTTP request (e.g., Authorization)
type: object
type:
description: '"image", "video", "audio", "file"'
type: string
url:
description: URL to fetch from
type: string
type: object
schema.NodeData:
properties:
id:
@@ -1416,60 +1258,6 @@ definitions:
description: voice audio file or speaker id
type: string
type: object
schema.Task:
properties:
created_at:
type: string
cron:
description: Optional cron expression
type: string
cron_parameters:
additionalProperties:
type: string
description: Parameters to use when executing cron jobs
type: object
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)
URLs to fetch multimedia content from when cron job executes
Each source can have custom headers for authentication/authorization
items:
$ref: '#/definitions/schema.MultimediaSourceConfig'
type: array
name:
description: User-friendly name
type: string
prompt:
description: Template prompt (supports {{.param}} syntax)
type: string
updated_at:
type: string
webhooks:
description: |-
Webhook configuration (for notifications)
Support multiple webhook endpoints
Webhooks can handle both success and failure cases using template variables:
- {{.Job}} - Job object with all fields
- {{.Task}} - Task object
- {{.Result}} - Job result (if successful)
- {{.Error}} - Error message (if failed, empty string if successful)
- {{.Status}} - Job status string
items:
$ref: '#/definitions/schema.WebhookConfig'
type: array
type: object
schema.TokenizeRequest:
properties:
content:
@@ -1541,23 +1329,6 @@ definitions:
width:
type: integer
type: object
schema.WebhookConfig:
properties:
headers:
additionalProperties:
type: string
description: Custom headers (e.g., Authorization)
type: object
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
type: object
services.GalleryOpStatus:
properties:
cancellable:
@@ -1596,328 +1367,6 @@ info:
title: LocalAI API
version: 2.0.0
paths:
/api/agent/jobs:
get:
description: Get a list of agent jobs, optionally filtered by task_id and status
parameters:
- description: Filter by task ID
in: query
name: task_id
type: string
- description: Filter by status (pending, running, completed, failed, cancelled)
in: query
name: status
type: string
- description: Limit number of results
in: query
name: limit
type: integer
produces:
- application/json
responses:
"200":
description: List of jobs
schema:
items:
$ref: '#/definitions/schema.Job'
type: array
summary: List agent jobs
tags:
- agent-jobs
/api/agent/jobs/{id}:
delete:
description: Delete an agent job by ID
parameters:
- description: Job ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Job deleted
schema:
additionalProperties:
type: string
type: object
"404":
description: Job not found
schema:
additionalProperties:
type: string
type: object
summary: Delete an agent job
tags:
- agent-jobs
get:
description: Get an agent job by ID
parameters:
- description: Job ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Job details
schema:
$ref: '#/definitions/schema.Job'
"404":
description: Job not found
schema:
additionalProperties:
type: string
type: object
summary: Get an agent job
tags:
- agent-jobs
/api/agent/jobs/{id}/cancel:
post:
description: Cancel a running or pending agent job
parameters:
- description: Job ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Job cancelled
schema:
additionalProperties:
type: string
type: object
"400":
description: Job cannot be cancelled
schema:
additionalProperties:
type: string
type: object
"404":
description: Job not found
schema:
additionalProperties:
type: string
type: object
summary: Cancel an agent job
tags:
- agent-jobs
/api/agent/jobs/execute:
post:
consumes:
- application/json
description: Create and execute a new agent job
parameters:
- description: Job execution request
in: body
name: request
required: true
schema:
$ref: '#/definitions/schema.JobExecutionRequest'
produces:
- application/json
responses:
"201":
description: Job created
schema:
$ref: '#/definitions/schema.JobExecutionResponse'
"400":
description: Invalid request
schema:
additionalProperties:
type: string
type: object
summary: Execute an agent job
tags:
- agent-jobs
/api/agent/tasks:
get:
description: Get a list of all agent tasks
produces:
- application/json
responses:
"200":
description: List of tasks
schema:
items:
$ref: '#/definitions/schema.Task'
type: array
summary: List all agent tasks
tags:
- agent-jobs
post:
consumes:
- application/json
description: Create a new reusable agent task with prompt template and configuration
parameters:
- description: Task definition
in: body
name: task
required: true
schema:
$ref: '#/definitions/schema.Task'
produces:
- application/json
responses:
"201":
description: Task created
schema:
additionalProperties:
type: string
type: object
"400":
description: Invalid request
schema:
additionalProperties:
type: string
type: object
"500":
description: Internal server error
schema:
additionalProperties:
type: string
type: object
summary: Create a new agent task
tags:
- agent-jobs
/api/agent/tasks/{id}:
delete:
description: Delete an agent task by ID
parameters:
- description: Task ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Task deleted
schema:
additionalProperties:
type: string
type: object
"404":
description: Task not found
schema:
additionalProperties:
type: string
type: object
summary: Delete an agent task
tags:
- agent-jobs
get:
description: Get an agent task by ID
parameters:
- description: Task ID
in: path
name: id
required: true
type: string
produces:
- application/json
responses:
"200":
description: Task details
schema:
$ref: '#/definitions/schema.Task'
"404":
description: Task not found
schema:
additionalProperties:
type: string
type: object
summary: Get an agent task
tags:
- agent-jobs
put:
consumes:
- application/json
description: Update an existing agent task
parameters:
- description: Task ID
in: path
name: id
required: true
type: string
- description: Updated task definition
in: body
name: task
required: true
schema:
$ref: '#/definitions/schema.Task'
produces:
- application/json
responses:
"200":
description: Task updated
schema:
additionalProperties:
type: string
type: object
"400":
description: Invalid request
schema:
additionalProperties:
type: string
type: object
"404":
description: Task not found
schema:
additionalProperties:
type: string
type: object
summary: Update an agent task
tags:
- agent-jobs
/api/agent/tasks/{name}/execute:
post:
consumes:
- application/json
description: Execute an agent task by its name (convenience endpoint). Parameters
can be provided in the request body as a JSON object with string values.
parameters:
- description: Task name
in: path
name: name
required: true
type: string
- description: Template parameters (JSON object with string values)
in: body
name: request
schema:
additionalProperties:
type: string
type: object
produces:
- application/json
responses:
"201":
description: Job created
schema:
$ref: '#/definitions/schema.JobExecutionResponse'
"400":
description: Invalid request
schema:
additionalProperties:
type: string
type: object
"404":
description: Task not found
schema:
additionalProperties:
type: string
type: object
summary: Execute a task by name
tags:
- agent-jobs
/api/p2p:
get:
responses: