AI Game Environment
Generate game environment art, level backgrounds, and world concepts using each::sense — the intelligent AI agent that automatically selects the best model for your request.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
Using curl
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": "Generate a fantasy game environment: a vast underground cavern with bioluminescent mushrooms casting teal and violet light on crystal formations, an ancient stone bridge crossing a chasm, and a distant glowing portal. Painted concept art style, wide panoramic composition, rich atmospheric depth, game environment art"
}
],
"stream": false
}'
Using Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
api_key="YOUR_EACHLABS_API_KEY",
base_url="https://eachsense-agent.core.eachlabs.run/v1"
)
response = client.chat.completions.create(
model="eachsense/beta",
messages=[{
"role": "user",
"content": "Generate a fantasy game environment: a vast underground cavern with bioluminescent mushrooms casting teal and violet light on crystal formations, an ancient stone bridge crossing a chasm, and a distant glowing portal. Painted concept art style, wide panoramic composition, rich atmospheric depth, game environment art"
}]
)
print(response.choices[0].message.content)
With Reference Image
Provide a mood board or rough sketch to guide the environment:
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": [
{"type": "text", "text": "Create a game environment based on this mood reference. Match the color palette and atmosphere. A frozen lakeside village with wooden longhouses, ice-covered docks, and mountains in the distance. Painted concept art, wide composition."},
{"type": "image_url", "image_url": {"url": "https://example.com/mood-reference.jpg"}}
]
}
],
"stream": false
}'
Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.
Streaming
Set "stream": true for real-time SSE responses, or "stream": false for complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.
Environment Types
| Biome / Setting |
Key Elements |
Mood |
| Enchanted Forest |
giant trees, glowing flora, fairy lights, moss |
mystical, serene |
| Volcanic Wasteland |
lava rivers, obsidian, ash clouds, cracked earth |
hostile, dramatic |
| Underwater City |
coral architecture, bioluminescence, kelp, bubbles |
alien, tranquil |
| Cyberpunk City |
neon, holograms, rain, skyscrapers, flying cars |
gritty, electric |
| Desert Ruins |
sandstone temples, dunes, oasis, buried statues |
ancient, desolate |
| Space Station |
metal corridors, viewports, stars, zero-gravity |
isolated, futuristic |
| Medieval Village |
thatched roofs, cobblestone, market, castle |
warm, welcoming |
| Frozen Tundra |
ice, aurora, snow drifts, frozen waterfalls |
harsh, beautiful |
Prompt Engineering Tips
Prompt Structure
"Generate a [genre] game environment:" + [setting description] + [key landmarks] + [atmospheric details] + [lighting] + [art style] + [composition]
Depth and Scale
Use layering language for depth:
foreground: [close objects, framing elements]
midground: [main subject, playable area]
background: [distant scenery, sky, atmosphere]
Lighting Keywords
golden hour, blue hour, overcast diffused, harsh noon sun,
moonlit, torchlit, bioluminescent glow, neon-lit,
volumetric fog, god rays, rim lighting, campfire warmth
Examples
2D Platformer — Parallax Layers
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": "Generate a 2D side-scrolling game background for a haunted graveyard level with parallax depth layers: foreground with crooked iron fence and dead tree silhouettes, midground with crumbling tombstones and a mausoleum, background with a full moon behind wispy clouds and a distant hilltop castle. Spooky purple and grey palette, hand-painted style, horizontal panoramic format."
}
],
"stream": false
}'
Top-Down RPG Overworld
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": "Generate a top-down game map view of a fantasy kingdom: a winding river cutting through green farmland, a walled city in the center with a castle, dark forests to the north, mountains to the east, a coastal port town to the south, and swampland to the west. Hand-drawn illustrated map style, parchment-colored background, labeled regions, RPG world map aesthetic."
}
],
"stream": false
}'
Sci-Fi Interior Level
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": "Generate a sci-fi game environment: the interior of a derelict space station. Flickering emergency red lights, broken pipes venting steam, floating debris in low gravity, a shattered observation window revealing stars and a nebula outside. Photorealistic rendering, first-person perspective looking down a long corridor, horror atmosphere, volumetric lighting."
}
],
"stream": false
}'
Pixel Art Dungeon
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"messages": [
{
"role": "user",
"content": "Generate a pixel art dungeon room for a roguelike game: a torchlit stone chamber with a treasure chest in the center, scattered bones on the floor, cracked pillars, a locked iron door on the far wall, and cobwebs in the corners. 32-bit pixel art, top-down three-quarter view, warm torchlight against cold stone blue, retro game aesthetic."
}
],
"stream": false
}'
Batch Workflow: World Biomes
STYLE="painted concept art, wide panoramic, rich atmospheric depth, game environment"
BIOMES=(
"Enchanted forest: towering ancient trees with glowing sap veins, carpet of luminous flowers, gentle fog, firefly particles, twilight sky"
"Volcanic badlands: jagged obsidian formations, rivers of flowing lava, ash falling like snow, smoke plumes, angry red sky"
"Crystal caves: enormous crystalline formations in amethyst and quartz, reflecting pools, prismatic light refractions, underground waterfalls"
"Floating islands: chunks of earth suspended in the sky connected by rope bridges, waterfalls falling into the void, clouds drifting between islands, sunset"
)
for BIOME in "${BIOMES[@]}"; do
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d "{
\"messages\": [{\"role\": \"user\", \"content\": \"Generate a fantasy game environment: $BIOME. $STYLE\"}],
\"stream\": false
}"
echo "---"
done
Common Pitfalls
- No sense of scale — include a reference object (a small figure, a bridge, a doorway) to communicate the environment's size.
- Flat composition — use foreground, midground, and background layers for visual depth.
- Missing atmosphere — fog, particles, light rays, and haze sell believability. Do not skip them.
- Inconsistent perspective — specify "side view", "top-down", "first-person", or "isometric" explicitly.
- Over-detailed backgrounds — for playable levels, the background should not overwhelm foreground gameplay elements.
Related Skills
Related Models
Documentation
1---2name: ai-game-environment3description: Generate game environment and level backgrounds using each::sense AI. Create landscapes, dungeons, cityscapes, interiors, and biomes for 2D and 3D games. Supports pixel art, painted, photorealistic, and stylized renders for any genre. Use for: level design concepts, background art, world building, game backdrops, parallax layers, environment concept art. Triggers: game environment, level background, game landscape, game world, dungeon art, game biome, level art, game backdrop, environment concept, game scenery4---56# AI Game Environment78Generate game environment art, level backgrounds, and world concepts using [each::sense](https://docs.eachlabs.ai/sense/overview) — the intelligent AI agent that automatically selects the best model for your request.910## Quick Start1112> Requires an each::labs API key. Get one at [eachlabs.ai](https://eachlabs.ai).1314### Using curl1516```bash17curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \18 -H "Content-Type: application/json" \19 -H "X-API-Key: $EACHLABS_API_KEY" \20 -d '{21 "messages": [22 {23 "role": "user",24 "content": "Generate a fantasy game environment: a vast underground cavern with bioluminescent mushrooms casting teal and violet light on crystal formations, an ancient stone bridge crossing a chasm, and a distant glowing portal. Painted concept art style, wide panoramic composition, rich atmospheric depth, game environment art"25 }26 ],27 "stream": false28 }'29```3031### Using Python (OpenAI SDK)3233```python34from openai import OpenAI3536client = OpenAI(37 api_key="YOUR_EACHLABS_API_KEY",38 base_url="https://eachsense-agent.core.eachlabs.run/v1"39)4041response = client.chat.completions.create(42 model="eachsense/beta",43 messages=[{44 "role": "user",45 "content": "Generate a fantasy game environment: a vast underground cavern with bioluminescent mushrooms casting teal and violet light on crystal formations, an ancient stone bridge crossing a chasm, and a distant glowing portal. Painted concept art style, wide panoramic composition, rich atmospheric depth, game environment art"46 }]47)4849print(response.choices[0].message.content)50```5152### With Reference Image5354Provide a mood board or rough sketch to guide the environment:5556```bash57curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \58 -H "Content-Type: application/json" \59 -H "X-API-Key: $EACHLABS_API_KEY" \60 -d '{61 "messages": [62 {63 "role": "user",64 "content": [65 {"type": "text", "text": "Create a game environment based on this mood reference. Match the color palette and atmosphere. A frozen lakeside village with wooden longhouses, ice-covered docks, and mountains in the distance. Painted concept art, wide composition."},66 {"type": "image_url", "image_url": {"url": "https://example.com/mood-reference.jpg"}}67 ]68 }69 ],70 "stream": false71 }'72```7374> Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.7576### Streaming7778Set `"stream": true` for real-time SSE responses, or `"stream": false` for complete result in a single response. Streaming is useful for showing progress in UIs; non-streaming is simpler for scripts and automation.7980## Environment Types8182| Biome / Setting | Key Elements | Mood |83|----------------|--------------|------|84| **Enchanted Forest** | giant trees, glowing flora, fairy lights, moss | mystical, serene |85| **Volcanic Wasteland** | lava rivers, obsidian, ash clouds, cracked earth | hostile, dramatic |86| **Underwater City** | coral architecture, bioluminescence, kelp, bubbles | alien, tranquil |87| **Cyberpunk City** | neon, holograms, rain, skyscrapers, flying cars | gritty, electric |88| **Desert Ruins** | sandstone temples, dunes, oasis, buried statues | ancient, desolate |89| **Space Station** | metal corridors, viewports, stars, zero-gravity | isolated, futuristic |90| **Medieval Village** | thatched roofs, cobblestone, market, castle | warm, welcoming |91| **Frozen Tundra** | ice, aurora, snow drifts, frozen waterfalls | harsh, beautiful |9293## Prompt Engineering Tips9495### Prompt Structure9697```98"Generate a [genre] game environment:" + [setting description] + [key landmarks] + [atmospheric details] + [lighting] + [art style] + [composition]99```100101### Depth and Scale102103Use layering language for depth:104```105foreground: [close objects, framing elements]106midground: [main subject, playable area]107background: [distant scenery, sky, atmosphere]108```109110### Lighting Keywords111112```113golden hour, blue hour, overcast diffused, harsh noon sun,114moonlit, torchlit, bioluminescent glow, neon-lit,115volumetric fog, god rays, rim lighting, campfire warmth116```117118## Examples119120### 2D Platformer — Parallax Layers121122```bash123curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \124 -H "Content-Type: application/json" \125 -H "X-API-Key: $EACHLABS_API_KEY" \126 -d '{127 "messages": [128 {129 "role": "user",130 "content": "Generate a 2D side-scrolling game background for a haunted graveyard level with parallax depth layers: foreground with crooked iron fence and dead tree silhouettes, midground with crumbling tombstones and a mausoleum, background with a full moon behind wispy clouds and a distant hilltop castle. Spooky purple and grey palette, hand-painted style, horizontal panoramic format."131 }132 ],133 "stream": false134 }'135```136137### Top-Down RPG Overworld138139```bash140curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \141 -H "Content-Type: application/json" \142 -H "X-API-Key: $EACHLABS_API_KEY" \143 -d '{144 "messages": [145 {146 "role": "user",147 "content": "Generate a top-down game map view of a fantasy kingdom: a winding river cutting through green farmland, a walled city in the center with a castle, dark forests to the north, mountains to the east, a coastal port town to the south, and swampland to the west. Hand-drawn illustrated map style, parchment-colored background, labeled regions, RPG world map aesthetic."148 }149 ],150 "stream": false151 }'152```153154### Sci-Fi Interior Level155156```bash157curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \158 -H "Content-Type: application/json" \159 -H "X-API-Key: $EACHLABS_API_KEY" \160 -d '{161 "messages": [162 {163 "role": "user",164 "content": "Generate a sci-fi game environment: the interior of a derelict space station. Flickering emergency red lights, broken pipes venting steam, floating debris in low gravity, a shattered observation window revealing stars and a nebula outside. Photorealistic rendering, first-person perspective looking down a long corridor, horror atmosphere, volumetric lighting."165 }166 ],167 "stream": false168 }'169```170171### Pixel Art Dungeon172173```bash174curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \175 -H "Content-Type: application/json" \176 -H "X-API-Key: $EACHLABS_API_KEY" \177 -d '{178 "messages": [179 {180 "role": "user",181 "content": "Generate a pixel art dungeon room for a roguelike game: a torchlit stone chamber with a treasure chest in the center, scattered bones on the floor, cracked pillars, a locked iron door on the far wall, and cobwebs in the corners. 32-bit pixel art, top-down three-quarter view, warm torchlight against cold stone blue, retro game aesthetic."182 }183 ],184 "stream": false185 }'186```187188## Batch Workflow: World Biomes189190```bash191STYLE="painted concept art, wide panoramic, rich atmospheric depth, game environment"192193BIOMES=(194 "Enchanted forest: towering ancient trees with glowing sap veins, carpet of luminous flowers, gentle fog, firefly particles, twilight sky"195 "Volcanic badlands: jagged obsidian formations, rivers of flowing lava, ash falling like snow, smoke plumes, angry red sky"196 "Crystal caves: enormous crystalline formations in amethyst and quartz, reflecting pools, prismatic light refractions, underground waterfalls"197 "Floating islands: chunks of earth suspended in the sky connected by rope bridges, waterfalls falling into the void, clouds drifting between islands, sunset"198)199200for BIOME in "${BIOMES[@]}"; do201 curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \202 -H "Content-Type: application/json" \203 -H "X-API-Key: $EACHLABS_API_KEY" \204 -d "{205 \"messages\": [{\"role\": \"user\", \"content\": \"Generate a fantasy game environment: $BIOME. $STYLE\"}],206 \"stream\": false207 }"208 echo "---"209done210```211212## Common Pitfalls213214- **No sense of scale** — include a reference object (a small figure, a bridge, a doorway) to communicate the environment's size.215- **Flat composition** — use foreground, midground, and background layers for visual depth.216- **Missing atmosphere** — fog, particles, light rays, and haze sell believability. Do not skip them.217- **Inconsistent perspective** — specify "side view", "top-down", "first-person", or "isometric" explicitly.218- **Over-detailed backgrounds** — for playable levels, the background should not overwhelm foreground gameplay elements.219220## Related Skills221222- [AI Game Asset](../ai-game-asset/SKILL.md) — Props and items for environments223- [AI Character Design](../ai-character-design/SKILL.md) — Characters to populate worlds224- [AI Sprite Generator](../ai-sprite-generator/SKILL.md) — 2D animated sprites225- [AI Game UI](../ai-game-ui/SKILL.md) — HUD overlays for levels226227## Related Models228229- [flux-2-max](../../../models/flux-2-max/SKILL.md) — Highest quality image generation230- [seedream-v4-5](../../../models/seedream-v4-5/SKILL.md) — Creative and artistic styles231- [nano-banana-pro](../../../models/nano-banana-pro/SKILL.md) — Fast iterations232233## Documentation234235- [each::sense Overview](https://docs.eachlabs.ai/sense/overview)236- [each::labs API](https://docs.eachlabs.ai)