As NetSuite continues to expand its generative AI capabilities, developers working with the N/llm module must understand the usage limits, monthly quotas, and concurrency rules that apply to LLM-related SuiteScript calls.
If you’re building AI-driven Suitelets, Map/Reduce scripts, or integrations using the N/llm module, ignoring these limits can lead to unexpected runtime errors such as:
- “Exceeded N/llm usage limit”
- “Concurrent LLM calls exceed allowed threshold”
This guide explains everything you need to know about:
✔ Monthly AI usage pools
✔ How SuiteApps receive their own usage quota
✔ How to increase usage with OCI
✔ Concurrency limits for generate and embed methods
✔ Practical best-practices to avoid hitting these limits
Let’s break it down.
⭐ 1. Usage Limits for N/llm Methods
NetSuite gives every account access to a free monthly pool of generative AI usage.
This pool is used for:
👉 Generate Methods
llm.generateText()llm.generateTextStreamed()llm.evaluatePrompt()- Their
.promise()versions
👉 Embed Methods
llm.embed()llm.embed.promise()
Each successful response from the LLM deducts usage from your monthly quota.
🎯 Key Notes About Usage Limits
- Generate and embed usage are tracked separately
- Unused monthly quota does not carry over
- Usage resets at the beginning of each month
- You can view usage on the AI Preferences page
This makes it easy to monitor how your scripts are consuming AI resources.
⭐ 2. SuiteApps Have Their Own Usage Pools
This is one of the most important — and often overlooked — parts of NetSuite’s design.
✔ Each SuiteApp installed in your account gets its own separate usage pool.
✔ These pools are independent from your main account pool.
✔ SuiteApps cannot drain your main account’s AI quota.
Example:
If your account has:
- Your internal scripts
- SuiteApp A
- SuiteApp B
Then you get:
- 1 main usage pool (for your scripts)
- 1 pool for SuiteApp A
- 1 separate pool for SuiteApp B
So technically you have 3 separate monthly usage allocations.
Additional SuiteApp Details
- Generate vs embed usage are tracked separately within each SuiteApp
- Usage numbers for SuiteApps do not appear on the AI Preferences page
- A SuiteApp developer must provide its own usage dashboard
This distribution prevents a SuiteApp from consuming your entire quota and blocking your internal automations.
⭐ 3. How to Get More Usage (Using Your OCI Account)
If your monthly free pool isn’t enough, you can add:
✔ Your Own OCI Credentials
Once configured, NetSuite will:
- Stop using the free monthly pool
- Consume usage from your OCI Generative AI service instead
This is ideal for:
- Large enterprise workloads
- Scripts that handle large prompt volumes
- AI-heavy SuiteApps
- High-frequency Map/Reduce automations
You must configure OCI credentials either:
- In your SuiteScript code (via
ociConfigobject), or - On the AI Preferences → Settings tab
Once done, the usage becomes effectively unlimited depending on your OCI plan.
⭐ 4. Concurrency Limits for N/llm Methods
In addition to monthly usage, NetSuite enforces concurrency limits to prevent too many simultaneous LLM calls.
These limits apply at runtime.
🧠 Generate Methods — Maximum 5 Concurrent Calls
Applies to:
llm.generateText()llm.generateText.promise()llm.generateTextStreamed()llm.generateTextStreamed.promise()llm.evaluatePrompt()llm.evaluatePrompt.promise()llm.evaluatePromptStreamed()llm.evaluatePromptStreamed.promise()
Limit:
➡ Up to 5 concurrent requests
If you exceed this, NetSuite will throw a concurrency error.
🧠 Embed Methods — Maximum 5 Concurrent Calls
Applies to:
llm.embed()llm.embed.promise()
Limit:
➡ Up to 5 concurrent embed operations
Generate and embed concurrency are tracked separately, so you could theoretically run:
- 5 generate operations
- AND 5 embed operations
at the same time
Without hitting concurrency caps.
⭐ 5. Practical Tips to Avoid Usage & Concurrency Errors
Here are best practices for real-world NetSuite development:
✔ 1. Queue or batch multiple AI requests
Instead of firing 10 calls at once, stagger them using:
- Scheduled scripts
- Async queues
- Delayed promise chains
✔ 2. Use the streaming methods wisely
Streamed responses count the same as non-streamed but may help reduce failures.
✔ 3. Use Prompt Studio for reusable prompts
It reduces prompt size, lowering token usage and cost.
✔ 4. Cache results when possible
If you’re using AI to classify or summarize similar data, store results.
✔ 5. Switch to OCI for enterprise workloads
If you expect high traffic:
- Enable OCI config
- Bypass NetSuite’s free limits
- Avoid end-of-month failures
✔ 6. Monitor usage frequently
Use the AI Preferences page to avoid surprises near month-end.
⭐ 6. Final Thoughts
As more developers build AI-powered scripts, understanding usage and concurrency limits is essential to preventing failures and scaling your automations safely.
The N/llm module is incredibly powerful — but like all AI systems, it must be used responsibly and optimized to avoid:
- Concurrency overload
- Monthly quota exhaustion
- Unexpected errors in production
With proper planning, you can use NetSuite’s generative AI APIs efficiently and reliably across your entire automation stack.
Discover more from The NetSuite Pro
Subscribe to get the latest posts sent to your email.
Leave a Reply