{
  "openapi": "3.0.0",
  "info": {
    "title": "Pipecat Cloud",
    "version": "1.0.0",
    "description": "Public API for Pipecat Cloud services"
  },
  "servers": [
    {
      "url": "https://api.pipecat.daily.co/v1",
      "description": "API server"
    }
  ],
  "paths": {
    "/builds/{buildId}/logs": {
      "get": {
        "summary": "Get build logs",
        "description": "Retrieve the logs for a specific build. Returns log lines from the build process, useful for monitoring progress or debugging failures.",
        "operationId": "getBuildLogs",
        "security": [
          {
            "BearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "description": "Unique identifier of the build.",
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Maximum number of log events to return.",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000,
              "default": 500
            },
            "example": 500
          }
        ],
        "responses": {
          "200": {
            "description": "Build logs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetBuildLogsResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid build ID format or invalid query parameters",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Build not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authentication using a Pipecat Cloud API token."
      }
    },
    "schemas": {
      "GetBuildLogsResponse": {
        "type": "object",
        "properties": {
          "logs": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Array of log lines from the build process. May be empty if the build hasn't started generating logs yet.",
            "example": [
              "[Container] 2026/03/04 10:00:00 Entering phase: INSTALL",
              "[Container] 2026/03/04 10:00:01 Running command pip install -r requirements.txt",
              "[Container] 2026/03/04 10:00:05 Successfully installed pipecat-ai-0.1.0"
            ]
          },
          "nextToken": {
            "type": "string",
            "description": "Pagination token for retrieving additional logs. Present when more logs are available.",
            "example": "eyJuZXh0VG9rZW4iOiAiYWJjMTIzIn0="
          }
        },
        "required": [
          "logs"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "description": "Error message"
          },
          "code": {
            "type": "string",
            "description": "Error code"
          }
        }
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ]
}