---
title: "Upload Build Context"
method: POST
path: "/build-contexts"
tags: ["Support API Key Authentication"]
---

# Upload Build Context

`POST /build-contexts`

## Request

- Base URL: `https://lium.io/api`
- URL: `https://lium.io/api/build-contexts`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Upload the build context of a custom-Dockerfile rent: a gzipped tar as the raw request body.

Rent with `dockerfile_content` and the returned `sha256` as `build_context_sha256`. The archive is kept for a
limited time, so upload it right before the rent.

## Response `201`

Successful Response

- BuildContextUploadResponse
  - `sha256` string, required
  - `size_bytes` integer, required

## Changes

- **2026-10-21** `50ab46bcf4ac`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/lium/apis/lium-backend-api/changes/build-contexts/post.md)

---

[API](https://skmtc.dev/lium/apis/lium-backend-api.md) · [All operations](https://skmtc.dev/lium/apis/lium-backend-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lium/apis/lium-backend-api/revisions/5656250194ce?raw)
