# Upload assets Upload owned image, video, and audio references. ## POST /api/generate/assets Requires **generate** scope. Send raw file bytes with the matching media `Content-Type`. This is not multipart upload. Optional `X-Filename` records the original name, truncated to 255 characters. Maximum size is 30 MiB (30 × 1024 × 1024 bytes); specific workflows can impose lower limits. ```bash curl https://letsgen.app/api/generate/assets \ -H "Authorization: Bearer $LETSGEN_API_KEY" \ -H 'Content-Type: image/png' \ -H 'X-Filename: reference.png' \ --data-binary @reference.png ``` The declared type must be an image, video, or audio type supported by the canonical media validation. An accepted upload returns HTTP `201`: ```json { "asset": { "id": "asset_example", "kind": "image", "state": "ready", "url": "https://CURRENT_ASSET_URL" } } ``` Use the asset **ID**, not its URL, as a generation reference. Check readiness before using a file; the URL can be null. Uploading bytes does not start media generation and does not authorize publishing. Ownership and media validation still apply. This upload endpoint has no idempotency guarantee. Do not blindly repeat an ambiguous upload. Voice reference recordings use the separate multipart [voice upload](/docs/api/voices), which also transcribes the reference.