{ "openapi": "3.1.0", "info": { "title": "Entities", "description": "API for AI inference", "version": "1.0.0" }, "paths": { "/v1/health": { "get": { "tags": [ "Main API", "Health" ], "summary": "Health Check", "description": "A simple health check endpoint that pings the database.\nExtend with any other dependency checks as needed.", "operationId": "health_check_v1_health_get", "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Health Check V1 Health Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/monitor": { "post": { "tags": [ "Event Monitoring" ], "summary": "Register Run Monitoring", "description": "Registers a run_id for server-side event monitoring.\nRequires a valid API key.", "operationId": "register_run_monitoring_v1_monitor_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MonitorRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/subscribe/{run_id}": { "get": { "tags": [ "Event Monitoring" ], "summary": "Subscribe To Run Events", "description": "Client connects here using Server-Sent Events (SSE) to receive\nreal-time events for a specific run_id. Requires a valid API key.", "operationId": "subscribe_to_run_events_v1_subscribe__run_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/completions": { "post": { "tags": [ "Inference" ], "summary": "Asynchronous completions streaming endpoint (Unified Orchestration)", "description": "Handles streaming completion requests using the appropriate inference provider.", "operationId": "completions_v1_completions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StreamRequest" } } }, "required": true }, "responses": { "200": { "description": "A stream of JSON-formatted completions chunks", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads": { "post": { "tags": [ "Threads", "Threads" ], "summary": "Create Thread", "description": "Create a thread. If `participant_ids` are absent in the payload,\nwe infer the caller from the authenticated API\u2011key.", "operationId": "create_thread_v1_threads_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadReadDetailed" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/{thread_id}": { "get": { "tags": [ "Threads", "Threads" ], "summary": "Get Thread", "operationId": "get_thread_v1_threads__thread_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadReadDetailed" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Threads", "Threads" ], "summary": "Delete Thread", "operationId": "delete_thread_v1_threads__thread_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadDeleted" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Threads", "Threads" ], "summary": "Update Thread", "operationId": "update_thread_v1_threads__thread_id__put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadReadDetailed" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/user/{user_id}": { "get": { "tags": [ "Threads", "Threads" ], "summary": "List User Threads", "operationId": "list_user_threads_v1_threads_user__user_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "string" }, "title": "Response List User Threads V1 Threads User User Id Get" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/{thread_id}/metadata": { "put": { "tags": [ "Threads", "Threads" ], "summary": "Update Thread Metadata", "operationId": "update_thread_metadata_v1_threads__thread_id__metadata_put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Metadata" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ThreadReadDetailed" } } } }, "404": { "description": "Thread not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users": { "post": { "tags": [ "Users", "Users" ], "summary": "Create User", "description": "Creates a new user. Requires **Admin** authentication via API Key.", "operationId": "create_user_v1_users_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/{user_id}": { "get": { "tags": [ "Users", "Users" ], "summary": "Get User", "description": "Retrieves details for a specific user.", "operationId": "get_user_v1_users__user_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Users", "Users" ], "summary": "Update User", "description": "Updates details for a specific user.", "operationId": "update_user_v1_users__user_id__put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Users", "Users" ], "summary": "Delete User", "description": "Deletes a specific user. Requires **Admin** authentication.", "operationId": "delete_user_v1_users__user_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs": { "post": { "tags": [ "Runs" ], "summary": "Create Run", "operationId": "create_run_v1_runs_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Run" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Runs" ], "summary": "List Runs", "operationId": "list_runs_v1_runs_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "order", "in": "query", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string", "default": "asc", "title": "Order" } }, { "name": "thread_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}": { "get": { "tags": [ "Runs" ], "summary": "Retrieve Run", "operationId": "retrieve_run_v1_runs__run_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunReadDetailed" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}/status": { "put": { "tags": [ "Runs" ], "summary": "Update Run Status", "operationId": "update_run_status_v1_runs__run_id__status_put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunStatusUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Run" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}/metadata": { "put": { "tags": [ "Runs" ], "summary": "Update Run Metadata", "operationId": "update_run_metadata_v1_runs__run_id__metadata_put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "title": "Payload" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Run" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}/cancel": { "post": { "tags": [ "Runs" ], "summary": "Cancel Run", "operationId": "cancel_run_v1_runs__run_id__cancel_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Run" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}/events": { "get": { "tags": [ "Runs" ], "summary": "Stream run\u2011lifecycle events (SSE)", "operationId": "stream_run_events_v1_runs__run_id__events_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/{thread_id}/runs": { "get": { "tags": [ "Runs" ], "summary": "List Runs For Thread", "operationId": "list_runs_for_thread_v1_threads__thread_id__runs_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Limit" } }, { "name": "order", "in": "query", "required": false, "schema": { "enum": [ "asc", "desc" ], "type": "string", "default": "asc", "title": "Order" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunListResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants": { "post": { "tags": [ "Assistants" ], "summary": "Create Assistant", "description": "Create a new assistant.", "operationId": "create_assistant_v1_assistants_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Assistants" ], "summary": "List Assistants", "description": "List assistants for the caller (derived from API-key).", "operationId": "list_assistants_v1_assistants_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AssistantRead" }, "title": "Response List Assistants V1 Assistants Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{assistant_id}": { "get": { "tags": [ "Assistants" ], "summary": "Get Assistant", "operationId": "get_assistant_v1_assistants__assistant_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Assistants" ], "summary": "Update Assistant", "description": "Update any mutable assistant fields \u2013 including `tool_resources`.", "operationId": "update_assistant_v1_assistants__assistant_id__put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssistantRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/{user_id}/assistants/{assistant_id}": { "post": { "tags": [ "Assistants" ], "summary": "Associate Assistant With User", "operationId": "associate_assistant_with_user_v1_users__user_id__assistants__assistant_id__post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Assistants" ], "summary": "Disassociate Assistant From User", "operationId": "disassociate_assistant_from_user_v1_users__user_id__assistants__assistant_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/messages": { "post": { "tags": [ "Messages" ], "summary": "Create Message", "operationId": "create_message_v1_messages_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/messages/tools": { "post": { "tags": [ "Messages" ], "summary": "Submit Tool Response", "operationId": "submit_tool_response_v1_messages_tools_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/messages/{message_id}": { "get": { "tags": [ "Messages" ], "summary": "Get Message", "operationId": "get_message_v1_messages__message_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Message Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Messages" ], "summary": "Delete Message", "operationId": "delete_message_v1_messages__message_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "message_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Message Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageDeleted" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/{thread_id}/messages": { "get": { "tags": [ "Messages" ], "summary": "List Messages", "operationId": "list_messages_v1_threads__thread_id__messages_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Limit" } }, { "name": "order", "in": "query", "required": false, "schema": { "type": "string", "default": "asc", "title": "Order" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessagesList" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/threads/{thread_id}/formatted_messages": { "get": { "tags": [ "Messages" ], "summary": "Get Formatted Messages", "operationId": "get_formatted_messages_v1_threads__thread_id__formatted_messages_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "thread_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Thread Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response Get Formatted Messages V1 Threads Thread Id Formatted Messages Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/messages/assistant": { "post": { "tags": [ "Messages" ], "summary": "Save Assistant Message", "operationId": "save_assistant_message_v1_messages_assistant_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/actions": { "post": { "tags": [ "Actions" ], "summary": "Create Action", "operationId": "create_action_v1_actions_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionCreate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/actions/{action_id}": { "get": { "tags": [ "Actions" ], "summary": "Get Action", "operationId": "get_action_v1_actions__action_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "action_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Action Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "put": { "tags": [ "Actions" ], "summary": "Update Action Status", "operationId": "update_action_status_v1_actions__action_id__put", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "action_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Action Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionUpdate" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActionRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Actions" ], "summary": "Delete Action", "operationId": "delete_action_v1_actions__action_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "action_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Action Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/runs/{run_id}/actions/status": { "get": { "tags": [ "Actions" ], "summary": "Get Actions By Status", "operationId": "get_actions_by_status_v1_runs__run_id__actions_status_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": "pending", "title": "Status" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ActionRead" }, "title": "Response Get Actions By Status V1 Runs Run Id Actions Status Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/actions/pending/{run_id}": { "get": { "tags": [ "Actions" ], "summary": "Get Pending Actions", "description": "Retrieve all pending actions with their function arguments, tool names,\nand run details. Filter by run_id.", "operationId": "get_pending_actions_v1_actions_pending__run_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "run_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Run Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object" }, "title": "Response Get Pending Actions V1 Actions Pending Run Id Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/uploads": { "post": { "tags": [ "Files" ], "summary": "Upload a file", "operationId": "upload_file_endpoint_v1_uploads_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/Body_upload_file_endpoint_v1_uploads_post" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/files/{file_id}": { "get": { "tags": [ "Files" ], "summary": "Retrieve file metadata", "operationId": "retrieve_file_metadata_v1_files__file_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Files" ], "summary": "Delete a file", "operationId": "delete_file_endpoint_v1_files__file_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FileDeleteResponse" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/files/{file_id}/signed-url": { "get": { "tags": [ "Files" ], "summary": "Generate a temporary signed URL (no API key required)", "description": "Returns {'signed_url': ...}", "operationId": "generate_signed_url_v1_files__file_id__signed_url_get", "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "expires_in", "in": "query", "required": false, "schema": { "type": "integer", "description": "Seconds until link expires", "default": 600, "title": "Expires In" }, "description": "Seconds until link expires" }, { "name": "use_real_filename", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Use Real Filename" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Generate Signed Url V1 Files File Id Signed Url Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/files/{file_id}/base64": { "get": { "tags": [ "Files" ], "summary": "Get file as Base64", "operationId": "get_file_as_base64_v1_files__file_id__base64_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "title": "Response Get File As Base64 V1 Files File Id Base64 Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores": { "post": { "tags": [ "Vector Stores" ], "summary": "Create Vector Store", "description": "Creates a new vector-store. \n\n- **Regular callers** \u2192 the store is assigned to *their* user-id. \n- **Admins** \u2192 may pass the optional `owner_id` query-param to create the store for a different user.", "operationId": "create_vector_store_v1_vector_stores_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "owner_id", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Target user-id (admin-only). If omitted, the store is created for the caller.", "title": "Owner Id" }, "description": "Target user-id (admin-only). If omitted, the store is created for the caller." }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreCreateWithSharedId" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Vector Stores" ], "summary": "List current user's Vector Stores", "operationId": "list_my_vector_stores_v1_vector_stores_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VectorStoreRead" }, "title": "Response List My Vector Stores V1 Vector Stores Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores/{vector_store_id}": { "delete": { "tags": [ "Vector Stores" ], "summary": "Delete Vector Store", "operationId": "delete_vector_store_v1_vector_stores__vector_store_id__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "permanent", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Permanent" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Vector Stores" ], "summary": "Get Vector Store", "operationId": "get_vector_store_v1_vector_stores__vector_store_id__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores/admin/by-user": { "get": { "tags": [ "Vector Stores" ], "summary": "(admin) list vector-stores for a given user_id", "operationId": "list_vector_stores_by_user_v1_vector_stores_admin_by_user_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "owner_id", "in": "query", "required": true, "schema": { "type": "string", "description": "Target user-id", "title": "Owner Id" }, "description": "Target user-id" }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VectorStoreRead" }, "title": "Response List Vector Stores By User V1 Vector Stores Admin By User Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores/{vector_store_id}/files": { "post": { "tags": [ "Vector Stores" ], "summary": "Add File", "operationId": "add_file_v1_vector_stores__vector_store_id__files_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreFileCreate" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreFileRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Vector Stores" ], "summary": "List Files", "operationId": "list_files_v1_vector_stores__vector_store_id__files_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VectorStoreFileRead" }, "title": "Response List Files V1 Vector Stores Vector Store Id Files Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Vector Stores" ], "summary": "Delete File", "operationId": "delete_file_v1_vector_stores__vector_store_id__files_delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "file_path", "in": "query", "required": true, "schema": { "type": "string", "title": "File Path" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores/{vector_store_id}/files/{file_id}": { "patch": { "tags": [ "Vector Stores" ], "summary": "Update File Status", "operationId": "update_file_status_v1_vector_stores__vector_store_id__files__file_id__patch", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "file_id", "in": "path", "required": true, "schema": { "type": "string", "title": "File Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreFileUpdateStatus" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreFileRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{assistant_id}/vector-stores/{vector_store_id}/attach": { "post": { "tags": [ "Vector Stores" ], "summary": "Attach Store", "operationId": "attach_store_v1_assistants__assistant_id__vector_stores__vector_store_id__attach_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "boolean" }, "title": "Response Attach Store V1 Assistants Assistant Id Vector Stores Vector Store Id Attach Post" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{assistant_id}/vector-stores/{vector_store_id}/detach": { "delete": { "tags": [ "Vector Stores" ], "summary": "Detach Store", "operationId": "detach_store_v1_assistants__assistant_id__vector_stores__vector_store_id__detach_delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "vector_store_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Vector Store Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "object", "additionalProperties": { "type": "boolean" }, "title": "Response Detach Store V1 Assistants Assistant Id Vector Stores Vector Store Id Detach Delete" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/assistants/{assistant_id}/vector-stores": { "get": { "tags": [ "Vector Stores" ], "summary": "List Assistant Stores", "operationId": "list_assistant_stores_v1_assistants__assistant_id__vector_stores_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "assistant_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Assistant Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/VectorStoreRead" }, "title": "Response List Assistant Stores V1 Assistants Assistant Id Vector Stores Get" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/vector-stores/lookup/collection": { "get": { "tags": [ "Vector Stores" ], "summary": "Get Vector Store by Collection Name", "description": "Retrieves vector-store metadata using its unique collection name.", "operationId": "get_vector_store_by_collection_v1_vector_stores_lookup_collection_get", "parameters": [ { "name": "name", "in": "query", "required": true, "schema": { "type": "string", "description": "Collection name to look up", "title": "Name" }, "description": "Collection name to look up" }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VectorStoreRead" } } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/{user_id}/apikeys": { "post": { "tags": [ "API Keys", "API Keys" ], "summary": "Create API Key", "description": "Generates a new API key for the specified user. The plain key is returned only once.", "operationId": "create_api_key_v1_users__user_id__apikeys_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateResponse" } } } }, "404": { "description": "User or Key not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "API Keys", "API Keys" ], "summary": "List API Keys", "description": "Retrieves a list of API keys for the specified user.", "operationId": "list_api_keys_v1_users__user_id__apikeys_get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "include_inactive", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Include Inactive" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyListResponse" } } } }, "404": { "description": "User or Key not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/users/{user_id}/apikeys/{key_prefix}": { "get": { "tags": [ "API Keys", "API Keys" ], "summary": "Get API Key Details", "description": "Retrieves details for a specific API key using its prefix.", "operationId": "get_api_key_details_v1_users__user_id__apikeys__key_prefix__get", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "key_prefix", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Prefix" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyDetails" } } } }, "404": { "description": "User or Key not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "API Keys", "API Keys" ], "summary": "Revoke API Key", "description": "Revokes (deactivates) a specific API key using its prefix.", "operationId": "revoke_api_key_v1_users__user_id__apikeys__key_prefix__delete", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "User Id" } }, { "name": "key_prefix", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Prefix" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "responses": { "204": { "description": "Successful Response" }, "404": { "description": "User or Key not found" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/admin/users/{target_user_id}/keys": { "post": { "tags": [ "Admin", "Admin" ], "summary": "Admin: Create API Key for User", "description": "Allows an authenticated administrator to create a new API key for any specified user.", "operationId": "admin_create_api_key_for_user_v1_admin_users__target_user_id__keys_post", "security": [ { "APIKeyHeader": [] } ], "parameters": [ { "name": "target_user_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Target User Id" } }, { "name": "args", "in": "query", "required": true, "schema": { "title": "Args" } }, { "name": "kwargs", "in": "query", "required": true, "schema": { "title": "Kwargs" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } } }, "responses": { "201": { "description": "Successful Response", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateResponse" } } } }, "403": { "description": "Admin privileges required" }, "401": { "description": "Authentication required / Invalid API Key" }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/": { "get": { "summary": "Read Root", "operationId": "read_root__get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } } }, "components": { "schemas": { "ActionCreate": { "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id" }, "tool_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name" }, "run_id": { "type": "string", "title": "Run Id" }, "function_args": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Function Args", "default": {} }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status", "default": "pending" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "turn_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Index", "default": 0 } }, "type": "object", "required": [ "run_id" ], "title": "ActionCreate", "example": { "function_args": { "arg1": "value1" }, "run_id": "example_run_id", "status": "pending", "tool_call_id": "call_abc123", "tool_name": "example_tool_name" } }, "ActionRead": { "properties": { "id": { "type": "string", "title": "Id" }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Run Id" }, "tool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" }, "tool_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Name" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "turn_index": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Turn Index" }, "triggered_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Triggered At" }, "expires_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Expires At" }, "is_processed": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Is Processed" }, "processed_at": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Processed At" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "function_args": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Function Args" }, "result": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Result" } }, "additionalProperties": false, "type": "object", "required": [ "id" ], "title": "ActionRead" }, "ActionStatus": { "type": "string", "enum": [ "pending", "processing", "completed", "failed", "expired", "cancelled", "retrying" ], "title": "ActionStatus" }, "ActionUpdate": { "properties": { "status": { "$ref": "#/components/schemas/ActionStatus" }, "result": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Result" } }, "type": "object", "required": [ "status" ], "title": "ActionUpdate" }, "ApiKeyCreateRequest": { "properties": { "key_name": { "anyOf": [ { "type": "string", "maxLength": 100 }, { "type": "null" } ], "title": "Key Name", "description": "An optional user-friendly name for the key (e.g., 'My Production Key')." }, "expires_in_days": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Expires In Days", "description": "Optional number of days from now until the key automatically expires. Minimum value is 1." } }, "additionalProperties": false, "type": "object", "title": "ApiKeyCreateRequest", "description": "Schema for the request body when creating a new API key.", "examples": [ { "expires_in_days": 30, "key_name": "Development Key" }, { "key_name": "Permanent Admin Key" } ] }, "ApiKeyCreateResponse": { "properties": { "plain_key": { "type": "string", "title": "Plain Key", "description": "The generated API key. This is the ONLY time this key will be shown. Store it securely immediately." }, "details": { "$ref": "#/components/schemas/ApiKeyDetails", "description": "The details of the API key record that was created in the database." } }, "type": "object", "required": [ "plain_key", "details" ], "title": "ApiKeyCreateResponse", "description": "Schema for the response after successfully creating an API key.\nCrucially includes the plain text key which should be stored securely by the client.", "examples": [ { "details": { "created_at": "2023-10-27T10:00:00Z", "is_active": true, "key_name": "My New Key", "prefix": "ea_abc123", "user_id": "user_jkl456" }, "plain_key": "ea_abc123_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } ] }, "ApiKeyDetails": { "properties": { "prefix": { "type": "string", "title": "Prefix", "description": "The non-secret unique prefix of the key (e.g., 'ea_abc123'). Used for identification." }, "key_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Key Name", "description": "The user-friendly name assigned to the key, if any." }, "user_id": { "type": "string", "title": "User Id", "description": "The ID of the user who owns this key." }, "created_at": { "type": "string", "format": "date-time", "title": "Created At", "description": "The timestamp (UTC) when the key was created." }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Expires At", "description": "The timestamp (UTC) when the key will expire, if an expiration was set." }, "last_used_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "null" } ], "title": "Last Used At", "description": "The timestamp (UTC) when the key was last successfully used for authentication (if tracked)." }, "is_active": { "type": "boolean", "title": "Is Active", "description": "Indicates if the key is currently active and usable for authentication." } }, "type": "object", "required": [ "prefix", "user_id", "created_at", "is_active" ], "title": "ApiKeyDetails", "description": "Schema representing the public details of an API key.\nThis schema does *not* include the secret key itself.\nIt's designed to be created from the ApiKey ORM model." }, "ApiKeyListResponse": { "properties": { "keys": { "items": { "$ref": "#/components/schemas/ApiKeyDetails" }, "type": "array", "title": "Keys", "description": "A list containing the details of the API keys associated with the user." } }, "type": "object", "required": [ "keys" ], "title": "ApiKeyListResponse", "description": "Schema for the response when listing API keys for a user.\nContains a list of key details." }, "AssistantCreate": { "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Id", "description": "Optional pre-generated assistant ID." }, "name": { "type": "string", "title": "Name", "description": "Assistant name" }, "description": { "type": "string", "title": "Description", "description": "Brief description", "default": "" }, "model": { "type": "string", "title": "Model", "description": "LLM model ID" }, "instructions": { "type": "string", "title": "Instructions", "description": "System instructions", "default": "" }, "tools": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tools", "description": "OpenAI-style tool specs (dicts)." }, "tool_resources": { "anyOf": [ { "additionalProperties": { "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Resources" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data" }, "top_p": { "type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Top P", "default": 1.0 }, "temperature": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Temperature", "default": 1.0 }, "response_format": { "type": "string", "title": "Response Format", "default": "auto" }, "webhook_url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Webhook Url" }, "webhook_secret": { "anyOf": [ { "type": "string", "minLength": 16 }, { "type": "null" } ], "title": "Webhook Secret" } }, "type": "object", "required": [ "name", "model" ], "title": "AssistantCreate", "example": { "model": "gpt-4o-mini", "name": "Search Assistant", "tool_resources": { "file_search": { "vector_store_ids": [ "vs_docs" ] } } } }, "AssistantRead": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id" }, "object": { "type": "string", "title": "Object" }, "created_at": { "type": "integer", "title": "Created At" }, "name": { "type": "string", "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "model": { "type": "string", "title": "Model" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "tools": { "anyOf": [ { "items": { "type": "object" }, "type": "array" }, { "type": "null" } ], "title": "Tools" }, "tool_resources": { "anyOf": [ { "additionalProperties": { "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Resources" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data" }, "top_p": { "type": "number", "title": "Top P" }, "temperature": { "type": "number", "title": "Temperature" }, "response_format": { "type": "string", "title": "Response Format" }, "vector_stores": { "items": { "$ref": "#/components/schemas/VectorStoreRead" }, "type": "array", "title": "Vector Stores" }, "webhook_url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Webhook Url" } }, "type": "object", "required": [ "id", "object", "created_at", "name", "model", "top_p", "temperature", "response_format" ], "title": "AssistantRead" }, "AssistantUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Description" }, "model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Model" }, "instructions": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Instructions" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data" }, "top_p": { "anyOf": [ { "type": "number", "maximum": 1.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Top P" }, "temperature": { "anyOf": [ { "type": "number", "maximum": 2.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Temperature" }, "response_format": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Response Format" }, "tools": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Tools" }, "users": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Users" }, "vector_stores": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Vector Stores" }, "tool_resources": { "anyOf": [ { "additionalProperties": { "type": "object" }, "type": "object" }, { "type": "null" } ], "title": "Tool Resources" }, "webhook_url": { "anyOf": [ { "type": "string", "maxLength": 2083, "minLength": 1, "format": "uri" }, { "type": "null" } ], "title": "Webhook Url" }, "webhook_secret": { "anyOf": [ { "type": "string", "minLength": 16 }, { "type": "null" } ], "title": "Webhook Secret" } }, "additionalProperties": false, "type": "object", "title": "AssistantUpdate" }, "Body_upload_file_endpoint_v1_uploads_post": { "properties": { "purpose": { "type": "string", "title": "Purpose", "description": "Purpose (e.g. assistants)" }, "file": { "type": "string", "format": "binary", "title": "File" } }, "type": "object", "required": [ "purpose", "file" ], "title": "Body_upload_file_endpoint_v1_uploads_post" }, "FileDeleteResponse": { "properties": { "id": { "type": "string", "title": "Id", "description": "Unique identifier of the file" }, "object": { "type": "string", "const": "file", "title": "Object", "description": "Always the string 'file'", "default": "file" }, "deleted": { "type": "boolean", "title": "Deleted", "description": "True if the file was deleted successfully" } }, "type": "object", "required": [ "id", "deleted" ], "title": "FileDeleteResponse" }, "FileResponse": { "properties": { "id": { "type": "string", "title": "Id", "description": "Unique identifier of the file" }, "object": { "type": "string", "const": "file", "title": "Object", "description": "Always the string 'file'", "default": "file" }, "bytes": { "type": "integer", "title": "Bytes", "description": "Size of the file in bytes" }, "created_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string" } ], "title": "Created At", "description": "ISO\u20118601 timestamp when the file was created (datetime or ISO string accepted)" }, "filename": { "type": "string", "title": "Filename", "description": "Original filename supplied by the user" }, "purpose": { "type": "string", "title": "Purpose", "description": "Purpose associated with the file" }, "status": { "type": "string", "title": "Status", "description": "Current status of the file", "default": "uploaded" }, "expires_at": { "anyOf": [ { "type": "string", "format": "date-time" }, { "type": "string" }, { "type": "null" } ], "title": "Expires At", "description": "Optional ISO\u20118601 expiry timestamp" } }, "type": "object", "required": [ "id", "bytes", "created_at", "filename", "purpose" ], "title": "FileResponse" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "MessageCreate": { "properties": { "content": { "type": "string", "title": "Content" }, "thread_id": { "type": "string", "title": "Thread Id" }, "sender_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sender Id" }, "assistant_id": { "type": "string", "title": "Assistant Id" }, "role": { "type": "string", "title": "Role" }, "tool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data" }, "is_last_chunk": { "type": "boolean", "title": "Is Last Chunk", "default": false } }, "type": "object", "required": [ "content", "thread_id", "assistant_id", "role" ], "title": "MessageCreate", "example": { "assistant_id": "example_assistant_id", "content": "Hello, this is a test message.", "meta_data": { "key": "value" }, "role": "user", "thread_id": "example_thread_id" } }, "MessageDeleted": { "properties": { "id": { "type": "string", "title": "Id" }, "object": { "type": "string", "title": "Object", "default": "thread.message.deleted" }, "deleted": { "type": "boolean", "title": "Deleted", "default": true } }, "type": "object", "required": [ "id" ], "title": "MessageDeleted" }, "MessageRead": { "properties": { "id": { "type": "string", "title": "Id" }, "assistant_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Assistant Id" }, "attachments": { "items": {}, "type": "array", "title": "Attachments" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "content": { "type": "string", "title": "Content" }, "created_at": { "type": "integer", "title": "Created At" }, "incomplete_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Incomplete At" }, "incomplete_details": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Incomplete Details" }, "meta_data": { "type": "object", "title": "Meta Data" }, "object": { "type": "string", "title": "Object" }, "role": { "type": "string", "title": "Role" }, "run_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Run Id" }, "tool_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Id" }, "tool_call_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Call Id" }, "status": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" }, "thread_id": { "type": "string", "title": "Thread Id" }, "sender_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Sender Id" } }, "type": "object", "required": [ "id", "assistant_id", "attachments", "completed_at", "content", "created_at", "incomplete_at", "incomplete_details", "meta_data", "object", "role", "run_id", "status", "thread_id" ], "title": "MessageRead" }, "MessagesList": { "properties": { "object": { "type": "string", "title": "Object", "default": "list" }, "data": { "items": { "$ref": "#/components/schemas/MessageRead" }, "type": "array", "title": "Data" }, "first_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "First Id" }, "last_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Id" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "data" ], "title": "MessagesList" }, "MonitorRequest": { "properties": { "run_id": { "type": "string", "title": "Run Id" } }, "type": "object", "required": [ "run_id" ], "title": "MonitorRequest" }, "Run": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id", "description": "Filled in by the server from the caller\u2019s API-key. Clients MAY omit or set to None." }, "assistant_id": { "type": "string", "title": "Assistant Id" }, "cancelled_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cancelled At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "created_at": { "type": "integer", "title": "Created At" }, "expires_at": { "type": "integer", "title": "Expires At" }, "failed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Failed At" }, "incomplete_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Incomplete Details" }, "instructions": { "type": "string", "title": "Instructions" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "max_completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Completion Tokens" }, "max_prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Prompt Tokens" }, "meta_data": { "type": "object", "title": "Meta Data" }, "model": { "type": "string", "title": "Model" }, "object": { "type": "string", "title": "Object" }, "parallel_tool_calls": { "type": "boolean", "title": "Parallel Tool Calls" }, "required_action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Required Action" }, "response_format": { "type": "string", "title": "Response Format" }, "started_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Started At" }, "status": { "$ref": "#/components/schemas/RunStatus" }, "thread_id": { "type": "string", "title": "Thread Id" }, "tool_choice": { "type": "string", "title": "Tool Choice" }, "tools": { "items": { "$ref": "#/components/schemas/Tool" }, "type": "array", "title": "Tools" }, "truncation_strategy": { "anyOf": [ { "$ref": "#/components/schemas/TruncationStrategy" }, { "type": "null" } ] }, "usage": { "anyOf": [ {}, { "type": "null" } ], "title": "Usage" }, "temperature": { "type": "number", "title": "Temperature" }, "top_p": { "type": "number", "title": "Top P" }, "tool_resources": { "type": "object", "title": "Tool Resources" } }, "type": "object", "required": [ "id", "assistant_id", "cancelled_at", "completed_at", "created_at", "expires_at", "failed_at", "incomplete_details", "instructions", "last_error", "max_completion_tokens", "max_prompt_tokens", "meta_data", "model", "object", "parallel_tool_calls", "required_action", "response_format", "started_at", "status", "thread_id", "tool_choice", "tools", "usage", "temperature", "top_p", "tool_resources" ], "title": "Run" }, "RunCreate": { "properties": { "id": { "type": "string", "title": "Id" }, "assistant_id": { "type": "string", "title": "Assistant Id" }, "user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "User Id", "readOnly": true }, "cancelled_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cancelled At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "created_at": { "type": "integer", "title": "Created At" }, "expires_at": { "type": "integer", "title": "Expires At" }, "failed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Failed At" }, "incomplete_details": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Incomplete Details" }, "instructions": { "type": "string", "title": "Instructions" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "max_completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Completion Tokens", "default": 1000 }, "max_prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Prompt Tokens", "default": 500 }, "meta_data": { "type": "object", "title": "Meta Data" }, "model": { "type": "string", "title": "Model", "default": "gpt-4" }, "object": { "type": "string", "title": "Object", "default": "run" }, "parallel_tool_calls": { "type": "boolean", "title": "Parallel Tool Calls", "default": false }, "required_action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Required Action" }, "response_format": { "type": "string", "title": "Response Format", "default": "text" }, "started_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Started At" }, "status": { "$ref": "#/components/schemas/RunStatus", "default": "pending" }, "thread_id": { "type": "string", "title": "Thread Id" }, "tool_choice": { "type": "string", "title": "Tool Choice", "default": "none" }, "tools": { "items": { "$ref": "#/components/schemas/Tool" }, "type": "array", "title": "Tools" }, "truncation_strategy": { "anyOf": [ { "$ref": "#/components/schemas/TruncationStrategy" }, { "type": "null" } ] }, "usage": { "anyOf": [ {}, { "type": "null" } ], "title": "Usage" }, "temperature": { "type": "number", "title": "Temperature", "default": 0.7 }, "top_p": { "type": "number", "title": "Top P", "default": 0.9 }, "tool_resources": { "type": "object", "title": "Tool Resources" } }, "type": "object", "required": [ "id", "assistant_id", "created_at", "expires_at", "instructions", "thread_id" ], "title": "RunCreate" }, "RunListResponse": { "properties": { "object": { "type": "string", "const": "list", "title": "Object", "default": "list" }, "data": { "items": { "$ref": "#/components/schemas/Run" }, "type": "array", "title": "Data" }, "first_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "First Id" }, "last_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Id" }, "has_more": { "type": "boolean", "title": "Has More", "default": false } }, "type": "object", "required": [ "data" ], "title": "RunListResponse" }, "RunReadDetailed": { "properties": { "id": { "type": "string", "title": "Id" }, "user_id": { "type": "string", "title": "User Id" }, "assistant_id": { "type": "string", "title": "Assistant Id" }, "cancelled_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Cancelled At" }, "completed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Completed At" }, "created_at": { "type": "integer", "title": "Created At" }, "expires_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Expires At" }, "failed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Failed At" }, "incomplete_details": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Incomplete Details" }, "instructions": { "type": "string", "title": "Instructions" }, "last_error": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Last Error" }, "max_completion_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Completion Tokens", "default": 1000 }, "max_prompt_tokens": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Max Prompt Tokens", "default": 500 }, "meta_data": { "type": "object", "title": "Meta Data" }, "model": { "type": "string", "title": "Model" }, "object": { "type": "string", "title": "Object" }, "parallel_tool_calls": { "type": "boolean", "title": "Parallel Tool Calls" }, "required_action": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Required Action" }, "response_format": { "type": "string", "title": "Response Format" }, "started_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Started At" }, "status": { "$ref": "#/components/schemas/RunStatus" }, "thread_id": { "type": "string", "title": "Thread Id" }, "tool_choice": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tool Choice" }, "tools": { "items": { "$ref": "#/components/schemas/ToolRead" }, "type": "array", "title": "Tools" }, "truncation_strategy": { "anyOf": [ { "$ref": "#/components/schemas/TruncationStrategy" }, { "type": "null" } ] }, "usage": { "anyOf": [ {}, { "type": "null" } ], "title": "Usage" }, "temperature": { "type": "number", "title": "Temperature" }, "top_p": { "type": "number", "title": "Top P" }, "tool_resources": { "type": "object", "title": "Tool Resources" }, "actions": { "items": { "$ref": "#/components/schemas/ActionRead" }, "type": "array", "title": "Actions" } }, "type": "object", "required": [ "id", "user_id", "assistant_id", "created_at", "instructions", "meta_data", "model", "object", "parallel_tool_calls", "response_format", "status", "thread_id", "tools", "temperature", "top_p", "tool_resources" ], "title": "RunReadDetailed" }, "RunStatus": { "type": "string", "enum": [ "queued", "in_progress", "action_required", "completed", "failed", "cancelled", "pending", "processing", "expired", "retrying" ], "title": "RunStatus" }, "RunStatusUpdate": { "properties": { "status": { "$ref": "#/components/schemas/RunStatus" } }, "type": "object", "required": [ "status" ], "title": "RunStatusUpdate" }, "StatusEnum": { "type": "string", "enum": [ "deleted", "active", "queued", "in_progress", "action_required", "completed", "failed", "cancelling", "cancelled", "pending", "processing", "expired", "retrying" ], "title": "StatusEnum" }, "StreamRequest": { "properties": { "provider": { "type": "string", "title": "Provider" }, "model": { "type": "string", "title": "Model" }, "api_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Api Key" }, "thread_id": { "type": "string", "title": "Thread Id" }, "message_id": { "type": "string", "title": "Message Id" }, "run_id": { "type": "string", "title": "Run Id" }, "assistant_id": { "type": "string", "title": "Assistant Id" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Content" } }, "type": "object", "required": [ "provider", "model", "api_key", "thread_id", "message_id", "run_id", "assistant_id" ], "title": "StreamRequest" }, "ThreadCreate": { "properties": { "participant_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Participant Ids", "description": "List of participant IDs. Omit to default to the authenticated user." }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data", "description": "Optional metadata for the thread" } }, "type": "object", "title": "ThreadCreate" }, "ThreadDeleted": { "properties": { "id": { "type": "string", "title": "Id" }, "object": { "type": "string", "title": "Object", "default": "thread.deleted" }, "deleted": { "type": "boolean", "title": "Deleted", "default": true } }, "type": "object", "required": [ "id" ], "title": "ThreadDeleted" }, "ThreadReadDetailed": { "properties": { "id": { "type": "string", "title": "Id" }, "created_at": { "type": "integer", "title": "Created At" }, "meta_data": { "type": "object", "title": "Meta Data" }, "object": { "type": "string", "title": "Object" }, "tool_resources": { "type": "object", "title": "Tool Resources" }, "participants": { "items": { "$ref": "#/components/schemas/UserBase" }, "type": "array", "title": "Participants" } }, "type": "object", "required": [ "id", "created_at", "meta_data", "object", "tool_resources", "participants" ], "title": "ThreadReadDetailed" }, "ThreadUpdate": { "properties": { "participant_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "null" } ], "title": "Participant Ids", "description": "Updated list of participant IDs" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data", "description": "Updated metadata" }, "tool_resources": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Tool Resources", "description": "Updated tool resources for the thread" } }, "type": "object", "title": "ThreadUpdate" }, "Tool": { "properties": { "id": { "type": "string", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "function": { "anyOf": [ { "$ref": "#/components/schemas/ToolFunction" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "type" ], "title": "Tool" }, "ToolFunction": { "properties": { "function": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Function", "description": "Tool function definition" } }, "type": "object", "title": "ToolFunction" }, "ToolRead": { "properties": { "id": { "type": "string", "title": "Id" }, "type": { "type": "string", "title": "Type" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "function": { "anyOf": [ { "$ref": "#/components/schemas/ToolFunction" }, { "type": "null" } ] } }, "type": "object", "required": [ "id", "type" ], "title": "ToolRead" }, "TruncationStrategy": { "type": "string", "enum": [ "auto", "disabled" ], "title": "TruncationStrategy" }, "UserBase": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name" } }, "type": "object", "required": [ "id" ], "title": "UserBase", "description": "Base schema, potentially used for embedding user info minimally." }, "UserCreate": { "properties": { "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email", "description": "User's email address." }, "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name", "description": "User's full display name." }, "given_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Given Name", "description": "User's first name." }, "family_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Family Name", "description": "User's last name." }, "picture_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Picture Url", "description": "URL to profile picture." }, "email_verified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Email Verified", "description": "Email verification status.", "default": false }, "oauth_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Provider", "description": "Authentication provider (e.g., 'google', 'local').", "default": "local" }, "provider_user_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Provider User Id", "description": "User ID from the OAuth provider." } }, "type": "object", "title": "UserCreate", "description": "Schema for creating a new user (e.g., manual or OAuth)." }, "UserRead": { "properties": { "id": { "type": "string", "title": "Id" }, "email": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email" }, "full_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Full Name" }, "given_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Given Name" }, "family_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Family Name" }, "picture_url": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Picture Url" }, "email_verified": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Email Verified" }, "oauth_provider": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Oauth Provider" }, "created_at": { "type": "string", "format": "date-time", "title": "Created At" }, "updated_at": { "type": "string", "format": "date-time", "title": "Updated At" } }, "type": "object", "required": [ "id", "created_at", "updated_at" ], "title": "UserRead", "description": "Schema for reading user details from the API." }, "UserUpdate": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" } }, "type": "object", "title": "UserUpdate" }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VectorStoreCreateWithSharedId": { "properties": { "name": { "type": "string", "maxLength": 128, "minLength": 3, "title": "Name", "description": "Human-friendly store name" }, "vector_size": { "type": "integer", "exclusiveMinimum": 0.0, "title": "Vector Size", "description": "Dimensionality of the vectors" }, "distance_metric": { "type": "string", "title": "Distance Metric", "description": "Distance metric (COSINE, EUCLID, DOT)" }, "config": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Config", "description": "Additional configuration options" }, "shared_id": { "type": "string", "title": "Shared Id", "description": "Pre-generated unique ID (also used as collection name)." } }, "type": "object", "required": [ "name", "vector_size", "distance_metric", "shared_id" ], "title": "VectorStoreCreateWithSharedId", "description": "Same payload as `VectorStoreCreate`, but the client pre-generates the\nshared/collection ID so Qdrant can be provisioned first." }, "VectorStoreFileCreate": { "properties": { "file_id": { "type": "string", "title": "File Id", "description": "Client-assigned unique file record ID" }, "file_name": { "type": "string", "maxLength": 256, "title": "File Name", "description": "Original filename" }, "file_path": { "type": "string", "maxLength": 1024, "title": "File Path", "description": "Identifier path in metadata" }, "status": { "anyOf": [ { "$ref": "#/components/schemas/StatusEnum" }, { "type": "null" } ], "description": "Initial processing state" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data", "description": "Arbitrary metadata" } }, "type": "object", "required": [ "file_id", "file_name", "file_path" ], "title": "VectorStoreFileCreate" }, "VectorStoreFileRead": { "properties": { "id": { "type": "string", "title": "Id", "description": "File record ID" }, "vector_store_id": { "type": "string", "title": "Vector Store Id", "description": "Owning vector-store ID" }, "file_name": { "type": "string", "title": "File Name", "description": "Original file name" }, "file_path": { "type": "string", "title": "File Path", "description": "Metadata path identifier" }, "processed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Processed At", "description": "Unix timestamp of last processing change" }, "status": { "$ref": "#/components/schemas/StatusEnum", "description": "Current processing state" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message", "description": "Failure reason, if any" }, "meta_data": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Meta Data", "description": "Metadata dict" }, "object": { "type": "string", "title": "Object", "description": "Object type identifier", "default": "vector_store.file" } }, "type": "object", "required": [ "id", "vector_store_id", "file_name", "file_path", "status" ], "title": "VectorStoreFileRead" }, "VectorStoreFileUpdateStatus": { "properties": { "status": { "$ref": "#/components/schemas/StatusEnum", "description": "New status for the file record" }, "error_message": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Error Message", "description": "Error message if status is 'failed'" } }, "type": "object", "required": [ "status" ], "title": "VectorStoreFileUpdateStatus" }, "VectorStoreRead": { "properties": { "id": { "type": "string", "title": "Id", "description": "Unique identifier for the vector store" }, "name": { "type": "string", "title": "Name", "description": "Vector store name" }, "user_id": { "type": "string", "title": "User Id", "description": "Owner user ID (server-side filled)" }, "collection_name": { "type": "string", "title": "Collection Name", "description": "Qdrant collection name (== id)" }, "vector_size": { "type": "integer", "title": "Vector Size", "description": "Vector dimensionality" }, "distance_metric": { "type": "string", "title": "Distance Metric", "description": "Metric used for comparison" }, "created_at": { "type": "integer", "title": "Created At", "description": "Unix timestamp (sec) when created" }, "updated_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Updated At", "description": "Last modified timestamp" }, "status": { "$ref": "#/components/schemas/StatusEnum", "description": "Vector store status" }, "config": { "anyOf": [ { "type": "object" }, { "type": "null" } ], "title": "Config", "description": "Optional config dict" }, "file_count": { "type": "integer", "minimum": 0.0, "title": "File Count", "description": "Number of files associated" }, "object": { "type": "string", "title": "Object", "description": "Object type identifier", "default": "vector_store" } }, "type": "object", "required": [ "id", "name", "user_id", "collection_name", "vector_size", "distance_metric", "created_at", "status", "file_count" ], "title": "VectorStoreRead", "description": "Metadata returned from the API for an existing vector-store." } }, "securitySchemes": { "APIKeyHeader": { "type": "apiKey", "in": "header", "name": "X-API-Key" } } } }