算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
ai-game-asset【设计与创意】Generate game art assets using each::sense AI. Create sprites, icons, items, weapons, props, tilesets, and UI elements for 2D and 3D games. Supports pixel art, hand-painted, stylized, and photorealistic styles across all game genres. Use for: indie game development, game jams, prototyping, asset libraries, mobile games, RPG items. Triggers: game asse…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate game art assets, sprites, icons, and props using each::sense — the intelligent AI agent that automatically selects the best model for your request.
Requires an each::labs API key. Get one at eachlabs.ai.
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 set of fantasy RPG item icons: a glowing blue health potion in a glass vial, a golden shield with a lion emblem, a flaming sword with a ruby pommel, and a leather satchel with enchanted runes. Each icon on a transparent background, hand-painted style, 64x64 pixel grid layout, game-ready"
}
],
"stream": false
}'
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 set of fantasy RPG item icons: a glowing blue health potion in a glass vial, a golden shield with a lion emblem, a flaming sword with a ruby pommel, and a leather satchel with enchanted runes. Each icon on a transparent background, hand-painted style, 64x64 pixel grid layout, game-ready"
}]
)
print(response.choices[0].message.content)
Match the art style of your existing assets:
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 new game item icons matching the art style of these reference icons. Generate: a frost staff, a poison dagger, a healing amulet, and a scroll of teleportation. Same visual style, color palette, and icon size as the reference."},
{"type": "image_url", "image_url": {"url": "https://example.com/existing-game-icons.png"}}
]
}
],
"stream": false
}'
Images are sent inside messages using the OpenAI multimodal content format. Maximum 4 images per request.
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.
| Category | Examples | Common Styles |
|---|---|---|
| Item Icons | potions, weapons, armor, food, gems | hand-painted, flat, pixel art |
| Props | barrels, crates, torches, signs, treasure chests | stylized 3D, painted, isometric |
| Tilesets | grass, stone, water, lava, dungeon floor | pixel art, painted, seamless |
| Weapons | swords, bows, staves, guns, hammers | concept art, icon, sprite |
| Collectibles | coins, stars, hearts, keys, orbs | vector, pixel, cartoon |
| Obstacles | spikes, walls, pits, barriers, traps | side-view, top-down, isometric |
"Generate [asset type] for a [game genre] game:" + [specific items] + [art style] + [background] + [size/layout] + "game-ready"
pixel art 16-bit, pixel art 32-bit, hand-painted digital,
cel-shaded, flat vector, isometric, low-poly 3D render,
anime style, comic book style, photorealistic PBR,
retro 8-bit, watercolor game art
transparent background, solid black background,
dark gradient background, clean white background,
game UI slot background
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 tileset for a 2D platformer forest level: grass tiles, dirt tiles, stone path, tree trunk, leafy canopy, bush, flower, mushroom, wooden bridge plank, and water surface. 16x16 pixel tiles arranged in a sprite sheet grid. Earthy green and brown palette, retro 16-bit style, seamless edges."
}
],
"stream": false
}'
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 weapon icon set for a space shooter game: plasma rifle with blue energy glow, laser pistol with red beam indicator, EMP grenade with electric arcs, rocket launcher with orange exhaust, and an energy shield generator. Side-view perspective, clean dark background, glowing neon accents, digital illustration style, game UI ready."
}
],
"stream": false
}'
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 isometric game props for a medieval town: a wooden market stall with hanging meats, a stone well with bucket, a hay cart, a blacksmith anvil with hammer, a street lamp with flame, and a wooden barrel stack. Isometric 45-degree perspective, warm hand-painted style, transparent background, game-ready assets."
}
],
"stream": false
}'
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 collectible icons for a casual mobile puzzle game: a sparkling diamond, a ruby gem, an emerald gem, a sapphire gem, a gold coin, and a silver coin. Bright glossy cartoon style with soft highlights and shadows, each on a transparent background, round icon format suitable for match-3 game grid."
}
],
"stream": false
}'
ITEM="a longsword"
TIERS=(
"common: plain iron with leather grip, dull grey metal, no effects"
"uncommon: steel with blue gem in the crossguard, slight magical shimmer"
"rare: enchanted silver with glowing purple runes along the blade"
"epic: crystalline blade radiating golden light, ornate golden hilt"
"legendary: ethereal flame sword, blazing with white-hot fire, divine radiance"
)
for TIER in "${TIERS[@]}"; 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 game icon of $ITEM — $TIER. Hand-painted fantasy RPG style, dark gradient background, centered composition, game-ready icon.\"}],
\"stream\": false
}"
echo "---"
done