---
# @generated by sylphx-gen 0.1.0 from contracts@e145cc7cf1bc9605f2b27439e5e17ed76a1a2fd7e7021906a013f7565e4a0cd5. Do not edit.
title: "Lock an asset"
description: "`assets.assets.lock` (POST /v1/{parent}/assets:lock): Returns the `assets.lock` entries and canonical text for the keys the call names, and only those."
type: reference
product: assets
summary: "Returns the `assets.lock` entries and canonical text for the keys the call names, and only those."
updated: 2026-09-28
nav: false
---

> **This method is not served on the public API.** `api.sylphx.com` does not route this call: its backend is not deployed behind the public API, or does not implement the call. This page documents the contract. It is kept out of the sidebar and of search engines.

Returns the `assets.lock` entries and canonical text for the keys the call names, and only those. A read with a request body, like a query.

**Not available yet.** Sylphx Generated Assets 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/envs/production/assets:lock`
- **Scope** `assets:read`
- **Effect** `read` — nothing is written.
- **Collection** [assets](/docs/api/assets)

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `parent` | `string` | The environment to read from. Required. |
| `keys` | `string[]` | The logical keys the code declares, 1 to 5000, each 16 lowercase hex characters. The lock holds only these, so a removed recipe drops out. Required. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `entries` | `LockEntry[]` | The lock entries of the keys that have a complete record, sorted by key. |
| `missing` | `string[]` | Keys with no record. |
| `incomplete` | `string[]` | Keys whose stored variants are fewer than wanted, or whose state is neither ready nor approved. |
| `content` | `string` | The canonical `assets.lock` text, version 1. |

### LockEntry

| Field | Type | What it is |
| --- | --- | --- |
| `key` | `string` | The logical key. Output only. |
| `kind` | `AssetKind` | What kind of asset this is. Output only. One of `image`, `sfx`, `music`, `video`, `character`, `voice`. |
| `seed` | `string` | The seed, a decimal integer as a string. Output only. |
| `variants` | `LockVariant[]` | The variants, ordered by slot. Output only. |

### LockVariant

| Field | Type | What it is |
| --- | --- | --- |
| `content_hash` | `string` | The SHA-256 of the file's bytes, 64 lowercase hex characters. Output only. |
| `ext` | `string` | The file's extension without the dot. Output only. |
| `media_type` | `string` | The file's media type. Output only. |
| `width` | `int32` | Width in pixels. Output only. |
| `height` | `int32` | Height in pixels. Output only. |
| `bytes` | `int64` | The file's size in bytes. Output only. |
| `model` | `string` | The model that made this variant. Output only. |
| `approved_by` | `string` | The principal that approved the variant; empty when unreviewed. Output only. |

## 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.
- [`INVALID_FIELD`](/docs/api/errors/INVALID_FIELD) — A field failed validation.

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/envs/production/assets:lock" \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keys":["…"]}'
```

**TypeScript**

```ts
const response = await sylphx.assets.assets.lock({ keys: ['…'], parent: 'orgs/acme/projects/shop/envs/production' })
```

**Rust**

```rust
let mut req = sylphx::assets::LockAssetsRequest::default();
req.keys = vec!["…".to_string()];
req.parent = "orgs/acme/projects/shop/envs/production".to_string();
let response = sx.assets().assets().lock(req).await?;
```

**CLI**

```bash
sylphx assets assets lock orgs/acme/projects/shop/envs/production
```

**MCP**

```json
{ "method_id": "assets.assets.lock", "args": {"keys":["…"],"parent":"orgs/acme/projects/shop/envs/production"} }
```
