Publish a template as a public link

Returns a stable URL that renders the template for anyone, no key required. The most expensive decision available: a published link cannot be recalled from the internet, only disabled for future requests. Spending is bounded: repeat hits are served from cache and cost nothing, while NEW combinations of query values are capped at 200 renders a day per link for a small canvas (fewer for costlier canvases — the cap is set in credits, not pictures). The exact number for this link comes back as daily_render_budget. Past it the public URL answers 429 with error url_link_budget_exhausted, charges nothing, and keeps serving every variant already in cache. For a template that computes some of its values the reply also carries variables (the query parameters a visitor's page passes) and inputs (InputDescriptor: what the template computes from them); a query parameter named after a computed value overrides it.

post/presets/{id}/share

Request

  • Base URL: https://rendry.io/api/v1
  • URL: https://rendry.io/api/v1/presets/{id}/share
  • Auth: one of:
    • HTTP bearer
    • HTTP bearer
    • HTTP bearer

Path parameters

idstring required

Headers

X-Rendry-Accountstring

Browser/OAuth current member account selector. API keys/embed credentials are bound to their persisted account and reject another account. Omitting this header selects the browser actor personal account.

Request body

enabledboolean

true or absent opens the link; false closes it — the public URL stops working immediately and the reply is {"enabled": false}

rotateboolean

true issues a NEW url and kills the previous one (rotated:true in the reply); every place the old link was pasted stops working

Response

The link's state: {enabled:true, url, rotated, daily_render_budget, …} when open, {enabled:false} when closed

enabledboolean required

true while the link is open; {enabled: false} is the whole reply of a closed link

urlstring

Path of the public picture, /u/{token}.png — prefix https://rendry.io; absent while closed. Template variables go on as query parameters (example shows this template's own); a parameter named after a computed value overrides it

daily_render_budgetinteger

NEW pictures this link may render a day; cached variants are free

rotatedboolean

POST only: true when rotate: true issued a NEW url and killed the previous one; false when the reply re-reports the live url (opening an open link never replaces it)

hintstring

POST only: how to use the link

examplestring

POST only: the url with this template's own first variable and its sample as a query parameter (the same example share_preset_url gives); the bare url when the template has no variables

variablesstring[]

Present with inputs: the names a caller supplies — not the computed ones, which a value sent under their name overrides for the call.

Changes

No recorded changes to this operation across all 1 revision of this API.