关于 ai-headshot-generation
使用 each::sense 根据照片或文字描述生成专业 AI 头像的技能,适用于个人及团队肖像,并可调整背景、服装、表情和图像格式。
主要功能
- 01根据照片或描述生成肖像
- 02企业及高管肖像风格
- 03更换背景与服装
- 04生成不同表情版本
- 05统一团队肖像风格
- 06适配多平台的图像格式
适用场景
- 01制作 LinkedIn 个人头像
- 02为公司网站制作员工肖像
- 03为团队生成风格一致的头像
- 04制作简历或演讲者肖像
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ eachlabs/ skills --skill ai-headshot-generation安装后在 Claude Code 中输入/ai-headshot-generation确认已加载。
附带文件references/SSE-EVENTS.md
详细介绍
AI 头像生成
使用 each::sense,根据休闲照片或文字描述生成专业 AI 头像。此技能可创建精致、专业的肖像,适用于企业用途、社交媒体个人资料、简历和营销材料。
功能
- 企业头像:用于公司网站和名录的专业肖像
- LinkedIn 照片:针对专业社交优化的头像
- 高管肖像:适用于 C 级高管和领导层的高品质头像
- 团队照片:确保多位团队成员的风格一致
- 背景选项:办公室、摄影棚、渐变或自定义背景
- 更换服装:将休闲着装转换为专业商务装
- 表情变化:根据同一张源照片生成多种表情
- 多平台适配:针对各种宽高比和使用场景进行优化
快速开始
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 corporate headshot from this casual photo. Clean background, professional lighting, business appropriate appearance."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/casual-photo.jpg"]
}'
头像格式与尺寸
| 使用场景 | 宽高比 | 推荐尺寸 | 备注 |
|---|---|---|---|
| 1:1 | 400x400 to 800x800 | 方形裁剪,头部和肩部入镜 | |
| 企业网站 | 3:4 | 600x800 | 标准纵向肖像 |
| 简历/CV | 1:1 or 3:4 | 300x300 or 300x400 | 简洁、极简的背景 |
| 电子邮件签名 | 1:1 | 150x150 to 300x300 | 尺寸较小但易于辨认 |
| 演讲者资料 | 1:1 or 16:9 | 800x800 or 1920x1080 | 适用于会议/活动 |
| 团队页面 | 1:1 | 500x500 | 团队成员风格一致 |
使用场景示例
1. 根据休闲照片制作企业头像
将休闲自拍或个人照片转换为精致的企业头像。
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 casual photo into a professional corporate headshot. Use a clean neutral gray background, soft professional studio lighting, and ensure the subject looks polished and approachable. Keep the likeness accurate."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/casual-selfie.jpg"]
}'
2. LinkedIn 个人资料头像
专门为 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": "Create a LinkedIn-optimized professional headshot from this photo. Square 1:1 format, friendly but professional expression, clean blurred office background, warm natural lighting. The subject should appear confident and approachable."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/source-photo.jpg"]
}'
3. 高管头像
为 C 级高管、董事会成员和高级领导层制作高品质头像。
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 premium executive headshot from this photo. Dark sophisticated background with subtle gradient, dramatic professional lighting, formal business attire appearance. The subject should convey authority, confidence, and leadership. Magazine cover quality."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/ceo-casual.jpg"]
}'
4. 团队头像(风格一致)
为团队成员生成风格匹配的头像,确保整个组织的视觉效果一致。
# First team member - establish the 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": "Create a professional team headshot with these specifications: light gray background, soft diffused lighting from the left, 1:1 square format, head and shoulders framing. Professional but friendly expression. This will be the template style for our entire team."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "team-headshots-2024",
"mode": "max",
"image_urls": ["https://example.com/team-member-1.jpg"]
}'
# Second team member - maintain consistency
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 headshot for this team member using the exact same style as the previous one - same background, lighting, framing, and overall aesthetic."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "team-headshots-2024",
"mode": "max",
"image_urls": ["https://example.com/team-member-2.jpg"]
}'
# Third team member
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 headshot for this team member matching our established team style."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "team-headshots-2024",
"mode": "max",
"image_urls": ["https://example.com/team-member-3.jpg"]
}'
5. 使用不同背景的头像
为同一头像生成多种背景选项。
# Office 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" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create a professional headshot with a blurred modern office background. Glass windows, city view visible but out of focus. Natural daylight feel."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "background-variations",
"mode": "max",
"image_urls": ["https://example.com/source-photo.jpg"]
}'
# Studio gradient 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" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Now create the same headshot but with a classic studio gradient background - deep blue fading to lighter blue. Keep the same professional lighting on the subject."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "background-variations",
"mode": "max"
}'
# Nature/outdoor 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" \
-H "Accept: text/event-stream" \
-d '{
"messages": [{"role": "user", "content": "Create another variation with a natural outdoor background - soft green foliage, blurred bokeh effect, golden hour lighting. More relaxed professional vibe."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "background-variations",
"mode": "max"
}'
6. 使用不同服装的头像
使用专业着装选项改变人物的外观。
# Navy suit
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 headshot from this casual photo. Dress the subject in a classic navy blue business suit with a white dress shirt and subtle tie. Clean gray background, professional studio lighting."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "outfit-variations",
"mode": "max",
"image_urls": ["https://example.com/casual-photo.jpg"]
}'
# Business casual
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 another version with business casual attire - a blazer over a smart polo shirt or open-collar dress shirt. Same background and lighting as before."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "outfit-variations",
"mode": "max"
}'
# Creative professional
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 version for creative industry - stylish but professional, perhaps a dark turtleneck or modern collarless jacket. Contemporary creative professional look."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "outfit-variations",
"mode": "max"
}'
7. 简历/CV 头像
适用于求职申请和 CV 的简洁专业头像。
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 clean, professional headshot suitable for a resume or CV. Simple solid light background (white or very light gray), professional attire, friendly and confident expression. The photo should be conservative and appropriate for any industry. Square format, head and shoulders framing."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/applicant-photo.jpg"]
}'
8. 演讲者/作者头像
适用于会议演讲者、作者和思想领袖的生动头像。
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 compelling speaker/author headshot. The subject should appear engaging, confident, and dynamic. Use dramatic lighting with a dark background to create visual impact. Slight smile, eyes that connect with the viewer. This should work well on book covers, conference websites, and keynote slides. High contrast, memorable, professional."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/author-source.jpg"]
}'
9. 房地产经纪人头像
适用于房地产从业者的亲切、可信赖的头像。
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 real estate agent headshot. The subject should appear trustworthy, friendly, and professional. Warm lighting, genuine smile, approachable expression. Background should be a subtle blurred interior of an upscale home or modern building. Professional but not stiff - someone you would trust to help you buy a home."}],
"model": "eachsense/beta",
"stream": true,
"mode": "max",
"image_urls": ["https://example.com/agent-photo.jpg"]
}'
10. 多种表情变化
根据同一张源照片生成多种表情选项。
# Confident/serious
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 headshot with a confident, serious expression. Professional and authoritative, suitable for a law firm or financial services. Neutral gray background, classic professional lighting."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "expression-variations",
"mode": "max",
"image_urls": ["https://example.com/source-photo.jpg"]
}'
# Friendly/approachable
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 variation with a warm, friendly smile. Approachable and welcoming, suitable for customer-facing roles or consulting. Same background and lighting setup."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "expression-variations",
"mode": "max"
}'
# Thoughtful/engaged
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 another variation with a thoughtful, engaged expression - slight smile, intelligent and curious look. Good for tech industry or academia. Same background and lighting."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "expression-variations",
"mode": "max"
}'
最佳实践
照片输入指南
- 面部可见度:确保面部清晰可见、光线充足且无遮挡
- 分辨率:为获得最佳效果,请使用至少 512x512 像素的源照片
- 角度:正面或略微侧身(3/4 视角)效果最佳
- 光线:避免源照片中出现强烈阴影或严重逆光
- 表情:源照片采用中性或自然表情,可获得最佳转换效果
专业头像标准
- 取景:拍摄头部和肩部,面部占垂直画面的 60-70%
- 目光接触:人物应呈现出正在看向观众的效果
- 背景:简洁、不分散注意力,并与人物相衬
- 光线:采用柔和、显气色的光线,尽量减少强烈阴影
- 着装:符合行业和职位要求
行业专属建议
| 行业 | 风格 | 背景 | 着装 |
|---|---|---|---|
| 金融/法律 | 保守、正式 | 中性灰色/蓝色 | 深色西装、传统风格 |
| 科技 | 现代、亲切 | 简洁渐变或办公室 | 精致休闲装至商务装 |
| 创意行业 | 活力十足、独具特色 | 大胆或艺术化 | 现代、时尚 |
| 医疗 | 值得信赖、温暖 | 明亮、临床风格或中性 | 职业装,可选择白大褂 |
| 房地产 | 友好、值得信赖 | 模糊的室内家居背景 | 商务职业装 |
| 学术 | 深思熟虑、可信 | 图书馆或中性背景 | 商务休闲装至正式装 |
模式选择
生成前先询问用户:
“您想要快速又省钱,还是高质量?”
| 模式 | 最适合 | 速度 | 质量 |
|---|---|---|---|
max | 最终头像、客户交付内容、高管肖像 | 较慢 | 最高 |
eco | 快速预览、测试风格、批量草稿 | 较快 | 良好 |
多轮头像优化
使用 session_id 反复调整并完善头像:
# Initial generation
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 headshot from this photo with a blue gradient background"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "headshot-refinement",
"mode": "max",
"image_urls": ["https://example.com/source.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 the expression slightly more friendly. Keep the same background."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "headshot-refinement",
"mode": "max"
}'
# Final adjustments
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": "Perfect. Now generate 2 more slight variations of this final result."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "headshot-refinement",
"mode": "max"
}'
团队批量生成
高效地为整个团队生成风格一致的头像:
# Define team style first
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 need to create headshots for a team of 10 people. Our brand colors are navy blue and white. We want: 1:1 square format, light gray background, soft professional lighting, business casual attire, friendly but professional expressions. First, create a headshot for this team member to establish the style."}],
"model": "eachsense/beta",
"stream": true,
"session_id": "acme-corp-team",
"mode": "max",
"image_urls": ["https://example.com/team/person-1.jpg"]
}'
# Continue with remaining team members using same 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": "Create headshot for next team member, matching established style"}],
"model": "eachsense/beta",
"stream": true,
"session_id": "acme-corp-team",
"mode": "eco",
"image_urls": ["https://example.com/team/person-2.jpg"]
}'
错误处理
| 错误 | 原因 | 解决方案 |
|---|---|---|
Failed to create prediction: HTTP 422 | 余额不足 | 在 eachlabs.ai 充值 |
| 未检测到人脸 | 源图像中看不到人脸 | 使用人脸清晰可见的照片 |
| 相似度较低 | 源图像质量不佳 | 使用更高分辨率的源图像(512x512+) |
| 超时 | 生成过程复杂 | 将客户端超时设置为至少 10 分钟 |
相关技能
each-sense- 核心 API 文档product-photo-generation- 电商产品摄影meta-ad-creative-generation- 社交媒体广告创意
评论
支持 Markdown