generate_url
Turn any Mediagraph entity ID, slug, or GUID into a direct, shareable deep-link URL. Covers assets, collections, lightboxes, folders, tags, share links, and explore root.
Instructions
Generate a direct deep-link URL to a Mediagraph entity (asset, collection, lightbox, storage folder, tag, creator tag, share link, or the explore root).
Two host modes:
Custom domain: when the org has one set (e.g. "dam.mer.fm"), URLs use https://{domain}/explore/...
Default: https://mediagraph.io/{org-slug}/explore/...
Path patterns: asset → /explore#/assets/{guid} (hash route) collection → /explore/collections/{slug} lightbox → /explore/projects/{id}-{slug} storage_folder → /explore/folders/{slug} tag, creator_tag → /explore/tags/{id}-{name} share_link → /share-links/{share_code}
Identifier rules:
Pass whichever identifier you already have (guid, slug, id+name, etc.); the tool fetches the entity if needed to derive the rest.
For assets, only guid is needed.
For collections / storage folders, slug works directly.
For lightboxes, the API returns a composite "slug" of the form "{id}-{name}" — pass it as slug.
For tags, pass id (and optionally name for a prettier URL).
Override host with --host (e.g., point at staging) or --base_host (just the fallback).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Numeric id (for lightbox + tag composite URLs, or to auto-fetch) | |
| guid | No | Asset guid | |
| host | No | Override the full host (e.g. "dam.mer.fm" or "https://staging.example.com") | |
| name | No | Tag/lightbox name (used to build the {id}-{name} composite if slug missing) | |
| slug | No | Pre-computed slug (collection / storage_folder / lightbox composite) | |
| type | Yes | Entity type | |
| autofetch | No | When true (default) and a required identifier is missing, fetch the entity to derive it. | |
| base_host | No | Override only the no-custom-domain fallback host. Default https://mediagraph.io | |
| share_code | No | Share code for share_link URLs |