omi-api-integration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Omi 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/dev
Authentication: Bearer token with
omi_dev_
prefix
基础URL
https://api.omi.me/v1/dev
认证方式:带有
omi_dev_
前缀的Bearer令牌

Getting API Key

获取API密钥

  1. Open Omi app
  2. Settings → Developer → Create Key
  3. Copy key immediately (won't be shown again)
  1. 打开Omi应用
  2. 进入设置 → 开发者 → 创建密钥
  3. 立即复制密钥(不会再次显示)

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()
undefined
response = requests.get( "https://api.omi.me/v1/dev/user/memories", headers=headers, params={"limit": 10} )
memories = response.json()
undefined

Available Endpoints

可用端点

  • GET /v1/dev/user/memories
    - Get memories
  • POST /v1/dev/user/memories
    - Create memory
  • POST /v1/dev/user/memories/batch
    - Create up to 25 memories
  • GET /v1/dev/user/conversations
    - Get conversations
  • POST /v1/dev/user/conversations
    - Create conversation
  • GET /v1/dev/user/action-items
    - Get action items
  • POST /v1/dev/user/action-items
    - Create action item
  • GET /v1/dev/user/memories
    - 获取记忆内容
  • POST /v1/dev/user/memories
    - 创建记忆内容
  • POST /v1/dev/user/memories/batch
    - 批量创建最多25条记忆内容
  • 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/sse
Authentication: Bearer token with
omi_mcp_
prefix
URL
https://api.omi.me/v1/mcp/sse
认证方式:带有
omi_mcp_
前缀的Bearer令牌

Available Tools

可用工具

  • get_memories
    - Retrieve memories
  • create_memory
    - Create a memory
  • edit_memory
    - Edit a memory
  • delete_memory
    - Delete a memory
  • get_conversations
    - Retrieve 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-created
Payload:
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/transcript
Payload:
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

  1. Create OAuth 2.0 Client in Google Cloud Console
  2. Configure authorized origins and redirect URIs
  3. Use client ID and secret in app
  1. 在Google Cloud控制台创建OAuth 2.0客户端
  2. 配置授权来源和重定向URI
  3. 在应用中使用客户端ID和密钥

Apple OAuth

Apple OAuth

  1. Create App ID with Sign In with Apple
  2. Create Services ID
  3. Create private key (.p8 file)
  4. Configure in Firebase Console
  1. 创建支持"使用Apple登录"的App ID
  2. 创建服务ID
  3. 创建私钥(.p8文件)
  4. 在Firebase控制台中配置

Common Tasks

常见任务

Creating an Integration

创建集成

  1. Set up webhook endpoint
  2. Register webhook URL in app configuration
  3. Handle webhook payloads
  4. Process and react to events
  1. 搭建Webhook端点
  2. 在应用配置中注册Webhook URL
  3. 处理Webhook负载
  4. 处理并响应事件

Using Developer API

使用开发者API

  1. Generate API key in Omi app
  2. Store key securely (environment variable)
  3. Make authenticated requests
  4. Handle rate limits (100/min, 10,000/day)
  1. 在Omi应用中生成API密钥
  2. 安全存储密钥(使用环境变量)
  3. 发起带认证的请求
  4. 处理速率限制(每分钟100次,每天10000次)

Setting Up MCP

搭建MCP

  1. Generate MCP API key in Omi app
  2. Configure MCP client (Claude Desktop, etc.)
  3. Use tools to interact with Omi data
  1. 在Omi应用中生成MCP API密钥
  2. 配置MCP客户端(如Claude Desktop等)
  3. 使用工具与Omi数据交互

Related Documentation

相关文档

The
docs/
folder is the single source of truth for all user-facing documentation, deployed at docs.omi.me.
  • API Overview:
    docs/doc/developer/api/overview.mdx
    - View online
  • API Endpoints:
    docs/api-reference/
    - View online
  • Memories API:
    docs/doc/developer/api/memories.mdx
    - View online
  • Conversations API:
    docs/doc/developer/api/conversations.mdx
    - View online
  • Action Items API:
    docs/doc/developer/api/action-items.mdx
    - View online
  • MCP:
    docs/doc/developer/MCP.mdx
    - View online
  • Plugin Development:
    docs/doc/developer/apps/Introduction.mdx
    - View online
  • OAuth:
    docs/doc/developer/apps/Oauth.mdx
    - View online
docs/
文件夹是所有面向用户文档的唯一可信来源,部署在docs.omi.me
  • 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

规则

  • .cursor/rules/backend-api-patterns.mdc
    - Backend API patterns
  • .cursor/rules/backend-architecture.mdc
    - Backend architecture
  • .cursor/rules/plugin-development.mdc
    - Plugin development patterns
  • .cursor/rules/web-nextjs-patterns.mdc
    - Web API integration
  • .cursor/rules/backend-api-patterns.mdc
    - 后端API模式
  • .cursor/rules/backend-architecture.mdc
    - 后端架构
  • .cursor/rules/plugin-development.mdc
    - 插件开发模式
  • .cursor/rules/web-nextjs-patterns.mdc
    - Web API集成

Subagents

子代理

  • .cursor/agents/backend-api-developer/
    - Uses this skill for API development
  • .cursor/agents/plugin-developer/
    - Uses this skill for plugin integration
  • .cursor/agents/web-developer/
    - Uses this skill for web integration
  • .cursor/agents/sdk-developer/
    - Uses this skill for SDK development
  • .cursor/agents/backend-api-developer/
    - 使用本技能进行API开发
  • .cursor/agents/plugin-developer/
    - 使用本技能进行插件集成
  • .cursor/agents/web-developer/
    - 使用本技能进行Web集成
  • .cursor/agents/sdk-developer/
    - 使用本技能进行SDK开发

Commands

命令

  • /backend-setup
    - Uses this skill for API setup
  • /create-plugin
    - Uses this skill for plugin integration
  • /update-api-docs
    - Uses this skill for API documentation
  • /backend-setup
    - 使用本技能进行API搭建
  • /create-plugin
    - 使用本技能进行插件集成
  • /update-api-docs
    - 使用本技能进行API文档更新