Celestory combines the power of nocode (creating applications without writing code) and vibe coding (describing what you want in plain language and letting the AI generate the code) to bring AI models โ including sovereign models (developed in Europe or open source, independent of US tech giants) like Mistral (text) or Flux (image) โ directly into your player experiences.
No API key lives in your project: the call goes from the application to Celestory's servers, which carry the billing with the model provider themselves. Good news for security โ and the reason why everything a player triggers is charged to your credits.
General Principles
During an experience (game, narrative application, serious game, training moduleโฆ), the player can interact directly with AI engines configured by the creator, thanks to two dedicated blocks available in the graph:
- ๐ฆ AI text request block โ Dynamic text generation
- ๐ฆ AI image request block โ On-the-fly image generation
โ ๏ธ Both blocks are restricted to the Organization account (Business) plan. On a Pro or free-trial account they simply do not run โ with no error message. See AI Credits and Subscription.
๐ฆ AI text request block
The AI text request block connects your scenario to language models (LLMs โ AI programs capable of understanding and generating text, like a very advanced virtual assistant) to generate dynamic and contextual responses in real time.
๐ฅ Inputs
| Input | Type | Role |
|---|---|---|
| in | Stream | The scenario flow that triggers the request. |
| prompt | Text | The message sent to the model. Empty if nothing is wired in. |
| system prompt | Text | The role instruction ("You are a sly merchantโฆ"). Empty if nothing is wired in. |
| model | Closed list | Two choices only (see below). No free text entry. |
| temperature | Number | 1 by default โ the most creative setting, hence the least reproducible. |
๐บ There is no "history" input. Each call goes out on its own, with no memory of previous exchanges. If you want an NPC to remember, it is up to you to accumulate the lines in a text variable and concatenate it into the prompt.
๐บ There is no response-length setting. The only way to bound it is to say so in the instruction ("120 words maximum").
๐ค Outputs
| Output | Type | Role |
|---|---|---|
| out | Stream | The rest of the scenario. Always taken, whether the call succeeded or not. |
| result | Text | The model's answer. Empty string by default. |
๐บ There is no "on error" output. Unlike the Baserow block, the AI request block offers no dedicated failure path: network down, quota exhausted, model unavailable โ the scenario carries on through out as if nothing happened. Worse, for the text block the server's error message becomes result and can be shown to the player as a genuine answer. This is the central trap of this block: it is covered in full, with the workarounds, in The AI Text Request Block: What It Won't Tell You.
Text models available in-game
The list is closed: two models, no free text entry. Calls go through Celestory's servers, which route them to fal, which in turn relies on OpenRouter (a service that provides access to many different AI models from a single interface).
| Model | When to pick it |
|---|---|
mistralai/ministral-3b-2512 (default) |
Small and fast: one-sentence summaries, rewording, labelling. |
google/gemini-2.5-flash |
Whenever it must follow a strict instruction, reason over supplied context, or refuse to answer rather than invent. |
๐บ Set the model point explicitly โ do not let the default decide for you.
๐ก Use Case Example
Scenario: Dialogue with a traveling merchant
- The player interacts via a Text Input block: ยซ What do you have for sale? ยป
- The text is passed to the prompt input of the AI text request block.
- The system prompt is configured: ยซ Sly merchant who exaggerates the value of his items and answers in rhymes. Answer in 40 words maximum. ยป
- Temperature is lowered to 0.7: lively enough for a merchant, stable enough to stay playable.
- The block carries on through out, and
resultgoes into a condition that tests whether the text is empty or looks like a technical message. - If the text is valid it is displayed: ยซ Rare treasures, my friend! A sword that glows like day, or a potion that heals in every way! ยป Otherwise a hand-written fallback line takes over.
๐บ Step 5 is not a nicety: it is the only safety net that exists, since the block has no error output.
โ๏ธ Technical Details
- Temperature at exactly 0: don't. The server treats a 0 as "nothing was set" and silently replaces it with 0.5. For near-deterministic behaviour, use 0.1.
- Quota validation: before each generation, the server checks that the creator has not exceeded their monthly limit. If the quota is reached the call is refused โ and, for the text block, that refusal lands in
result. - Prompt length: everything you concatenate (home-made history, context data) is sent on every call and consumes tokens. Keep it bounded.
๐ฆ AI image request block
The AI image request block turns textual descriptions into dynamically generated images, integrated at the heart of the interactive experience.
๐ฅ Inputs
| Input | Type | Role |
|---|---|---|
| in | Stream | The scenario flow that triggers the generation. |
| prompt | Text | The description of the desired image. |
| image | Image | Only appears if you select the editing model (see below): the source image to retouch. The block reconfigures itself when you change model. |
| negative prompt | Text | What you do NOT want to see ("no text, no blur"). |
| model | Closed list | Two choices only. |
๐ค Outputs
| Output | Type | Role |
|---|---|---|
| out | Stream | The rest of the scenario. Always taken, success or failure. |
| result | Image | The generated image. Empty URL by default โ and on failure too. |
๐บ As with the text block, no "on error" output. The difference: here a failure does not produce a fake answer but an empty image. Test result before displaying it, or the player sees a hole in the screen.
Image models available in-game
| Model | Mode |
|---|---|
fal-ai/flux-2/klein/4b (default) |
Text to image: generates from the description alone. |
fal-ai/flux-2/klein/4b/base/edit |
Image to image: adds the image input and retouches the supplied image according to the prompt. |
๐บ These are the block's own list, not the editor's AI Generation workshop: the models offered in-game are deliberately more restricted (and cheaper) than those in the creator panel.
๐ก Use Case Example
Scenario: Creating a personalized fantasy landscape
- The player describes a location via a Text Input block: ยซ An enchanted forest with golden-leaved trees and a crystal river under a purple sky ยป
- The text is passed to the prompt input of the AI image request block.
- The model stays on
fal-ai/flux-2/klein/4b, and the negative prompt contains "text, watermark, frame". - Plan a waiting screen: generation takes several seconds and the player gets no feedback meanwhile.
- The block carries on through out, and a condition tests whether
resultis empty. - If the image exists it goes to an image display block. Otherwise a fallback illustration stored in the project takes its place.
โ๏ธ Technical Details
- Performance and costs: image generation is slower and more expensive than text. Plan for smooth loading screens and watch your quota.
- Quota validation: same as the text request โ checked before each generation.
- Fallback is mandatory: since no error signal exists, the only possible handling is a condition on
resultfollowed by a default image.
โ ๏ธ AI Credit Consumption
A crucial aspect of the AI usage model in player experiences:
Any request sent from the experience โ whether an AI text request or an AI image request block triggered by a player's action โ draws directly from the Creator's monthly AI credits, never from the player's (who has none).
In-game requests are counted far more finely than editor generations:
| Trigger | Cost |
|---|---|
| In-game AI text request | 0.01 credit per successful generation |
| In-game AI image request | 0.05 credit per successful generation |
| A failed generation | 0 โ failures are never charged |
In other words, with the 30 credits/month of the Organization account plan, a game can absorb a few hundred image requests or a few thousand text requests per month โ but not unlimited use. The tier details are in AI Credits and Subscription.
Creator Responsibilities
- Limit and secure requests: cap the number of possible requests per session, per player, or per scene. Nothing does it for you, and a player who loops a dialogue burns your quota.
- Use strict prompts: constrain the AI with precise system prompts (see Competency Prompts in the Creator documentation) to frame responses.
- Monitor consumption: track generations in the Generations tab of the AI Generation window, filterable by "In-Game" source, and the "Monthly usage" gauge at the top of the panel.
- Choose the right model:
mistralai/ministral-3b-2512for frequent interactions,google/gemini-2.5-flashfor moments that demand rigour. - Always test
resultbefore using it. This is the only error handling available: there is no "on error" output to wire. Never sendresultstraight to a screen or to a database write.
โ Further reading: The AI Text Request Block: What It Won't Tell You ยท AI Generation โ Creator Side ยท AI Glossary