> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pipecat.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Build Logs

> Retrieve the logs for a specific build

## Streaming Logs During Build

You can poll this endpoint during a build to stream logs in real-time. The endpoint returns the latest logs each time you call it:

```bash theme={null}
BUILD_ID="123e4567-e89b-12d3-a456-426614174000"

while true; do
  RESPONSE=$(curl -s "https://api.pipecat.daily.co/v1/builds/$BUILD_ID/logs?limit=100" \
    -H "Authorization: Bearer $PIPECAT_API_KEY")

  echo "$RESPONSE" | jq -r '.logs[]'

  # Check if build is still in progress
  BUILD_STATUS=$(curl -s "https://api.pipecat.daily.co/v1/builds/$BUILD_ID" \
    -H "Authorization: Bearer $PIPECAT_API_KEY" | jq -r '.build.status')

  if [[ "$BUILD_STATUS" == "success" || "$BUILD_STATUS" == "failed" || "$BUILD_STATUS" == "timeout" ]]; then
    echo "Build finished with status: $BUILD_STATUS"
    break
  fi

  sleep 5
done
```

## Pagination

Use the `limit` query parameter to control how many log lines are returned:

| Parameter | Default | Min | Max    | Description                    |
| --------- | ------- | --- | ------ | ------------------------------ |
| `limit`   | 500     | 1   | 10,000 | Number of log events to return |

<Note>
  Logs may be empty if the build was just created and hasn't started executing yet. Continue polling until logs appear or the build completes.
</Note>

## Debugging Failed Builds

When a build fails, use this endpoint to diagnose the issue:

```bash theme={null}
BUILD_ID="123e4567-e89b-12d3-a456-426614174000"

# Get the full build logs
curl -s "https://api.pipecat.daily.co/v1/builds/$BUILD_ID/logs?limit=10000" \
  -H "Authorization: Bearer $PIPECAT_API_KEY" | jq -r '.logs[]'
```

Common issues visible in build logs include:

* Missing dependencies in `requirements.txt`
* Dockerfile syntax errors
* Failed `pip install` commands
* Missing files referenced in `COPY` instructions


## OpenAPI

````yaml GET /builds/{buildId}/logs
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
security:
  - BearerAuth: []
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
      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'
      security:
        - BearerAuth: []
components:
  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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Authentication using a Pipecat Cloud API token.

````