{
  "openapi": "3.1.0",
  "info": {
    "title": "Onesa AI API",
    "version": "0.1.0"
  },
  "paths": {
    "/api/v1/auth/register": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Register",
        "operationId": "register_api_v1_auth_register_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Register"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/login": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Login",
        "operationId": "login_api_v1_auth_login_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Credentials"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/me": {
      "get": {
        "tags": [
          "authentication"
        ],
        "summary": "Me",
        "operationId": "me_api_v1_auth_me_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/refresh": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Refresh",
        "operationId": "refresh_api_v1_auth_refresh_post",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/logout": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Logout",
        "operationId": "logout_api_v1_auth_logout_post",
        "responses": {
          "204": {
            "description": "Successful Response"
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/profile": {
      "patch": {
        "tags": [
          "authentication"
        ],
        "summary": "Profile",
        "operationId": "profile_api_v1_auth_profile_patch",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProfileUpdate"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/sessions": {
      "get": {
        "tags": [
          "authentication"
        ],
        "summary": "Sessions",
        "operationId": "sessions_api_v1_auth_sessions_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SessionList"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/sessions/revoke-others": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Revoke Others",
        "operationId": "revoke_others_api_v1_auth_sessions_revoke_others_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/auth/password": {
      "post": {
        "tags": [
          "authentication"
        ],
        "summary": "Change Password",
        "operationId": "change_password_api_v1_auth_password_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordChange"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SafeUser"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/admin/invitations": {
      "post": {
        "tags": [
          "identity recovery"
        ],
        "summary": "Invite",
        "operationId": "invite_api_v1_admin_invitations_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Invite"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/admin/invitations/{identifier}/revoke": {
      "post": {
        "tags": [
          "identity recovery"
        ],
        "summary": "Revoke Invite",
        "operationId": "revoke_invite_api_v1_admin_invitations__identifier__revoke_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordProof"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationReceipt"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/admin/access/{identifier}/revoke": {
      "post": {
        "tags": [
          "identity recovery"
        ],
        "summary": "Revoke Access",
        "operationId": "revoke_access_api_v1_admin_access__identifier__revoke_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordProof"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/recovery/request": {
      "post": {
        "tags": [
          "identity recovery"
        ],
        "summary": "Recovery Request",
        "operationId": "recovery_request_api_v1_auth_recovery_request_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/auth/recovery/complete": {
      "post": {
        "tags": [
          "identity recovery"
        ],
        "summary": "Recovery Complete",
        "operationId": "recovery_complete_api_v1_auth_recovery_complete_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RecoveryComplete"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Accepted"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/uploads": {
      "post": {
        "tags": [
          "bounded ingestion"
        ],
        "summary": "Start",
        "operationId": "start_api_v1_knowledge_uploads_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Start"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Receipt"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/knowledge/uploads/{identifier}/chunks": {
      "post": {
        "tags": [
          "bounded ingestion"
        ],
        "summary": "Chunk",
        "operationId": "chunk_api_v1_knowledge_uploads__identifier__chunks_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Chunk"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Progress"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/uploads/{identifier}/complete": {
      "post": {
        "tags": [
          "bounded ingestion"
        ],
        "summary": "Complete",
        "operationId": "complete_api_v1_knowledge_uploads__identifier__complete_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMetadata"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/uploads/{identifier}": {
      "delete": {
        "tags": [
          "bounded ingestion"
        ],
        "summary": "Cancel",
        "operationId": "cancel_api_v1_knowledge_uploads__identifier__delete",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/account/export": {
      "post": {
        "tags": [
          "account"
        ],
        "summary": "Export Account",
        "operationId": "export_account_api_v1_account_export_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PasswordProof"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountExport"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/account/delete": {
      "post": {
        "tags": [
          "account"
        ],
        "summary": "Delete Account",
        "operationId": "delete_account_api_v1_account_delete_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteAccount"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/conversations": {
      "post": {
        "tags": [
          "conversations"
        ],
        "summary": "Create",
        "operationId": "create_api_v1_conversations_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "conversations"
        ],
        "summary": "Listing",
        "operationId": "listing_api_v1_conversations_get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationList"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{identifier}": {
      "get": {
        "tags": [
          "conversations"
        ],
        "summary": "Detail",
        "operationId": "detail_api_v1_conversations__identifier__get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "conversations"
        ],
        "summary": "Rename",
        "operationId": "rename_api_v1_conversations__identifier__patch",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Rename"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "conversations"
        ],
        "summary": "Remove",
        "operationId": "remove_api_v1_conversations__identifier__delete",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/conversations/{identifier}/cancel": {
      "post": {
        "tags": [
          "conversations"
        ],
        "summary": "Cancel",
        "operationId": "cancel_api_v1_conversations__identifier__cancel_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CancelGeneration"
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/models": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Models",
        "operationId": "models_api_v1_models_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelList"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/models/{identifier}": {
      "get": {
        "tags": [
          "chat"
        ],
        "summary": "Model",
        "operationId": "model_api_v1_models__identifier__get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/chat/completions": {
      "post": {
        "tags": [
          "chat"
        ],
        "summary": "Complete",
        "operationId": "complete_api_v1_chat_completions_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChatRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/knowledge/documents": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Upload",
        "operationId": "upload_api_v1_knowledge_documents_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_api_v1_knowledge_documents_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMetadata"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "Documents",
        "operationId": "documents_api_v1_knowledge_documents_get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 50,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentList"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/documents/{identifier}": {
      "get": {
        "tags": [
          "knowledge"
        ],
        "summary": "Document",
        "operationId": "document_api_v1_knowledge_documents__identifier__get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentDetail"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "knowledge"
        ],
        "summary": "Remove",
        "operationId": "remove_api_v1_knowledge_documents__identifier__delete",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/documents/{identifier}/reindex": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Reindex",
        "operationId": "reindex_api_v1_knowledge_documents__identifier__reindex_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DocumentMetadata"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/knowledge/search": {
      "post": {
        "tags": [
          "knowledge"
        ],
        "summary": "Search",
        "operationId": "search_api_v1_knowledge_search_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Search"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeResults"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/agents/tools": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Tools",
        "operationId": "tools_api_v1_agents_tools_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ToolList"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/agents/runs": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Listing",
        "operationId": "listing_api_v1_agents_runs_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunList"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Execute",
        "operationId": "execute_api_v1_agents_runs_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/agents/runs/{identifier}": {
      "get": {
        "tags": [
          "agents"
        ],
        "summary": "Detail",
        "operationId": "detail_api_v1_agents_runs__identifier__get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/agents/runs/{identifier}/cancel": {
      "post": {
        "tags": [
          "agents"
        ],
        "summary": "Cancel",
        "operationId": "cancel_api_v1_agents_runs__identifier__cancel_post",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AgentRunOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/travel/trips": {
      "get": {
        "tags": [
          "travel"
        ],
        "summary": "Listing",
        "operationId": "listing_api_v1_travel_trips_get",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TripList"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      },
      "post": {
        "tags": [
          "travel"
        ],
        "summary": "Create",
        "operationId": "create_api_v1_travel_trips_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Preferences"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TripOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyCookie": []
          }
        ]
      }
    },
    "/api/v1/travel/trips/{identifier}": {
      "get": {
        "tags": [
          "travel"
        ],
        "summary": "Detail",
        "operationId": "detail_api_v1_travel_trips__identifier__get",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TripOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "travel"
        ],
        "summary": "Revise",
        "operationId": "revise_api_v1_travel_trips__identifier__put",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Revision"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TripOut"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "travel"
        ],
        "summary": "Remove",
        "operationId": "remove_api_v1_travel_trips__identifier__delete",
        "security": [
          {
            "APIKeyCookie": []
          }
        ],
        "parameters": [
          {
            "name": "identifier",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Identifier"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Accepted": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "default": "queued_if_eligible"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "Accepted"
      },
      "AccountExport": {
        "properties": {
          "format_version": {
            "type": "integer",
            "const": 1,
            "title": "Format Version",
            "default": 1
          },
          "exported_at": {
            "type": "string",
            "format": "date-time",
            "title": "Exported At"
          },
          "account": {
            "$ref": "#/components/schemas/SafeUser"
          },
          "conversations": {
            "items": {
              "$ref": "#/components/schemas/ExportConversation"
            },
            "type": "array",
            "title": "Conversations"
          },
          "documents": {
            "items": {
              "$ref": "#/components/schemas/DocumentDetail"
            },
            "type": "array",
            "title": "Documents"
          },
          "agent_runs": {
            "items": {
              "$ref": "#/components/schemas/AgentRunOut"
            },
            "type": "array",
            "title": "Agent Runs"
          },
          "trips": {
            "items": {
              "$ref": "#/components/schemas/TripOut"
            },
            "type": "array",
            "title": "Trips"
          },
          "scope": {
            "type": "string",
            "title": "Scope"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "exported_at",
          "account",
          "conversations",
          "documents",
          "agent_runs",
          "trips",
          "scope"
        ],
        "title": "AccountExport"
      },
      "Activity": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title"
          },
          "notes": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 1,
            "title": "Notes"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "title",
          "notes"
        ],
        "title": "Activity"
      },
      "AgentRunList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AgentRunOut"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items"
        ],
        "title": "AgentRunList"
      },
      "AgentRunOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "goal": {
            "type": "string",
            "title": "Goal"
          },
          "status": {
            "type": "string",
            "enum": [
              "running",
              "completed",
              "failed",
              "cancelled"
            ],
            "title": "Status"
          },
          "steps": {
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/CompletedToolStep"
                },
                {
                  "$ref": "#/components/schemas/FailedToolStep"
                }
              ],
              "discriminator": {
                "propertyName": "status",
                "mapping": {
                  "completed": "#/components/schemas/CompletedToolStep",
                  "failed": "#/components/schemas/FailedToolStep"
                }
              }
            },
            "type": "array",
            "title": "Steps"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "goal",
          "status",
          "steps",
          "created_at"
        ],
        "title": "AgentRunOut"
      },
      "Body_upload_api_v1_knowledge_documents_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File"
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_api_v1_knowledge_documents_post"
      },
      "CancelGeneration": {
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid",
            "title": "Run Id"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "run_id"
        ],
        "title": "CancelGeneration"
      },
      "ChatRequest": {
        "properties": {
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id"
          },
          "content": {
            "type": "string",
            "maxLength": 32000,
            "minLength": 1,
            "title": "Content"
          },
          "model_id": {
            "type": "string",
            "title": "Model Id",
            "default": "default"
          },
          "stream": {
            "type": "boolean",
            "title": "Stream",
            "default": true
          },
          "document_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Document Ids"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "conversation_id",
          "content"
        ],
        "title": "ChatRequest"
      },
      "Chunk": {
        "properties": {
          "sequence": {
            "type": "integer",
            "maximum": 9.0,
            "minimum": 0.0,
            "title": "Sequence"
          },
          "base64": {
            "type": "string",
            "maxLength": 699052,
            "minLength": 4,
            "title": "Base64"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sequence",
          "base64"
        ],
        "title": "Chunk"
      },
      "CompletedToolStep": {
        "properties": {
          "tool": {
            "type": "string",
            "title": "Tool"
          },
          "status": {
            "type": "string",
            "const": "completed",
            "title": "Status"
          },
          "result": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "object",
            "title": "Result"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool",
          "status",
          "result"
        ],
        "title": "CompletedToolStep"
      },
      "ConversationCreate": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title",
            "default": "New conversation"
          },
          "selected_model_id": {
            "type": "string",
            "title": "Selected Model Id",
            "default": "default"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ConversationCreate"
      },
      "ConversationDetail": {
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/ConversationOut"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageOut"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "conversation",
          "messages"
        ],
        "title": "ConversationDetail"
      },
      "ConversationList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConversationOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items",
          "total",
          "limit",
          "offset"
        ],
        "title": "ConversationList"
      },
      "ConversationOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "selected_model_id": {
            "type": "string",
            "title": "Selected Model Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "title",
          "selected_model_id",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationOut"
      },
      "Credentials": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "Password"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "password"
        ],
        "title": "Credentials"
      },
      "Day": {
        "properties": {
          "day": {
            "type": "integer",
            "maximum": 14.0,
            "minimum": 1.0,
            "title": "Day"
          },
          "activities": {
            "items": {
              "$ref": "#/components/schemas/Activity"
            },
            "type": "array",
            "maxItems": 8,
            "minItems": 1,
            "title": "Activities"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "day",
          "activities"
        ],
        "title": "Day"
      },
      "DeleteAccount": {
        "properties": {
          "current_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Current Password"
          },
          "confirmation": {
            "type": "string",
            "const": "DELETE MY ACCOUNT",
            "title": "Confirmation"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_password",
          "confirmation"
        ],
        "title": "DeleteAccount"
      },
      "DocumentDetail": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "media_type": {
            "type": "string",
            "title": "Media Type"
          },
          "embedding_version": {
            "type": "string",
            "title": "Embedding Version"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "text": {
            "type": "string",
            "title": "Text"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "title",
          "media_type",
          "embedding_version",
          "created_at",
          "text"
        ],
        "title": "DocumentDetail"
      },
      "DocumentList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DocumentMetadata"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset"
        ],
        "title": "DocumentList"
      },
      "DocumentMetadata": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "media_type": {
            "type": "string",
            "title": "Media Type"
          },
          "embedding_version": {
            "type": "string",
            "title": "Embedding Version"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "title",
          "media_type",
          "embedding_version",
          "created_at"
        ],
        "title": "DocumentMetadata"
      },
      "ExportConversation": {
        "properties": {
          "conversation": {
            "$ref": "#/components/schemas/ConversationOut"
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/MessageOut"
            },
            "type": "array",
            "title": "Messages"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "conversation",
          "messages"
        ],
        "title": "ExportConversation"
      },
      "FailedToolStep": {
        "properties": {
          "status": {
            "type": "string",
            "const": "failed",
            "title": "Status"
          },
          "error": {
            "type": "string",
            "title": "Error"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "status",
          "error"
        ],
        "title": "FailedToolStep"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "InvitationReceipt": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "status": {
            "type": "string",
            "title": "Status"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "status"
        ],
        "title": "InvitationReceipt"
      },
      "Invite": {
        "properties": {
          "current_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Current Password"
          },
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "access_days": {
            "type": "integer",
            "maximum": 90.0,
            "minimum": 1.0,
            "title": "Access Days",
            "default": 30
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_password",
          "email"
        ],
        "title": "Invite"
      },
      "JsonValue": {},
      "KnowledgeResults": {
        "properties": {
          "sources": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeSource"
            },
            "type": "array",
            "title": "Sources"
          },
          "backend": {
            "type": "string",
            "enum": [
              "lexical",
              "http"
            ],
            "title": "Backend"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "sources",
          "backend"
        ],
        "title": "KnowledgeResults"
      },
      "KnowledgeSource": {
        "properties": {
          "document_id": {
            "type": "string",
            "format": "uuid",
            "title": "Document Id"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "chunk": {
            "type": "integer",
            "minimum": 0.0,
            "title": "Chunk"
          },
          "text": {
            "type": "string",
            "title": "Text"
          },
          "distance": {
            "type": "number",
            "title": "Distance"
          },
          "embedding_version": {
            "type": "string",
            "title": "Embedding Version"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "document_id",
          "title",
          "chunk",
          "text",
          "distance",
          "embedding_version"
        ],
        "title": "KnowledgeSource"
      },
      "MessageOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "role": {
            "type": "string",
            "title": "Role"
          },
          "content": {
            "additionalProperties": true,
            "type": "object",
            "title": "Content"
          },
          "status": {
            "type": "string",
            "title": "Status"
          },
          "sequence": {
            "type": "integer",
            "title": "Sequence"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "role",
          "content",
          "status",
          "sequence"
        ],
        "title": "MessageOut"
      },
      "ModelList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ModelOut"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ModelList"
      },
      "ModelOut": {
        "properties": {
          "id": {
            "type": "string",
            "const": "default",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "backend": {
            "type": "string",
            "enum": [
              "mock",
              "ollama",
              "vllm"
            ],
            "title": "Backend"
          },
          "model_identifier": {
            "type": "string",
            "title": "Model Identifier"
          },
          "context_tokens": {
            "type": "integer",
            "title": "Context Tokens"
          },
          "modalities": {
            "items": {
              "type": "string",
              "enum": [
                "text",
                "vision",
                "speech"
              ]
            },
            "type": "array",
            "title": "Modalities"
          },
          "quantization": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quantization"
          },
          "revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Revision"
          },
          "real_inference": {
            "type": "boolean",
            "title": "Real Inference"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "name",
          "backend",
          "model_identifier",
          "context_tokens",
          "modalities",
          "quantization",
          "revision",
          "real_inference"
        ],
        "title": "ModelOut"
      },
      "PasswordChange": {
        "properties": {
          "current_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Current Password"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "New Password"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_password",
          "new_password"
        ],
        "title": "PasswordChange"
      },
      "PasswordProof": {
        "properties": {
          "current_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 1,
            "title": "Current Password"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "current_password"
        ],
        "title": "PasswordProof"
      },
      "PlannedItinerary": {
        "properties": {
          "days": {
            "items": {
              "$ref": "#/components/schemas/Day"
            },
            "type": "array",
            "maxItems": 14,
            "minItems": 1,
            "title": "Days"
          },
          "assumptions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Assumptions"
          },
          "providers": {
            "items": {
              "$ref": "#/components/schemas/UnavailableTravelProvider"
            },
            "type": "array",
            "title": "Providers"
          },
          "backend": {
            "type": "string",
            "enum": [
              "mock",
              "ollama",
              "vllm"
            ],
            "title": "Backend"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "days",
          "assumptions",
          "providers",
          "backend"
        ],
        "title": "PlannedItinerary"
      },
      "Preferences": {
        "properties": {
          "destination": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Destination"
          },
          "duration": {
            "type": "integer",
            "maximum": 14.0,
            "minimum": 1.0,
            "title": "Duration"
          },
          "budget": {
            "type": "number",
            "maximum": 100000000.0,
            "exclusiveMinimum": 0.0,
            "title": "Budget"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "title": "Currency",
            "default": "USD"
          },
          "preferences": {
            "type": "string",
            "maxLength": 4000,
            "title": "Preferences",
            "default": ""
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "destination",
          "duration",
          "budget"
        ],
        "title": "Preferences"
      },
      "ProfileUpdate": {
        "properties": {
          "display_name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "pattern": "\\S",
            "title": "Display Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "display_name"
        ],
        "title": "ProfileUpdate"
      },
      "Progress": {
        "properties": {
          "received": {
            "type": "integer",
            "title": "Received"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "received"
        ],
        "title": "Progress"
      },
      "Receipt": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "chunk_bytes": {
            "type": "integer",
            "title": "Chunk Bytes",
            "default": 524288
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id"
        ],
        "title": "Receipt"
      },
      "RecoveryComplete": {
        "properties": {
          "token": {
            "type": "string",
            "maxLength": 128,
            "minLength": 40,
            "title": "Token"
          },
          "new_password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "New Password"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "token",
          "new_password"
        ],
        "title": "RecoveryComplete"
      },
      "RecoveryRequest": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email"
        ],
        "title": "RecoveryRequest"
      },
      "Register": {
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
          },
          "password": {
            "type": "string",
            "maxLength": 128,
            "minLength": 12,
            "title": "Password"
          },
          "display_name": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Display Name"
          },
          "invitation_token": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "minLength": 40
              },
              {
                "type": "null"
              }
            ],
            "title": "Invitation Token"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "email",
          "password",
          "display_name"
        ],
        "title": "Register"
      },
      "Rename": {
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Title"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "title"
        ],
        "title": "Rename"
      },
      "Revision": {
        "properties": {
          "destination": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Destination"
          },
          "duration": {
            "type": "integer",
            "maximum": 14.0,
            "minimum": 1.0,
            "title": "Duration"
          },
          "budget": {
            "type": "number",
            "maximum": 100000000.0,
            "exclusiveMinimum": 0.0,
            "title": "Budget"
          },
          "currency": {
            "type": "string",
            "pattern": "^[A-Z]{3}$",
            "title": "Currency",
            "default": "USD"
          },
          "preferences": {
            "type": "string",
            "maxLength": 4000,
            "title": "Preferences",
            "default": ""
          },
          "expected_revision": {
            "type": "integer",
            "minimum": 1.0,
            "title": "Expected Revision"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "destination",
          "duration",
          "budget",
          "expected_revision"
        ],
        "title": "Revision"
      },
      "RunRequest": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "goal": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Goal"
          },
          "steps": {
            "items": {
              "$ref": "#/components/schemas/ToolCall"
            },
            "type": "array",
            "maxItems": 8,
            "title": "Steps"
          },
          "allowed_tools": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 8,
            "title": "Allowed Tools"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "goal"
        ],
        "title": "RunRequest"
      },
      "SafeUser": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "email": {
            "type": "string",
            "title": "Email"
          },
          "display_name": {
            "type": "string",
            "title": "Display Name"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "email",
          "display_name"
        ],
        "title": "SafeUser"
      },
      "Search": {
        "properties": {
          "query": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 1,
            "title": "Query"
          },
          "document_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "maxItems": 20,
            "title": "Document Ids"
          },
          "limit": {
            "type": "integer",
            "maximum": 10.0,
            "minimum": 1.0,
            "title": "Limit",
            "default": 5
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "query"
        ],
        "title": "Search"
      },
      "SessionList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SessionOut"
            },
            "type": "array",
            "title": "Items"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items",
          "total",
          "limit"
        ],
        "title": "SessionList"
      },
      "SessionOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
          },
          "current": {
            "type": "boolean",
            "title": "Current"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "created_at",
          "expires_at",
          "current"
        ],
        "title": "SessionOut"
      },
      "Start": {
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "pattern": "^[^/\\\\]+\\.(txt|pdf)$",
            "title": "Filename"
          },
          "media_type": {
            "type": "string",
            "pattern": "^(text/plain|application/pdf)$",
            "title": "Media Type"
          },
          "size": {
            "type": "integer",
            "maximum": 5242880.0,
            "minimum": 1.0,
            "title": "Size"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "title": "Sha256"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "filename",
          "media_type",
          "size",
          "sha256"
        ],
        "title": "Start"
      },
      "ToolCall": {
        "properties": {
          "tool": {
            "type": "string",
            "maxLength": 80,
            "minLength": 1,
            "title": "Tool"
          },
          "arguments": {
            "additionalProperties": true,
            "type": "object",
            "title": "Arguments"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "tool",
          "arguments"
        ],
        "title": "ToolCall"
      },
      "ToolDescriptor": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "schema": {
            "additionalProperties": {
              "$ref": "#/components/schemas/JsonValue"
            },
            "type": "object",
            "title": "Schema"
          },
          "effect": {
            "type": "string",
            "const": "local computation",
            "title": "Effect"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "schema",
          "effect"
        ],
        "title": "ToolDescriptor"
      },
      "ToolList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ToolDescriptor"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ToolList"
      },
      "TripList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TripOut"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "items"
        ],
        "title": "TripList"
      },
      "TripOut": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "destination": {
            "type": "string",
            "title": "Destination"
          },
          "duration": {
            "type": "integer",
            "title": "Duration"
          },
          "budget": {
            "type": "number",
            "title": "Budget"
          },
          "currency": {
            "type": "string",
            "title": "Currency"
          },
          "preferences": {
            "type": "string",
            "title": "Preferences"
          },
          "revision": {
            "type": "integer",
            "title": "Revision"
          },
          "itinerary": {
            "$ref": "#/components/schemas/PlannedItinerary"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          },
          "live_data_verified": {
            "type": "boolean",
            "const": false,
            "title": "Live Data Verified"
          },
          "notice": {
            "type": "string",
            "title": "Notice"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "id",
          "destination",
          "duration",
          "budget",
          "currency",
          "preferences",
          "revision",
          "itinerary",
          "created_at",
          "updated_at",
          "live_data_verified",
          "notice"
        ],
        "title": "TripOut"
      },
      "UnavailableTravelProvider": {
        "properties": {
          "provider": {
            "type": "string",
            "enum": [
              "weather",
              "maps",
              "flights",
              "accommodation",
              "places",
              "transport"
            ],
            "title": "Provider"
          },
          "status": {
            "type": "string",
            "const": "unavailable",
            "title": "Status"
          },
          "verified": {
            "type": "boolean",
            "const": false,
            "title": "Verified"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "provider",
          "status",
          "verified"
        ],
        "title": "UnavailableTravelProvider"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyCookie": {
        "type": "apiKey",
        "in": "cookie",
        "name": "onesa_session"
      }
    }
  }
}
