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

# Template build status

> Get template build info



## OpenAPI

````yaml /api-reference/e2b-openapi.yaml get /templates/{templateID}/builds/{buildID}/status
openapi: 3.0.0
info:
  title: Anona Compute API (E2B-compatible routes)
  version: 0.1.0
  description: >-
    The E2B-compatible API operations the Anona Compute gateway serves, for use
    with the E2B SDK.
servers:
  - url: https://api.compute.anonalabs.com
security: []
tags:
  - name: sandboxes
paths:
  /templates/{templateID}/builds/{buildID}/status:
    get:
      tags:
        - templates
      summary: Template build status
      description: Get template build info
      parameters:
        - $ref: '#/components/parameters/templateID'
        - $ref: '#/components/parameters/buildID'
        - in: query
          name: logsOffset
          schema:
            default: 0
            type: integer
            format: int32
            minimum: 0
          description: >-
            Index of the starting build log that should be returned with the
            template
        - in: query
          name: limit
          schema:
            default: 100
            type: integer
            format: int32
            minimum: 0
            maximum: 100
          description: Maximum number of logs that should be returned
        - in: query
          name: level
          schema:
            $ref: '#/components/schemas/LogLevel'
      responses:
        '200':
          description: Successfully returned the template
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateBuildInfo'
        '401':
          $ref: '#/components/responses/401'
        '404':
          $ref: '#/components/responses/404'
        '429':
          $ref: '#/components/responses/429'
        '500':
          $ref: '#/components/responses/500'
      security:
        - ApiKeyAuth: []
components:
  parameters:
    templateID:
      name: templateID
      in: path
      required: true
      schema:
        type: string
    buildID:
      name: buildID
      in: path
      required: true
      schema:
        type: string
  schemas:
    LogLevel:
      type: string
      description: State of the sandbox
      enum:
        - debug
        - info
        - warn
        - error
    TemplateBuildInfo:
      required:
        - templateID
        - buildID
        - status
        - logs
        - logEntries
      properties:
        logs:
          default: []
          deprecated: true
          description: >-
            Build logs (always empty since the V1 build path was removed, use
            logEntries)
          type: array
          items:
            type: string
        logEntries:
          default: []
          description: Build logs structured
          type: array
          items:
            $ref: '#/components/schemas/BuildLogEntry'
        templateID:
          type: string
          description: Identifier of the template
        buildID:
          type: string
          description: Identifier of the build
        status:
          $ref: '#/components/schemas/TemplateBuildStatus'
        reason:
          $ref: '#/components/schemas/BuildStatusReason'
    BuildLogEntry:
      required:
        - timestamp
        - message
        - level
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the log entry
        message:
          type: string
          description: Log message content
        level:
          $ref: '#/components/schemas/LogLevel'
        step:
          type: string
          description: Step in the build process related to the log entry
    TemplateBuildStatus:
      type: string
      description: Status of the template build
      enum:
        - building
        - waiting
        - ready
        - error
    BuildStatusReason:
      required:
        - message
      properties:
        message:
          type: string
          description: >-
            Message with the status reason, currently reporting only for error
            status
        step:
          type: string
          description: Step that failed
        logEntries:
          default: []
          description: Log entries related to the status reason
          type: array
          items:
            $ref: '#/components/schemas/BuildLogEntry'
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        error_code:
          type: string
          description: >-
            Machine-readable error code. Not a closed set; the gateway sends
            plan_limit_exceeded (a plan limit; the body also has limit_name,
            limit, current and plan), rate_limited (a rate limit, with
            Retry-After), sandbox_quota_exceeded (a platform cap that is not a
            plan limit: fork checkpoints, builds in progress), credit_exhausted
            (the credit is spent), sandbox_snapshot_storage_full (pause and fork
            cannot store a snapshot; retrying does not help),
            template_not_found, template_not_ready (the template exists but
            cannot start a sandbox), sandbox_capacity_unavailable,
            sandbox_engine_starting and sandbox_engine_unavailable (retry after
            Retry-After), sandbox_create_failed (retry), sandbox_create_refused,
            invalid_request and internal_server_error.
        message:
          type: string
          description: Error
  responses:
    '401':
      description: Authentication error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '404':
      description: Not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '429':
      description: Too many requests
      headers:
        Retry-After:
          description: >-
            When present, the number of seconds to wait before retrying the
            request.
          required: false
          schema:
            type: integer
            minimum: 0
          example: 30
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '500':
      description: Server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.