Documentation Index
Fetch the complete documentation index at: https://docs.pixy.art/llms.txt
Use this file to discover all available pages before exploring further.
Add the SDK
Load the Pixy embed SDK on the page where you want to launch the editor.onExport callback. Use the iframe fallback only when you do not need a callback into your app.
Choose a launch scenario
Every embed launch needs anembedKey and one source for the editor:
- pass
designIdto open an existing design - pass
designIdwithopenAsCopy: trueto create a new design from an existing design - pass
widthandheightto start from a blank canvas
designId with width and height. If you pass a designId, the editor uses that design path.
Public template IDs returned by the Templates API are copy-only in Embed: pass the template id as designId and set openAsCopy: true.
Existing design
Existing design
Use this when the user should continue editing the same saved design.Behavior:Use this for saved user projects, drafts, or any workflow where reopening the design should continue from the previous state.
- opens the design identified by
designId - does not create a copy before loading
- save/export returns the same design id through
onExport - use the returned
designIdto reopen the same design later
Existing design as a copy
Existing design as a copy
Use this when an existing design should behave like a template.
This is required when the source Store the returned
designId is a public template returned by the Templates API.Behavior:- looks up the source design by
designId - creates a new design copy when the editor loads, even before the user exports
- opens the new copied design, not the original source design
- keeps the original source design unchanged
- save/export returns the new copied design id through
onExport - every launch with
openAsCopy: truecreates another new copy
result.designId if the user should continue editing that copy later. To reopen that saved copy, launch with the returned designId and leave openAsCopy off.Your app receives the copied design id only after onExport runs. If the user opens the editor and closes it without saving, the copy may already exist in Pixy, but your app will not receive that new id.Blank canvas
Blank canvas
Use this when the editor should start with an empty design.Behavior:You must provide both
- creates a new design with the provided
widthandheight - does not require a template or existing design
- creates the blank design when the editor loads, even before the user exports
- save/export returns the new design id through
onExport - use the returned
designIdto reopen the design later
width and height for a blank canvas.Your app receives the new blank design id only after onExport runs. If the user opens the editor and closes it without saving, the design may already exist in Pixy, but your app will not receive that new id.Optional User ID
PassuserId when you want Pixy to associate the opened or newly created design with a user from your app. This is not a Pixy user id and does not need to exist in Pixy. It is stored as embed metadata and can be used later with the Automation API designs endpoint.
userId value when listing designs through the Automation API.
userId is omitted, the design is still saved and can still be listed without a user filter.
Appearance
The launch scenario controls which design opens. Inline and modal only control how the editor appears.Inline
Inline
Inline mounts the editor inside your page. In inline mode, the editor stays open after save.
Modal
Modal
Modal opens the editor in an overlay. In modal mode, a successful save calls
onExport and then closes the modal automatically.Export Callback
WhenonExport is provided, the embedded editor shows a Save button that sends the export result back to your app.
onExport receives the render id, the saved design id, duration, and uploaded export files.
Set saveButtonLabel to customize the button text for your workflow. The label is limited to 32 characters. For example, use Schedule when your app opens a scheduler after receiving the exported files.
result.designIdis the design that was actually saved- for a normal existing design, this is the original
designId - for
openAsCopy: true, this is the new copied design id - for a blank canvas, this is the new blank design id
- each successful embed save consumes credits based on the number of exported files
Iframe Fallback
Use a plain iframe only when you do not needonExport.