{
  "openapi": "3.1.0",
  "info": {
    "title": "Seminara Agentic API",
    "version": "1.0.0",
    "description": "API for external AI agents to manage Seminara sessions on behalf of users."
  },
  "servers": [
    {
      "url": "https://seminara.online"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "User's Seminara API Key. E.g., Bearer sk_live_..."
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/api/v1/agent/sessions": {
      "post": {
        "summary": "Create a new presentation session",
        "operationId": "createSession",
        "description": "Creates a new Seminara session on behalf of the user and returns the shareable join link.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": ["title"],
                "properties": {
                  "title": {
                    "type": "string",
                    "description": "The title of the presentation session."
                  },
                  "description": {
                    "type": "string",
                    "description": "A description of what the session is about."
                  },
                  "mode": {
                    "type": "string",
                    "enum": ["isolated", "broadcast"],
                    "default": "isolated",
                    "description": "The mode of the session. Isolated means one-on-one. Broadcast means one-to-many."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Session created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionId": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "slug": {
                      "type": "string"
                    },
                    "shareLink": {
                      "type": "string",
                      "format": "uri",
                      "description": "The absolute URL to share with attendees (e.g., https://seminara.online/join/slug-here)"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. Invalid or missing API Key."
          },
          "402": {
            "description": "Payment Required. User has exceeded their session creation quota."
          }
        }
      }
    }
  }
}
