create_share_link

Create share link

Mint a public permalink for a ready generation, a verified upload, or a whole group. Ask before sharing on someone's behalf. The URL comes back ONCE — nothing can recover it later, only revoke it — so hand it to the user in the same turn. expires_in_seconds bounds it (one minute to thirty days; absent means no expiry). settings decides what the page says: a title and caption, whether Download is offered, how much provenance shows, the default theme, and indexable (whether search engines may list the page; off by default, so a link stays unlisted, and only turned on when the user asks for the page to be findable). Spends no credits.

Scope

Behaviour

Writes
Creates or changes items in the caller's own account.
Can delete or overwrite
Can delete, overwrite, cancel or withdraw something the caller already has, so a host should confirm it.
Reaches outside
Mints a public permalink anyone holding the link can open.

Credits

What the tool's description says about credits, verbatim.

Inputs

Example call

A tools/call request with the required arguments only, each a placeholder read off the schema. Replace them before sending.

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_share_link",
    "arguments": {
      "reference": {
        "type": "upload",
        "upload_id": "00000000-0000-4000-8000-000000000000"
      }
    }
  }
}

Input schema

As the server sends it in tools/list.

{
  "type": "object",
  "properties": {
    "reference": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "upload"
            },
            "upload_id": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "upload_id"
          ],
          "additionalProperties": false
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "generation"
            },
            "generation_id": {
              "type": "string",
              "format": "uuid"
            }
          },
          "required": [
            "type",
            "generation_id"
          ],
          "additionalProperties": false
        }
      ],
      "description": "A generation or upload, as list_media names it. A group generation shares the whole set."
    },
    "expires_in_seconds": {
      "type": "integer",
      "minimum": 60,
      "maximum": 2592000
    },
    "settings": {
      "type": "object",
      "properties": {
        "title": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            {
              "type": "null"
            }
          ]
        },
        "caption": {
          "anyOf": [
            {
              "type": "string",
              "minLength": 1,
              "maxLength": 300
            },
            {
              "type": "null"
            }
          ]
        },
        "download": {
          "type": "boolean"
        },
        "remix": {
          "type": "boolean"
        },
        "made_with": {
          "type": "string",
          "enum": [
            "off",
            "recipe",
            "inputs",
            "prompt"
          ]
        },
        "theme": {
          "type": "string",
          "enum": [
            "auto",
            "light",
            "dark"
          ]
        },
        "view_count": {
          "type": "boolean"
        },
        "branding": {
          "type": "boolean"
        },
        "indexable": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    }
  },
  "required": [
    "reference"
  ],
  "additionalProperties": false
}

Related tools

Every tool· This page as Markdown