Build a time-limited link for private media with client.signed_url().
Files in a signed folder can only be fetched with a link that carries an expiry time
(exp) and an HMAC-SHA256 signature (sig). signed_url() builds that link locally — no
network call, no API key in the result.
client = Dreep(signing_secret="...") # or set DREEP_SIGNING_SECRETlink = client.signed_url(asset, expires_in=3600)# https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b.png?exp=1774003600&sig=6b10e0…
Required. The asset itself — its id is what gets signed
expires_in
int | timedelta
Required. Seconds, or a timedelta, until the link stops working
transform
Transform
A transform to apply. Not covered by the signature
from datetime import timedeltaclient.signed_url(asset, expires_in=timedelta(minutes=15))client.signed_url(asset, expires_in=3600, transform={"width": 400, "format": "webp"})
Unlike url(), this needs the asset, not just its URL: the
signature is computed over the asset’s id.
What is signed
The signature covers the asset id and the expiry time — HMAC-SHA256 over "{id}:{exp}" —
and nothing else. One signed link can therefore be resized by a frontend (&width=…)
without being signed again.Once the link expires, or if anyone edits exp or sig, the API answers 401.
A signed URL is a bearer token. Anyone holding it can fetch the file until it expires,
with no API key. Keep expiry times short.
Access control is set on folders
Access control is set on top-level folders and inherited by everything beneath them.
Create the signed folder first, then upload under it:
Calling it without a signing secret raises DreepError — the SDK has nothing to sign with.
Set signing_secret on the client, or the DREEP_SIGNING_SECRET environment variable; it
is on the API Keys page of your dashboard.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Dreep API Documentation","colors":{"primary":"#10B981","light":"#34D399","dark":"#059669"},"logo":{"light":"https://mintcdn.com/dreep/B5OflqGFw_jNEs7c/logo/light.svg?fit=max\u0026auto=format\u0026n=B5OflqGFw_jNEs7c\u0026q=85\u0026s=17d21f346b62521c576a44e667803e4b","dark":"https://mintcdn.com/dreep/B5OflqGFw_jNEs7c/logo/dark.svg?fit=max\u0026auto=format\u0026n=B5OflqGFw_jNEs7c\u0026q=85\u0026s=df259f51557b6b7e99e6d7ea6a7766e8"},"favicon":"https://mintcdn.com/dreep/8uHSPvhv7SPM0QJk/favicon.ico?fit=max\u0026auto=format\u0026n=8uHSPvhv7SPM0QJk\u0026q=85\u0026s=77d50b88312fb792ec51954806d22ec7","api":{"openapi":"openapi.yaml","playground":{"display":"interactive","proxy":false}},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Website","href":"https://dreep.cloud"}},"contextual":{"options":["copy","view"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dreep","hasAudioNarration":false,"actualSubdomain":"dreep","customDomains":["docs.dreep.cloud"],"gitSource":{"type":"github","owner":"indigosoftwares21","repo":"dreep_docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6b10f6e89ffae5051c419d2b"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6b135966151e8e3916c8feb4","clientVersion":"0.0.4453","searchFilterCounts":[{"language":"default","tag":"Guides","count":28},{"language":"default","tag":"Node SDK","count":28},{"language":"default","tag":"API Reference","count":24},{"language":"default","tag":"Python SDK","count":20},{"language":"default","tag":"Media","count":19},{"language":"default","tag":"Go SDK","count":18},{"language":"default","tag":"Presets","count":12},{"language":"default","tag":"Upload","count":12},{"language":"default","tag":"Image Tags","count":10},{"language":"default","tag":"Folders","count":8}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"auth-vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"python-sdk/media/signed-url","slug":"/python-sdk/media/signed-url","pageMetadata":{"title":"Signed URLs","description":"Build a time-limited link for private media with client.signed_url().","href":"/python-sdk/media/signed-url"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Build a time-limited link for private media with client.signed_url().\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Files in a `,_jsx(_components.strong,{children:`signed`}),` folder can only be fetched with a link that carries an expiry time\n(`,_jsx(_components.code,{children:`exp`}),`) and an HMAC-SHA256 signature (`,_jsx(_components.code,{children:`sig`}),`). `,_jsx(_components.code,{children:`signed_url()`}),` builds that link locally — no\nnetwork call, no API key in the result.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` Dreep(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`signing_secret`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# or set DREEP_SIGNING_SECRET`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`link `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.signed_url(asset, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`expires_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# https://cdn.dreep.cloud/api/v1/fetch/2f928a3f-1d2a-4a2b.png?exp=1774003600\u0026sig=6b10e0…`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`signature`,children:`Signature`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.signed_url(asset, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`*`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, expires_in, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`transform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#82071E`,\"--shiki-light-font-style\":`italic`,\"--shiki-dark\":`#F44747`,\"--shiki-dark-font-style\":`inherit`},children:`->`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` str`})]}),`\n`]})})}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{style:{textAlign:`left`},children:`Parameter`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Type`}),_jsx(_components.th,{style:{textAlign:`left`},children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`asset`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`AssetLike`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`Required.`}),` The asset itself — its `,_jsx(_components.code,{children:`id`}),` is what gets signed`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`expires_in`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`int | timedelta`})}),_jsxs(_components.td,{style:{textAlign:`left`},children:[_jsx(_components.strong,{children:`Required.`}),` Seconds, or a `,_jsx(_components.code,{children:`timedelta`}),`, until the link stops working`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`transform`})}),_jsx(_components.td,{style:{textAlign:`left`},children:_jsx(_components.code,{children:`Transform`})}),_jsx(_components.td,{style:{textAlign:`left`},children:`A transform to apply. Not covered by the signature`})]})]})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` datetime `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` timedelta`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.signed_url(asset, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`expires_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`timedelta(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`minutes`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`15`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.signed_url(asset, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`expires_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`transform`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"width\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`400`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"webp\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Unlike `,_jsx(_components.a,{href:`/python-sdk/media/build-url`,children:_jsx(_components.code,{children:`url()`})}),`, this needs the asset, not just its URL: the\nsignature is computed over the asset’s id.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-is-signed`,children:`What is signed`}),`\n`,_jsxs(_components.p,{children:[`The signature covers the asset id and the expiry time — `,_jsx(_components.code,{children:`HMAC-SHA256`}),` over `,_jsx(_components.code,{children:`\"{id}:{exp}\"`}),` —\nand nothing else. One signed link can therefore be resized by a frontend (`,_jsx(_components.code,{children:`\u0026width=…`}),`)\nwithout being signed again.`]}),`\n`,_jsxs(_components.p,{children:[`Once the link expires, or if anyone edits `,_jsx(_components.code,{children:`exp`}),` or `,_jsx(_components.code,{children:`sig`}),`, the API answers `,_jsx(_components.code,{children:`401`}),`.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`A signed URL is a bearer token. Anyone holding it can fetch the file until it expires,\nwith no API key. Keep expiry times short.`})}),`\n`,_jsx(Heading,{level:`2`,id:`access-control-is-set-on-folders`,children:`Access control is set on folders`}),`\n`,_jsxs(_components.p,{children:[`Access control is set on `,_jsx(_components.strong,{children:`top-level folders`}),` and inherited by everything beneath them.\nCreate the signed folder first, then upload under it:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.create_folder(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`name`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"premium\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`access_control_type`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"signed\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asset `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.upload(Path(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"lesson.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`), `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"premium/course-1/lesson-1.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client.signed_url(asset, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`expires_in`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3600`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/security/private-media`,children:`Private media`}),` and `,_jsx(_components.a,{href:`/security/signed-urls`,children:`Signed URLs`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`errors`,children:`Errors`}),`\n`,_jsxs(_components.p,{children:[`Calling it without a signing secret raises `,_jsx(_components.code,{children:`DreepError`}),` — the SDK has nothing to sign with.\nSet `,_jsx(_components.code,{children:`signing_secret`}),` on the client, or the `,_jsx(_components.code,{children:`DREEP_SIGNING_SECRET`}),` environment variable; it\nis on the `,_jsx(_components.strong,{children:`API Keys`}),` page of your dashboard.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Signed URLs","description":"Build a time-limited link for private media with client.signed_url().","href":"/python-sdk/media/signed-url"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Signature","slug":"signature","depth":2,"children":[]},{"title":"What is signed","slug":"what-is-signed","depth":2,"children":[]},{"title":"Access control is set on folders","slug":"access-control-is-set-on-folders","depth":2,"children":[]},{"title":"Errors","slug":"errors","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dreep/94f2727abcb3c306/update_openapi.js"],"subdomain":"dreep","siteName":"Dreep API Documentation","title":"Signed URLs - Dreep API Documentation","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-19T08:05:46.911Z","originalFileLocation":"python-sdk/media/signed-url.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Build a time-limited link for private media with client.signed_url().\">\u003cmeta data-mint-head name=\"application-name\" content=\"Dreep API Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Signed URLs - Dreep API Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Build a time-limited link for private media with client.signed_url().\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Dreep API Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.dreep.cloud/python-sdk/media/signed-url\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dreep.mintlify.site/_mintlify/api/og/v2?division=Media\u0026amp;title=Signed+URLs\u0026amp;description=Build+a+time-limited+link+for+private+media+with+client.signed_url%28%29.\u0026amp;theme=9c1bcf76cf08ac46df0f4cfe\u0026amp;signature=581b904a5a3ea7cf950ecfba8a726875375f570b7c8d6ec5a138a041476e5d68\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Signed URLs - Dreep API Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Build a time-limited link for private media with client.signed_url().\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dreep.mintlify.site/_mintlify/api/og/v2?division=Media\u0026amp;title=Signed+URLs\u0026amp;description=Build+a+time-limited+link+for+private+media+with+client.signed_url%28%29.\u0026amp;theme=9c1bcf76cf08ac46df0f4cfe\u0026amp;signature=581b904a5a3ea7cf950ecfba8a726875375f570b7c8d6ec5a138a041476e5d68\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/dreep/J4ca-p5ijThJrjBG/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Dreep API Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#10B981\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.dreep.cloud/python-sdk/media/signed-url\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/python-sdk/media/signed-url.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.dreep.cloud/#organization\",\"name\":\"Dreep API Documentation\",\"url\":\"https://docs.dreep.cloud\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dreep/B5OflqGFw_jNEs7c/logo/light.svg?fit=max\u0026auto=format\u0026n=B5OflqGFw_jNEs7c\u0026q=85\u0026s=17d21f346b62521c576a44e667803e4b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.dreep.cloud#website\",\"name\":\"Dreep API Documentation\",\"url\":\"https://docs.dreep.cloud\",\"publisher\":{\"@id\":\"https://docs.dreep.cloud/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.dreep.cloud/python-sdk/media/signed-url#webpage\",\"url\":\"https://docs.dreep.cloud/python-sdk/media/signed-url\",\"name\":\"Signed URLs\",\"description\":\"Build a time-limited link for private media with client.signed_url().\",\"dateModified\":\"2026-11-19T08:05:46.911Z\",\"isPartOf\":{\"@id\":\"https://docs.dreep.cloud#website\"},\"breadcrumb\":{\"@id\":\"https://docs.dreep.cloud/python-sdk/media/signed-url#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.dreep.cloud/python-sdk/media/signed-url#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Media\",\"item\":\"https://docs.dreep.cloud/python-sdk/media/build-url\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Signed URLs\",\"item\":\"https://docs.dreep.cloud/python-sdk/media/signed-url\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.dreep.cloud/python-sdk/media/signed-url#article\",\"headline\":\"Signed URLs\",\"name\":\"Signed URLs\",\"description\":\"Build a time-limited link for private media with client.signed_url().\",\"url\":\"https://docs.dreep.cloud/python-sdk/media/signed-url\",\"mainEntityOfPage\":{\"@id\":\"https://docs.dreep.cloud/python-sdk/media/signed-url#webpage\"},\"dateModified\":\"2026-11-19T08:05:46.911Z\",\"publisher\":{\"@id\":\"https://docs.dreep.cloud/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.dreep.cloud#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Dreep API Documentation\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Dreep API Documentation\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/python-sdk/media/signed-url.md","siteName":"Dreep API Documentation","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/upload/upload-media"}]},{"tab":"Node SDK","pages":[{"title":"Node SDK","href":"/node-sdk/introduction"}]},{"tab":"Python SDK","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Introduction","href":"/python-sdk/introduction"}]},{"group":"Upload","icon":"cloud-arrow-up","pages":[{"title":"Upload Media","href":"/python-sdk/upload/upload-media"},{"title":"Presigned Uploads","href":"/python-sdk/upload/create-presigned-upload"},{"title":"Confirm Upload","href":"/python-sdk/upload/confirm-upload"}]},{"group":"OCR","icon":"text-size","pages":[{"title":"Extract Text (OCR)","href":"/python-sdk/ocr/extract-text"}]},{"group":"Background Removal","icon":"eraser","pages":[{"title":"Remove Background","href":"/python-sdk/bg-remove/remove-background"}]},{"group":"Documents","icon":"file-lines","pages":[{"title":"Convert Document","href":"/python-sdk/documents/convert-document"}]},{"group":"Media","icon":"image","pages":[{"title":"Delivery URLs","description":"Transform an asset at delivery time with client.url().","href":"/python-sdk/media/build-url"},{"title":"Signed URLs","href":"/python-sdk/media/signed-url"},{"title":"List Media","description":"List one page of assets with client.list_media().","href":"/python-sdk/media/list-media"},{"title":"List All Media","href":"/python-sdk/media/list-all-media"},{"title":"Delete Media","href":"/python-sdk/media/delete-media"}]},{"group":"Folders","icon":"folder","pages":[{"title":"Create Folder","href":"/python-sdk/folders/create-folder"},{"title":"List Folders","href":"/python-sdk/folders/list-folders"}]},{"group":"Presets","icon":"sliders","pages":[{"title":"Create Preset","href":"/python-sdk/presets/create-preset"},{"title":"List Presets","href":"/python-sdk/presets/list-presets"},{"title":"Delete Preset","href":"/python-sdk/presets/delete-preset"}]},{"group":"Usage \u0026 Billing","icon":"chart-simple","pages":[{"title":"Get Usage","href":"/python-sdk/usage/get-usage"}]},{"group":"Reference","icon":"triangle-exclamation","pages":[{"title":"Async Client","href":"/python-sdk/async"},{"title":"Errors \u0026 Retries","href":"/python-sdk/errors"}]}]},{"tab":"Go SDK","pages":[{"title":"Go SDK","href":"/go-sdk/introduction"}]},{"tab":"MCP Server","pages":[{"title":"MCP Server","href":"/mcp/introduction"}]}]},"basePath":"","title":"Signed URLs - Dreep API Documentation","deploymentId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","buildId":"dpl_BLZw3QngerHodH9E8mGgC4v752y3","dynamics":[],"chunks":[]}