mcpField
A
ai-avatar-generation

ai-avatar-generation

github.com/eachlabs创意与媒体44379 次安装今天更新
代码仓库

关于 ai-avatar-generation

ai-avatar-generation 是基于 each::sense 的头像生成技能,可从自拍或描述创建专业、卡通、3D、奇幻及科幻风格头像。适用于个人资料、游戏和社交平台,也支持跨姿势保持角色一致。

主要功能

  1. 01从自拍制作专业头像
  2. 02生成卡通、3D及主题角色
  3. 03制作适用于社交平台的头像
  4. 04跨姿势和风格保持角色一致

适用场景

  1. 01将日常自拍转换为职业头像
  2. 02为游戏资料创建奇幻角色头像
  3. 03为社交账号制作卡通风格头像
  4. 04为同一角色生成不同姿势

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/eachlabs/skills --skill ai-avatar-generation

安装后在 Claude Code 中输入/ai-avatar-generation确认已加载。

附带文件references/SSE-EVENTS.md

详细介绍

AI 头像生成

使用 each::sense 生成惊艳的 AI 头像。将自拍照转换为专业头像照,创建卡通或 3D 头像,设计奇幻角色,并为游戏、社交媒体和专业用途生成风格统一的头像。

功能

  • 专业头像:将日常照片转换为精致的专业头像照
  • 卡通头像:将照片转换为各种卡通和插画风格
  • 3D 头像:根据照片或描述生成 3D 角色渲染图
  • 奇幻头像:创建巫师、骑士、精灵等奇幻角色
  • 科幻头像:设计未来风、赛博朋克和太空主题角色
  • 社交媒体头像:针对 LinkedIn、Instagram 等平台优化的头像
  • 游戏头像:RPG 角色、主播和游戏人物
  • 角色一致性:生成同一角色的多个姿势和风格

快速开始

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a professional avatar from this selfie, make it look like a corporate headshot with studio lighting"}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-selfie.jpg"]
  }'

头像风格与使用场景

风格最适用场景输出质量
专业头像照LinkedIn、企业资料、简历照片级真实感
卡通/插画社交媒体、休闲平台、个人品牌风格化
3D 渲染游戏、元宇宙、虚拟世界3D 角色
奇幻/主题风格游戏资料、创意社区、RPG艺术风格
Anime/漫画Discord、直播、动漫社区Anime 风格
像素艺术游戏、复古平台、NFT像素风格

使用场景示例

1. 根据自拍生成专业头像

将日常自拍转换为精致的专业头像照,适用于 LinkedIn 或企业资料。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Transform this selfie into a professional corporate headshot. Clean studio background (soft gray gradient), perfect lighting, slight smile, confident expression. Make it suitable for LinkedIn. Keep my facial features recognizable but enhance to look polished and professional."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-selfie.jpg"]
  }'
2. 卡通风格头像

将照片转换为有趣的卡通或插画风格头像。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Convert this photo into a Pixar-style cartoon avatar. Exaggerated friendly features, big expressive eyes, smooth colorful rendering. Keep the likeness recognizable but make it fun and animated. Bright cheerful background."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
3. 生成 3D 头像

根据照片或描述创建 3D 渲染的角色头像。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate a 3D rendered avatar based on this photo. Make it look like a high-quality video game character with clean topology, subsurface skin scattering, realistic hair rendering. Neutral pose, front-facing, clean dark studio background. Suitable for metaverse or gaming profile."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/reference-photo.jpg"]
  }'
4. 奇幻主题头像(巫师、骑士)

为游戏或创意社区创建奇幻角色头像。

# Wizard Avatar
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Transform this photo into a powerful wizard avatar. Add a mystical purple cloak with glowing runes, a long silver beard (if male) or flowing magical hair, ancient staff, and magical energy particles around the hands. Fantasy art style, dramatic lighting with magical glow. Epic RPG character portrait."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Knight Avatar
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Transform this photo into a noble knight avatar. Shining silver armor with gold accents, red cape, battle-worn but heroic appearance. Medieval castle background with dramatic sunset. Keep my facial features but make me look like a legendary warrior. High fantasy art style."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
5. 科幻主题头像

设计未来风、赛博朋克或太空主题角色头像。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Transform this photo into a cyberpunk avatar. Add neon circuit tattoos, cybernetic eye implant with glowing blue iris, futuristic collar with LED strips, slick dark hair with neon highlights. Dark city background with rain and neon signs. Blade Runner aesthetic, dramatic lighting."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
6. 社交媒体头像

创建针对各类社交网络平台优化的头像。

# Instagram Profile Avatar
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a trendy Instagram profile avatar from this photo. Modern aesthetic, soft warm filter, slight glow effect, friendly approachable expression. 1:1 square format optimized for circular crop. Pastel gradient background. Keep it authentic but polished, influencer-style."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Discord/Gaming Avatar
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a cool Discord avatar from this photo. Anime-inspired style with bold outlines, vibrant colors, confident expression. Add gaming headphones, RGB lighting effects in the background. Square format, works well at small sizes. Energetic gamer aesthetic."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
7. 游戏头像

为游戏资料和直播生成角色头像。

curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create an epic gaming avatar from this photo. Transform me into an RPG hero character - detailed armor, confident battle-ready pose, dramatic lighting with volumetric rays. Style similar to League of Legends or Valorant character art. High detail, vibrant colors, professional esports team portrait quality."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'
8. 多种头像变体

为同一个人生成多种不同风格的头像。

# Initial request - set up the session
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "I want to create multiple avatar variations from this photo. Start with a professional headshot version."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "session_id": "avatar-variations-001",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Second variation - cartoon style
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Now create a cartoon/illustrated version of the same person"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "avatar-variations-001"
  }'

# Third variation - 3D render
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a 3D rendered version, like a video game character"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "avatar-variations-001"
  }'
9. 姿势各异且保持一致的角色

生成同一角色的多个姿势,同时保持角色一致性。

# Define the character
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a character avatar based on this photo. Professional illustration style, clean lines, distinctive features. This will be my consistent character for multiple images. Front-facing portrait first."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "session_id": "consistent-character-001",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Same character, different pose
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate the same character in a 3/4 side view, looking confident with arms crossed. Maintain exact same style, colors, and features."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "consistent-character-001"
  }'

# Same character, action pose
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Now show the same character waving hello, friendly expression. Keep all features consistent with previous images."}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "consistent-character-001"
  }'
10. 带自定义背景的头像

创建带有特定主题背景的头像。

# Beach/Travel themed
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create an avatar from this photo with a beautiful tropical beach background. Sunset golden hour lighting, palm trees, ocean waves. Make it look like a premium travel profile picture. Professional color grading, dreamy atmosphere."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Studio with colored backdrop
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a professional avatar from this photo with a vibrant gradient background (purple to blue). Studio lighting setup, clean and modern. Perfect for a creative professional or designer profile."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Nature/Outdoor backdrop
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Generate an avatar with a mountain landscape background. Person in focus with bokeh effect on the scenic mountains behind. Adventure/outdoor enthusiast vibe. Natural lighting, authentic feel."}],
    "model": "eachsense/beta",
    "stream": true,
    "mode": "max",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

最佳实践

照片输入提示
  • 清晰显示面部:确保光线充足,面部清晰可见
  • 优先选择正面照:正面或略带角度的照片效果最佳
  • 分辨率要高:输入分辨率越高,输出质量越好
  • 背景简洁:简单的背景有助于突出主体
头像提示词技巧
  1. 明确指定风格:卡通、3D、写实、anime 等
  2. 描述期望的特征:光线、表情、姿势
  3. 注明平台:LinkedIn、Instagram、游戏平台——这会影响优化方式
  4. 说明背景偏好:影棚、渐变、主题背景等
  5. 要求保持一致性:生成多个头像时,使用 session_id 并参考之前的输出
风格一致性

为同一个人创建多个头像时:

  • 使用 session_id 在多个请求之间保持上下文
  • 请求新姿势时参考之前的生成结果
  • 明确说明需要保持一致的特征

模式选择

生成前先询问用户:

“您想要快速且便宜,还是高质量?”

模式最适用场景速度质量
max最终头像、专业头像照、精细的奇幻角色较慢最高
eco快速预览、探索风格、批量生成变体较快良好

多轮头像优化

使用 session_id 迭代并优化你的头像:

# Initial avatar
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Create a professional avatar from this photo"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "my-avatar-project",
    "image_urls": ["https://example.com/my-photo.jpg"]
  }'

# Refine based on feedback
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Make the lighting warmer and add a slight smile"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "my-avatar-project"
  }'

# Try a different style
curl -X POST https://eachsense-agent.core.eachlabs.run/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "X-API-Key: $EACHLABS_API_KEY" \
  -H "Accept: text/event-stream" \
  -d '{
    "messages": [{"role": "user", "content": "Can you make a cartoon version of this same avatar?"}],
    "model": "eachsense/beta",
    "stream": true,
    "session_id": "my-avatar-project"
  }'

错误处理

错误原因解决方案
Failed to create prediction: HTTP 422余额不足在 eachlabs.ai 充值
内容政策违规内容被禁止确保照片和提示词符合内容政策
超时生成过程复杂将客户端超时设置为至少 10 分钟
相似度较低输入质量较差使用分辨率更高、光线充足且面部清晰的照片

相关技能

  • each-sense - 核心 API 文档
  • product-photo-generation - 电商产品照片
  • meta-ad-creative-generation - 社交媒体广告创意

评论

支持 Markdown