SuiteScript
NetSuite 2025.2
2026-08-25

documentCapture.getRemainingFreeUsage() Deprecated in Favor of llm.getRemainingUsage()

The N/documentCapture method getRemainingFreeUsage() is deprecated as of 2025.2. It now delegates to llm.getRemainingUsage() and returns remaining AI Units instead of free-tier document capture usage. Migrate to llm.getRemainingUsage() directly.

Affects:SuiteScript 2.1N/documentCaptureN/llm

What changed

documentCapture.getRemainingFreeUsage() in the N/documentCapture module is now deprecated as of 2025.2. Under the hood, calling this method simply delegates to llm.getRemainingUsage() from the N/llm module. The return value is no longer "remaining free document-capture usage" — it is the number of AI Units remaining on the account, the same value llm.getRemainingUsage() returns.

This signals that Oracle is consolidating AI-related metering under the N/llm module and a single AI Units pool rather than tracking free-tier document capture usage separately.

The method carries no governance cost and is restricted to server-side script types. Oracle warns it may be removed in a future release.

What to do

  1. Search your codebase for any calls to documentCapture.getRemainingFreeUsage(). Check SuiteScript 2.1 server scripts — Scheduled, Map/Reduce, User Event, RESTlet, Suitelet, etc.
  2. Replace each call with llm.getRemainingUsage(). Update the module dependency from N/documentCapture to N/llm (or add N/llm if the script already loads N/documentCapture for other methods).
  3. Update any logic that interprets the return value as "free document capture credits." The value now represents AI Units remaining, which is a broader pool. If you had threshold checks or alerts based on the old meaning, recalibrate them against the AI Units quota for your account.
  4. Test in Sandbox before promoting. Confirm llm.getRemainingUsage() returns the expected numeric value and that your scripts handle it correctly.
  5. Plan for removal. Oracle's deprecation notice indicates the method may disappear entirely in a future release. Do not defer this migration.

Notes

The source documentation does not clarify whether other N/documentCapture methods are also being consolidated or deprecated. If your scripts use additional members of that module (e.g., documentCapture.captureDocument()), check the 2025.2 release notes for the full module status.