---
# @generated by sylphx-gen 0.1.0 from contracts@a2fae12c0c5145b79e95827e3e70b57caffc9b10e04ab643baf17ab8dff51931. Do not edit.
title: "Mint env on a build cache"
description: "`build.build_caches.mint_env` (POST /v1/{name}:mintEnv): Mints the settings a build that runs elsewhere (a laptop, a CI runner) uses to reach the cache: the sccache, Turbo and crates mirror doors and a short-lived token, as environment…"
type: reference
product: builds
summary: "Mints the settings a build that runs elsewhere (a laptop, a CI runner) uses to reach the cache: the sccache, Turbo and crates mirror doors…"
updated: 2026-09-28
nav: false
---

Mints the settings a build that runs elsewhere (a laptop, a CI runner) uses to reach the cache: the sccache, Turbo and crates mirror doors and a short-lived token, as environment variables.

**Not available yet.** Sylphx Build is declared in the registry but no backend serves it: every call answers `501` with the problem code `UNIMPLEMENTED`.

- **Path** `POST https://api.sylphx.com/v1/orgs/acme/projects/shop/build_caches/build-cache:mintEnv`
- **Scope** `build:run`
- **Effect** `write` — a successful call changes state.
- **Collection** [build_caches](/docs/api/build_caches)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `name` | `string` | The name of the build cache. Required. |
| `access` | `BuildCacheAccess` | What the token may do; default READ. One of `read`, `read_write`. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `env` | `map<string, string>` | Environment variables by name: `SCCACHE_WEBDAV_ENDPOINT`, `SCCACHE_WEBDAV_TOKEN`, `TURBO_API`, `TURBO_TEAM`, `TURBO_TOKEN`, `SYLPHX_CRATES_MIRROR`. Never returned again. |
| `expire_time` | `timestamp` | When the token in `env` stops verifying. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.
- [`IDEMPOTENCY_KEY_REUSED`](/docs/api/errors/IDEMPOTENCY_KEY_REUSED) — An Idempotency-Key was reused with another body.
- [`IDEMPOTENCY_IN_PROGRESS`](/docs/api/errors/IDEMPOTENCY_IN_PROGRESS) — The first call with this Idempotency-Key is still running.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl -X POST "https://api.sylphx.com/v1/orgs/acme/projects/shop/build_caches/build-cache:mintEnv" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

**TypeScript**

```ts
const response = await sylphx.build.buildCaches.mintEnv({ name: 'orgs/acme/projects/shop/build_caches/build-cache' })
```

**Rust**

```rust
let mut req = sylphx::build::MintBuildCacheEnvRequest::default();
req.name = "orgs/acme/projects/shop/build_caches/build-cache".to_string();
let response = sx.build().build_caches().mint_env(req).await?;
```

**CLI**

```bash
sylphx build build-caches mint-env orgs/acme/projects/shop/build_caches/build-cache
```

**MCP**

```json
{ "method_id": "build.build_caches.mint_env", "args": {"name":"orgs/acme/projects/shop/build_caches/build-cache"} }
```
