Open Waters Authentication API
Create a token over HTTP. Feeder, peer, partner, and admin tokens are issued by the operator.
Create a token over HTTP. Feeder, peer, partner, and admin tokens are issued by the operator.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/openwaters-io:openwaters-io-authentication-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: aiscast Authentication API
version: 1.0.0
description: 'Live AIS data from openwaters.io: current vessel positions, receiving stations, usage stats, self-serve tokens, and HTTP ingest for feeders. Successful responses are JSON; errors and `/health` are plain text. CORS is open, times are UTC, and JSON is compressed (zstd or gzip) when the request sends `Accept-Encoding`.
The streams are documented separately: `/v0/stream` (WebSocket, aisstream.io-compatible), `/v1/stream` (WebSocket JSON frames, MQTT over WebSocket for feeders, or Server-Sent Events), `/v1/nmea` (WebSocket, raw NMEA), and raw NMEA ingest on UDP port 10110. `/mcp` is the MCP (Model Context Protocol) endpoint for AI assistants: Streamable HTTP, no sign-in, the same tiers as `/v1/vessels`. See openwaters.io/api/ais.
All requests require a valid `User-Agent` header that names your app, version, and a URL or email address, such as `my-app/1.2 (you@example.org)`. See the User-Agent policy.'
contact:
name: aiscast
url: https://github.com/openwatersio/aiscast
termsOfService: https://github.com/openwatersio/aiscast/blob/main/docs/contributor-agreement.md
license:
name: MIT
identifier: MIT
servers:
- url: https://ais.openwaters.io
tags:
- name: Authentication
description: Create a token over HTTP. Feeder, peer, partner, and admin tokens are issued by the operator.
paths:
/v1/keys:
post:
operationId: mintKey
tags:
- Authentication
summary: Create a personal token
description: 'Create a personal token for an Ed25519 key you generate. It never expires. Generate a key and print its public half in the form `pubkey` expects:
```
openssl genpkey -algorithm ed25519 -out ais-key.pem
PUB=$(openssl pkey -in ais-key.pem -pubout -outform DER | tail -c 32 | base64 | tr ''+/'' ''-_'' | tr -d ''='')
```
Sign the request with the same key, so nobody else can mint a token for it. The signature covers six lines joined by newlines, with no newline at the end: `aiscast-key`, `pubkey`, `ts`, `1` or `0` for `bind_ip`, `name`, and `vessel_name`, with an empty line for a name left out:
```
TS=$(date +%s)
printf ''aiscast-key\n%s\n%s\n0\n\n'' "$PUB" "$TS" > msg
SIG=$(openssl pkeyutl -sign -inkey ais-key.pem -rawin -in msg | base64 | tr ''+/'' ''-_'' | tr -d ''=\n'')
curl -d "{\"pubkey\":\"$PUB\",\"ts\":$TS,\"sig\":\"$SIG\"}" https://ais.openwaters.io/v1/keys
```
Once a key has signed a request, every later request for it must be signed, and a request that names the station must be signed. Unsigned requests are still accepted for keys that have never signed, for clients that do not sign yet.
Tiers and limits are in docs/limits.md.'
security: []
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- pubkey
properties:
pubkey:
type: string
description: The raw 32-byte Ed25519 public key, base64url-encoded without padding (43 characters). Not PEM or DER.
bind_ip:
type: boolean
default: false
description: Claim the UDP station at the requesting address, so a receiver sending UDP from that address counts toward this token's feeder tier from anywhere, and takes this request's names. The address goes in the token's `udp` claim. The token still works from every address.
name:
type: string
description: 'The station''s public name, up to 40 characters of letters, digits, spaces, and `. , '' - & ( ) / #`. Unique among stations. An empty string clears it. Needs `sig`. Generating again with a new name renames the station, and tokens already issued keep working.'
vessel_name:
type: string
description: The name of the boat the station is on, from a client that knows it, such as the Signal K plugin. Same rules as `name`, except that two stations may share it. Shown when there is no `name`. Needs `sig`.
ts:
type: integer
description: Unix seconds, within 5 minutes of the server clock and later than the last signed request for this key.
sig:
type: string
description: Ed25519 signature by `pubkey` over the signed lines, base64url without padding.
example:
pubkey: 9BEqQjPRE0sZse-EbW1xUJa0K2iTBTV3TCqz1sPS7Fk
bind_ip: false
name: Quissett Harbor
ts: 1790000000
sig: 2Wq…
responses:
'200':
description: The token and the claims it carries.
content:
application/json:
schema:
type: object
required:
- token
- claims
properties:
token:
type: string
description: Ed25519-signed claim token, `ak1.<base64url claims>.<base64url signature>`, about 200 characters.
claims:
$ref: '#/components/schemas/Claims'
signed:
type: boolean
description: '`true` when the request''s signature was checked and accepted. A client can wait for it before treating its key as locked to signed requests.'
name_error:
type: string
description: Why a requested name was not stored. The token is issued anyway.
example:
token: ak1.eyJraWQiOiJr...In0.X2lnbmF0dXJl...
claims:
kid: k1
sub: ed25519:9BEqQjPRE0sZse-EbW1xUJa0K2iTBTV3TCqz1sPS7Fk
role: personal
iat: 1755691200
conns: 2
rate: 50
area: 400
'400':
description: Malformed JSON, or `pubkey` is not a base64url Ed25519 public key.
content:
text/plain:
schema:
type: string
'429':
$ref: '#/components/responses/RateLimited'
'403':
description: The request is not signed and must be, or its signature, `ts`, or key does not check out. The body says which.
'501':
description: This server has no personal-token issuer configured.
content:
text/plain:
schema:
type: string
components:
responses:
RateLimited:
description: Over the per-address or per-station request limit.
content:
text/plain:
schema:
type: string
example: rate limited
schemas:
Claims:
type: object
description: The claims a token carries. Absent limits mean unlimited.
properties:
kid:
type: string
description: Issuer key id.
sub:
type: string
description: 'Who: a station name, partner name, or `ed25519:<pubkey>` / `mmsi:<n>` for a device.'
role:
type: string
enum:
- personal
- feeder
- peer
- partner
- admin
iat:
type: integer
description: Issued at, unix seconds.
exp:
type: integer
description: Expiry, unix seconds. Absent on personal tokens, which never expire.
bbox:
type: array
description: Boxes every subscription must fit inside, each `[minLat, minLon, maxLat, maxLon]`.
items:
type: array
items:
type: number
minItems: 4
maxItems: 4
cidr:
type: array
description: Source CIDRs/IPs the token may be used from. On a personal token signed with the personal issuer's key (one minted by `POST /v1/keys`), a single address is a UDP station claim like `udp` and does not limit where the token is used. An operator-minted personal token with `cidr` is still limited to it.
items:
type: string
udp:
type: array
description: Addresses whose UDP stations the token owns, set by `bind_ip`. Not a limit on where the token is used from.
items:
type: string
conns:
type: integer
description: Concurrent WebSocket cap for this `sub`.
rate:
type: integer
description: Messages per second per connection; excess is thinned.
area:
type: integer
description: Total subscribed bounding-box area in square degrees. Negative means MMSI-only subscriptions.
mmsis:
type: integer
description: Vessels followed by MMSI or IMO per subscription.
securitySchemes:
token:
type: http
scheme: bearer
description: 'An aiscast claim token (`ak1....`), created by `POST /v1/keys` or issued by the operator. Besides `Authorization: Bearer`, the token is accepted as an HTTP Basic password (`anything:<token>`, which is what AIS-catcher''s USERPWD sends) or as `?key=<token>` on the URL. A token that is present but invalid, expired, revoked, used outside its `cidr`, or lacking the role for the action is refused; it never degrades to anonymous access.'