After Effects API Reference
The After Effects API is the host-specific layer that After Effects adds on top of UXP. Use it to inspect and update application state, project items, layers, properties, fonts, import options, and settings from a UXP plugin.
Access the API
Load the After Effects host module to access the application API. For example, group related changes into one undo step:
const app = require("aftereffects");
app.beginUndoGroup("Update composition");
// Make changes to the active project.
app.endUndoGroup();
Browse the API
Area
Use it to
Access the running After Effects application, project, preferences, settings, and application commands.
Access a layer that contains audio or video, such as footage, a solid, or a nested composition.
Inspect and configure a camera layer in a composition.
Read and set character-level styling for a range of text in a Text layer.
Access and modify composition settings, layers, and markers.
Inspect a single composed line of text within a Text layer.
Track an asynchronous function call deferred until the script call stack clears.
Inspect the file source associated with a project item.
Organize project items into folders.
Read font properties and metadata.
Find and manage fonts available to After Effects.
Inspect imported footage or solid-color items used as layer sources.
Read and set the properties of a guide in a composition's viewer.
Configure how files and footage are imported into a project.
Create, access, and organize project items.
Read and set the ease applied to a property's keyframe.
Inspect and modify layers in a composition.
Access and manage the layers in a composition.
Inspect and configure a light layer in a composition.
Add and configure markers on layers.
Read and set properties within a mask.
Access the output modules in a render-queue item.
Configure how a render-queue item is rendered and saved.
Read and set paragraph-level styling for text in a Text layer.
Access a parametric mesh layer and its properties in a composition.
Inspect the source of a placeholder footage item.
Read and set After Effects application preferences.
Access the current project, its items, and project-level operations and settings.
Read, set, and animate layer and effect properties.
Access and navigate groups of properties, such as effects, masks, and layer transforms.
Queue and manage compositions for rendering.
Configure a composition queued for rendering.
Access the items in the render queue.
Store and retrieve After Effects application settings.
Read and set the outline used by a mask or shape layer path.
Access a shape layer and its vector contents in a composition.
Inspect the source of a solid-color footage item.
Read and set the text and formatting of a Text layer's source text.
Access a Text layer and its text-specific properties.
Access a 3D model layer and its properties in a composition.
Inspect a view shown in a viewer panel.
Access and configure a Composition, Layer, or Footage viewer panel.
Configure the display options of a view.
Minimum Version Tags
Property and method tables include the minimum After Effects version where a member is available. Check the Min Version column before using an API so your plugin can support the intended host versions.
Shared UXP APIs
Use the After Effects API together with the shared UXP platform APIs for file access, storage, networking, HTML, CSS, and Spectrum UI. For those platform capabilities, start with the UXP Hub.