---
title: "Internal Store Media"
method: POST
path: "/v1/internal/store-media"
---

# Internal Store Media

`POST /v1/internal/store-media`

## Request

- Base URL: `https://api.empiriolabs.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.empiriolabs.ai/v1/internal/store-media`
- Auth: none declared
- TypeScript: <https://skmtc.dev/empiriolabs/apis/empiriolabs-gateway/docs/v1/internal/store-media/post.ts> (a function with typed inputs; its response is checked against the schema)

Workers call this over the Railway private mesh to upload bytes
into Bunny without holding Bunny credentials themselves. Returns the
same shape store_generated_content_bytes returns (file_id, url, path,
expires_at, content_type) so worker code can drop in directly.

Body is raw bytes. Headers carry the metadata:
  X-Internal-Secret  shared secret (same as worker auth)
  Content-Type       media content type (image/png, video/mp4, ...)
  X-Worker-Name      origin worker for log attribution (optional)
  X-Storage-Folder   worker-outputs (default) or user-uploads

Consolidating uploads here means BUNNY_STORAGE_ACCESS_KEY +
BUNNY_TOKEN_SECURITY_KEY only need to live on the gateway, not on
every media worker — single rotation surface, single audit trail,
single TTL clamp pulled from system_config.

## Response `200`

Successful Response

- unknown

---

[API](https://skmtc.dev/empiriolabs/apis/empiriolabs-gateway.md) - [All operations](https://skmtc.dev/empiriolabs/apis/empiriolabs-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/empiriolabs/apis/empiriolabs-gateway/revisions/94bb966b0560?raw)
