{
  "openapi": "3.1.0",
  "info": {
    "title": "Golden Engine API",
    "description": "REST API for creating avatars, managing knowledge, and running real-time avatar conversations. Authenticate every request with your developer API key in the X-Api-Key header.",
    "version": "1.0.0"
  },
  "paths": {
    "/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Return the identity of the API key owner",
        "description": "Confirm which account an API key belongs to.\n\nUseful as a credential check: a 200 means the key is live and not revoked.",
        "operationId": "return-the-identity-of-the-api-key-owner",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1MeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/avatars": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Create an avatar",
        "description": "Create a new avatar for the API key owner from a previously uploaded source video (see `POST /v1/videos/upload-url`) and kick off GPU training. Poll `GET /v1/avatars/{avatar_id}/status` until the avatar is `ready` before starting a conversation.",
        "operationId": "create-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvatarCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "A provider the request depends on failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "upstream_error",
                    "message": "Failed to generate avatar system prompt"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "List the API key owner's avatars",
        "description": "List the avatars this account owns, most recently created first.\n\nStock avatars are excluded — they belong to no account and are listed\nseparately by `GET /v1/avatars/stock`. `total` is the full number of avatars\non the account, not the size of the page you asked for.",
        "operationId": "list-the-api-key-owners-avatars",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Records per page",
              "default": 10,
              "title": "Limit"
            },
            "description": "Records per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AvatarResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/stock": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "List stock avatars",
        "description": "List the pre-trained avatars available to every account, newest first.\n\nStock avatars need no training and are usable immediately, which makes them\nthe quickest way to get a conversation working end to end. The public API\nexposes them read-only: create your own avatar to change a system prompt,\nvoice or knowledge.",
        "operationId": "list-stock-avatars",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Records per page",
              "default": 10,
              "title": "Limit"
            },
            "description": "Records per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_AvatarResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/stock/{avatar_id}": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "Get a stock avatar",
        "description": "Get a specific system-created stock avatar.",
        "operationId": "get-a-stock-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/retrain": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Retrain an avatar",
        "description": "Re-run training for an existing avatar using its original source video.",
        "operationId": "retrain-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "conflict",
                    "message": "Avatar is not ready. Current status: training."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/preload": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Warm an avatar on the GPU engine ahead of a session",
        "description": "Ask the engine to load this avatar's bundle now, before the WS connects.\n\nFired when the caller opens/selects an avatar so the ~6s cold load overlaps\ntheir setup instead of blocking the first connection. Best-effort: a\nfailure just means the WS connect cold-loads as before.",
        "operationId": "warm-an-avatar-on-the-gpu-engine-ahead-of-a-session",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarPreloadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "conflict",
                    "message": "Avatar is not ready. Current status: training."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/preload-status": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "Check whether an avatar is warm on the GPU engine",
        "description": "Readiness poll for preload-then-connect.\n\nPoll after `POST /v1/avatars/{avatar_id}/preload` and open the session\nonce status is `ready`. `cold`/`error` mean re-POST preload;\n`unknown` means the engine was unreachable (keep polling).",
        "operationId": "check-whether-an-avatar-is-warm-on-the-gpu-engine",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarPreloadStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "conflict",
                    "message": "Avatar is not ready. Current status: training."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/cancel": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Cancel an in-progress or queued training run",
        "description": "Cancel a `queued` or `training` run for an avatar the caller owns.",
        "operationId": "cancel-an-in-progress-or-queued-training-run",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "conflict",
                    "message": "Avatar is not ready. Current status: training."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "Get an avatar",
        "description": "Get a specific avatar (own avatars and stock avatars).",
        "operationId": "get-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Avatars"
        ],
        "summary": "Update an avatar",
        "description": "Update a specific avatar (only if owned by the API key owner).",
        "operationId": "update-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AvatarUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "502": {
            "description": "A provider the request depends on failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "upstream_error",
                    "message": "Failed to generate avatar system prompt"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Avatars"
        ],
        "summary": "Delete an avatar",
        "description": "Delete a specific avatar (only if owned by the API key owner).\n\nIf a training run is still active it is aborted first, then the source\nvideo is removed from S3 and the local dataset/checkpoint/syncnet_ckpt\ndirs are removed from the persistent volume.",
        "operationId": "delete-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/training-jobs": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "List training jobs for an avatar",
        "description": "List every training attempt (newest first) for an avatar the caller owns.",
        "operationId": "list-training-jobs-for-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_TrainingJobResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/video-url": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "Get a short-lived URL for the avatar's source video",
        "description": "Return a short-lived presigned S3 GET URL for the avatar's uploaded video.",
        "operationId": "get-a-short-lived-url-for-the-avatars-source-video",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoDownloadUrlResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/status": {
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "Get avatar training status",
        "description": "Get avatar training status (poll-based).\n\nReturns current status (pending/training/ready/failed), progress percentage,\nand error message if applicable.",
        "operationId": "get-avatar-training-status",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AvatarStatusResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/knowledge": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Upload a document to an avatar's knowledge base",
        "description": "Upload a PDF/DOCX bound to this avatar and enqueue async extraction. Poll `GET /v1/avatars/{avatar_id}/knowledge` until the document's `status` is `completed` before expecting it to be retrievable in conversations.",
        "operationId": "upload-a-document-to-an-avatars-knowledge-base",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_avatar_knowledge_v1_avatars__avatar_id__knowledge_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseItemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Avatars"
        ],
        "summary": "List an avatar's knowledge documents",
        "description": "List the documents this avatar can draw on when it answers.\n\nCovers both documents uploaded straight to the avatar and account-level bank\nitems attached to it; once attached the two are indistinguishable here. Only\ndocuments that finished extraction are used in a reply, so check `status`\nbefore assuming the avatar knows something.",
        "operationId": "list-an-avatars-knowledge-documents",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeBaseItemResponse"
                  },
                  "title": "Response List Avatar Knowledge V1 Avatars  Avatar Id  Knowledge Get"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/knowledge/batch": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Upload multiple documents to an avatar's knowledge base",
        "description": "Upload one to five PDF/DOCX documents. Each document is queued and processed independently, with results returned in request order.",
        "operationId": "upload-multiple-documents-to-an-avatars-knowledge-base",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_avatar_knowledge_batch_v1_avatars__avatar_id__knowledge_batch_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBatchUploadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "207": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBatchUploadResponse"
                }
              }
            },
            "description": "Multi-Status"
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/knowledge/attach": {
      "post": {
        "tags": [
          "Avatars"
        ],
        "summary": "Attach an account-level document to an avatar",
        "description": "Link a general (account-level) knowledge document to this avatar without re-uploading. The document must be owned by the API key owner and already `completed` (poll `GET /v1/knowledge-bank/{id}`). Only this avatar draws on it: a bank document is used by no avatar until attached.",
        "operationId": "attach-an-account-level-document-to-an-avatar",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeAttachRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBaseItemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "409": {
            "description": "The request conflicts with the resource's current state.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "conflict",
                    "message": "Avatar is not ready. Current status: training."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/knowledge/{knowledge_id}": {
      "delete": {
        "tags": [
          "Avatars"
        ],
        "summary": "Delete a document from an avatar's knowledge base",
        "description": "Delete a document from this avatar's knowledge.\n\nThis deletes the document itself, not just its link to the avatar — an item\nattached from the account bank is removed from the bank too, and its stored\nfile is deleted. Immediate and irreversible; upload again to undo it.",
        "operationId": "delete-a-document-from-an-avatars-knowledge-base",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "knowledge_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Knowledge Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Start a conversation",
        "description": "Create a live conversation with an avatar and return an embeddable `conversation_url` — an iframe that renders the realtime avatar session — instead of the raw engine WebSocket URL. The URL carries a short-lived session token valid until `expires_at`.",
        "operationId": "start-a-conversation",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/V1ConversationCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/V1ConversationCreatedResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "List the API key owner's conversations",
        "description": "List this account's conversations, most recently started first.\n\nIncludes conversations that have already ended: closing one keeps its\nmessages, transcript and recording. `total` is the full number on the\naccount (or in the requested `end_user_id` scope), not the size of the\npage you asked for.",
        "operationId": "list-the-api-key-owners-conversations",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Records per page",
              "default": 10,
              "title": "Limit"
            },
            "description": "Records per page"
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 128,
                  "pattern": "^[^\\x00-\\x1f\\x7f]*$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only conversations created with this `end_user_id` — one of your end users' history. Trimmed like on create; blank means no filter.",
              "title": "End User Id"
            },
            "description": "Only conversations created with this `end_user_id` — one of your end users' history. Trimmed like on create; blank means no filter."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ConversationResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations/{conversation_id}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get a conversation with messages",
        "description": "Get a specific conversation with all messages (only if owned).",
        "operationId": "get-a-conversation-with-messages",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationDetailResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Conversations"
        ],
        "summary": "Close a conversation",
        "description": "Close a conversation (set ended_at timestamp) and enqueue memory compaction.",
        "operationId": "close-a-conversation",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Conversations"
        ],
        "summary": "Delete a conversation",
        "description": "Delete a conversation, its messages, and any associated recording.",
        "operationId": "delete-a-conversation",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations/{conversation_id}/messages": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get conversation messages",
        "description": "Get paginated messages from a conversation (only if owned).",
        "operationId": "get-conversation-messages",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 500,
              "minimum": 1,
              "description": "Records per page",
              "default": 100,
              "title": "Limit"
            },
            "description": "Records per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_ConversationMessageResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "summary": "Add a message to a conversation (deprecated)",
        "description": "Deprecated: the transcript records what was actually said on the call, and the engine writes those rows itself. Bodies that are not speech — a pasted transcript, 'private continuity notes', a scripted 'I remember this person' line — are refused with 422: the engine never reads them and memory compaction used to summarise them as the caller's own words (audit 2026-09-15). Nothing reads these rows back into a call; use `end_user_id` on the conversation for per-end-user memory instead.",
        "operationId": "add-a-message-to-a-conversation-deprecated",
        "deprecated": true,
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConversationMessageCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConversationMessageResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations/{conversation_id}/transcript": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get the full conversation transcript",
        "description": "Return the conversation's transcript ordered by timestamp_offset.\n\nRoles are exposed as `user` or `avatar` (the DB stores `assistant`).",
        "operationId": "get-the-full-conversation-transcript",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TranscriptResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/conversations/{conversation_id}/recording": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "summary": "Get the session recording download URL",
        "description": "Return a presigned download URL for the session recording.\n\nRaises 404 if the conversation has no recording yet (status != ready).",
        "operationId": "get-the-session-recording-download-url",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "conversation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Conversation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RecordingResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/knowledge-bank/upload": {
      "post": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "Upload a document to the account knowledge bank",
        "description": "Upload a PDF/DOCX to the API key owner's account-level knowledge bank and enqueue async extraction. Documents become searchable once chunked.",
        "operationId": "upload-a-document-to-the-account-knowledge-bank",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_knowledge_bank_item_v1_knowledge_bank_upload_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBankItemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/knowledge-bank/upload/batch": {
      "post": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "Upload multiple documents to the account knowledge bank",
        "description": "Upload one to five PDF/DOCX documents. Each document is processed independently and its result is returned in request order.",
        "operationId": "upload-multiple-documents-to-the-account-knowledge-bank",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_upload_knowledge_bank_items_v1_knowledge_bank_upload_batch_post"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBatchUploadResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                }
              }
            }
          },
          "207": {
            "description": "Multi-Status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBatchUploadResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/knowledge-bank": {
      "get": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "List account knowledge bank documents",
        "description": "List the account-level documents in the knowledge bank, newest first.\n\nA document here is used by no avatar until you attach it with\n`POST /v1/avatars/{avatar_id}/knowledge/attach`; it then answers for that\navatar only and leaves this list. Documents already attached to an avatar\nare not listed here; use `GET /v1/avatars/{avatar_id}/knowledge` for\nthose.",
        "operationId": "list-account-knowledge-bank-documents",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/KnowledgeBankItemResponse"
                  },
                  "type": "array",
                  "title": "Response List Knowledge Bank Items V1 Knowledge Bank Get"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/knowledge-bank/search": {
      "post": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "Search account knowledge bank chunks",
        "description": "Search the account knowledge bank by meaning rather than by keyword.\n\nThe query is embedded and matched against document chunks by vector\nsimilarity, so it finds passages that answer the query even when they share\nno words with it. Results are chunks, not documents — the same document can\nappear several times — and each carries the id of the document it came from.\n\n`limit` defaults to 5 and caps at 20. Only documents that finished\nextraction are searchable.",
        "operationId": "search-account-knowledge-bank-chunks",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KnowledgeSearchRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeSearchResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/knowledge-bank/{item_id}": {
      "get": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "Get one account knowledge bank document",
        "description": "Get one account-level knowledge bank document by ID.\n\nReturns the document's metadata and extraction `status`, not its text. Use\n`POST /v1/knowledge-bank/search` to retrieve content.",
        "operationId": "get-one-account-knowledge-bank-document",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Item Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KnowledgeBankItemResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Knowledge bank"
        ],
        "summary": "Delete one account knowledge bank document",
        "description": "Delete an account-level knowledge bank document and its stored file.\n\nImmediate and irreversible. If the document is attached to an avatar, that\navatar stops being able to draw on it.",
        "operationId": "delete-one-account-knowledge-bank-document",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Item Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/scopes": {
      "get": {
        "tags": [
          "Memory"
        ],
        "summary": "List the end users an avatar remembers",
        "description": "Every `end_user_id` this avatar holds memory for, most recently updated first.",
        "operationId": "list-the-end-users-an-avatar-remembers",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Records per page",
              "default": 10,
              "title": "Limit"
            },
            "description": "Records per page"
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "maxLength": 128
                },
                {
                  "type": "null"
                }
              ],
              "description": "Substring of `end_user_id` to match.",
              "title": "Search"
            },
            "description": "Substring of `end_user_id` to match."
          },
          {
            "name": "include_anonymous",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Include `anon:` scopes — conversations created without an `end_user_id`, each isolated under its own id.",
              "default": false,
              "title": "Include Anonymous"
            },
            "description": "Include `anon:` scopes — conversations created without an `end_user_id`, each isolated under its own id."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_MemoryScopeSummary_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory": {
      "get": {
        "tags": [
          "Memory"
        ],
        "summary": "Get what an avatar remembers about one end user",
        "description": "Learned facts plus the timeline: the rolling aggregate of older\nconversations and every conversation summary, newest first.\n\n`pending_conversations` counts conversations whose memory is still being\nwritten — memory lands a few seconds after a conversation ends. 404 when\nthe scope holds nothing and nothing is pending.",
        "operationId": "get-what-an-avatar-remembers-about-one-end-user",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "facts",
                    "timeline"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Return only `facts` or only the `timeline`. Omit for both.",
              "title": "Type"
            },
            "description": "Return only `facts` or only the `timeline`. Omit for both."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryScopeResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Forget an end user",
        "description": "Delete everything this avatar remembers about one end user: facts,\nsummaries and the aggregate. Conversations and transcripts are **not**\ndeleted — this forgets, it does not erase. A conversation that ended\nmoments ago may still land its memory afterwards; check\n`pending_conversations` first if that matters.",
        "operationId": "forget-an-end-user",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/facts/{key}": {
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Delete one learned fact",
        "description": "Remove one fact by its `key` (as returned by `GET …/memory`). A later\nconversation can learn it again if the end user says it again.",
        "operationId": "delete-one-learned-fact",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Key"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/summaries/{summary_id}": {
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Delete one conversation's summary",
        "description": "Remove one summary. If it was already folded into the aggregate\n(`in_aggregate: true`), the aggregate is removed with it and rebuilt from\nthe remaining summaries in the background — otherwise the avatar would\nkeep remembering it. The conversation and its transcript are kept.",
        "operationId": "delete-one-conversations-summary",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "summary_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Summary Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryDeleteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/aggregate": {
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Rebuild the rolling summary of older conversations",
        "description": "Discard the aggregate and rebuild it from the summaries that remain.\nUse it after correcting summaries, or when the aggregate itself is wrong.",
        "operationId": "rebuild-the-rolling-summary-of-older-conversations",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemoryDeleteResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/timeline/{entry_id}": {
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Forget one week or month",
        "description": "Delete a week or month from `timeline.weeks` / `timeline.months`\ntogether with the conversation summaries it was built from, so the period\nis forgotten rather than rolled up again. Conversations and transcripts\nare kept.",
        "operationId": "forget-one-week-or-month",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "entry_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Entry Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/pinned": {
      "post": {
        "tags": [
          "Memory"
        ],
        "summary": "Pin a memory about an end user",
        "description": "Give the avatar a fact about an end user from your own records —\nworks before their first conversation. Pinned memories are shown to the\navatar ahead of what it learned; if the end user later says something\nnewer about themselves, the avatar goes with the end user. Learning\nnever changes them. At most 30 per end user, 500 characters each.",
        "operationId": "pin-a-memory-about-an-end-user",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinnedMemoryCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PinnedMemoryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Memory"
        ],
        "summary": "List an end user's pinned memories",
        "description": "Oldest first — the order the avatar sees them in.",
        "operationId": "list-an-end-users-pinned-memories",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "end_user_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 128,
              "pattern": "^[^\\x00-\\x1f\\x7f]*$",
              "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create.",
              "title": "End User Id"
            },
            "description": "The end user whose memory this is — the `end_user_id` the conversations were created with. Required; pass it empty (`?end_user_id=`) for your own scope. Trimmed like on create."
          },
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "description": "Records to skip",
              "default": 0,
              "title": "Skip"
            },
            "description": "Records to skip"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Records per page",
              "default": 30,
              "title": "Limit"
            },
            "description": "Records per page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_PinnedMemoryResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/pinned/batch": {
      "post": {
        "tags": [
          "Memory"
        ],
        "summary": "Pin several memories at once",
        "description": "Pre-seed an end user in one call. All or nothing: if the scope would\nexceed 30 pinned memories, none are added.",
        "operationId": "pin-several-memories-at-once",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinnedMemoryBatchCreate"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PinnedMemoryResponse"
                  },
                  "title": "Response Create Pinned Memories V1 Avatars  Avatar Id  Memory Pinned Batch Post"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/avatars/{avatar_id}/memory/pinned/{pinned_id}": {
      "patch": {
        "tags": [
          "Memory"
        ],
        "summary": "Replace a pinned memory's text",
        "operationId": "replace-a-pinned-memorys-text",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "pinned_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Pinned Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PinnedMemoryUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PinnedMemoryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Memory"
        ],
        "summary": "Delete a pinned memory",
        "operationId": "delete-a-pinned-memory",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "avatar_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Avatar Id"
            }
          },
          {
            "name": "pinned_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Pinned Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/models": {
      "get": {
        "tags": [
          "Models"
        ],
        "summary": "List supported AI models",
        "description": "Return the frontend-ready catalog of supported LLM, STT, and TTS engine options plus the available provider voices (including account-owned Cartesia clones). Read-only: use a voice's `id`/`provider` when creating an avatar.",
        "operationId": "list-supported-ai-models",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ModelsList"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/videos/upload-url": {
      "post": {
        "tags": [
          "Videos"
        ],
        "summary": "Upload a source video",
        "description": "Upload an avatar source video through the backend (S3 upload enqueued). Use the returned `video_id` when creating an avatar.",
        "operationId": "upload-a-source-video",
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/Body_create_video_upload_url_v1_videos_upload_url_post"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but a value in it cannot be accepted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "invalid_request",
                    "message": "Unsupported file type. Upload a video file."
                  }
                }
              }
            }
          },
          "413": {
            "description": "The uploaded file is larger than the limit for this endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "file_too_large",
                    "message": "Video is larger than the 2 GB limit."
                  }
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                }
              }
            }
          },
          "500": {
            "description": "The request was valid but processing it failed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                },
                "example": {
                  "error": {
                    "code": "internal_error",
                    "message": "Failed to upload video"
                  }
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          }
        ]
      }
    },
    "/v1/videos": {
      "get": {
        "tags": [
          "Videos"
        ],
        "summary": "List the API key owner's videos",
        "description": "List the source videos this account has uploaded, most recently first.\n\nA video stays here after an avatar has been trained from it, and `total` is\nthe full number on the account rather than the size of this page. Check each\nvideo's `status` before using its `video_id` to create an avatar.",
        "operationId": "list-the-api-key-owners-videos",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "skip",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0,
              "title": "Skip"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 10,
              "title": "Limit"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Page_VideoResponse_"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos/{video_id}/progress": {
      "get": {
        "tags": [
          "Videos"
        ],
        "summary": "Get video upload progress",
        "description": "Poll an upload while it is still running.\n\nCheaper than fetching the whole video record, and the only endpoint that\nreports how far along the transfer is.",
        "operationId": "get-video-upload-progress",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "video_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Video Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoProgressResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/v1/videos/{video_id}": {
      "get": {
        "tags": [
          "Videos"
        ],
        "summary": "Get a video by ID",
        "description": "Get one uploaded source video by ID.\n\nMainly useful for its `status`: a video can only be used to create an avatar\nonce it has finished uploading and processing. `GET /v1/videos/{video_id}/progress`\nreports the same thing more cheaply while an upload is still running.",
        "operationId": "get-a-video-by-id",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "video_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Video Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VideoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Videos"
        ],
        "summary": "Delete a video",
        "description": "Delete a video and its associated S3 objects (file + thumbnail).\n\nOnly the owner can delete their videos.",
        "operationId": "delete-a-video",
        "security": [
          {
            "APIKeyHeader": []
          }
        ],
        "parameters": [
          {
            "name": "video_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid",
              "title": "Video Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "description": "Missing, invalid or revoked API key.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "invalid_api_key",
                    "message": "Invalid or revoked API key"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded for this API key. The envelope carries `retry_after_seconds`.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "rate_limit_exceeded",
                    "message": "Rate limit exceeded",
                    "retry_after_seconds": 37
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it belongs to another account.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "not_found",
                    "message": "Avatar not found"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "422": {
            "description": "A field in the request failed validation.",
            "content": {
              "application/json": {
                "example": {
                  "error": {
                    "code": "validation_error",
                    "message": "body.name: Field required"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AvatarCreate": {
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Name",
            "description": "Display name for the avatar.",
            "examples": [
              "Ada Lovelace"
            ]
          },
          "bio": {
            "type": "string",
            "minLength": 1,
            "title": "Bio",
            "description": "Who the avatar is, in prose. This is the largest single influence on the generated system prompt, so write it as you would brief a person standing in for you.",
            "examples": [
              "Founder and CTO of an AI research lab, speaking about applied ML."
            ]
          },
          "awards_achievements": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Awards Achievements",
            "description": "Free-text credentials the avatar may mention when relevant."
          },
          "known_for": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "AI Innovation",
                    "Public Speaking",
                    "Research",
                    "Content Creation",
                    "Entrepreneurship",
                    "Education",
                    "Healthcare",
                    "Finance",
                    "Design",
                    "Engineering"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Known For",
            "description": "Topics the avatar is associated with.",
            "examples": [
              [
                "AI Innovation",
                "Public Speaking"
              ]
            ]
          },
          "personality_traits": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "AI Innovation",
                    "Entrepreneurship",
                    "Content Creation",
                    "Public Speaking",
                    "Writing & Publishing",
                    "Book Marketing",
                    "Storytelling",
                    "Personal Development",
                    "Leadership",
                    "Business Strategy",
                    "Self-Improvement",
                    "Health & Wellness",
                    "Finance & Investing",
                    "Technology",
                    "Science",
                    "History",
                    "Psychology",
                    "Creativity",
                    "Memoir & Biography",
                    "Media & Journalism"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personality Traits",
            "description": "Traits that shape how the avatar speaks."
          },
          "interaction_guardrails": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "Stay on topic",
                    "No profanity",
                    "No political opinions",
                    "No medical advice",
                    "No financial advice",
                    "No personal relationship details",
                    "Do not discuss family members",
                    "Stick to information in my content",
                    "No speculation about my personal life",
                    "Keep responses professional",
                    "No religious commentary",
                    "Respect privacy boundaries",
                    "Base answers only on provided material",
                    "Avoid controversial topics",
                    "Maintain positive tone",
                    "No legal advice",
                    "Do not share personal contact info",
                    "Stay within my expertise",
                    "No dating or romantic topics",
                    "Keep responses appropriate for all audiences"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Guardrails",
            "description": "Limits written into the system prompt. Prompt-level guidance, not enforcement — treat them as instruction, not as a content filter.",
            "examples": [
              [
                "Stay on topic",
                "No medical advice"
              ]
            ]
          },
          "primary_goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Goal",
            "description": "What the avatar is for, in one line. Steers what it volunteers.",
            "examples": [
              "Answer product questions for prospective customers."
            ]
          },
          "primary_language": {
            "type": "string",
            "enum": [
              "English (US)",
              "English (UK)",
              "Spanish",
              "French",
              "German",
              "Arabic",
              "Swedish",
              "Portuguese",
              "Italian",
              "Dutch",
              "Hindi",
              "Bengali",
              "Punjabi",
              "Urdu",
              "Mandarin Chinese",
              "Japanese",
              "Korean",
              "Turkish",
              "Russian",
              "Ukrainian",
              "Polish",
              "Romanian",
              "Czech",
              "Hungarian",
              "Greek",
              "Hebrew",
              "Thai",
              "Vietnamese",
              "Indonesian",
              "Malay",
              "Tagalog",
              "Swahili",
              "Yoruba",
              "Igbo",
              "Hausa",
              "Amharic",
              "Somali",
              "Zulu",
              "Afrikaans",
              "Danish",
              "Norwegian",
              "Finnish"
            ],
            "title": "Primary Language",
            "description": "Language the avatar speaks by default.",
            "default": "English (US)"
          },
          "ai_languages": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "English (US)",
                    "English (UK)",
                    "Spanish",
                    "French",
                    "German",
                    "Arabic",
                    "Swedish",
                    "Portuguese",
                    "Italian",
                    "Dutch",
                    "Hindi",
                    "Bengali",
                    "Punjabi",
                    "Urdu",
                    "Mandarin Chinese",
                    "Japanese",
                    "Korean",
                    "Turkish",
                    "Russian",
                    "Ukrainian",
                    "Polish",
                    "Romanian",
                    "Czech",
                    "Hungarian",
                    "Greek",
                    "Hebrew",
                    "Thai",
                    "Vietnamese",
                    "Indonesian",
                    "Malay",
                    "Tagalog",
                    "Swahili",
                    "Yoruba",
                    "Igbo",
                    "Hausa",
                    "Amharic",
                    "Somali",
                    "Zulu",
                    "Afrikaans",
                    "Danish",
                    "Norwegian",
                    "Finnish"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Languages",
            "description": "Additional languages the avatar may reply in."
          },
          "llm_model": {
            "type": "string",
            "enum": [
              "gpt-4o",
              "gpt-4.1",
              "gpt-4o-mini",
              "gpt-4.1-mini",
              "gpt-4.1-nano",
              "openai/gpt-oss-120b",
              "claude-haiku-4-5",
              "gemini-3.5-flash-lite",
              "gpt-5.4-nano",
              "gpt-5.4-mini",
              "gpt-5.4",
              "gpt-5.5",
              "gpt-5.6-luna",
              "gpt-5.6-terra",
              "gpt-5.6-sol",
              "gpt-6-luna",
              "gpt-5.1",
              "gpt-5.2",
              "gpt-5-mini",
              "gpt-5-nano",
              "openrouter/google/gemma-4-31b-it",
              "openrouter/google/gemma-4-26b-a4b-it",
              "openrouter/mistralai/mistral-medium-3.1",
              "openrouter/qwen/qwen3.8-27b",
              "openrouter/google/gemini-3.5-flash-lite"
            ],
            "title": "Llm Model",
            "description": "Model that generates replies.",
            "default": "gpt-4o"
          },
          "tts_provider": {
            "type": "string",
            "enum": [
              "cartesia",
              "elevenlabs",
              "fish",
              "csm"
            ],
            "title": "Tts Provider",
            "description": "Text-to-speech provider. Determines which `voice_id` values are valid.",
            "default": "elevenlabs"
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id",
            "description": "Voice to speak with, from `GET /v1/models`. Must belong to `tts_provider`. Omit for the provider's default voice."
          },
          "tts_speed": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Tts Speed",
            "description": "Speech rate multiplier. 1.0 is the voice's natural pace.",
            "default": 1.0,
            "examples": [
              1.0
            ]
          },
          "web_search_enabled": {
            "type": "boolean",
            "title": "Web Search Enabled",
            "description": "Let the avatar search the web for current facts (news, weather, scores, prices) when a question needs them. On by default.",
            "default": true,
            "examples": [
              true
            ]
          },
          "guardrail_level": {
            "type": "string",
            "enum": [
              "off",
              "relaxed",
              "normal",
              "strict"
            ],
            "title": "Guardrail Level",
            "description": "How strictly the avatar's speech is checked before it is spoken. `off` skips the content classifier but still filters profanity; `relaxed`, `normal` (default) and `strict` lower the score at which a sentence is rewritten or the reply is stopped.",
            "default": "normal"
          },
          "guardrail_fallback_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Fallback Line",
            "description": "What the avatar says when it stops a reply. Up to 300 characters. Empty uses the default line (\"Sorry, I can't help with that. Is there something else I can do for you?\")."
          },
          "guardrail_blocked_words": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Blocked Words",
            "description": "Extra words or short phrases the avatar must never say, on top of the built-in profanity list. Up to 200 entries of up to 50 characters each."
          },
          "stt_engine": {
            "type": "string",
            "enum": [
              "deepgram",
              "deepgram-flux",
              "cartesia",
              "whisper",
              "whisper-smartturn"
            ],
            "title": "Stt Engine",
            "description": "Speech-to-text engine used to hear the person talking to the avatar.",
            "default": "deepgram-flux"
          },
          "stt_speed": {
            "type": "number",
            "exclusiveMinimum": 0.0,
            "title": "Stt Speed",
            "description": "Transcription pacing multiplier. Leave at 1.0 unless tuning latency.",
            "default": 1.0,
            "examples": [
              1.0
            ]
          },
          "video_id": {
            "type": "string",
            "format": "uuid",
            "title": "Video Id",
            "description": "Source video to train on, from `POST /v1/videos/upload-url`. It must have finished processing first."
          },
          "knowledge_base_ids": {
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "type": "array",
            "title": "Knowledge Base Ids",
            "description": "Account knowledge bank documents to attach at creation, scoping them to this avatar. A document backs at most one of your avatars: one already attached elsewhere moves here. Unlike `POST /v1/avatars/{avatar_id}/knowledge/attach`, this does not check that each is `completed`. A document answers only for the avatar it is attached or uploaded to; one left unattached is used by no avatar."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "name",
          "bio",
          "video_id"
        ],
        "title": "AvatarCreate",
        "description": "Everything needed to train a new avatar.\n\nThe persona fields feed the system prompt the avatar speaks with; the engine\nfields choose the models behind it. Only `name`, `bio` and `video_id` are\nrequired — the rest have working defaults.\n\nUnknown fields are rejected rather than ignored, so a typo in a field name is\na 422 and not a setting that silently did nothing."
      },
      "AvatarPreloadResponse": {
        "properties": {
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "Avatar being warmed."
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Always `preloading`: the request was accepted, not completed. Poll `GET /v1/avatars/{avatar_id}/preload-status` for readiness.",
            "default": "preloading"
          }
        },
        "type": "object",
        "required": [
          "avatar_id"
        ],
        "title": "AvatarPreloadResponse",
        "description": "Acknowledgement that a warm-up has been asked for."
      },
      "AvatarPreloadStatusResponse": {
        "properties": {
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "Avatar being reported on."
          },
          "status": {
            "type": "string",
            "enum": [
              "ready",
              "loading",
              "cold",
              "error",
              "unknown"
            ],
            "title": "Status",
            "description": "`ready` to connect now; `loading` while warming; `cold` if nothing has been warmed; `error` if warming failed; `unknown` if the engine could not be reached. A `cold` avatar still works — the first session just waits for the load.",
            "examples": [
              "ready"
            ]
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail",
            "description": "Extra context, mainly when `status` is `error` or `unknown`."
          }
        },
        "type": "object",
        "required": [
          "avatar_id",
          "status"
        ],
        "title": "AvatarPreloadStatusResponse",
        "description": "Whether an avatar is warm on the GPU and ready to connect without delay."
      },
      "AvatarResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the avatar."
          },
          "user_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "User Id",
            "description": "Account that owns the avatar. Null for stock avatars, which belong to no account."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Display name for the avatar."
          },
          "bio": {
            "type": "string",
            "title": "Bio",
            "description": "Who the avatar is, in prose."
          },
          "awards_achievements": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Awards Achievements",
            "description": "Free-text credentials the avatar may mention when relevant."
          },
          "known_for": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Known For",
            "description": "Topics the avatar is associated with."
          },
          "personality_traits": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personality Traits",
            "description": "Traits that shape how the avatar speaks."
          },
          "interaction_guardrails": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Guardrails",
            "description": "Limits written into the system prompt."
          },
          "primary_goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Goal",
            "description": "What the avatar is for, in one line."
          },
          "primary_language": {
            "type": "string",
            "title": "Primary Language",
            "description": "Language the avatar speaks by default."
          },
          "ai_languages": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Languages",
            "description": "Additional languages the avatar may reply in."
          },
          "llm_model": {
            "type": "string",
            "title": "Llm Model",
            "description": "Model that generates replies."
          },
          "tts_provider": {
            "type": "string",
            "title": "Tts Provider",
            "description": "Text-to-speech provider in use."
          },
          "tts_speed": {
            "type": "number",
            "title": "Tts Speed",
            "description": "Speech rate multiplier."
          },
          "web_search_enabled": {
            "type": "boolean",
            "title": "Web Search Enabled",
            "description": "Whether the avatar may search the web for current facts."
          },
          "guardrail_level": {
            "type": "string",
            "enum": [
              "off",
              "relaxed",
              "normal",
              "strict"
            ],
            "title": "Guardrail Level",
            "description": "How strictly the avatar's speech is checked before it is spoken.",
            "default": "normal"
          },
          "guardrail_fallback_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Fallback Line",
            "description": "What the avatar says when it stops a reply. Null or empty = the default line."
          },
          "guardrail_blocked_words": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Guardrail Blocked Words",
            "description": "Extra words the avatar must never say, on top of the built-in list."
          },
          "stt_engine": {
            "type": "string",
            "title": "Stt Engine",
            "description": "Speech-to-text engine in use."
          },
          "stt_speed": {
            "type": "number",
            "title": "Stt Speed",
            "description": "Transcription pacing multiplier."
          },
          "stt_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Model",
            "description": "Provider-specific model resolved from `stt_engine`. Set by the API, not by you."
          },
          "tts_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Tts Model",
            "description": "Provider-specific model resolved from `tts_provider`. Set by the API, not by you."
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id",
            "description": "Voice the avatar speaks with, as listed by `GET /v1/models`."
          },
          "system_prompt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "System Prompt",
            "description": "The prompt the avatar speaks with, generated from the persona fields. Read-only: change the persona and it is rewritten."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "queued",
              "training",
              "ready",
              "failed"
            ],
            "title": "Status",
            "description": "Where the avatar is in the training pipeline. `pending` on creation, then `queued`, `training`, and finally `ready` or `failed`. Only `ready` avatars can hold a conversation.",
            "examples": [
              "ready"
            ]
          },
          "is_stock": {
            "type": "boolean",
            "title": "Is Stock",
            "description": "True for the shared, pre-trained avatars available to every account."
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "description": "Catalog grouping. Set on stock avatars only."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "Catalog blurb. Set on stock avatars only."
          },
          "video_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Id",
            "description": "Source video the avatar was trained from."
          },
          "video_s3_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video S3 Key",
            "description": "Internal storage key for the source video. Not fetchable directly — use `GET /v1/avatars/{avatar_id}/video-url` for a signed URL."
          },
          "checkpoint_s3_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkpoint S3 Key",
            "description": "Internal storage key for the trained model. Not fetchable."
          },
          "training_job_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Training Job Id",
            "description": "Most recent training run, as listed by `GET /v1/avatars/{avatar_id}/training-jobs`."
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Why training failed. Set only when `status` is `failed`."
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "Signed preview image URL. Short-lived and regenerated on every read, so link to it rather than storing it."
          },
          "knowledge_base_items": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeBaseItemResponse"
            },
            "type": "array",
            "title": "Knowledge Base Items",
            "description": "Documents this avatar can draw on when it answers."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the avatar was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When the avatar was last modified."
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "bio",
          "primary_language",
          "llm_model",
          "tts_provider",
          "tts_speed",
          "web_search_enabled",
          "stt_engine",
          "stt_speed",
          "status",
          "is_stock",
          "created_at",
          "updated_at"
        ],
        "title": "AvatarResponse",
        "description": "An avatar: its persona, the engines behind it, and its training state.\n\nCheck `status` before using one. Only `ready` avatars can hold a\nconversation; the rest are still in the pipeline, or failed with a reason in\n`error_message`."
      },
      "AvatarStatusResponse": {
        "properties": {
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "Avatar being reported on."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "queued",
              "training",
              "ready",
              "failed"
            ],
            "title": "Status",
            "description": "`pending`, `queued`, `training`, then `ready` or `failed`. Only `ready` avatars can hold a conversation.",
            "examples": [
              "training"
            ]
          },
          "progress_percent": {
            "type": "integer",
            "maximum": 100.0,
            "minimum": 0.0,
            "title": "Progress Percent",
            "description": "Completion of the current training run, 0-100. Not a time estimate: training does not advance at a constant rate.",
            "default": 0
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Why training failed. Set only when `status` is `failed`."
          },
          "checkpoint_s3_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Checkpoint S3 Key",
            "description": "Internal storage key for the trained model. Not fetchable."
          }
        },
        "type": "object",
        "required": [
          "avatar_id",
          "status"
        ],
        "title": "AvatarStatusResponse",
        "description": "Where an avatar is in training. Poll this rather than the full avatar."
      },
      "AvatarUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Display name for the avatar."
          },
          "bio": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Bio",
            "description": "Who the avatar is, in prose. Changing this regenerates the system prompt."
          },
          "awards_achievements": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Awards Achievements",
            "description": "Free-text credentials the avatar may mention when relevant."
          },
          "known_for": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "AI Innovation",
                    "Public Speaking",
                    "Research",
                    "Content Creation",
                    "Entrepreneurship",
                    "Education",
                    "Healthcare",
                    "Finance",
                    "Design",
                    "Engineering"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Known For",
            "description": "Topics the avatar is associated with. Replaces the current list."
          },
          "personality_traits": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "AI Innovation",
                    "Entrepreneurship",
                    "Content Creation",
                    "Public Speaking",
                    "Writing & Publishing",
                    "Book Marketing",
                    "Storytelling",
                    "Personal Development",
                    "Leadership",
                    "Business Strategy",
                    "Self-Improvement",
                    "Health & Wellness",
                    "Finance & Investing",
                    "Technology",
                    "Science",
                    "History",
                    "Psychology",
                    "Creativity",
                    "Memoir & Biography",
                    "Media & Journalism"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Personality Traits",
            "description": "Traits that shape how the avatar speaks. Replaces the current list."
          },
          "interaction_guardrails": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "Stay on topic",
                    "No profanity",
                    "No political opinions",
                    "No medical advice",
                    "No financial advice",
                    "No personal relationship details",
                    "Do not discuss family members",
                    "Stick to information in my content",
                    "No speculation about my personal life",
                    "Keep responses professional",
                    "No religious commentary",
                    "Respect privacy boundaries",
                    "Base answers only on provided material",
                    "Avoid controversial topics",
                    "Maintain positive tone",
                    "No legal advice",
                    "Do not share personal contact info",
                    "Stay within my expertise",
                    "No dating or romantic topics",
                    "Keep responses appropriate for all audiences"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Interaction Guardrails",
            "description": "Limits written into the system prompt. Replaces the current list. Prompt-level guidance, not enforcement."
          },
          "primary_goal": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Goal",
            "description": "What the avatar is for, in one line."
          },
          "primary_language": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "English (US)",
                  "English (UK)",
                  "Spanish",
                  "French",
                  "German",
                  "Arabic",
                  "Swedish",
                  "Portuguese",
                  "Italian",
                  "Dutch",
                  "Hindi",
                  "Bengali",
                  "Punjabi",
                  "Urdu",
                  "Mandarin Chinese",
                  "Japanese",
                  "Korean",
                  "Turkish",
                  "Russian",
                  "Ukrainian",
                  "Polish",
                  "Romanian",
                  "Czech",
                  "Hungarian",
                  "Greek",
                  "Hebrew",
                  "Thai",
                  "Vietnamese",
                  "Indonesian",
                  "Malay",
                  "Tagalog",
                  "Swahili",
                  "Yoruba",
                  "Igbo",
                  "Hausa",
                  "Amharic",
                  "Somali",
                  "Zulu",
                  "Afrikaans",
                  "Danish",
                  "Norwegian",
                  "Finnish"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Primary Language",
            "description": "Language the avatar speaks by default."
          },
          "ai_languages": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "enum": [
                    "English (US)",
                    "English (UK)",
                    "Spanish",
                    "French",
                    "German",
                    "Arabic",
                    "Swedish",
                    "Portuguese",
                    "Italian",
                    "Dutch",
                    "Hindi",
                    "Bengali",
                    "Punjabi",
                    "Urdu",
                    "Mandarin Chinese",
                    "Japanese",
                    "Korean",
                    "Turkish",
                    "Russian",
                    "Ukrainian",
                    "Polish",
                    "Romanian",
                    "Czech",
                    "Hungarian",
                    "Greek",
                    "Hebrew",
                    "Thai",
                    "Vietnamese",
                    "Indonesian",
                    "Malay",
                    "Tagalog",
                    "Swahili",
                    "Yoruba",
                    "Igbo",
                    "Hausa",
                    "Amharic",
                    "Somali",
                    "Zulu",
                    "Afrikaans",
                    "Danish",
                    "Norwegian",
                    "Finnish"
                  ]
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ai Languages",
            "description": "Additional languages the avatar may reply in. Replaces the current list."
          },
          "llm_model": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "gpt-4o",
                  "gpt-4.1",
                  "gpt-4o-mini",
                  "gpt-4.1-mini",
                  "gpt-4.1-nano",
                  "openai/gpt-oss-120b",
                  "claude-haiku-4-5",
                  "gemini-3.5-flash-lite",
                  "gpt-5.4-nano",
                  "gpt-5.4-mini",
                  "gpt-5.4",
                  "gpt-5.5",
                  "gpt-5.6-luna",
                  "gpt-5.6-terra",
                  "gpt-5.6-sol",
                  "gpt-6-luna",
                  "gpt-5.1",
                  "gpt-5.2",
                  "gpt-5-mini",
                  "gpt-5-nano",
                  "openrouter/google/gemma-4-31b-it",
                  "openrouter/google/gemma-4-26b-a4b-it",
                  "openrouter/mistralai/mistral-medium-3.1",
                  "openrouter/qwen/qwen3.8-27b",
                  "openrouter/google/gemini-3.5-flash-lite"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Llm Model",
            "description": "Model that generates replies."
          },
          "tts_provider": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "cartesia",
                  "elevenlabs",
                  "fish",
                  "csm"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Tts Provider",
            "description": "Text-to-speech provider. Changing it without also sending `voice_id` resets the voice to that provider's default."
          },
          "voice_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voice Id",
            "description": "Voice to speak with, from `GET /v1/models`. Must belong to `tts_provider`."
          },
          "tts_speed": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Tts Speed",
            "description": "Speech rate multiplier. 1.0 is the voice's natural pace."
          },
          "web_search_enabled": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Search Enabled",
            "description": "Let the avatar search the web for current facts when a question needs them. False turns it off for this avatar."
          },
          "guardrail_level": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "off",
                  "relaxed",
                  "normal",
                  "strict"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Level",
            "description": "How strictly the avatar's speech is checked before it is spoken. `off` skips the content classifier but still filters profanity; `relaxed`, `normal` (default) and `strict` lower the score at which a sentence is rewritten or the reply is stopped."
          },
          "guardrail_fallback_line": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Fallback Line",
            "description": "What the avatar says when it stops a reply. Up to 300 characters. Empty uses the default line (\"Sorry, I can't help with that. Is there something else I can do for you?\")."
          },
          "guardrail_blocked_words": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Guardrail Blocked Words",
            "description": "Extra words or short phrases the avatar must never say, on top of the built-in profanity list. Up to 200 entries of up to 50 characters each. Replaces the current list; send `[]` to clear it."
          },
          "stt_engine": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "deepgram",
                  "deepgram-flux",
                  "cartesia",
                  "whisper",
                  "whisper-smartturn"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Engine",
            "description": "Speech-to-text engine used to hear the person talking to the avatar."
          },
          "stt_speed": {
            "anyOf": [
              {
                "type": "number",
                "exclusiveMinimum": 0.0
              },
              {
                "type": "null"
              }
            ],
            "title": "Stt Speed",
            "description": "Transcription pacing multiplier."
          },
          "knowledge_base_ids": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "format": "uuid"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Knowledge Base Ids",
            "description": "The complete set of account knowledge bank documents this avatar should use. Replaces the current set; send `[]` to detach everything. A detached document returns to the bank, where no avatar uses it."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "AvatarUpdate",
        "description": "A partial update. Send only the fields you are changing.\n\nOmitting a field leaves it alone, and so does sending `null` — there is no\nway to clear a field back to empty through this endpoint.\n\nTwo changes do more than they appear to. Editing any persona field (`name`,\n`bio`, `awards_achievements`, `known_for`, `personality_traits`,\n`interaction_guardrails`) regenerates the system prompt through a model call,\nwhich is why this endpoint can return 502. And `knowledge_base_ids` replaces\nthe avatar's documents rather than adding to them, so send the full set you\nwant it to end up with.\n\nNone of this retrains the avatar. Retraining needs new footage — see\n`POST /v1/avatars/{avatar_id}/retrain`.\n\nUnknown fields are rejected rather than ignored."
      },
      "Body_create_video_upload_url_v1_videos_upload_url_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "Source video to train an avatar from."
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_create_video_upload_url_v1_videos_upload_url_post"
      },
      "Body_upload_avatar_knowledge_batch_v1_avatars__avatar_id__knowledge_batch_post": {
        "properties": {
          "files": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files"
          }
        },
        "type": "object",
        "title": "Body_upload_avatar_knowledge_batch_v1_avatars__avatar_id__knowledge_batch_post"
      },
      "Body_upload_avatar_knowledge_v1_avatars__avatar_id__knowledge_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "PDF or DOCX document. Extraction runs asynchronously after upload; poll the item's `status` until it is `completed`."
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_avatar_knowledge_v1_avatars__avatar_id__knowledge_post"
      },
      "Body_upload_knowledge_bank_item_v1_knowledge_bank_upload_post": {
        "properties": {
          "file": {
            "type": "string",
            "contentMediaType": "application/octet-stream",
            "title": "File",
            "description": "PDF or DOCX document. Extraction runs asynchronously after upload; poll the item's `status` until it is `completed`."
          }
        },
        "type": "object",
        "required": [
          "file"
        ],
        "title": "Body_upload_knowledge_bank_item_v1_knowledge_bank_upload_post"
      },
      "Body_upload_knowledge_bank_items_v1_knowledge_bank_upload_batch_post": {
        "properties": {
          "files": {
            "anyOf": [
              {
                "items": {
                  "type": "string",
                  "contentMediaType": "application/octet-stream"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files"
          }
        },
        "type": "object",
        "title": "Body_upload_knowledge_bank_items_v1_knowledge_bank_upload_batch_post"
      },
      "ConversationDetailResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the conversation."
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "Account the conversation belongs to."
          },
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "Avatar the session was held with."
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id",
            "description": "Memory scope the conversation belongs to: the `end_user_id` it was created with, `anon:<id>` for an isolated API conversation, or empty for the account owner's own sessions.",
            "default": ""
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Label for the conversation."
          },
          "greeting": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Greeting",
            "description": "Opening line the avatar speaks first, if one was set."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At",
            "description": "When the conversation was created."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "When it was closed. Null while it is still open."
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds",
            "description": "Total session length in seconds. Null until the session ends."
          },
          "recording_status": {
            "$ref": "#/components/schemas/RecordingStatusEnum",
            "description": "Whether a video recording of the session exists. `none` if it was never recorded, then `processing`, and finally `ready` or `failed`.",
            "default": "none"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url",
            "description": "Signed download URL for the recording. Present only when `recording_status` is `ready`, short-lived, and regenerated on every read."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the record was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When it last changed."
          },
          "websocket_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Websocket Url",
            "description": "Always null on this API. The live session is reached through the `conversation_url` returned when the conversation is created, which is embedded in an iframe; the underlying socket is not a public interface."
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/ConversationMessageResponse"
            },
            "type": "array",
            "title": "Messages",
            "description": "Messages in conversation"
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "avatar_id",
          "title",
          "started_at",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationDetailResponse",
        "description": "Conversation response with embedded messages.",
        "example": {
          "avatar_id": "550e8400-e29b-41d4-a716-446655440002",
          "created_at": "2026-04-07T10:00:00Z",
          "duration_seconds": 142.6,
          "greeting": "Hi there! Welcome to our product demo.",
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "recording_status": "ready",
          "recording_url": "https://s3.amazonaws.com/...",
          "started_at": "2026-04-07T10:00:00Z",
          "title": "Product Demo Call",
          "updated_at": "2026-04-07T10:00:00Z",
          "user_id": "550e8400-e29b-41d4-a716-446655440001",
          "websocket_url": "wss://gpu-pod-xyz.runpod.io/ws?token=eyJhbG..."
        }
      },
      "ConversationMessageCreate": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/ConversationRoleEnum",
            "description": "Role: user or assistant"
          },
          "content": {
            "type": "string",
            "minLength": 1,
            "title": "Content",
            "description": "Message content"
          }
        },
        "type": "object",
        "required": [
          "role",
          "content"
        ],
        "title": "ConversationMessageCreate",
        "description": "Schema for creating a conversation message.",
        "example": {
          "content": "Hello, how are you?",
          "role": "user"
        }
      },
      "ConversationMessageResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the message."
          },
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id",
            "description": "Conversation it belongs to."
          },
          "role": {
            "$ref": "#/components/schemas/ConversationRoleEnum",
            "description": "Who spoke. Note the transcript endpoint labels the same speaker `avatar` rather than `assistant`."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "What was said."
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "title": "Timestamp",
            "description": "Wall-clock time of the message."
          },
          "timestamp_offset": {
            "type": "number",
            "title": "Timestamp Offset",
            "description": "Seconds from the start of the session. Use this to line up with the recording.",
            "default": 0.0
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the message was stored."
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "role",
          "content",
          "timestamp",
          "created_at"
        ],
        "title": "ConversationMessageResponse",
        "description": "Schema for conversation message response.",
        "example": {
          "content": "Hello, how are you?",
          "conversation_id": "550e8400-e29b-41d4-a716-446655440001",
          "created_at": "2026-04-07T10:00:00Z",
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "role": "user",
          "timestamp": "2026-04-07T10:00:00Z",
          "timestamp_offset": 4.2
        }
      },
      "ConversationResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the conversation."
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "Account the conversation belongs to."
          },
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "Avatar the session was held with."
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id",
            "description": "Memory scope the conversation belongs to: the `end_user_id` it was created with, `anon:<id>` for an isolated API conversation, or empty for the account owner's own sessions.",
            "default": ""
          },
          "title": {
            "type": "string",
            "title": "Title",
            "description": "Label for the conversation."
          },
          "greeting": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Greeting",
            "description": "Opening line the avatar speaks first, if one was set."
          },
          "started_at": {
            "type": "string",
            "format": "date-time",
            "title": "Started At",
            "description": "When the conversation was created."
          },
          "ended_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ended At",
            "description": "When it was closed. Null while it is still open."
          },
          "duration_seconds": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duration Seconds",
            "description": "Total session length in seconds. Null until the session ends."
          },
          "recording_status": {
            "$ref": "#/components/schemas/RecordingStatusEnum",
            "description": "Whether a video recording of the session exists. `none` if it was never recorded, then `processing`, and finally `ready` or `failed`.",
            "default": "none"
          },
          "recording_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Recording Url",
            "description": "Signed download URL for the recording. Present only when `recording_status` is `ready`, short-lived, and regenerated on every read."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the record was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When it last changed."
          },
          "websocket_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Websocket Url",
            "description": "Always null on this API. The live session is reached through the `conversation_url` returned when the conversation is created, which is embedded in an iframe; the underlying socket is not a public interface."
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "avatar_id",
          "title",
          "started_at",
          "created_at",
          "updated_at"
        ],
        "title": "ConversationResponse",
        "description": "Schema for conversation response.",
        "example": {
          "avatar_id": "550e8400-e29b-41d4-a716-446655440002",
          "created_at": "2026-04-07T10:00:00Z",
          "duration_seconds": 142.6,
          "greeting": "Hi there! Welcome to our product demo.",
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "recording_status": "ready",
          "recording_url": "https://s3.amazonaws.com/...",
          "started_at": "2026-04-07T10:00:00Z",
          "title": "Product Demo Call",
          "updated_at": "2026-04-07T10:00:00Z",
          "user_id": "550e8400-e29b-41d4-a716-446655440001",
          "websocket_url": "wss://gpu-pod-xyz.runpod.io/ws?token=eyJhbG..."
        }
      },
      "ConversationRoleEnum": {
        "type": "string",
        "enum": [
          "user",
          "assistant"
        ],
        "title": "ConversationRoleEnum",
        "description": "Role of message in conversation."
      },
      "ConversationStatusEnum": {
        "type": "string",
        "enum": [
          "active",
          "ended"
        ],
        "title": "ConversationStatusEnum",
        "description": "Lifecycle status exposed by the public /v1/ conversation create response."
      },
      "EngineOption": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Value to send in `llm_model`, `tts_provider` or `stt_engine`.",
            "examples": [
              "gpt-4o"
            ]
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable label."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "What this engine is good for."
          },
          "recommended": {
            "type": "boolean",
            "title": "Recommended",
            "description": "True for the option to reach for when unsure.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "name"
        ],
        "title": "EngineOption",
        "description": "One selectable engine."
      },
      "ErrorDetail": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Stable machine-readable code. Branch on this; the codes are part of the contract, the wording of `message` is not."
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable explanation, for logs and developers rather than end users."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "ErrorDetail",
        "description": "The inner object of an error envelope."
      },
      "ErrorEnvelope": {
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorDetail",
            "description": "What went wrong."
          }
        },
        "type": "object",
        "required": [
          "error"
        ],
        "title": "ErrorEnvelope",
        "description": "The body of every error response on the public /v1/ API."
      },
      "KnowledgeAttachRequest": {
        "properties": {
          "knowledge_base_id": {
            "type": "string",
            "format": "uuid",
            "title": "Knowledge Base Id",
            "description": "Account knowledge bank document to attach. It must have finished extraction, and must not already be attached to another avatar."
          }
        },
        "type": "object",
        "required": [
          "knowledge_base_id"
        ],
        "title": "KnowledgeAttachRequest",
        "description": "Which knowledge bank document to attach."
      },
      "KnowledgeBankItemResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the document."
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Name the file was uploaded under."
          },
          "file_type": {
            "type": "string",
            "title": "File Type",
            "description": "Detected document type.",
            "examples": [
              "pdf"
            ]
          },
          "file_size_bytes": {
            "type": "integer",
            "title": "File Size Bytes",
            "description": "Size of the uploaded file in bytes."
          },
          "status": {
            "type": "string",
            "enum": [
              "uploaded",
              "processing",
              "completed",
              "failed"
            ],
            "title": "Status",
            "description": "Extraction state. `uploaded` on arrival, then `processing`, and finally `completed` or `failed`. Only `completed` documents are searchable or used in a reply.",
            "examples": [
              "completed"
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Why extraction failed. Set only when `status` is `failed`."
          },
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count",
            "description": "Passages the document was split into for retrieval. Null until extraction completes."
          },
          "total_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens",
            "description": "Tokens extracted from the document. Null until it completes."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the document was uploaded."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When its state last changed."
          }
        },
        "type": "object",
        "required": [
          "id",
          "filename",
          "file_type",
          "file_size_bytes",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "KnowledgeBankItemResponse",
        "description": "A document in the account knowledge bank.\n\nBelongs to the account rather than to any one avatar, and no avatar uses it\nuntil it is attached to one. Attached, it answers for that avatar only."
      },
      "KnowledgeBaseItemResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the document."
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "Account that owns the document."
          },
          "avatar_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Id",
            "description": "Avatar the document is attached to. Null while it sits unattached in the account knowledge bank; a document backs at most one avatar."
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Name the file was uploaded under."
          },
          "file_type": {
            "type": "string",
            "title": "File Type",
            "description": "Detected document type.",
            "examples": [
              "pdf"
            ]
          },
          "content_type": {
            "type": "string",
            "title": "Content Type",
            "description": "MIME type of the upload.",
            "examples": [
              "application/pdf"
            ]
          },
          "file_size_bytes": {
            "type": "integer",
            "title": "File Size Bytes",
            "description": "Size of the uploaded file in bytes."
          },
          "status": {
            "type": "string",
            "enum": [
              "uploaded",
              "processing",
              "completed",
              "failed"
            ],
            "title": "Status",
            "description": "Extraction state. `uploaded` on arrival, then `processing`, and finally `completed` or `failed`. Only `completed` documents are searchable or used in a reply.",
            "examples": [
              "completed"
            ]
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Why extraction failed. Set only when `status` is `failed`."
          },
          "chunk_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chunk Count",
            "description": "Passages the document was split into for retrieval. Null until extraction completes."
          },
          "total_tokens": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Total Tokens",
            "description": "Tokens extracted from the document. Null until it completes."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the document was uploaded."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When its state last changed."
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "filename",
          "file_type",
          "content_type",
          "file_size_bytes",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "KnowledgeBaseItemResponse",
        "description": "A document an avatar can draw on when it answers."
      },
      "KnowledgeBatchUploadError": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "KnowledgeBatchUploadError",
        "description": "Sanitized failure for one file in a batch upload."
      },
      "KnowledgeBatchUploadResponse": {
        "properties": {
          "results": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeBatchUploadResult"
            },
            "type": "array",
            "title": "Results"
          },
          "submitted": {
            "type": "integer",
            "title": "Submitted"
          },
          "queued": {
            "type": "integer",
            "title": "Queued"
          },
          "failed": {
            "type": "integer",
            "title": "Failed"
          }
        },
        "type": "object",
        "required": [
          "results",
          "submitted",
          "queued",
          "failed"
        ],
        "title": "KnowledgeBatchUploadResponse",
        "description": "Results for a multi-document upload."
      },
      "KnowledgeBatchUploadResult": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "filename": {
            "type": "string",
            "title": "Filename"
          },
          "item": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KnowledgeBaseItemResponse"
              },
              {
                "type": "null"
              }
            ]
          },
          "error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/KnowledgeBatchUploadError"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "index",
          "filename"
        ],
        "title": "KnowledgeBatchUploadResult",
        "description": "Ordered outcome for one submitted file."
      },
      "KnowledgeSearchChunkResponse": {
        "properties": {
          "knowledge_base_item_id": {
            "type": "string",
            "format": "uuid",
            "title": "Knowledge Base Item Id",
            "description": "Document this passage came from."
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Name of that document."
          },
          "chunk_index": {
            "type": "integer",
            "title": "Chunk Index",
            "description": "Position of this passage within the document, from 0."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "The passage itself."
          },
          "page_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Page Number",
            "description": "Source page, where the document format has pages."
          },
          "token_count": {
            "type": "integer",
            "title": "Token Count",
            "description": "Tokens in this passage."
          }
        },
        "type": "object",
        "required": [
          "knowledge_base_item_id",
          "filename",
          "chunk_index",
          "content",
          "token_count"
        ],
        "title": "KnowledgeSearchChunkResponse",
        "description": "One passage retrieved from a knowledge document."
      },
      "KnowledgeSearchRequest": {
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "title": "Query",
            "description": "What you are looking for, in natural language. Matched by meaning, so it need not share wording with the passage that answers it.",
            "examples": [
              "What is the refund window?"
            ]
          },
          "limit": {
            "type": "integer",
            "maximum": 20.0,
            "minimum": 1.0,
            "title": "Limit",
            "description": "Maximum chunks to return.",
            "default": 5
          }
        },
        "type": "object",
        "required": [
          "query"
        ],
        "title": "KnowledgeSearchRequest",
        "description": "What to search the account knowledge bank for."
      },
      "KnowledgeSearchResponse": {
        "properties": {
          "chunks": {
            "items": {
              "$ref": "#/components/schemas/KnowledgeSearchChunkResponse"
            },
            "type": "array",
            "title": "Chunks",
            "description": "Matching passages, closest first. The same document can appear more than once. Empty when nothing matched."
          }
        },
        "type": "object",
        "required": [
          "chunks"
        ],
        "title": "KnowledgeSearchResponse",
        "description": "Matching passages, closest first."
      },
      "MemoryAggregate": {
        "properties": {
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "conversation_count": {
            "type": "integer",
            "title": "Conversation Count",
            "description": "Conversations folded into this summary."
          },
          "last_aggregated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Last Aggregated At"
          }
        },
        "type": "object",
        "required": [
          "summary",
          "conversation_count",
          "last_aggregated_at"
        ],
        "title": "MemoryAggregate",
        "description": "The rolling summary of older conversations."
      },
      "MemoryDeleteResponse": {
        "properties": {
          "aggregate_rebuild": {
            "type": "string",
            "enum": [
              "queued",
              "not_needed",
              "unavailable"
            ],
            "title": "Aggregate Rebuild",
            "description": "`queued`: the aggregate was removed and is being rebuilt from the remaining summaries. `not_needed`: the aggregate never contained what was deleted. `unavailable`: the aggregate was removed but the rebuild could not be queued; it is rebuilt after the next conversation."
          }
        },
        "type": "object",
        "required": [
          "aggregate_rebuild"
        ],
        "title": "MemoryDeleteResponse",
        "description": "Result of a delete that may change the rolling aggregate."
      },
      "MemoryFact": {
        "properties": {
          "key": {
            "type": "string",
            "title": "Key",
            "examples": [
              "pet"
            ]
          },
          "value": {
            "type": "string",
            "title": "Value",
            "examples": [
              "Rocky"
            ]
          },
          "updated_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Updated At",
            "description": "When a conversation last set this fact. Null for facts learned before provenance was recorded."
          },
          "conversation_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conversation Id",
            "description": "The conversation that last set this fact."
          }
        },
        "type": "object",
        "required": [
          "key",
          "value"
        ],
        "title": "MemoryFact",
        "description": "One learned fact about the end user."
      },
      "MemoryScopeResponse": {
        "properties": {
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id"
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id",
            "description": "The scope. \"\" is the API key owner's own scope."
          },
          "pinned": {
            "items": {
              "$ref": "#/components/schemas/PinnedMemoryResponse"
            },
            "type": "array",
            "title": "Pinned",
            "description": "Memories you pinned. Always returned, whatever `type` asks for."
          },
          "facts": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/MemoryFact"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Facts",
            "description": "Null when `type=timeline`."
          },
          "timeline": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryTimeline"
              },
              {
                "type": "null"
              }
            ],
            "description": "Null when `type=facts`."
          },
          "pending_conversations": {
            "type": "integer",
            "title": "Pending Conversations",
            "description": "Conversations in this scope whose memory has not been written yet. Non-zero right after a conversation ends; re-read to confirm it landed."
          }
        },
        "type": "object",
        "required": [
          "avatar_id",
          "end_user_id",
          "pending_conversations"
        ],
        "title": "MemoryScopeResponse",
        "description": "What the avatar remembers about one end user."
      },
      "MemoryScopeSummary": {
        "properties": {
          "end_user_id": {
            "type": "string",
            "title": "End User Id"
          },
          "facts_count": {
            "type": "integer",
            "title": "Facts Count"
          },
          "conversation_count": {
            "type": "integer",
            "title": "Conversation Count",
            "description": "Conversation summaries stored."
          },
          "pinned_count": {
            "type": "integer",
            "title": "Pinned Count",
            "default": 0
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "end_user_id",
          "facts_count",
          "conversation_count",
          "updated_at"
        ],
        "title": "MemoryScopeSummary",
        "description": "One end user the avatar has memory of."
      },
      "MemorySummary": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the conversation was summarised."
          },
          "in_aggregate": {
            "type": "boolean",
            "title": "In Aggregate",
            "description": "True when this summary has already been folded into `aggregate` or a week/month entry. Deleting such a summary also rebuilds what carries it, since that still remembers it until then."
          }
        },
        "type": "object",
        "required": [
          "id",
          "conversation_id",
          "summary",
          "created_at",
          "in_aggregate"
        ],
        "title": "MemorySummary",
        "description": "One conversation's summary."
      },
      "MemoryTimeline": {
        "properties": {
          "aggregate": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MemoryAggregate"
              },
              {
                "type": "null"
              }
            ],
            "description": "The rolling summary of older conversations ('Earlier' once the timeline is on)."
          },
          "months": {
            "items": {
              "$ref": "#/components/schemas/MemoryTimelineEntryResponse"
            },
            "type": "array",
            "title": "Months",
            "description": "Oldest first."
          },
          "weeks": {
            "items": {
              "$ref": "#/components/schemas/MemoryTimelineEntryResponse"
            },
            "type": "array",
            "title": "Weeks",
            "description": "Oldest first."
          },
          "summaries": {
            "items": {
              "$ref": "#/components/schemas/MemorySummary"
            },
            "type": "array",
            "title": "Summaries",
            "description": "Newest first."
          }
        },
        "type": "object",
        "required": [
          "aggregate",
          "summaries"
        ],
        "title": "MemoryTimeline"
      },
      "MemoryTimelineEntryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "granularity": {
            "type": "string",
            "enum": [
              "week",
              "month"
            ],
            "title": "Granularity"
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "title": "Period Start",
            "description": "The Monday of the week, or the 1st of the month."
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "source_count": {
            "type": "integer",
            "title": "Source Count",
            "description": "Conversations folded into this entry."
          },
          "covered_until": {
            "type": "string",
            "format": "date-time",
            "title": "Covered Until"
          }
        },
        "type": "object",
        "required": [
          "id",
          "granularity",
          "period_start",
          "summary",
          "source_count",
          "covered_until"
        ],
        "title": "MemoryTimelineEntryResponse",
        "description": "One rolled-up week or month (only while the timeline is enabled)."
      },
      "ModelsList": {
        "properties": {
          "llm": {
            "items": {
              "$ref": "#/components/schemas/EngineOption"
            },
            "type": "array",
            "title": "Llm",
            "description": "Models that can generate an avatar's replies."
          },
          "tts": {
            "items": {
              "$ref": "#/components/schemas/EngineOption"
            },
            "type": "array",
            "title": "Tts",
            "description": "Providers that can speak an avatar's replies."
          },
          "stt": {
            "items": {
              "$ref": "#/components/schemas/EngineOption"
            },
            "type": "array",
            "title": "Stt",
            "description": "Engines that can hear the person talking."
          },
          "supported_voices": {
            "items": {
              "$ref": "#/components/schemas/VoiceDescription"
            },
            "type": "array",
            "title": "Supported Voices",
            "description": "Available voices the frontend can offer for avatar create/update. Each voice is tagged with its provider; the avatar's tts_provider must match the voice's provider."
          }
        },
        "type": "object",
        "title": "ModelsList",
        "description": "Frontend-ready model catalog grouped by engine type.",
        "example": {
          "llm": [
            {
              "description": "Best for most use cases. High quality responses with balanced speed.",
              "id": "gpt-4o",
              "name": "GPT-4o (Recommended)",
              "recommended": true
            },
            {
              "description": "High-reasoning model for more complex dialogue behavior.",
              "id": "gpt-4.1",
              "name": "GPT-4.1",
              "recommended": false
            },
            {
              "description": "Low-cost OpenAI model. Good quality at a fraction of GPT-4o's price.",
              "id": "gpt-4o-mini",
              "name": "GPT-4o Mini",
              "recommended": false
            },
            {
              "description": "Fast, low-cost OpenAI model with strong conversational quality.",
              "id": "gpt-4.1-mini",
              "name": "GPT-4.1 Mini",
              "recommended": false
            },
            {
              "description": "Ultra-fast, lowest-cost OpenAI model for simple conversational tasks.",
              "id": "gpt-4.1-nano",
              "name": "GPT-4.1 Nano",
              "recommended": false
            },
            {
              "description": "Open-weight OpenAI model on Groq. Very low latency and cost.",
              "id": "openai/gpt-oss-120b",
              "name": "GPT-OSS 120B (Groq)",
              "recommended": false
            },
            {
              "description": "Anthropic's fastest model. Low-latency conversational responses.",
              "id": "claude-haiku-4-5",
              "name": "Claude Haiku 4.5",
              "recommended": false
            },
            {
              "description": "Google's low-latency, low-cost multimodal model.",
              "id": "gemini-3.5-flash-lite",
              "name": "Gemini 3.5 Flash-Lite",
              "recommended": false
            },
            {
              "description": "Fastest model in this list (~0.56s to first token). Lowest cost.",
              "id": "gpt-5.4-nano",
              "name": "GPT-5.4 Nano",
              "recommended": false
            },
            {
              "description": "Low-cost GPT-5.4 with strong conversational quality (~0.84s).",
              "id": "gpt-5.4-mini",
              "name": "GPT-5.4 Mini",
              "recommended": false
            },
            {
              "description": "Full-size GPT-5.4. Higher reasoning quality (~0.71s).",
              "id": "gpt-5.4",
              "name": "GPT-5.4",
              "recommended": false
            },
            {
              "description": "Newer full-size model for more demanding dialogue (~0.99s).",
              "id": "gpt-5.5",
              "name": "GPT-5.5",
              "recommended": false
            },
            {
              "description": "Newest generation, fastest of the three GPT-5.6 variants (~0.58s).",
              "id": "gpt-5.6-luna",
              "name": "GPT-5.6 Luna",
              "recommended": false
            },
            {
              "description": "Newest generation, balanced (~0.91s).",
              "id": "gpt-5.6-terra",
              "name": "GPT-5.6 Terra",
              "recommended": false
            },
            {
              "description": "Newest generation; slowest of the three (~1.15s).",
              "id": "gpt-5.6-sol",
              "name": "GPT-5.6 Sol",
              "recommended": false
            },
            {
              "description": "GPT-6 generation, fast variant (~0.84s; ~0.94s with web search).",
              "id": "gpt-6-luna",
              "name": "GPT-6 Luna",
              "recommended": false
            },
            {
              "description": "First GPT-5 revision with low-latency replies (~0.70s).",
              "id": "gpt-5.1",
              "name": "GPT-5.1",
              "recommended": false
            },
            {
              "description": "GPT-5.2 conversational model (~1.02s).",
              "id": "gpt-5.2",
              "name": "GPT-5.2",
              "recommended": false
            },
            {
              "description": "Original GPT-5 mini. Superseded by GPT-5.4 Mini (~1.24s).",
              "id": "gpt-5-mini",
              "name": "GPT-5 Mini",
              "recommended": false
            },
            {
              "description": "Original GPT-5 nano. Superseded by GPT-5.4 Nano (~1.09s).",
              "id": "gpt-5-nano",
              "name": "GPT-5 Nano",
              "recommended": false
            },
            {
              "description": "Multimodal, fast (~0.31s to first token).",
              "id": "openrouter/google/gemma-4-31b-it",
              "name": "Gemma 4 31B (OpenRouter)",
              "recommended": false
            },
            {
              "description": "Multimodal, fastest here (~0.26s); slightly weaker knowledge-base recall.",
              "id": "openrouter/google/gemma-4-26b-a4b-it",
              "name": "Gemma 4 26B MoE (OpenRouter)",
              "recommended": false
            },
            {
              "description": "Multimodal, larger model with fuller replies (~0.54s).",
              "id": "openrouter/mistralai/mistral-medium-3.1",
              "name": "Mistral Medium 3.1 (OpenRouter)",
              "recommended": false
            },
            {
              "description": "Multimodal, thinks before answering: most reliable with the knowledge base, slower (~1.3s).",
              "id": "openrouter/qwen/qwen3.8-27b",
              "name": "Qwen3.8 27B (OpenRouter)",
              "recommended": false
            },
            {
              "description": "Gemini via OpenRouter billing (~0.73s).",
              "id": "openrouter/google/gemini-3.5-flash-lite",
              "name": "Gemini 3.5 Flash-Lite (OpenRouter)",
              "recommended": false
            }
          ],
          "stt": [
            {
              "id": "deepgram",
              "name": "Deepgram"
            },
            {
              "id": "deepgram-flux",
              "name": "Deepgram Flux"
            },
            {
              "id": "cartesia",
              "name": "Cartesia"
            },
            {
              "id": "whisper",
              "name": "Whisper"
            },
            {
              "id": "whisper-smartturn",
              "name": "Whisper + Smart Turn (self-hosted)"
            }
          ],
          "tts": [
            {
              "id": "cartesia",
              "name": "Cartesia"
            },
            {
              "id": "elevenlabs",
              "name": "ElevenLabs"
            },
            {
              "id": "fish",
              "name": "Fish Audio"
            },
            {
              "id": "csm",
              "name": "Custom voice"
            }
          ]
        }
      },
      "Page_AvatarResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AvatarResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[AvatarResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_ConversationMessageResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConversationMessageResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[ConversationMessageResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_ConversationResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ConversationResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[ConversationResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_MemoryScopeSummary_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemoryScopeSummary"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[MemoryScopeSummary]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_PinnedMemoryResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PinnedMemoryResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[PinnedMemoryResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_TrainingJobResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TrainingJobResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[TrainingJobResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "Page_VideoResponse_": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/VideoResponse"
            },
            "type": "array",
            "title": "Items",
            "description": "The results on this page."
          },
          "total": {
            "type": "integer",
            "title": "Total",
            "description": "Total number of records available, not the number on this page. Keep requesting while `skip + limit < total`.",
            "examples": [
              42
            ]
          },
          "skip": {
            "type": "integer",
            "title": "Skip",
            "description": "Records skipped before this page.",
            "examples": [
              0
            ]
          },
          "limit": {
            "type": "integer",
            "title": "Limit",
            "description": "Maximum records this page can contain.",
            "examples": [
              10
            ]
          }
        },
        "type": "object",
        "required": [
          "items",
          "total",
          "skip",
          "limit"
        ],
        "title": "Page[VideoResponse]",
        "example": {
          "items": [],
          "limit": 10,
          "skip": 0,
          "total": 42
        }
      },
      "PinnedMemoryBatchCreate": {
        "properties": {
          "end_user_id": {
            "type": "string",
            "maxLength": 128,
            "pattern": "^[^\\x00-\\x1f\\x7f]*$",
            "title": "End User Id",
            "description": "The end user this memory is about — the `end_user_id` you create their conversations with. Required; send \"\" for your own scope. Pins may be added before that end user's first conversation."
          },
          "memories": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "maxItems": 30,
            "minItems": 1,
            "title": "Memories",
            "description": "Added together or not at all."
          }
        },
        "type": "object",
        "required": [
          "end_user_id",
          "memories"
        ],
        "title": "PinnedMemoryBatchCreate"
      },
      "PinnedMemoryCreate": {
        "properties": {
          "end_user_id": {
            "type": "string",
            "maxLength": 128,
            "pattern": "^[^\\x00-\\x1f\\x7f]*$",
            "title": "End User Id",
            "description": "The end user this memory is about — the `end_user_id` you create their conversations with. Required; send \"\" for your own scope. Pins may be added before that end user's first conversation."
          },
          "memory": {
            "type": "string",
            "title": "Memory",
            "description": "One statement about the end user, at most 500 characters.",
            "examples": [
              "Prefers short, direct answers"
            ]
          }
        },
        "type": "object",
        "required": [
          "end_user_id",
          "memory"
        ],
        "title": "PinnedMemoryCreate"
      },
      "PinnedMemoryResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id"
          },
          "memory": {
            "type": "string",
            "title": "Memory"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "end_user_id",
          "memory",
          "created_at",
          "updated_at"
        ],
        "title": "PinnedMemoryResponse"
      },
      "PinnedMemoryUpdate": {
        "properties": {
          "memory": {
            "type": "string",
            "title": "Memory",
            "description": "Replacement text. The id is kept."
          }
        },
        "type": "object",
        "required": [
          "memory"
        ],
        "title": "PinnedMemoryUpdate"
      },
      "RecordingResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Presigned download URL"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Lifetime of the presigned URL in seconds"
          }
        },
        "type": "object",
        "required": [
          "url",
          "expires_in"
        ],
        "title": "RecordingResponse",
        "description": "Presigned download URL for a session recording."
      },
      "RecordingStatusEnum": {
        "type": "string",
        "enum": [
          "none",
          "processing",
          "ready",
          "failed"
        ],
        "title": "RecordingStatusEnum",
        "description": "Lifecycle of the session video recording."
      },
      "TTSProviderEnum": {
        "type": "string",
        "enum": [
          "cartesia",
          "elevenlabs",
          "fish",
          "csm"
        ],
        "title": "TTSProviderEnum",
        "description": "Runtime TTS providers supported by the realtime engine."
      },
      "TrainingJobResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier for the training run."
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "Account the run belongs to."
          },
          "avatar_id": {
            "anyOf": [
              {
                "type": "string",
                "format": "uuid"
              },
              {
                "type": "null"
              }
            ],
            "title": "Avatar Id",
            "description": "Avatar being trained."
          },
          "status": {
            "$ref": "#/components/schemas/TrainingJobStatusEnum",
            "description": "`pending` while queued, `running` once a worker picks it up, then `completed`, `failed`, or `cancelled`."
          },
          "video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Url",
            "description": "Signed URL to the source footage this run trained on."
          },
          "error_message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error Message",
            "description": "Why the run failed. Set only when `status` is `failed`."
          },
          "progress_percent": {
            "type": "integer",
            "title": "Progress Percent",
            "description": "Completion of the current run, 0-100. Not a time estimate: training does not advance at a constant rate.",
            "examples": [
              50
            ]
          },
          "started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started At",
            "description": "When a worker picked the run up. Null while still queued."
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Completed At",
            "description": "When the run finished, whether it succeeded or not."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the run was queued."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When its state last changed."
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "status",
          "progress_percent",
          "created_at",
          "updated_at"
        ],
        "title": "TrainingJobResponse",
        "description": "One training run for an avatar.",
        "example": {
          "avatar_id": "9c858901-8a57-4791-81fe-4c455b099bc9",
          "created_at": "2026-04-07T10:00:00Z",
          "id": "550e8400-e29b-41d4-a716-446655440000",
          "progress_percent": 50,
          "started_at": "2026-04-07T10:00:00Z",
          "status": "running",
          "updated_at": "2026-04-07T10:00:00Z",
          "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "video_url": "https://example.com/video.mp4"
        }
      },
      "TrainingJobStatusEnum": {
        "type": "string",
        "enum": [
          "pending",
          "running",
          "completed",
          "failed",
          "cancelled"
        ],
        "title": "TrainingJobStatusEnum",
        "description": "Status of training job."
      },
      "TranscriptMessage": {
        "properties": {
          "role": {
            "$ref": "#/components/schemas/TranscriptRoleEnum",
            "description": "Who spoke: `user` or `avatar`. The messages endpoint labels the avatar `assistant` instead."
          },
          "content": {
            "type": "string",
            "title": "Content",
            "description": "What was said."
          },
          "timestamp_offset": {
            "type": "number",
            "title": "Timestamp Offset",
            "description": "Seconds from the start of the session. Use this to line up with the recording."
          }
        },
        "type": "object",
        "required": [
          "role",
          "content",
          "timestamp_offset"
        ],
        "title": "TranscriptMessage",
        "description": "Single transcript entry as exposed by GET /v1/conversations/{id}/transcript."
      },
      "TranscriptResponse": {
        "properties": {
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id",
            "description": "Conversation the transcript is for."
          },
          "messages": {
            "items": {
              "$ref": "#/components/schemas/TranscriptMessage"
            },
            "type": "array",
            "title": "Messages",
            "description": "Entries ordered by `timestamp_offset`. Empty if nothing was said."
          }
        },
        "type": "object",
        "required": [
          "conversation_id",
          "messages"
        ],
        "title": "TranscriptResponse",
        "description": "A conversation's transcript, in the order it was spoken."
      },
      "TranscriptRoleEnum": {
        "type": "string",
        "enum": [
          "user",
          "avatar"
        ],
        "title": "TranscriptRoleEnum",
        "description": "Role as exposed in the transcript endpoint (avatar instead of assistant)."
      },
      "V1ConversationCreate": {
        "properties": {
          "avatar_id": {
            "type": "string",
            "format": "uuid",
            "title": "Avatar Id",
            "description": "ID of the avatar to converse with"
          },
          "title": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Title",
            "description": "Conversation title (auto-generated if omitted)"
          },
          "greeting": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 5000
              },
              {
                "type": "null"
              }
            ],
            "title": "Greeting",
            "description": "Opening line the avatar speaks first, before the user says anything. Spoken verbatim by the engine once the session is ready."
          },
          "end_user_id": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 128,
                "pattern": "^[^\\x00-\\x1f\\x7f]*$"
              },
              {
                "type": "null"
              }
            ],
            "title": "End User Id",
            "description": "Stable identifier for the person talking to the avatar, from your own system (a user id, a hashed email, a ticket id). Conversations that share an `end_user_id` share memory across sessions; omit it and this conversation gets its own isolated memory that no later conversation can see. Whitespace is trimmed; the prefix `anon:` is reserved; control characters are rejected. The response echoes the value actually stored."
          }
        },
        "type": "object",
        "required": [
          "avatar_id"
        ],
        "title": "V1ConversationCreate",
        "description": "Public-API create body: the dashboard schema plus the memory scope.\n\nOnly the API key route takes `end_user_id`. Dashboard sessions are\nalways the account owner's own scope, so `ConversationCreate` has no\nsuch field and a dashboard client sending one is ignored."
      },
      "V1ConversationCreatedResponse": {
        "properties": {
          "conversation_id": {
            "type": "string",
            "format": "uuid",
            "title": "Conversation Id",
            "description": "ID of the created conversation"
          },
          "end_user_id": {
            "type": "string",
            "title": "End User Id",
            "description": "Memory scope this conversation was stored under: the `end_user_id` you sent (trimmed), or `anon:<conversation_id>` if you sent none."
          },
          "conversation_url": {
            "type": "string",
            "title": "Conversation Url",
            "description": "Embed-enabled conversation URL (iframes the live avatar session). Expires once the session token does. Append `theme=light`, `hide_controls=true`, `thumbnail_url=` or the `show_*` overlay switches (`show_timer`, `show_resolution`, `show_signal` default on; `show_status`, `show_live` default off) to adjust the embed; pass the rest of the URL through unmodified."
          },
          "status": {
            "$ref": "#/components/schemas/ConversationStatusEnum",
            "description": "Lifecycle status of the conversation: active | ended"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At",
            "description": "When the conversation_url session token expires (UTC)"
          }
        },
        "type": "object",
        "required": [
          "conversation_id",
          "end_user_id",
          "conversation_url",
          "status",
          "expires_at"
        ],
        "title": "V1ConversationCreatedResponse",
        "description": "Everything needed to start a live session with an avatar.\n\nThe URL is embeddable as-is: put it in an iframe and the session runs there.\nIt carries a session token that expires, so mint it server-side when a user\nis about to start rather than caching it.",
        "example": {
          "conversation_id": "550e8400-e29b-41d4-a716-446655440000",
          "conversation_url": "https://www.goldenengine.ai/embed/c/550e8400-e29b-41d4-a716-446655440000?token=eyJhb...",
          "end_user_id": "cust-42",
          "expires_at": "2026-04-07T10:10:00Z",
          "status": "active"
        }
      },
      "V1MeResponse": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id",
            "description": "ID of the developer account the key belongs to"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Account email address; null if the account has none on record"
          }
        },
        "type": "object",
        "required": [
          "user_id"
        ],
        "title": "V1MeResponse",
        "description": "Identity behind the API key used for the request."
      },
      "VideoDownloadUrlResponse": {
        "properties": {
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Signed URL. Fetch it before it expires; do not store it."
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds the URL stays valid, from when it was issued.",
            "examples": [
              3600
            ]
          }
        },
        "type": "object",
        "required": [
          "url",
          "expires_in"
        ],
        "title": "VideoDownloadUrlResponse",
        "description": "A temporary link to an avatar's source video."
      },
      "VideoProgressResponse": {
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "uploading",
              "uploaded",
              "failed"
            ],
            "title": "Status",
            "description": "Upload state. `pending` on creation, then `uploading`, and finally `uploaded` or `failed`. Only `uploaded` videos can train an avatar.",
            "examples": [
              "uploading"
            ]
          },
          "upload_progress_percent": {
            "type": "integer",
            "title": "Upload Progress Percent",
            "description": "Bytes transferred so far, 0-100.",
            "examples": [
              64
            ]
          },
          "file_size_bytes": {
            "type": "integer",
            "title": "File Size Bytes",
            "description": "Size of the upload in bytes. 0 until it is known."
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "Signed preview image URL, once a frame has been extracted. Short-lived and regenerated on every read."
          }
        },
        "type": "object",
        "required": [
          "status",
          "upload_progress_percent",
          "file_size_bytes"
        ],
        "title": "VideoProgressResponse",
        "description": "How far along a video upload is."
      },
      "VideoResponse": {
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id",
            "description": "Unique identifier. This is the `video_id` you pass to `POST /v1/avatars`."
          },
          "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id",
            "description": "Account that uploaded the video."
          },
          "s3_key": {
            "type": "string",
            "title": "S3 Key",
            "description": "Internal storage key. Not fetchable directly — use `video_url` for a URL you can open."
          },
          "video_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Url",
            "description": "Signed URL to the uploaded file. Short-lived and regenerated on every read, so link to it rather than storing it. Null before the upload lands."
          },
          "thumbnail_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Thumbnail Url",
            "description": "Signed preview image URL, on the same short-lived terms as `video_url`."
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Name the file was uploaded under."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "uploading",
              "uploaded",
              "failed"
            ],
            "title": "Status",
            "description": "Upload state. `pending` on creation, then `uploading`, and finally `uploaded` or `failed`. Only `uploaded` videos can train an avatar.",
            "examples": [
              "uploaded"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At",
            "description": "When the video was uploaded."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "title": "Updated At",
            "description": "When its state last changed."
          }
        },
        "type": "object",
        "required": [
          "id",
          "user_id",
          "s3_key",
          "filename",
          "status",
          "created_at",
          "updated_at"
        ],
        "title": "VideoResponse",
        "description": "A source video uploaded for avatar training."
      },
      "VoiceDescription": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "Provider voice id; goes into avatar.voice_id"
          },
          "provider": {
            "$ref": "#/components/schemas/TTSProviderEnum",
            "description": "Provider that owns the voice. Must match the avatar's `tts_provider`."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Human-readable voice name."
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description",
            "description": "How the voice sounds."
          },
          "language": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Language",
            "description": "ISO-639 code, e.g. 'en'"
          },
          "gender": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Gender",
            "description": "'masculine' | 'feminine' (Cartesia), labels.gender (ElevenLabs) or 'male' | 'female' (Fish Audio tags)"
          },
          "accent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Accent",
            "description": "Accent label, where the provider reports one."
          },
          "category": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Category",
            "description": "ElevenLabs: 'premade' | 'professional'; Cartesia and Fish Audio account clones: 'cloned'; the caller's own csm voices: 'custom'"
          },
          "popularity": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Popularity",
            "description": "Cartesia popularity score"
          },
          "is_owned": {
            "type": "boolean",
            "title": "Is Owned",
            "description": "True for voices cloned on our provider account ('My voices')",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "id",
          "provider",
          "name"
        ],
        "title": "VoiceDescription",
        "description": "A single voice option the frontend can offer the user."
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Developer API key. Send it as the X-Api-Key header on every /v1/ request. Keys are created under /v1/api-keys and are prefixed sk_live_ or sk_test_ by environment."
      }
    }
  },
  "tags": [
    {
      "name": "Avatars",
      "description": "An avatar is a trained likeness: upload a source video, train on it, then hold conversations with the result.\n\nTraining is asynchronous. Creating an avatar returns immediately with status `pending`, moves through `queued` and `training`, and is only usable at `ready` (or `failed`). Poll `GET /v1/avatars/{avatar_id}/status` rather than assuming.\n\nStock avatars are pre-trained and ready to use straight away — start there if you only want to see a conversation work."
    },
    {
      "name": "Conversations",
      "description": "A conversation is one session with one avatar.\n\nCreating one returns a `conversation_url` to load in an iframe and a session token that expires quickly, so mint it server-side at the moment you need it rather than caching it. The transcript and the recording remain available after the session ends."
    },
    {
      "name": "Knowledge bank",
      "description": "Documents an avatar can draw on when it answers.\n\nTwo scopes share one store. Upload to the account bank and attach an item to whichever avatars should use it, or upload directly to a single avatar. Extraction runs asynchronously after upload, so a document is not retrievable the instant the request returns.\n\nAn item attached to no avatar is stored and searchable here, but no avatar will ever use it in a reply."
    },
    {
      "name": "Memory",
      "description": "What an avatar remembers about each of your end users, learned from finished conversations.\n\nMemory is scoped by the `end_user_id` you pass when creating a conversation. Read it to see what the avatar knows; delete a fact, a conversation summary or a whole end user to correct or forget it. Learned memory cannot be edited. Memory lands a few seconds after a conversation ends, and deleting it never deletes conversations or transcripts."
    },
    {
      "name": "Videos",
      "description": "Source footage for avatar training.\n\nUpload a video, wait for it to finish processing, then pass its `video_id` to `POST /v1/avatars`. One video can back more than one avatar."
    },
    {
      "name": "Models",
      "description": "The LLM, speech-to-text and text-to-speech engines an avatar can be configured with, and the voices available to it.\n\nRead-only, and the source of truth: the catalog changes without a release of these docs, so read it at runtime rather than hard-coding the options listed elsewhere."
    },
    {
      "name": "Account",
      "description": "Which account an API key belongs to. `GET /v1/me` doubles as a credential check — a 200 means the key is live and not revoked."
    }
  ],
  "servers": [
    {
      "url": "https://backend.goldenengine.ai"
    }
  ]
}
