Skip to main content

How to show a static overlay with scenes

Arrange images into a scene, publish it, and apply it to a project, a program, or a single stream

To put static graphics — a logo, a sponsor bar, a lower-third image — on top of a live stream, you arrange them into a scene, publish it, and assign it to the streams that should show it. This guide drives the whole flow from the Program API. For a live, data-driven overlay rendered from a web page, add a live web URL to a scene in the dashboard — see Overlay Scenes (Dashboard).

Three objects work together:

  • Scene — your saved arrangement of image assets. Native Frame stores the arrangement but never renders it: you flatten it into one image and publish that image. Viewers only ever see the published image.
  • Overlay config — a named, ordered stack of up to four entries. Each entry is a published scene or an image asset. Entry 0 is the bottom layer.
  • Assignment — which config a project, program, or stream shows. The most specific level wins.
A dashboard "scene" is an API overlay config

What the dashboard calls a scene is an overlay config in the API. The ID in a dashboard scene's URL is a config ID: use it with the /overlay-configs endpoints, not /overlay-scenes. Sending it to an /overlay-scenes endpoint returns 404 overlay_scene_not_found.

Prerequisites​

  • A service-account JWT. In the dashboard, open your project, select API Keys, and under JSON Web Key Sets (JWKS) click Generate JWT on the Service Account JWK. To mint one from your backend instead, see JWT-based authentication. Send it on every request as Authorization: Bearer <token>. Every endpoint below is scoped to the token's project, and paths that name a projectID must use that project.
  • Storage for assets. The project's assets content type must be routed to managed storage or your own bucket — see Storage (Dashboard) or Storage Profiles.
  • A way to flatten your arrangement into a single PNG — your own editor or renderer. Native Frame does not composite scenes.

Send every request to https://platform.nativeframe.com. All paths below start with /program/api/v2, so the full address of the first call is https://platform.nativeframe.com/program/api/v2/projects/{projectID}/assets.

Procedure​

  1. Upload your images as image assets. POST /projects/{projectID}/assets takes a multipart/form-data body with a metadata part (JSON) and a file part (the image):

    curl -X POST "https://platform.nativeframe.com/program/api/v2/projects/<projectID>/assets" \
    -H "Authorization: Bearer <token>" \
    -F 'metadata={"id":"sponsor-logo","storageMode":"managed","type":"image"}' \
    -F 'file=@sponsor-logo.png;type=image/png'
    • id is the asset ID, and you choose it: 1–128 characters from a-z A-Z 0-9 . _ -, unique in the project. It is the value every later step calls assetId. Reusing an ID returns 409.
    • storageMode is managed when the project's assets go to managed storage, or byo when they go to your own bucket.
    • type must be image. HTML assets cannot be scene sources.

    The response is 201 with { "asset": { "id": "sponsor-logo", ... } }.

    To find the ID of an image already in the project — including one uploaded on the dashboard's Media page — list them with GET /projects/{projectID}/assets?type=image and read assets[].id.

  2. Create the scene. POST /projects/{projectID}/overlay-scenes

    {
    "name": "Sponsor bar",
    "sourceAssetIds": ["sponsor-logo", "sponsor-bar-bg"],
    "layout": { "items": [{ "assetId": "sponsor-logo", "x": 0, "y": 980 }] },
    "layoutVersion": 1
    }
    • layout is yours: any JSON object up to 64 KiB, returned exactly as you sent it. Store placement there, not image data.
    • layoutVersion round-trips unchanged, so a later version of your editor can recognize an older arrangement.
    • Scene names are unique within the project.

    The response is 201 with { "overlayScene": { "id": "<scene-id>", ... } }. Until you publish, the scene shows nothing.

  3. Publish it. Flatten the arrangement into one PNG, upload it as an image asset (step 1), then call POST /projects/{projectID}/overlay-scenes/{sceneID}/publish:

    { "assetId": "sponsor-bar-flat-v1" }

    The response is 200 with the scene, its publishedAssetId now set:

    {
    "overlayScene": {
    "id": "<scene-id>",
    "projectId": "<project-id>",
    "name": "Sponsor bar",
    "sourceAssetIds": ["sponsor-logo", "sponsor-bar-bg"],
    "layout": { "items": [{ "assetId": "sponsor-logo", "x": 0, "y": 980 }] },
    "layoutVersion": 1,
    "publishedAssetId": "sponsor-bar-flat-v1",
    "createdOn": "2026-11-17T18:02:11Z",
    "updatedOn": "2026-11-17T18:05:40Z"
    }
    }

    Every stream whose config names this scene picks up the new image on its next update — no config change, no stream restart. Publishing the same image again leaves what viewers see unchanged, though the scene's updatedOn moves. Earlier published images are kept, because a broadcast in progress may still be showing one.

    Editing the scene later (PATCH .../overlay-scenes/{sceneID}) does not change what viewers see. They keep the last published image until you publish again, so you can save work in progress freely.

  4. Create an overlay config that uses it. POST /projects/{projectID}/overlay-configs

    {
    "name": "Sponsor bar config",
    "entries": [{ "sceneId": "<scene-id>" }]
    }

    Each entry names exactly one of sceneId or assetId; an entry naming both returns 400 with invalid_field. Up to four entries stack in order, entry 0 at the bottom. A scene must be published before a config can use it.

    The response is 201 with { "overlayConfig": { "id": "<config-id>", ... } }.

  5. Assign the config. Pick the level that matches how widely it should apply:

    LevelRequestApplies to
    ProjectPUT /projects/{projectID}/overlay-configEvery stream in the project, unless a program or stream says otherwise
    ProgramPUT /programs/{programID}/overlay-configEvery stream in the program, including streams created later
    StreamPUT /streams/{streamID}/overlay-configThat stream only

    The body is { "configId": "<config-id>" }, and the response is 200 with the same shape. A stream resolves stream → program → project and uses the first level that has an assignment.

    • To show nothing at a level, even when a broader level assigns something, send { "configId": null }.
    • To inherit again from the level above, DELETE the assignment. The response is 204.
    Send JSON null, not an empty string

    { "configId": "" } is accepted without an error and turns the overlay off at that level, the same as null. It does not clear the assignment. To go back to inheriting, DELETE the assignment.

    To apply one config to several places in a single call, send the full set to PUT /projects/{projectID}/overlay-configs/{configID}/assignments:

    { "project": false, "programIds": ["<program-id>"], "streamIds": [] }

    All three fields are required. Targets that named this config and are not listed go back to inheriting.

    To add or remove a few targets without sending the whole set, use PATCH on the same path. Each side, add and remove, takes the same three fields, and each must carry all three — leaving one out returns 400:

    {
    "add": { "project": false, "programIds": [], "streamIds": ["<stream-id>"] },
    "remove": { "project": false, "programIds": ["<program-id>"], "streamIds": [] }
    }

    The same target in both lists returns 400, and nothing is written. Both PUT and PATCH respond 200 with every place the config is now assigned:

    {
    "assignments": {
    "configId": "<config-id>",
    "assignments": [
    { "level": "program", "programId": "<program-id>", "programName": "Main stage" },
    { "level": "stream", "programId": "<program-id>", "programName": "Main stage", "streamId": "<stream-id>", "streamName": "Camera 2" }
    ]
    }
    }

Result​

Check what a stream resolves to with GET /streams/{streamID}/overlay-config:

{
"streamId": "<stream-id>",
"projectId": "<project-id>",
"resolution": "resolved",
"level": "program",
"config": {
"id": "<config-id>",
"projectId": "<project-id>",
"name": "Sponsor bar config",
"entries": [{ "sceneId": "<scene-id>" }]
}
}

resolution is one of:

  • resolved — a config applies, and level says which assignment decided it.
  • explicitly_none — a level assigned { "configId": null }, so nothing is shown.
  • unassigned — no level assigns anything.

Viewers see the overlay on the stream's overlay output: a separate stream with kind: "filtergraph" whose derivedFromId is the source stream. Native Frame creates the output stream for you once a config applies to a source stream; you do not create it yourself. To find it, call GET /streams?derivedFromId={sourceStreamID} and pick the entry whose kind is "filtergraph". The source stream itself is unchanged.

To see which configs are in use across the project, list them with GET /projects/{projectID}/overlay-configs?assigned=true: a config counts as assigned when the project, any program, or any stream names it. Use assigned=false for configs applied nowhere. The filter combines with q (a case-insensitive name match) and with paging. The response is { "overlayConfigs": [ ... ], "totalCount": 8, "nextCursor": "<cursor>" }:

  • totalCount is how many configs match across every page, not just this one.
  • To page, send limit (1–200). Pass nextCursor back as cursor for the next page, with the same q and assigned. nextCursor is absent on the last page, and always absent when you send no limit, which returns every config at once.

Errors​

Every error body has a message. The machine-readable code is in one of these places, so check both:

Where the code isExample
Top-level errorCode{ "message": "...", "errorCode": "overlay_scene_not_found" }
invalidFields[].errorCode{ "message": "...", "invalidFields": [{ "name": "...", "reason": "...", "errorCode": "invalid_field" }] }
BothA top-level errorCode plus invalidFields naming the fields at fault
Neither{ "message": "..." } only — act on the status code

Read the top-level errorCode first; if it is absent, read errorCode from each invalidFields entry; if neither is present, use the HTTP status and message.

Troubleshooting​

Creating a config fails with 400 scene_not_published​

The scene has never been published. Publish it (step 3), then create the config.

Publishing fails with asset_not_published​

The image you named is still a draft asset. Finish the upload so the asset is published, then publish the scene again.

Creating a scene fails with 400 scene_source_not_image​

A source is an HTML asset, does not exist, or belongs to another project. Scene sources must be image assets in the same project.

An /overlay-scenes call returns 404 for an ID copied from the dashboard​

The ID in a dashboard scene's URL is an overlay config ID. Use it with /overlay-configs/{configID}.

A scene or image cannot be deleted​

Deleting returns 409 while something still depends on it: scene_used_by_overlay_configs for a scene that a config uses, and asset_used_by_scenes for an image a scene is built from or publishes. The error names what to change first. Likewise, a config that is still assigned cannot be deleted (overlay_config_in_use). Remove its assignments first. A successful delete of a scene, config, or assignment returns 204.

The stream shows no overlay​

Read GET /streams/{streamID}/overlay-config. If resolution is explicitly_none, a level assigned null (or an empty string). Delete that assignment to inherit again. If it is unassigned, nothing applies at any level yet.

Other errors​

StatusCodeMeaning
400invalid_fieldA config entry names both sceneId and assetId
400too_many_overlay_entriesMore than four entries in one config
400overlay_entry_not_foundAn entry names an asset or scene outside the project
404overlay_scene_not_foundNo scene with that ID in the project
409overlay_scene_name_in_useAnother scene in the project has that name
413layout_too_largelayout is over 64 KiB