Text Generation API Beta: Expanding Access

Text Generation API uses open-source LLMs to create immersive experiences with smart, contextual NPCs.


At our recent Roblox Developers Conference (RDC), we showcased demos of new text and voice features that help creators harness the power of natural language to speak, respond, and connect with users. As part of these featured capabilities, we are expanding the Text Generation API Beta so that creators can integrate it in all experiences and with additional improvements. Previously, the API was only available to experiences with a content maturity rating of moderate or restricted. We’re also updating content maturity guidelines to require experiences that feature extended interactions with an AI NPC to have a content maturity rating of “Restricted.” See more details below.

The Text Generation API allows creators to utilize open-source Large Language Models (LLMs) at run-time to create even more creative and immersive experiences featuring smart non-player characters (NPCs). For example, in a fantasy RPG, your system prompt for a village elder NPC might be ‘You are an oracle who speaks in riddles and talks about travelling the world. You have knowledge of local history and hidden secrets.’ Players can then ask the oracle about quest locations, character backstories, or dangers ahead, and the LLM will generate contextually appropriate responses without you pre-scripting every interaction.

Expanding Access with Important Safety Measures

Text generation is a powerful tool that can enable different types of interactive in-game experiences. Like many of our APIs, the type of experience you build using it should dictate its content maturity rating.

With our progress in AI safety systems, especially the new Roblox Guard 1.0, we are excited to enable the Text Generation API for any content maturity rating with the exception of experiences that feature extended interactions. Roblox Guard 1.0 proactively monitors the output of all text generated through the Text Generation API based on the Roblox Community Standards. We will evaluate experiences based on the creator’s design and system prompts rather than individual LLM outputs that creators are not able to control. Please continue to follow the terms and policies applicable to your use of the API, including the Terms of Use, Privacy Policy, AI Supplemental Terms, and Community Standards.

Additional Requirements for Experiences with Extended Interactions

We’re also updating our guidelines for AI features in experiences. “Extended interactions” are defined as ongoing, unlimited conversations between users and AI systems. For example, if users spend most of their time talking to an AI NPC, this would be an extended interaction. However, brief conversations with an AI NPC during regular gameplay would not qualify as extended interactions. Any experience designed primarily for extended interactions will receive a “Restricted” content rating.

If your experience includes extended interactions, you must retake the Maturity and Compliance questionnaire by September 30, 2025. We’ve added new questions to help us determine whether your experience includes extended interactions, which will affect your content rating. If you don’t complete the questionnaire, your experience may be moderated and its visibility on Roblox may be reduced.

To access the questionnaire, go to Creator Hub → Creations → Select your experience → Audience → Maturity & Compliance Questionnaire.

Key API Updates

We have made some improvements to the developer and player experience for the Text Generation API with the following updates:

  • Streamlined Integration: The new engine API eliminates the need for external cloud API setup, reducing integration complexity and setup time.

    • Note: We will be deprecating the Open Cloud Text Generation API over the next 90 days. We recommend migrating to the new engine API as soon as possible.
  • Higher Rate Limits for Better Player Experience: API rate limits are 100 requests per minute per experience. We have now also enabled dynamic scaling based on your experience’s concurrent users to support more fluid gameplay interactions.

We are committed to continuously improving our text generation models. Developers should expect periodic updates and enhancements to model performance and capabilities.

Enabling the Text Generation API

For the full API explanations, please make sure to explore the documentation here.

The demo below shows a simple experience where you can see how to call the Text Generation API to allow different NPCs to respond to questions that aid in gameplay.

Demo showing a conversational NPC and a memory context NPC.

This example shows how to create a simple NPC that can respond to player questions using the Text Generation API:

local textGenerator = Instance.new("TextGenerator", workspace) textGenerator.SystemPrompt = "You are an oracle who speaks in riddles and talks about travelling the world. You have knowledge of local history and hidden secrets. When asked about anything else you will bring it back to travelling" local function getResponse(userInput) local request = { UserPrompt = userInput }	local success, response = pcall(function()	return textGenerator:GenerateTextAsync(request)	end)	if success then	if response then	print("Generated Text: " .. response.GeneratedText)	return response	end	else	warn("Text generation failed: " .. tostring(response))	end	return nil end getResponse("Can you tell me a joke?") 

We also created this experience as a template for you to see its capabilities. You can click on the … on the experience details page to Edit in Studio.

What’s Next

This is another step in our journey to help you build immersive features for your players with ease. In addition to the Text-to-Speech API beta that has already been released, we will be releasing the Speech-to-Text API beta by end of year. When combined, these natural language capabilities can truly transform your creative possibilities, enabling fully voice-driven gameplay where players can naturally speak with and listen to any NPC.

Share Your Thoughts

We’re also eager to see how you utilize this feature along with other recently released natural language capabilities and want to hear your feedback. You can provide feedback below and also sign up for Natural Language office hours. If you would like to participate, please complete the office hour interest form here.

Thank you!


FAQs

Are there any other guidelines to help ensure safe and responsible use of AI?

  • The Text Generation API moderates content in line with Roblox policies and provides the option for creators to specify a system prompt to guide prompt input. We actively monitor system prompts, user inputs, and model outputs to promote a safe experience.

    To ensure safe and responsible AI use, creators should also:

    • Limit the reach of each LLM output by restricting its exposure only to the user interacting with it rather than broadcasting to everyone in the server

    • Not design AI features that encourage commercial transactions, such as spending money or Robux, or buying something (in-game or real life)

    • Ensure that users interacting with AI are shown a clear notice that the AI is not human and may be wrong

    • Instruct the LLM to respond on specific topics when appropriate to maintain focused interactions

    • Provide user instructions for safe AI use, such as not sharing sensitive personal information

Are there any additional tips to protect users’ privacy?

  • To protect users’ privacy, creators are encouraged to take the following precautions:

    • Only collect and process users’ data that is absolutely necessary for the experience to function
    • Adhere to all guidelines outlined in Roblox’s Privacy Policy, and ensure user data is handled securely and in compliance with all applicable regulations
    • Leverage the context_token feature that can maintain the last 20 messages per user session, eliminating the need for a separate chat data store

How does this AI interaction policy relate to your other content policies?

  • This update aligns with our broader approach to user safety, similar to our existing social hangout experience policies. Just as we have specific guidelines for social interactions to ensure a safe environment for all users, we’re now applying the same careful approach to AI-powered interactions.

    Experiences that enable extended, unlimited conversations with AI models will receive a “Restricted” rating to help users and parents make informed decisions about appropriate content.

Do I need to update my content maturity questionnaire if my experience uses third-party AI models?

  • Yes, you must disclose any AI interactions in your experience, regardless of which AI provider you use. The policy covers all AI models, whether first-party or third-party services like OpenAI, Claude, or others. Extended Interactions with any AI model will result in a “Restricted” content maturity rating.

Is there any cost associated with using the Text Generation API?

  • The API baseline utilization continues to be free during the beta launch. However, each experience will have a baseline usage limit of 100 requests per minute per experience, which scales with concurrent users. When this limit is reached, an error message that the developer can customize will be returned to the user. In the future, this rate limit may be adjusted.

Are there any caveats that would limit the generative capabilities?

  • We expect text generation capabilities to improve and expand over time; however, at launch there are some limitations we want to acknowledge, as follows:

    • We currently do not support text streaming.
    • For chat history, we are only preserving the last 20 chat messages per user within a session.
    • Input size is limited to 40k characters and output is limited to 1K tokens (~5000 characters)
74 Likes

This topic was automatically opened after 10 minutes.

Awesome!

Is this for the entire game, or just for that account? If it’s the former, that’s gonna negatively affect larger games making use of this. I know it is said that it “scales with concurrent users,” however can concrete information on this scaling be given?

I can understand this (hopefully this means those “sus ai” games will be Restricted now!), but it’s a bit vague. What is an “unlimited conversation”? Something like talking with an NPC, would that be considered an unlimited conversation? Or, is that only for experiences that mimic ChatGPT in functionality?


Also I keep getting a 403 error. Am I missing something?

Edit for future readers: You have to run it in Team Test!

9 Likes

I dont see the usecase for this if using it to make assistants (which most people will), instantly gives the game a restricted label.

I’m not anti-AI, but I dont see why AI is getting first class engine support when there’s more useful things that could be getting resources put towards them.

33 Likes

Well, this new text API is soo good! Thank you Roblox for doing this update! :heart:

6 Likes

i hope this gets used for good stuff and not bad things (just like what happened with every other feature that roblox decided to FOR SOME REASON release it to the public (like UGC stuff))

no there was no other paragrath that was written on this message trust me

2 Likes

Please at least read the whole announcement before jumping to conclusions:

Those games will still exist, but most of them should be Restricted now.

1 Like

It depends on if Roblox does it automatically or lets it fly under the hood until someone reports it.

Many inappropriate games are still flagged as “All Ages” when Roblox says they shouldn’t be. I assume the 30th September thing should fix this, but again, its up to Roblox to actually put effort in moderating it.

3 Likes

Yeah, it’s an optimistic view. Hopefully they do put effort into it.

1 Like

did not read that bit
my bad
but there will probably be games that will bypass this but, hey atleast it’s something

1 Like

This is great but it appears that the Content Maturity Labels is out of date — as it does not mention the “AI Interaction” label.

https://en.help.roblox.com/hc/en-us/articles/8862768451604-Content-Maturity-Labels

2 Likes

I see the capabilities

3 Likes

Hey - apologies currently when testing in Studio, this requires to be done in “Team Test”, we will be fixing this soon

8 Likes

Ok thank you, I was trying in a public server but remembered it’s still beta.

It would be nice if there was a warning pop up gui if you join publicly to avoid any confusion.

4 Likes

I don’t think assistants would be labeled as “extended interactions” (atleast I hope it wont)

1 Like

This doesn’t sound like expanding access to me.

8 Likes

I believe what they mean (or at least, how I interpreted it—hopefully I’m right!) is that any game can use it but “unlimited” interactions—like mimicking ChatGPT’s interface or those AI character chat games—will become Restricted.

2 Likes

I assume this is meant to reduce the risk of AI addiction and AI psychosis, which are both caused by the instant but variable gratification and subsequent dopamine hit one gets when chatting with an AI. This makes sense, but I have to ask about a potential edge case that would fall under this by technicality but would not have the same effect on a player; that is, an RPG where the AI acts as a game master generating the story in real time in response to the player’s actions. The player might only actually experience brief direct chat interactions with AI NPCs, but every action the player takes is used by the game master AI to control the non-verbal actions and thoughts of these NPCs, for instance the threat of the player might cause an evil king to decide to send a spy to learn the player’s plans, so the player is technically interacting with an AI the entire time. Does this qualify as an extended interaction?

3 Likes

Similar to a point I was going to make in my original post before I decided against it.

What about code generation (to be put through a handmade Lua interpreter)? Is that extended interaction? And, what if the Roblox chat filter censors the code accidentally? Is it forcefully put through the chat filter?

3 Likes

What does unlimited conversation really mean? If you’re able to talk to an NPC all you like, even if it’s just about a narrow topic and the game is not intended to be about talking to AI NPCs, could that count as unlimited conversation?

3 Likes