# In-game scene illustrations

Generate illustrations from game state with controls for scene accuracy, latency and reuse.

## Generate from game state

For a text adventure or interactive story, an illustration needs to represent the current scene accurately. Prepare a compact description of the location, visible characters, important objects and the player's relevant action. Exclude hidden information that the player should not see.

The output is a scene asset associated with a known game-state version. Resolution is only one criterion; following the scene and returning within an acceptable wait can matter more.

## Connect the workflow

1. Build the visual brief from structured game state rather than asking a model to infer everything from a long conversation.
2. Add recurring style and character references supported by the chosen image model.
3. Submit the request from your application backend and save its task identifier against the scene.
4. Show the completed image only if it still belongs to the player's current state.
5. Reuse an accepted image when the visual state is unchanged. Regenerate when a meaningful scene change requires it.

## Test gameplay cases

Include dark rooms, several named characters, inventory interactions and sudden scene changes. Check whether the image reveals unseen objects, contradicts the text or confuses characters. Test what the player sees while waiting and when a result arrives after they have moved on.

Use the [image API guide](https://seedrouter.ai/blog/gpt-image-2-api-python) for request handling and the [task documentation](https://seedrouter.ai/docs/api/tasks) for result lookup. Start model comparisons with the same scene brief and judge accuracy at the actual in-game display size.

## Control the budget

Track generations per session, accepted assets and reuse frequency using your own application data. Read the model's [current rates](https://seedrouter.ai/pricing); a low nominal image price does not establish the cost of a full game session.

SeedRouter provides generation APIs. Game state, asset reuse, player access and presentation are application responsibilities. Music generation is a separate planned capability and should not be assumed available from an image workflow.

## Related resources

- https://seedrouter.ai/models/nano-banana-2-lite
- https://seedrouter.ai/models/gpt-image-2
- https://seedrouter.ai/integrations/bubble
- https://seedrouter.ai/industries/gaming
- https://seedrouter.ai/blog/gpt-image-2-api-python
