NodaroAccount
Nodaro Docs
DocumentationNode ReferenceModelsAppsTemplatesAI Agents (MCP)DevelopersSelf-hostingResearchCompare
REST API

Share links

Share one result, a generation session or a project by a view-only link with the Nodaro API, read what the link shows, and get a preview card for social posts.

A share link is an unguessable, view-only link to one of your results (a job), a generation session or a project. Anyone signed in can make one, and anyone can open it, with no account. The link shows the results, the prompt as it was written, the model and the settings. With allow copy on, it also hands out the reference files the result was made from.

Each item has one link. Turning the link off makes it answer 404. Turning it on again brings back the same token, so a link you handed out before works again.

Endpoints

MethodPathWhat it does
GET/v1/shares?kind=&targetId=Your link for one of your items.
PUT/v1/sharesTurn the link of one of your items on or off.
GET/v1/public/shares/:tokenWhat the link shows. No credential needed.
GET/v1/public/shares/:token/itemsThe results of a shared session or project, a page at a time. No credential needed.

Turn a link on or off

# Turn the link of one of your jobs on.
TOKEN=$(curl -s -X PUT "https://app.nodaro.ai/v1/shares" \
  -H "Authorization: Bearer $NODARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"job","targetId":"<job-id>","shared":true}' | jq -r .data.token)

# What the link shows. No credential needed.
curl -s "https://app.nodaro.ai/v1/public/shares/$TOKEN"
const share = await client.shares.set({ kind: "job", targetId: jobId, shared: true })
const shown = await client.shares.getPublic(share.token)

PUT /v1/shares takes this body:

Prop

Type

The first call makes the link. Later calls keep its token. The answer is { data: Share }. Turning a link off always works. Turning a link on answers 422 share_not_allowed, with a reason, when the item cannot be shared now. See What a link never shows. The route answers 404 when the item is not yours.

GET /v1/shares?kind=&targetId= reads your link for one of your items. It answers { data: Share | null }, with null when the item was never shared. It answers 404 when the item is not yours.

A Share is { token, kind, targetId, shared, allowCopy, createdAt, updatedAt, locale }. locale is null for English, and on a server from before the link kept its language.

What a link shows

GET /v1/public/shares/:token answers { data: { kind, allowCopy, job? | session? | project? } }. Exactly one of job, session or project is there, as kind says.

A shared job is { id, type, mediaKind, outputUrl, outputUrls?, width?, height?, durationSec?, title, songTitle?, toolName, coverUrl, createdAt, prompt, displayPrompt, negativePrompt?, model, settings, references?, trend? }:

  • toolName is what a person calls the tool that made the result, for example "Song Mashup", "Text to Speech" or "Image to Video". It is never a model's name. It is null for a tool with no public name.
  • songTitle is a song's own title, of the take that outputUrl names, when the song has one.
  • coverUrl is the result's picture: the owner's cover, else the art made with the result, else null. See Set a job's cover.
  • prompt is the prompt as it was written, exactly as sent. When your app sent a userPrompt, the link shows that prompt.
  • displayPrompt is the same prompt as a person reads it. Each reference token becomes the name on its pill. @<slug>:<N>, with its role, variant or ~lock, becomes the name of the reference it names. When no name is known, the slug is made readable: @image-1:1 becomes @Image 1. {video:N:label}, {audio:N:label} and {image:N:label} become @label. Only names come from the references, never an address or an id. Both prompt and displayPrompt are null for a trend run.
  • model is the public model id and its name. It is null for a model that the public catalog does not list.
  • settings is the job's input without the prompt and model fields, and without anything internal: ids of rows, credits and prices, webhooks, tokens, storage keys and error text.
  • settings never holds a value that is an address or an id, whatever the field is called. That covers a link, a uuid, a path or storage key, a host or file name, an email, and a long id or hash. A nested object that held one, such as an image and its role, is left out whole.
  • references is a list of { url, kind }, at most 32. It is there only when the link allows copying. It holds https files only, never an address that carries a signature, a token, a key or a password.
  • A trend run shows as trend: { slug, name }, with prompt: null, empty settings and no references. The trend's recipe belongs to the platform.

A shared session is { title, tool, createdAt, itemCount }.

A shared project is { name, sessions: [{ id, title, tool, itemCount, coverUrl }] }. It lists the project's personal, unarchived sessions that show at least one result, most recently active first, at most 200. itemCount counts only what the link shows. coverUrl is the session's cover when the cover is shown, else its newest shown image.

List the results of a session or a project

GET /v1/public/shares/:token/items lists the results of a shared session, newest first. It answers { data: SharedJob[], nextCursor }, where each item has the shape of a shared job.

QueryMeaning
sessionIdRequired for a shared project: one of the sessions the link lists. A shared project without it answers 400.
limitPage size, 1 to 100. The default is 50.
cursorThe nextCursor of the previous page.

A page may hold fewer results than limit. Follow nextCursor until it is null.

A result the link may not show is skipped, and the page reads on to fill limit. nextCursor is always the position of the last result shown, never of one left out. Walking the pages therefore reveals nothing about the hidden results.

What a link never shows

A link shows only finished results of its owner that the platform would let anyone see. The cases below are not shown. PUT /v1/shares also refuses to turn a link on for them, with 422 share_not_allowed and this reason:

reasonWhy
not_completedThe job has not finished, or it failed or was cancelled.
no_mediaThe job made no image, video or sound.
private_outputThe result is kept private: it was made from private inputs, it is a preview render, or it was made in a workspace.
content_filteredIts prompt or name trips the content filter that keeps work out of the public gallery.
restrictedAn administrator restricted it.
workspaceIt is a session or project of a workspace. Work in a workspace is never public.
sharing_disabledThis deployment does not allow public work, so no link opens there.

A link also never shows a job in the Trash, an item removed from its session, a step of a larger run, or a deleted session or project. Nothing of a blocked account is shown.

All of this is decided again on every read. A result that is moved to the Trash or restricted after it was shared stops showing at once. Its link answers 404, and a session's link simply stops listing it.

A link to a job you moved to the Trash keeps its state. GET /v1/shares still reads it, and PUT /v1/shares with shared: false turns it off, so the link does not come back on when you restore the job. The link cannot be turned on while the job is in the Trash.

A session that is archived still opens through its own link. A shared project lists only its unarchived sessions.

The share card for link previews

A link pasted on a social network or in a chat shows a preview. The preview is read from the HTML of the link's address, with no script run. The address to share is the share card:

https://nodaro.ai/s/<token>

The card answers 200 text/html, a small page. Its tags come in the first bytes of its <head>, right after the charset and the <title>:

  • og:title, og:description, and og:image with og:image:secure_url, og:image:type, og:image:width and og:image:height when they are known, and og:image:alt.
  • og:type (video.other for a video, else website), og:site_name (Nodaro) and og:locale.
  • og:url and <link rel="canonical">, both the card's own address.
  • twitter:card (summary_large_image), twitter:title, twitter:description, twitter:image and twitter:image:alt.
  • For a video, og:video, with its secure_url, its type, and its width and height when they are known.
  • For a sound, og:audio, with its secure_url and its type.

The video and sound tags are written only when the file is on Nodaro's own storage.

The card's title and description

The title is the result's own name, then the tool that made it: Lady's on the Loose · Song Mashup. The name is chosen in this order:

  1. The name its owner gave the result.
  2. Its trend's name. A trend run is named by its trend, never by a prompt.
  3. The song's own title (songTitle).
  4. The start of its prompt as a person reads it (displayPrompt): @Maya, never @maya:1.

The tool is toolName. A shared session or project is named by its title or name.

The description is one line that says what the item is and that it was made with Nodaro. For example: "A song made with Nodaro", "A video made with Nodaro", "3 results made with Nodaro" or "Made with the Office Dance trend on Nodaro". The line is written in the language the link was shared in (locale). The card speaks English, German, Spanish, Hebrew, Japanese, Korean and Portuguese, and any other language reads as English. The page's lang, dir="rtl" for Hebrew, and og:locale follow the same language.

The card's picture

The picture is always on Nodaro's own storage. It is a 1200×630 JPEG, under 300 KB, made for the link:

ItemPicture
An imageThe image whole, over a blurred, darkened fill of itself.
A videoIts poster, else its first frame, with a play badge.
A song or a voiceIts art, that is the result's cover, else the Nodaro tile, with a play badge and its own name drawn beside it.
A session or a projectA grid of the pictures of its first results, up to four.

The name on a song or voice picture is drawn only when every character can be drawn: Latin, Greek, Cyrillic and Hebrew, which reads right to left. For any other name, the picture has no text.

The picture is made once, when the link is turned on. It is made again only when what it shows changes, for example a renamed result or a new cover. Each version has its own address.

A card read before its picture is ready shows the result's own picture when that picture is on Nodaro's storage, else the Nodaro card. Such a card may be cached for one minute only (Cache-Control: public, max-age=60). A card never hands out the reference files, whatever the link allows.

Where the card sends people

The card sends people on at once to the page that shows the link, https://nodaro.ai/shared/<token>. It does this with a <meta http-equiv="refresh">, a one-line script and a plain link.

Every value on the card is HTML-escaped, and only https addresses are written. The card's Content-Security-Policy allows that one script and nothing else. The card says noindex, in an X-Robots-Tag header and a robots meta tag.

A link that is unknown, turned off, or whose item is gone or may not be shown answers a 404 page. That page says nothing about any content.

On a self-hosted install, the share site serves the card and the page. It is set in the install's configuration. See Configuration.

Rate limits and caching

ReadLimit per networkCaching
GET /v1/public/shares/:token60 a minuteNever cached (Cache-Control: no-store)
GET /v1/public/shares/:token/items120 a minuteNever cached (Cache-Control: no-store)
The share card, /s/<token>120 a minuteUp to 5 minutes (Cache-Control: public, max-age=300), or 1 minute until its picture is ready

A read over its limit answers 429 rate_limit_exceeded. Because the card may be cached, a link you turn off stops previewing within minutes. The card's 404 page is never cached. See Rate limits.

Scopes for OAuth apps

RouteScope
GET /v1/sharesjobs:read
PUT /v1/sharesBoth assets:write and jobs:read, because the token it hands back reads what the link shows
GET /v1/public/shares/:token and its itemsNone

A personal API token that is limited to some workflows cannot reach GET /v1/shares or PUT /v1/shares. See OAuth.

From the SDK

client.shares has get, set, getPublic and publicItems. getPublic and publicItems work signed out. See Share links in the SDK.

Frequently asked questions

How do I share a Nodaro result by link through the API?

Send PUT /v1/shares with kind job, the job's id as targetId and shared true. The answer holds the link's token. Anyone can then read what the link shows with GET /v1/public/shares/:token, with no credential.

What does a Nodaro share link show?

The finished result or results, the prompt as it was written, the model and the settings. It never shows an address or an id from the settings. With allowCopy on, it also lists the reference files the result was made from.

What happens when I turn a share link off and on again?

Turned off, the link answers 404. Turned on again, the same token comes back, so a link you handed out before works again. Each item has one link.

Why does PUT /v1/shares answer 422 share_not_allowed?

The item cannot be shared now. The reason field says why, for example not_completed for a job that has not finished, or workspace for work in a workspace. No link was made or turned on.

Which address should I post on a social network?

Post the share card, https://nodaro.ai/s/ followed by the token. Its HTML carries the Open Graph and Twitter tags for the preview, and it sends people on to the page that shows the link.

Last updated on

On this page