Learning resourcesReviewed · OpenAI

Annotations Extensibility

Annotations Extensibility is a ChatGPT documentation page for website developers that explains how to customize what people select, comment on and send to ChatGPT when they annotate a site in the ChatGPT desktop app's built-in browser; these features need a supported app version and, in some workspaces, admin or site permissions. It explains how to customize selectable content, attach context, open annotations, preview changes with controls and identify objects inside a canvas.

Researched 14 Nov 2026

In short.

Annotations Extensibility is a guide for website developers adding structured feedback to ChatGPT, but its API is restricted to eligible pages in the desktop app's built-in browser. It documents HTML selection and metadata attributes, plus document.oai.annotation methods for annotation requests, reversible preview controls, canvas object picking and Annotation mode. The practical distinction is between previewing a proposed change and saving it: previews do not permanently update the application, and opening an annotation does not send a message. Runtime behavior, pricing and licensing are not established by the documentation alone.

Researched and written by an AI model and checked by a second AI model. How it works

Covers the complete documentation page at [https://learn.chatgpt.com/docs/annotations-extensibility.md], including code examples, embedded demo markup, permission notices, validation constraints, preview lifecycle, cleanup and suggested verification steps. Linked browser documentation, the documentation index, the plugin and WebMCP documentation are excluded. No code or interactive demonstration was executed. Actual browser behavior, cross-version compatibility, performance and downstream outcomes remain unassessed; pricing and licensing are unstated.

The overview

Resource identity

Annotations Extensibility documents the Browser Annotation API at [https://learn.chatgpt.com/docs/annotations-extensibility.md]. The resource is an implementation guide with HTML, TypeScript and JavaScript examples.

It explains how websites can customize the content and controls accompanying browser annotations sent in Context to Codex or ChatGPT Work. A separately linked Annotations Extensibility plugin offers implementation help; the plugin itself is outside this page's scope.

Practical fit

The guide is useful when ordinary page selection misses application structure: a whole component should be selected together, a design token needs a preview control, or a drawn canvas object needs a stable identity.

Basic browser annotations already work without website changes. Custom integration makes more sense when those additional semantics justify maintaining event handlers, preview state and registration cleanup. The page provides concrete implementation guidance, but its examples' actual behavior has not been assessed.

Intended users

The primary audience is frontend developers maintaining websites, component previews, design systems or applications with canvas content. Their users can select meaningful objects, suggest property changes and send more specific feedback to ChatGPT.

Beginners can start with HTML selection attributes. Requests, custom controls and canvas integrations require familiarity with DOM elements, browser events, application state and cleanup. The examples use TypeScript, with browser compilation instructions provided.

Documented capabilities

Selection containers can group a card as one target or enable dragging across text. Metadata can attach small amounts of additional context. A website button can request an annotation on an element or exact text range, supply an editable comment and optionally omit the automatic screenshot.

Custom controls support colors, numeric ranges, selectable options and toggles. They can preview application properties or collect choices without changing the page. Controls can replace or extend built-in controls.

Annotation surfaces identify individual canvas objects through application-provided hit testing. The API also supports custom selection feedback and controls for entering, leaving and observing Annotation mode.

Using it

Requirements and access

The guide targets the DevDay 2026 release of the ChatGPT desktop app and later. The JavaScript API is exposed through document.oai.annotation in its built-in browser on secure, top-level pages such as HTTPS or localhost.

Enterprise and Edu administrators must allow Site annotation customizations. Per-site settings and user permission can also affect availability. Each method should be feature-detected so unsupported browsers retain ordinary website behavior.

When enabled, the browser installs the API before page scripts run. Integrations should initialize after their DOM elements exist; the page says no readiness event or polling is required. Exact operating-system support and subscription eligibility are not specified.

How the integration works

HTML attributes define selection behavior and optional metadata. JavaScript methods request annotations, register controls, register surfaces and manage Annotation mode. Methods return synchronously, although the browser may still be loading the editor.

An accepted result acknowledges validation of a request; it does not establish that the editor opened, an annotation was saved or a message was sent. Only the user can submit the annotation to ChatGPT.

Control callback fields are string identifiers. Preview values arrive through the bubbling oaiannotationcontrolchange event, whose action distinguishes preview, original-state comparison and reset. Handlers must apply every supplied value reversibly. Permanent changes use the application's normal save flow.

For canvas content, hitTest maps pointer coordinates to stable object IDs. Events retain the captured object's identity even after selection changes. Later registration updates affect future annotations, while existing annotations retain captured values and targets.

Implementation setup

Start with the smallest relevant integration. For grouped element selection, place oai-annotatable targets inside an oai-annotation-container. For drag-based text selection, use oai-annotation-container-text. Selection attributes are unnecessary for explicit requests or control registration.

The page shows compiling annotations.ts with esbuild into an ES module and loading annotations.js after the example's HTML exists. An application that already builds TypeScript can use its existing build instead.

Keep registration handles, refresh control baselines when ordinary application state changes, and handle synchronous registration or update failures. Dispose registrations and remove listeners when components disappear. Disposal does not undo preview styling, so cleanup must restore ordinary rendering separately.

Concrete example

The spacing example gives two cards a shared CSS property, --card-padding, initially set to 16 pixels. A registered range control allows values from 8 to 32 in steps of 4. Its event handler updates the shared property, so changing either card's control to 24 previews both cards with the new padding.

The annotation records the control label, property reference and previous and proposed values. Clearing the preview is intended to restore the original value. This illustrates feedback on a shared design token; it does not demonstrate a permanent source-code edit or application save.

A separate email-tone example collects a choice without a preview handler. Omitting currentValue includes the selected option even when unchanged, and ChatGPT receives the visible option label rather than its internal value identifier.

Assessment & evidence

Limits and failure modes

Metadata must be a flat JSON object with at most six properties, 64-character keys, 256-character string values and a 2,048-byte serialized size. Nested objects and arrays are unsupported; invalid metadata is ignored.

Text-range requests require nonempty visible text, with at least part in the visible page area, and allow at most 20,000 UTF-16 code units. Advanced mode is rejected for ranges and request metadata is ignored. Canvas surfaces are unsupported inside iframes or shadow DOM, and request() cannot directly target virtual object IDs.

Controls have validation and capacity limits, including 12 controls per registration, 128 target entries per registration, 64 registrations per document and 1,024 registration-to-target associations. Invalid registrations and updates can throw synchronously; rejected updates preserve the previous registration.

Canvas hit testing has a 250-millisecond deadline before DOM fallback. Only one hitTest callback can be in flight, and canceled or timed-out promises must still settle or later picking can remain blocked.

Annotation mode captures page clicks. Holding Space permits ordinary page interaction without leaving the mode. Manual Adjust, collapse and Option-click controls are limited to Codex or localhost; hosted ChatGPT sites show registered controls automatically.

Why these features may help

Named component targets, stable canvas IDs and explicit property references may make feedback less ambiguous than a screenshot and comment alone. This is an inference from the documented context fields; the page supplies no measurements of model accuracy or successful code changes.

The separation between ordinary drafts, temporary previews and saved application state is central to adoption. The guide warns that mixing them can let unrelated edits overwrite a preview, and that using preview state or unfinished input as the currentValue baseline produces wrong before-and-after values and resets. The guide addresses this through currentValue updates, captured identities and reversible event handling.

Other approaches described

Default browser annotations are the simplest option when ordinary selection and comments provide enough context. Within this API, selection attributes offer a smaller integration than custom controls or canvas surfaces.

For agent actions on a website, the page points to Site tools through WebMCP. It distinguishes annotations, which convey a person's selection and feedback, from tools that expose application actions. The linked WebMCP documentation is outside scope, so its implementation and suitability are not assessed here.

The linked Annotations Extensibility plugin is presented as a source of implementation help. Its contents, access terms and behavior are not established by this page.

Evidence and confidence

The evidence is the complete Annotations Extensibility page at [https://learn.chatgpt.com/docs/annotations-extensibility.md], captured on 2026-11-14 at 04:17:41.280 UTC.

The page supports descriptions of intended API behavior, constraints and implementation patterns. Its examples and suggested verification steps are not execution results. Runtime compatibility, preview correctness, performance and downstream model responses remain unassessed.

Access & freshness

Costs

The page gives no API pricing, plugin price, billing schedule or definitive subscription requirement. Whether using these features requires a paid plan is unknown from this source.

Implementation effort, runtime overhead and ongoing maintenance costs are not quantified. The compilation example does not establish a total cost of adoption.

Rights and shared information

The page does not state a license for its documentation or embedded code, or redistribution terms for either. Those rights remain unknown.

Selection metadata accompanies the annotation in the conversation and is visible to the user and model. The guide says to include only information intended for both. Element and text-range requests normally retain automatic screenshot behavior unless omitScreenshot is set to true.

The page does not establish retention periods or broader data-handling terms. Attaching an email address as context does not grant an ability to send email; that still requires a connected email tool.

Version and freshness

The captured page explicitly targets the DevDay 2026 ChatGPT desktop release and later. It provides no exact application build number, publication date or last-updated date.

The capture establishes the text available on 14 November 2026, not compatibility with every installation. Later changes are unknown. The guide's method-by-method feature detection is therefore a material implementation requirement.

Recommended next steps

Confirm the intended desktop app exposes the required methods and that workspace and per-site permissions allow them. Choose one concrete use case, such as grouped component selection or a shared spacing control, and define which context should accompany the annotation.

Before adoption, follow the guide's verification steps: check selected targets and metadata, request acceptance, preview comparison and reset, saved annotation reopening, and the context received after user submission. Check ordinary interactions in a browser without the API.

For canvas integrations, also check resizing, scene changes, empty-space selection, captured object identity and cancellation of asynchronous picking. Establish pricing, access terms and code-use rights separately where these affect deployment.

Evidence for this report

selected-page.txtselected · checked 2026-11-14