omi-api-integration
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOmi API Integration Skill
Omi API集成技能
This skill provides guidance for integrating with Omi APIs, including Developer API, MCP server, and webhook integrations.
本技能提供与Omi API集成的指导,包括开发者API、MCP服务器和Webhook集成。
When to Use
适用场景
Use this skill when:
- Building integrations with Omi
- Using the Developer API
- Setting up MCP server
- Creating webhook integrations
- Working with OAuth flows
在以下场景使用本技能:
- 构建与Omi的集成
- 使用开发者API
- 搭建MCP服务器
- 创建Webhook集成
- 处理OAuth流程
Key Patterns
核心模式
Developer API
开发者API
Base URL:
https://api.omi.me/v1/devAuthentication: Bearer token with prefix
omi_dev_基础URL:
https://api.omi.me/v1/dev认证方式:带有前缀的Bearer令牌
omi_dev_Getting API Key
获取API密钥
- Open Omi app
- Settings → Developer → Create Key
- Copy key immediately (won't be shown again)
- 打开Omi应用
- 进入设置 → 开发者 → 创建密钥
- 立即复制密钥(不会再次显示)
Making Requests
发起请求
python
import requests
headers = {
"Authorization": "Bearer omi_dev_your_key_here"
}python
import requests
headers = {
"Authorization": "Bearer omi_dev_your_key_here"
}Get memories
获取记忆内容
response = requests.get(
"https://api.omi.me/v1/dev/user/memories",
headers=headers,
params={"limit": 10}
)
memories = response.json()
undefinedresponse = requests.get(
"https://api.omi.me/v1/dev/user/memories",
headers=headers,
params={"limit": 10}
)
memories = response.json()
undefinedAvailable Endpoints
可用端点
- - Get memories
GET /v1/dev/user/memories - - Create memory
POST /v1/dev/user/memories - - Create up to 25 memories
POST /v1/dev/user/memories/batch - - Get conversations
GET /v1/dev/user/conversations - - Create conversation
POST /v1/dev/user/conversations - - Get action items
GET /v1/dev/user/action-items - - Create action item
POST /v1/dev/user/action-items
- - 获取记忆内容
GET /v1/dev/user/memories - - 创建记忆内容
POST /v1/dev/user/memories - - 批量创建最多25条记忆内容
POST /v1/dev/user/memories/batch - - 获取对话记录
GET /v1/dev/user/conversations - - 创建对话
POST /v1/dev/user/conversations - - 获取行动项
GET /v1/dev/user/action-items - - 创建行动项
POST /v1/dev/user/action-items
MCP Server
MCP服务器
Purpose: Enable AI assistants (like Claude) to interact with Omi data
用途:让AI助手(如Claude)能够与Omi数据交互
Hosted MCP Server (SSE)
托管MCP服务器(SSE)
URL:
https://api.omi.me/v1/mcp/sseAuthentication: Bearer token with prefix
omi_mcp_URL:
https://api.omi.me/v1/mcp/sse认证方式:带有前缀的Bearer令牌
omi_mcp_Available Tools
可用工具
- - Retrieve memories
get_memories - - Create a memory
create_memory - - Edit a memory
edit_memory - - Delete a memory
delete_memory - - Retrieve conversations
get_conversations
- - 获取记忆内容
get_memories - - 创建记忆内容
create_memory - - 编辑记忆内容
edit_memory - - 删除记忆内容
delete_memory - - 获取对话记录
get_conversations
Configuration
配置示例
json
{
"mcpServers": {
"omi": {
"url": "https://api.omi.me/v1/mcp/sse",
"apiKey": "omi_mcp_your_key_here"
}
}
}json
{
"mcpServers": {
"omi": {
"url": "https://api.omi.me/v1/mcp/sse",
"apiKey": "omi_mcp_your_key_here"
}
}
}Webhook Integrations
Webhook集成
Memory Creation Webhook
记忆创建Webhook
Trigger: When a memory is created
Endpoint:
POST /webhook/memory-createdPayload:
json
{
"id": "memory_id",
"content": "Memory content",
"category": "personal",
"user_id": "user_uid",
"created_at": "2024-01-01T00:00:00Z"
}触发条件:当一条记忆内容被创建时
端点:
POST /webhook/memory-created负载示例:
json
{
"id": "memory_id",
"content": "Memory content",
"category": "personal",
"user_id": "user_uid",
"created_at": "2024-01-01T00:00:00Z"
}Real-time Transcript Webhook
实时转录Webhook
Trigger: As transcript segments arrive
Endpoint:
POST /webhook/transcriptPayload:
json
{
"text": "Transcript segment",
"timestamp": 1234567890,
"conversation_id": "conv_id",
"user_id": "user_uid"
}触发条件:当转录片段到达时
端点:
POST /webhook/transcript负载示例:
json
{
"text": "Transcript segment",
"timestamp": 1234567890,
"conversation_id": "conv_id",
"user_id": "user_uid"
}OAuth Integration
OAuth集成
Google OAuth
Google OAuth
- Create OAuth 2.0 Client in Google Cloud Console
- Configure authorized origins and redirect URIs
- Use client ID and secret in app
- 在Google Cloud控制台创建OAuth 2.0客户端
- 配置授权来源和重定向URI
- 在应用中使用客户端ID和密钥
Apple OAuth
Apple OAuth
- Create App ID with Sign In with Apple
- Create Services ID
- Create private key (.p8 file)
- Configure in Firebase Console
- 创建支持"使用Apple登录"的App ID
- 创建服务ID
- 创建私钥(.p8文件)
- 在Firebase控制台中配置
Common Tasks
常见任务
Creating an Integration
创建集成
- Set up webhook endpoint
- Register webhook URL in app configuration
- Handle webhook payloads
- Process and react to events
- 搭建Webhook端点
- 在应用配置中注册Webhook URL
- 处理Webhook负载
- 处理并响应事件
Using Developer API
使用开发者API
- Generate API key in Omi app
- Store key securely (environment variable)
- Make authenticated requests
- Handle rate limits (100/min, 10,000/day)
- 在Omi应用中生成API密钥
- 安全存储密钥(使用环境变量)
- 发起带认证的请求
- 处理速率限制(每分钟100次,每天10000次)
Setting Up MCP
搭建MCP
- Generate MCP API key in Omi app
- Configure MCP client (Claude Desktop, etc.)
- Use tools to interact with Omi data
- 在Omi应用中生成MCP API密钥
- 配置MCP客户端(如Claude Desktop等)
- 使用工具与Omi数据交互
Related Documentation
相关文档
The folder is the single source of truth for all user-facing documentation, deployed at docs.omi.me.
docs/- API Overview: - View online
docs/doc/developer/api/overview.mdx - API Endpoints: - View online
docs/api-reference/ - Memories API: - View online
docs/doc/developer/api/memories.mdx - Conversations API: - View online
docs/doc/developer/api/conversations.mdx - Action Items API: - View online
docs/doc/developer/api/action-items.mdx - MCP: - View online
docs/doc/developer/MCP.mdx - Plugin Development: - View online
docs/doc/developer/apps/Introduction.mdx - OAuth: - View online
docs/doc/developer/apps/Oauth.mdx
docs/- API概览:- 在线查看
docs/doc/developer/api/overview.mdx - API端点:- 在线查看
docs/api-reference/ - 记忆内容API:- 在线查看
docs/doc/developer/api/memories.mdx - 对话API:- 在线查看
docs/doc/developer/api/conversations.mdx - 行动项API:- 在线查看
docs/doc/developer/api/action-items.mdx - MCP:- 在线查看
docs/doc/developer/MCP.mdx - 插件开发:- 在线查看
docs/doc/developer/apps/Introduction.mdx - OAuth:- 在线查看
docs/doc/developer/apps/Oauth.mdx
Related Cursor Resources
相关Cursor资源
Rules
规则
- - Backend API patterns
.cursor/rules/backend-api-patterns.mdc - - Backend architecture
.cursor/rules/backend-architecture.mdc - - Plugin development patterns
.cursor/rules/plugin-development.mdc - - Web API integration
.cursor/rules/web-nextjs-patterns.mdc
- - 后端API模式
.cursor/rules/backend-api-patterns.mdc - - 后端架构
.cursor/rules/backend-architecture.mdc - - 插件开发模式
.cursor/rules/plugin-development.mdc - - Web API集成
.cursor/rules/web-nextjs-patterns.mdc
Subagents
子代理
- - Uses this skill for API development
.cursor/agents/backend-api-developer/ - - Uses this skill for plugin integration
.cursor/agents/plugin-developer/ - - Uses this skill for web integration
.cursor/agents/web-developer/ - - Uses this skill for SDK development
.cursor/agents/sdk-developer/
- - 使用本技能进行API开发
.cursor/agents/backend-api-developer/ - - 使用本技能进行插件集成
.cursor/agents/plugin-developer/ - - 使用本技能进行Web集成
.cursor/agents/web-developer/ - - 使用本技能进行SDK开发
.cursor/agents/sdk-developer/
Commands
命令
- - Uses this skill for API setup
/backend-setup - - Uses this skill for plugin integration
/create-plugin - - Uses this skill for API documentation
/update-api-docs
- - 使用本技能进行API搭建
/backend-setup - - 使用本技能进行插件集成
/create-plugin - - 使用本技能进行API文档更新
/update-api-docs