SeaLegs AI Marine Forecast API
Get AI-powered marine weather forecasts for any location worldwide
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install skilldb:sealegs-ai-coder~sealegs-marine-forecastcURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/skilldb%3Asealegs-ai-coder~sealegs-marine-forecast/file -o sealegs-marine-forecast.mdGit 仓库获取源码
git clone https://github.com/openclaw/skills/commit/e85b7ea699f99d6a8228bc9662dbddb4c0eda456# SeaLegs AI Marine Forecast API
Get AI-powered marine weather forecasts for any location worldwide. Includes wind, waves, visibility, precipitation analysis with GO/CAUTION/NO-GO safety classifications.
## Features
- **SpotCast Forecasts**: Get marine weather forecasts for any coordinates worldwide
- **AI Safety Analysis**: GO / CAUTION / NO-GO classifications for each day
- **Vessel-Specific**: Tailored recommendations based on boat type and size
- **Multi-Language**: Supports English, Spanish, French, Portuguese, Italian, Japanese
## Setup
### 1. Get an API Key
1. Sign up at https://developer.sealegs.ai — you'll get **10 free credits** to get started
2. Generate an API key from your dashboard
3. Need more? Add credits anytime ($10 = 200 forecast-days)
### 2. Configure OpenClaw
Add to your OpenClaw configuration:
```json5
{
skills: {
entries: {
"sealegs-marine-forecast": {
enabled: true,
apiKey: "sk_live_your_key_here"
}
}
}
}
```
Or set the environment variable:
```bash
export SEALEGS_API_KEY=sk_live_your_key_here
```
### 3. Install the Skill
```bash
clawhub install sealegs-marine-forecast
```
## Usage Example
```jsonc
// Miami, FL
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} // optional
}
```
**Sample response:**
```json
{
"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": "Miami Marina"
},
"latest_forecast": {
"status": "completed",
"ai_analysis": {
"summary": "Ideal conditions both days with light winds",
"daily_classifications": [
{
"date": "2026-02-10",
"classification": "GO",
"short_summary": "Outstanding conditions all day with light winds under 7kt and calm 1.1-1.6ft seas. Best window is morning 5:00 AM-12:00 PM with nearly calm 1-4kt northwest winds and comfortable 1.4ft seas at 11-second periods.",
"summary": "Outstanding sailing conditions throughout Monday with exceptionally light winds and calm seas. Morning hours offer the best window with nearly calm 1-4kt northwest winds and comfortable 1.4ft seas at 11-second periods from the northeast."
},
{
"date": "2026-02-11",
"classification": "GO",
"short_summary": "Exceptional conditions with very light winds 1-6kt and minimal 1.2-1.3ft seas all day. Best window 9:00 AM-1:00 PM offers glassy conditions with 1-3kt winds and 1.2ft seas at 11-second periods.",
"summary": "Exceptional boating conditions on Tuesday with very light winds and minimal seas throughout the day. Morning through midday provides ideal glassy conditions with 1-3kt east-southeast winds and 1.2ft seas at 10-11 second periods from the northeast."
}
]
}
}
}
```
## API Endpoints
| Operation | Endpoint | Cost |
|-----------|----------|------|
| Create forecast | POST /v3/spotcast | 1 credit/day |
| Get forecast | GET /v3/spotcast/{id} | Free |
| Check status | GET /v3/spotcast/{id}/status | Free |
| Refresh forecast | POST /v3/spotcast/{id}/refresh | 1 credit/day |
| List forecasts for SpotCast | GET /v3/spotcast/{id}/forecasts | Free |
| Get specific forecast | GET /v3/spotcast/{id}/forecast/{forecast_id} | Free |
| List SpotCasts | GET /v3/spotcasts | Free |
| Get balance | GET /v3/account/balance | Free |
## Weather Factors Used
- Wind speed, gusts, and direction
- Wave height, period, and direction
- Visibility and fog probability
- Precipitation probability and intensity
- Air and water temperature
## Authentication
All requests require:
```
Authorization: Bearer $SEALEGS_API_KEY
Content-Type: application/json
```
## Rate Limits
- Standard tier: 60 requests per minute
- Rate limit headers included in all responses: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset`
## Billing
- 1 credit per forecast-day (3-day forecast = 3 credits)
- GET operations are free
- Refreshes cost 1 credit per forecast-day
---
# SpotCast Forecasts
SpotCast generates AI-powered marine weather forecasts for specific coordinates.
## Create SpotCast
**POST** `https://api.sealegs.ai/v3/spotcast`
Creates a new forecast request. Processing is asynchronous (typically 30-60 seconds).
**Required parameters:**
- `latitude` (number): -90 to 90
- `longitude` (number): -180 to 180
- `start_date` (string): ISO 8601 format (e.g., "2025-12-05T00:00:00Z")
- `num_days` (integer): 1-5
**Optional parameters:**
- `webhook_url` (string): HTTPS endpoint for completion notification
- `metadata` (object): Custom key-value pairs for your reference
- `trip_duration_hours` (integer): Trip duration in hours
- `preferences.language`: en, es, fr, pt, it, ja (default: en)
- `preferences.distance_units`: nm, mi, km (default: nm)
- `preferences.speed_units`: kts, mph, ms (default: kts)
- `vessel_info.type`: powerBoat, sailboat, pwc, yacht, catamaran
- `vessel_info.length_ft`: 1-500
**Example request:**
```bash
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}
}'
```
**Response (202 Accepted):**
```json
{
"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"
}
}
```
## Check SpotCast Status
**GET** `https://api.sealegs.ai/v3/spotcast/{id}/status`
Poll this endpoint until status is "completed" or "failed". Recommended poll interval: 10-15 seconds.
**Status values:**
- `pending`: Queued for processing (no `progress` field)
- `processing`: Currently generating forecast (includes `progress`)
- `completed`: Ready to retrieve (includes `progress` at 100%)
- `failed`: Error occurred
**Progress stages** (only present when status is `processing` or `completed`):
- fetching_weather
- processing_data
- ai_analysis
- completing
- completed (100%)
**Example request:**
```bash
curl https://api.sealegs.ai/v3/spotcast/spc_abc123xyz/status \
-H "Authorization: Bearer $SEALEGS_API_KEY"
```
**Response (pending):**
```json
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "pending",
"created_at": "2025-12-01T10:30:00Z"
}
```
**Response (processing):**
```json
{
"id": "spc_abc123xyz",
"forecast_id": "fcst_xyz789",
"status": "processing",
"created_at": "2025-12-01T10:30:00Z",
"progress": {
"stage": "ai_analysis",
"percentage": 75
}
}
```
**Response (completed):**
```json
{
"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 SpotCast
**GET** `https://api.sealegs.ai/v3/spotcast/{id}`
Retrieves the completed forecast with AI analysis.
**Example request:**
```bash
curl https://api.sealegs.ai/v3/spotcast/spc_abc123xyz \
-H "Authorization: Bearer $SEALEGS_API_KEY"
```
**Response (200 OK):**
```json
{
"id": "spc_abc123xyz",
"created_at": "2025-12-01T10:30:00Z",
"coordinates": {
"latitude": 25.7617,
"longitude": -80.1918
},
"forecast_period": {
"start_