[Beta] Introducing Text Generation API

At RDC 2024, we previewed our plans to release a series of natural-language APIs to help creators innovate and provide immersive text and speech capabilities that enhance the experience for existing users, as well as capture new audiences.

Creators now can also harness the power of open-source Large Language Models (LLMs) at run-time to create even more creative and immersive experiences.

Text Generation API for Creators

Today, we are launching the beta release of the Text Generation API, a highly requested feature that opens up new interactive possibilities for your users to try in your experiences, such as NPC dialogue. For example, you can create fully interactive NPCs, such as a quest giver, who can have a dynamic conversation with a user, or an interactive tutorial where a user could ask questions about how to play your game.

This API is powered by an open-source LLM with Roblox enhancements, enabling you to implement various text-based AI features within your experiences. When you leverage this service, you can input text prompts and get text responses from the LLM. At this time, all text is limited to English only.

We’re excited to offer you early access to the Text Generation API available through our beta sign up program. In order to be eligible to participate, you must be ID verified and your experience must have a Moderate or Restricted content maturity rating.

To get started with the API, please use this form to send us the experience you would like us to use so we can enable access.

How to use the Text Generation API

For the full API explanations, please make sure to explore the docs here: Text Generation API | Documentation - Roblox Creator Hub.

We thought it would be helpful to create an example to show how everything could work together. The demo below shows a simple experience where you can see how to call the Text Generation API to allow an NPC to respond to questions that aid in gameplay.

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

Important Safety Measures

We are limiting the use of LLM generative services to Moderate or Restricted content maturity experiences. These experiences are a good fit to leverage LLMs because they are intended for more mature audiences.

To ensure all text outputs are safe, we have taken an extra step to train the models we leverage to align with our best practices for safety and civility. In addition, all text inputs and outputs are proactively moderated by Roblox’s AI safety systems to ensure the content does not violate Roblox Community Standards. Our safety tools can surface any policy violations quickly and help determine what is safe and appropriate to publish in an experience. Developers will not be responsible for potentially abusive outputs from the LLM unless they program or prompt the LLM to respond with a violation.

What’s Next

By the end of June, we expect to open Text Generation API access to all creators. In addition, we plan to provide beta releases for the following natural language capabilities soon:

Text-to-Speech API

  • Generate speech from text in real-time with curated voices initially. Some use cases include:
    • Enabling dynamic voiceovers based on player input with pre-canned voices (to enable NPC dialogue, announcements)

Speech-to-Text API

  • Converts user speech to text in real-time. Some use cases include:
    • Enabling voice commands in games
    • Facilitating in-game audio translation and accessibility through real-time transcription

We can’t wait to see what you build with these new powerful LLM generative capabilities. We welcome any feedback on these tools as they become available, as well as what you would like to see next here.

You may have seen other generative AI news announced this week and in our newsroom. Please stay tuned for additional DevForum posts to cover the remaining AI announcements made throughout this week.


FAQs

Click here to view the FAQ!

Why is sign up required to participate in the Text Generation API beta? Can any developer participate?

  • We are scaling our generative creation efforts starting with a gradual beta rollout for the Text Generation API. We are also providing early access to our community to gather crucial feedback to better understand use cases and to improve the features and capabilities of the Text Generation API. During this beta period some features and capabilities may change as we refine the services. We will communicate any large-scale changes within a transition period to ensure our Creators have time to make any necessary accommodations.

    In addition, we are limiting the use of the Text Generation API only to developers who are ID verified and have experiences with Moderate or Restricted content maturity. These safeguards allow us to introduce this feature in a safe and civil way.

Are there any other guidelines to enhance safety?

  • The API actively enforces Roblox policies and also provides the option for creators to specify a system prompt which can be used to guide user generation. We actively monitor the system prompts, user inputs and model outputs to ensure a safe and civil experience. At this time, creators should limit the reach of each LLM output by restricting its exposure only to the user interacting with it vs. broadcasting to everyone in the server.

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

  • The API baseline utilization will be free at the beta launch. However, each experience will have a baseline usage limit of 100 requests per second per experience. 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.
    • For the context window, the input token size is limited to 5K and the output token size is limited to 1K.

How can I stay up to date on changes to the model?

  • We plan to add improvements and iterations to the model behind the API. Model upgrades will follow a rollout approach where older versions of models will be available for a period of time, and allow creators time to upgrade. Roblox will also provide a list models API to allow developers to choose from available options.
147 Likes

This topic was automatically opened after 9 minutes.

so it’s like an AI in roblox
great!
i’m sure people will make good use for this

11 Likes

51 Likes

holy
can you imagine people making games with like tiktok text-to-speech voices

8 Likes

“Let’s go, can’t wait to use these features in my project! I’m sure others are hyped as well. This opens a whole new world for us.”

8 Likes

(that’s what you say, but the roblox community is filled with users)

1 Like

The rise of chatbots on roblox lol

6 Likes

This could be interesting but i feel like it won’t be used quite as intended.

6 Likes

RobloxGPT - your very own Roblox ChatGPT

1 Like

It’s impossible as a new developer to make a complex game without wasting years learning
The way you guys are building AI and setting up AI with Roblox is phenomenal
Keep up the amazing work you guys I can’t wait to see what more people can make!

4 Likes

Gamechanger when the speech to text and text to speech comes out :pray:

6 Likes

Let’s see if someone will make a chatbot that’ll make scripts better than the built in assistant chat bot on roblox studio.

2 Likes

I fear that this will open up the platform to even more freaky behavior

Which is something that roblox doesn’t need, yet they don’t actually feel like trying to rectify that issue, so just have 203 ID locks and other obscure account requirements instead

3 Likes

yeah but currently their AI is so bad that it can’t properly make a fully functional and good game without stealing from the toolbox, and without help from the user and lots of user corrections.

1 Like

Roblox will implement their chat filter to the message before the bot sends it.

2 Likes

Unless you’re on those restricted games.

1 Like

I was doing ai generated dialog system and this drops…

3 Likes

I see a problem with this: the chat filter

It either triggers and absolutely melts down during basic conversation or just pretends to stop existing during extremely inappropriate moments

3 Likes

The chat filter is terrible, I don’t want to attempt it but i could probably bypass something bad really easily

text to speech WILL have some problems

edit: this will most definitely be abused
image

3 Likes