Bilibili Video Transcriber
自动获取B站视频字幕、语音转文字并分析评论,支持飞书通知与多平台兼容。
基于AI的全球海洋气象预报,提供航行安全分类与船型适配建议。
openclaw skills install @sealegs-ai-coder/sealegs-marine-forecast命令、参数、文件名以原文为准
获取全球任意位置的 AI 驱动海洋天气预报。包含风速、浪高、能见度、降水分析,并提供 GO/CAUTION/NO-GO 安全等级分类。
在您的 OpenClaw 配置中添加:
{
skills: {
entries: {
"sealegs-marine-forecast": {
enabled: true,
apiKey: "sk_live_your_key_here"
}
}
}
}或设置环境变量:
export SEALEGS_API_KEY=sk_live_your_key_hereclawhub install sealegs-marine-forecast// 迈阿密,佛罗里达州
POST /v3/spotcast
{
"latitude": 25.7617,
"longitude": -80.1918,
"start_date": "2026-02-10T00:00:00Z",
"num_days": 2,
"vessel_info": {"type": "sailboat", "length_ft": 35} // 可选
}示例响应:
{
"id": "spc_FrZdSAs6T3cxbXiPtNZvxu",
"coordinates": {
"latitude": 25.7617,
"longitude": -80.1918
},
"forecast_period": {
"start_date": "2026-02-10T00:00:00-05:00",
"end_date": "2026-02-11T23:59:59-05:00",
"num_days": "2"
},
"trip_duration_hours": "12",
"metadata": {
"location_name": "迈阿密码头"
},
"latest_forecast": {
"status": "completed",
"ai_analysis": {
"summary": "两天天气条件理想,风力微弱",
"daily_classifications": [
{
"date": "2026-02-10",
"classification": "GO",
"short_summary": "全天条件极佳,风力低于 7 节,海浪平静,1.1-1.6 英尺。最佳出航时段为上午 5:00 至中午 12:00,西北风几乎无风(1-4 节),海浪舒适,1.4 英尺,周期 11 秒。",
"summary": "周一全天航行条件极佳,风力极其微弱,海况平静。清晨时段为最佳窗口期,西北风接近无风(1-4 节),海浪舒适,1.4 英尺,周期 11 秒,来自东北方向。"
},
{
"date": "2026-02-11",
"classification": "GO",
"short_summary": "全天条件优异,风力极轻(1-6 节),浪高极小(1.2-1.3 英尺)。最佳时段为上午 9:00 至下午 1:00,呈现镜面般平静,风力 1-3 节,浪高 1.2 英尺,周期 11 秒。",
"summary": "周二全天航海条件优异,风力微弱,浪高极小。上午至中午时段提供理想镜面状态,东风偏南风力 1-3 节,浪高 1.2 英尺,周期 10-11 秒,来自东北方向。"
}
]
}
}
}| 操作 | 端点 | 成本 |
|---|---|---|
| 创建预报 | POST /v3/spotcast | 每预报天数 1 积分 |
| 获取预报 | GET /v3/spotcast/{id} | 免费 |
| 查询状态 | GET /v3/spotcast/{id}/status | 免费 |
| 刷新预报 | POST /v3/spotcast/{id}/refresh | 每预报天数 1 积分 |
| 获取 SpotCast 所有预报 | GET /v3/spotcast/{id}/forecasts | 免费 |
| 获取特定预报 | GET /v3/spotcast/{id}/forecast/{forecast_id} | 免费 |
| 列出所有 SpotCasts | GET /v3/spotcasts | 免费 |
| 查询余额 | GET /v3/account/balance | 免费 |
所有请求需包含:
Authorization: Bearer $SEALEGS_API_KEY
Content-Type: application/jsonX-RateLimit-Limit、X-RateLimit-Remaining、X-RateLimit-ResetSpotCast 为指定地理坐标生成基于 AI 的海洋天气预报。
POST https://api.sealegs.ai/v3/spotcast
创建新的预报请求。处理为异步操作(通常耗时 30-60 秒)。
必填参数:
latitude (数字): -90 至 90longitude (数字): -180 至 180start_date (字符串): ISO 8601 格式(例如:"2025-12-05T00:00:00Z")num_days (整数): 1-5可选参数:
webhook_url (字符串): HTTPS 回调地址,用于完成通知metadata (对象): 自定义键值对,供您参考trip_duration_hours (整数): 旅程时长(小时)preferences.language: en, es, fr, pt, it, ja(默认:en)preferences.distance_units: nm, mi, km(默认:nm)preferences.speed_units: kts, mph, ms(默认:kts)vessel_info.type: powerBoat, sailboat, pwc, yacht, catamaranvessel_info.length_ft: 1-500示例请求:
curl -X POST https://api.sealegs.ai/v3/spotcast \
-H "Authorization: Bearer $SEALEGS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"latitude": 25.7617,
"longitude": -80.1918,
"start_date": "2025-12-05T00:00:00Z",
"num_days": 2,
"vessel_info": {"type": "sailboat", "length_ft": 35}
}'响应 (202 Accepted):
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "processing",
"created_at": "2025-12-01T10:30:00Z",
"estimated_completion_seconds": 45,
"credits_charged": 2,
"credits_remaining": 98,
"links": {
"self": "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz",
"forecast": "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/forecast/fcst_xyz789",
"status": "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/status"
}
}GET https://api.sealegs.ai/v3/spotcast/{id}/status
轮询此端点,直到状态变为 "completed" 或 "failed"。建议轮询间隔为 10-15 秒。
状态值:
pending:已排队处理(无 progress 字段)processing:正在生成预报(包含 progress 字段)completed:已准备就绪,可获取结果(包含 progress,百分比为 100%)failed:发生错误进度阶段(仅在状态为 processing 或 completed 时存在):
示例请求:
curl https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/status \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (pending):
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "pending",
"created_at": "2025-12-01T10:30:00Z"
}响应 (processing):
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "processing",
"created_at": "2025-12-01T10:30:00Z",
"progress": {
"stage": "ai_analysis",
"percentage": 75
}
}响应 (completed):
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "completed",
"created_at": "2025-12-01T10:30:00Z",
"completed_at": "2025-12-01T10:30:45Z",
"progress": {
"stage": "completed",
"percentage": 100
}
}GET https://api.sealegs.ai/v3/spotcast/{id}
获取已完成的预报及 AI 分析结果。
示例请求:
curl https://api.sealegs.ai/v3/spotcast/spc_abc123xyz \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (200 OK):
{
"id": "spc_abc123xyz",
"created_at": "2025-12-01T10:30:00Z",
"coordinates": {
"latitude": 25.7617,
"longitude": -80.1918
},
"forecast_period": {
"start_date": "2025-12-05T00:00:00Z",
"end_date": "2025-12-06T00:00:00Z",
"num_days": 2
},
"trip_duration_hours": 12,
"forecast_count": 1,
"metadata": {
"location_name": "迈阿密码头"
},
"latest_forecast": {
"forecast_id": "fcst_xyz789",
"status": "completed",
"created_at": "2025-12-01T10:30:00Z",
"completed_at": "2025-12-01T10:30:45Z",
"ai_analysis": {
"summary": "预计天气状况良好。东北风 8-12 节,海浪平静,1-2 英尺。",
"daily_classifications": [
{
"date": "2025-12-05",
"classification": "GO",
"summary": "东北风 8-12 节,海浪 1-2 英尺,能见度极佳,超过 10 海里。无降水预期。"
},
{
"date": "2025-12-06",
"classification": "CAUTION",
"summary": "风力增强至 15-20 节,下午海浪增至 3-4 英尺。建议早晨出发。"
}
]
}
}
}POST https://api.sealegs.ai/v3/spotcast/{id}/refresh
使用最新气象数据更新现有预报。每预报天数收费 1 积分。
可选请求体:
webhook_url (string):覆盖本次刷新的 webhook 地址示例请求:
curl -X POST https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/refresh \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (202 Accepted):
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_newxyz789",
"status": "processing",
"created_at": "2025-12-02T08:00:00Z",
"links": {
"self": "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz",
"status": "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/status"
}
}GET https://api.sealegs.ai/v3/spotcast/{id}/forecasts
列出某个 SpotCast 的所有预报,按创建时间排序(最新在前)。每次创建或刷新 SpotCast 时,都会生成一个新的预报。
查询参数:
limit (integer):返回结果数量(默认:10)示例请求:
curl "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/forecasts?limit=5" \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (200 OK):
{
"spotcast_id": "spc_abc123xyz",
"data": [
{
"forecast_id": "fcst_newxyz789",
"status": "completed",
"created_at": "2025-12-02T08:00:00Z",
"completed_at": "2025-12-02T08:00:42Z"
},
{
"forecast_id": "fcst_xyz789",
"status": "completed",
"created_at": "2025-12-01T10:30:00Z",
"completed_at": "2025-12-01T10:30:45Z"
}
],
"has_more": false
}GET https://api.sealegs.ai/v3/spotcast/{id}/forecast/{forecast_id}
获取指定预报的完整详情,包括 AI 分析内容。可用于访问 SpotCast 历史中的任意预报,而不仅限于最新版本。
示例请求:
curl "https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/forecast/fcst_xyz789" \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (200 OK - 已完成):
{
"forecast_id": "fcst_xyz789",
"spotcast_id": "spc_abc123xyz",
"status": "completed",
"created_at": "2025-12-01T10:30:00Z",
"completed_at": "2025-12-01T10:30:45Z",
"forecast_period": {
"start_date": "2025-12-05T00:00:00Z",
"num_days": 2
},
"ai_analysis": {
"summary": "预计条件良好。东北风轻风,风速 8-12 节,海浪平静,浪高 1-2 英尺。",
"daily_classifications": [
{
"date": "2025-12-05",
"classification": "GO",
"summary": "全天风力轻柔,海面平静。"
},
{
"date": "2025-12-06",
"classification": "CAUTION",
"summary": "天气状况逐步改善,下午时段为最佳出行窗口。"
}
]
}
}响应 (200 OK - 处理中):
{
"forecast_id": "fcst_xyz789",
"spotcast_id": "spc_abc123xyz",
"status": "processing",
"created_at": "2025-12-01T10:30:00Z",
"forecast_period": {
"start_date": "2025-12-05T00:00:00Z",
"num_days": 2
},
"progress": {
"stage": "analyzing",
"percentage": 65
}
}响应 (200 OK - 失败):
{
"forecast_id": "fcst_xyz789",
"spotcast_id": "spc_abc123xyz",
"status": "failed",
"created_at": "2025-12-01T10:30:00Z",
"forecast_period": {
"start_date": "2025-12-05T00:00:00Z",
"num_days": 2
},
"error": "处理失败"
}GET https://api.sealegs.ai/v3/spotcasts
获取您账户下的所有 SpotCast。
查询参数:
limit (整数):返回结果数量,范围 1-100(默认值:20)after (字符串):分页游标示例请求:
curl "https://api.sealegs.ai/v3/spotcasts?limit=10" \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (200 OK):
{
"data": [
{
"id": "spc_abc123xyz",
"created_at": "2025-12-01T10:30:00Z",
"coordinates": {
"latitude": 25.7617,
"longitude": -80.1918
},
"start_date": "2025-12-05T00:00:00-05:00",
"end_date": "2025-12-06T23:59:59-05:00",
"num_days": 2,
"latest_forecast": {
"forecast_id": "fcst_xyz789",
"status": "completed"
}
}
],
"has_more": true,
"next_cursor": "spc_def456"
}GET https://api.sealegs.ai/v3/account/balance
返回您的当前信用余额和使用情况。
示例请求:
curl https://api.sealegs.ai/v3/account/balance \
-H "Authorization: Bearer $SEALEGS_API_KEY"响应 (200 OK):
{
"credit_balance": 100,
"total_credits_purchased": 200,
"total_credits_used": 100,
"purchase_url": "https://developers.sealegs.ai/dashboard/billing"
}当您在创建或刷新 SpotCast 时提供 webhook_url,SeaLegs 会在处理完成或失败时向该 URL 发送 POST 请求。
Content-Type: application/json
X-SeaLegs-Event: spotcast.forecast.completed
X-SeaLegs-Signature: sha256=abc123...
X-SeaLegs-Delivery-ID: whk_abc123xyz
X-SeaLegs-Timestamp: 1733045400
User-Agent: SeaLegs-Webhooks/1.0每个 webhook 请求均包含一个 HMAC-SHA256 签名,位于 X-SeaLegs-Signature 请求头中。您的 webhook 秘钥可在开发者控制台中获取。在处理请求内容前,请始终验证签名。
Python:
import hmac
import hashlib
def verify_webhook(payload: bytes, signature: str, secret: str) -> bool:
expected = hmac.new(secret.encode(), payload, hashlib.sha256).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature)JavaScript:
const crypto = require('crypto');
function verifyWebhook(payload, signature, secret) {
const expected = crypto.createHmac('sha256', secret).update(payload).digest('hex');
return crypto.timingSafeEqual(
Buffer.from(`sha256=${expected}`),
Buffer.from(signature)
);
}{
"event": "spotcast.forecast.completed",
"created_at": "2025-12-01T10:30:45Z",
"data": {
"spotcast_id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "completed",
"summary": "预计条件良好。东北风轻风,风速 8-12 节,海浪平静,浪高 1-2 英尺。",
"metadata": {
"trip_name": "周末垂钓行程"
}
}
}summary 字段在 AI 分析成功完成后包含。metadata 对象在原始 POST /v3/spotcast 请求中提供了元数据时返回,内容与发送时完全一致。
{
"event": "spotcast.forecast.failed",
"created_at": "2025-12-01T10:31:00Z",
"data": {
"spotcast_id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "failed",
"error": {
"code": "processing_failed",
"message": "无法获取指定位置的气象数据"
},
"metadata": {
"trip_name": "周末垂钓行程"
}
}
}失败的交付将最多重试 4 次:分别在 5 分钟后、30 分钟后、2 小时后和 24 小时后进行。
{
"error": {
"code": "invalid_coordinates",
"message": "纬度必须在 -90 到 90 之间",
"param": "latitude"
}
}| 状态码 | 含义 | 操作 |
|---|---|---|
| 200 | 成功 | 请求已完成 |
| 201 | 已创建 | 资源已创建 |
| 202 | 已接受 | 异步处理已启动 |
| 400 | 错误请求 | 检查参数值 |
| 401 | 未授权 | 确认 API 密钥正确 |
| 402 | 需要付款 | 在 developer.sealegs.ai 添加积分 |
| 403 | 禁止访问 | 账户未验证或已被暂停 |
| 404 | 未找到 | 检查资源 ID |
| 429 | 速率受限 | 等待后重试(每分钟最多 60 次请求) |
| 500 | 服务器错误 | 稍等后重试 |
| 代码 | 描述 |
|---|---|
missing_api_key | 请求中未提供 API 密钥 |
invalid_api_key | API 密钥无效或无法识别 |
key_revoked | API 密钥已被撤销 |
| 代码 | 描述 |
|---|---|
account_not_verified | 开发者账户尚未验证 |
account_suspended | 开发者账户已被暂停 |
| 代码 | 描述 |
|---|---|
insufficient_balance | 积分不足(响应中包含 current_balance、required_credits、purchase_url) |
| 代码 | 描述 |
|---|---|
invalid_coordinates | 坐标超出有效范围 |
invalid_date_format | 日期格式不符合 ISO 8601 标准 |
invalid_webhook_url | Webhook URL 不是有效的 HTTPS 地址 |
invalid_preferences | 配置格式无效 |
invalid_language | 语言不支持(支持:en, es, fr, pt, it, ja) |
invalid_distance_units | 距离单位不支持(支持:nm, mi, km) |
invalid_speed_units | 速度单位不支持(支持:kts, mph, ms) |
invalid_json | 请求体不是有效的 JSON |
| 代码 | 描述 |
|---|---|
spotcast_not_found | 指定的 SpotCast 不存在 |
forecast_not_found | 指定的预报不存在 |
| 代码 | 描述 |
|---|---|
rate_limit_exceeded | 请求过多(响应中包含 retry_after 秒数) |
| 代码 | 描述 |
|---|---|
internal_error | 发生意外错误 |
creation_failed | 创建 SpotCast 失败 |
retrieval_failed | 获取资源失败 |
vessel_info 以获取定制化建议MIT
已收录 1 个 Skill