# Post Seal Blob

Encrypts a hex-encoded transaction or plaintext with the supplied public key and returns a hex-encoded sealed blob.

_Source: https://beta.taostats.io/docs/api-reference/seal-blob/post-seal-blob_

_Last reviewed: 2026-09-18_

```http
POST https://api.taostats.io/api/seal_blob/v1
```

Requires an API key in the `Authorization` header.

Encrypts a hex-encoded transaction or plaintext with the supplied public key and returns a hex-encoded sealed blob. Supply `pk_hex` and `tx_hex` in the JSON body. Sealing uses ML-KEM-768 and XChaCha20-Poly1305; this endpoint does not submit the transaction.

## Code samples

**cURL**

```bash
curl -X POST \
  -H "Authorization: <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "pk_hex": "string",
    "tx_hex": "string"
  }' \
  "https://api.taostats.io/api/seal_blob/v1"
```

**JavaScript**

```js
const response = await fetch('https://api.taostats.io/api/seal_blob/v1', {
  method: 'POST',
  headers: {
    Authorization: '<YOUR_API_KEY>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "pk_hex": "string",
    "tx_hex": "string"
  }),
});
const data = await response.json();
```

**Python**

```python
import requests

response = requests.post(
    "https://api.taostats.io/api/seal_blob/v1",
    headers={"Authorization": "<YOUR_API_KEY>"},
    json={
      "pk_hex": "string",
      "tx_hex": "string"
    },
)
data = response.json()
```

## Parameters

_No parameters._

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `pk_hex` | `string` | Yes | Public key in hex format |
| `tx_hex` | `string` | Yes | Transaction/plaintext in hex format |

```json
{
  "pk_hex": "string",
  "tx_hex": "string"
}
```

## Responses

### `200` — Blob encrypted successfully

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `ciphertext_hex` | `string` | Yes | Encrypted blob in hex format |

### Other responses

| Status | Meaning |
| --- | --- |
| `400` | Bad request - invalid hex or key format |
| `500` | Internal server error |

Every request needs an `Authorization` header holding your API key — see [Getting started with the Taostats API](https://beta.taostats.io/docs/start-here/getting-started-with-taostats-api).
