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

# Template build file upload URL

> Get an upload link for a tar file containing build layer files



## OpenAPI

````yaml /compute/api-reference/e2b-openapi.yaml get /templates/{templateID}/files/{hash}
openapi: 3.0.0
info:
  title: Anona Compute API (E2B-compatible routes)
  version: 0.1.0
  description: >-
    The E2B API operations the Anona Compute gateway serves, from the E2B spec
    pinned at e2b SDK 2.61.0 (`gateway/third_party/specs/e2b/openapi.yml`).
    Generated by `docs-site/scripts/gen_e2b_openapi.py`; do not edit by hand.
servers:
  - url: https://api.compute.anonalabs.com
security: []
tags:
  - name: sandboxes
paths:
  /templates/{templateID}/files/{hash}:
    get:
      tags:
        - templates
      summary: Template build file upload URL
      description: Get an upload link for a tar file containing build layer files
      parameters:
        - $ref: '#/components/parameters/templateID'
        - in: path
          name: hash
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{64}$
            description: Hash of the files (lowercase hex SHA-256)
      responses:
        '201':
          description: The upload link where to upload the tar file
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateBuildFileUpload'
        '400':
          $ref: '#/components/responses/400'
        '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
  schemas:
    TemplateBuildFileUpload:
      required:
        - present
      properties:
        present:
          type: boolean
          description: Whether the file is already present in the cache
        url:
          description: Url where the file should be uploaded to
          type: string
        headers:
          description: Request headers that must be sent with the upload request
          type: object
          additionalProperties:
            type: string
    Error:
      required:
        - code
        - message
      properties:
        code:
          type: integer
          format: int32
          description: Error code
        error_code:
          type: string
          description: >-
            Machine-readable semantic error code. Not a closed set; initial
            values: sandbox_capacity_unavailable, sandbox_placement_timeout,
            sandbox_no_compatible_node, sandbox_create_failed (a node could not
            create the sandbox this time; retry), sandbox_create_refused (a node
            refused the sandbox for a reason no retry changes, such as a vcpu
            count out of bounds in the stored build; a server error, since no
            request field reaches that check), internal_server_error,
            secret_limit_reached, idempotency_request_mismatch,
            idempotency_in_progress, idempotency_outcome_unknown.
        message:
          type: string
          description: Error
  responses:
    '400':
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    '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.