script asset runs your own ExtendScript code inside the job’s After Effects project, right before the render starts. Use it when a change needs logic: loops, conditions, reading data files, or restructuring compositions.
When to use a script
Reach for the simplest asset type that does the job. A script is the most flexible option, and also the one you have to maintain.Before you start
- Scripting is turned on per team. If your team doesn’t have it, the API rejects any job with a
scriptasset with403and the error codeSCRIPTING_DISABLED. Contact [email protected] to get it turned on. - Scripts are ExtendScript. That’s the JavaScript dialect After Effects uses for scripting, based on ECMAScript 3. Use
varandfunction.let, arrow functions, and template literals don’t work. Nexrender addsJSON.parse,JSON.stringify, and the array methodsforEach,filter, andindexOf, which plain ExtendScript lacks. - Scripts run in a sandbox by default. They can use the After Effects scripting API and files in the job’s folder, but not the rest of the machine. See Sandbox and limits.
Your first script
Host the script anywhere the render node can download it, and reference it from the job:NX.get("title") reads a value from the job’s parameters, and nexrender.selectLayersByName finds the layer. Script assets and parameters and Helper functions cover both in detail.
src accepts:
- A public
https://URL. Google Drive and Dropbox share links work too: Nexrender converts them to direct downloads. - An inline
data:URL, for short scripts or quick tests:data:text/javascript;base64,followed by the script encoded in Base64.
How a job runs your script
1
Download
Nexrender downloads the template and every asset into a folder for the job.
2
Assemble
It builds one After Effects script from your assets, in the order you list them in
assets. Footage replacements, text and data assets, functions, and scripts all apply in that order, so a script sees every change made by the assets above it.3
Run
After Effects opens the project and runs the assembled script, then saves the project.
4
Render
After Effects renders the job’s composition.
nexrender: to make them the job’s error word for word. See Stop the job with a clear error.
See what your script did
Lines your script writes withnexrender.log go into the job’s render log, prefixed with NX:. Read the log with GET /jobs/{id}/logs, which returns it as plain text, or with the CLI:
Render log (excerpt)
Next steps
Script assets and parameters
Every field of a script asset, and how to pass values into your script
Helper functions
The
nexrender object: find compositions and layers, replace footage, logExamples
Tested scripts for common tasks
Sandbox and limits
What scripts can do on Nexrender Cloud, and the limits that apply

