SeaLinkSeaLink
/
← Docs

API surface

API Reference

Create an API Key and start calling SeaLink. Each capability includes the minimal request, when to use it, and where to read the detailed guide.

Download OpenAPI 3.1 specDownload Postman collection

Unified SeaLink API

Use https://api.sealink.io as the base URL. Send Authorization: Bearer $SEALINK_API_KEY on authenticated requests. Synchronous APIs return results directly; video and some generation jobs return a task id first, then you poll for status.

Production call flow

  1. Create an API Key in the dashboard and confirm your balance or trial credit is available.
  2. Choose a model ID from /models; match the model to chat, vision, image, video, audio, embedding, or rerank work.
  3. Set Base URL to https://api.sealink.io/v1, or call the SeaLink API paths below directly.
  4. Before launch, verify with minimal requests: one chat message, one image, a short video task, and short text/file audio.
  5. In production, store x-sealink-request-id so you can debug billing, rate limits, and errors.
POST/v1/chat/completions

Chat completion (OpenAI-compatible)

OpenAI-compatible chat completion endpoint. Use stream=true for streaming responses.

cURL
curl https://test.sealink.io/v1/chat/completions \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-max",
"messages": [{"role":"user","content":"Hello"}]
}'
POST/v1/chat/completions

Vision chat (image input)

Use the chat endpoint with OpenAI-compatible image_url content. Pick a model that supports image input.

cURL
curl https://test.sealink.io/v1/chat/completions \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o-mini",
"messages": [{
"role": "user",
"content": [
{ "type": "text", "text": "Describe this image in one sentence." },
{ "type": "image_url", "image_url": { "url": "https://example.com/photo.jpg" } }
]
}]
}'

Read the vision guide

POST/v1/embeddings

Generate embeddings

Use text-embedding-v4 for embedding workloads.

cURL
curl https://test.sealink.io/v1/embeddings \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "text-embedding-v4",
"input": ["Hello", "您好", "สวัสดี"]
}'
POST/v1/rerank

Rerank documents

Preview: rerank is not in the production-ready path yet. Rank candidate documents by relevance to a query for RAG, enterprise search, and post-retrieval refinement.

cURL
curl https://test.sealink.io/v1/rerank \
-H "Authorization: Bearer <your-sealink-key>" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-rerank",
"query": "best API gateway for Qwen models",
"documents": [
"SeaLink exposes one rerank API.",
"A sourdough starter needs regular feeding.",
"Rerank models improve retrieval quality for RAG."
],
"top_n": 2
}'
POST/v1/images/generations

Generate images

Generate images from a prompt. Use image models for product shots, illustrations, design assets, and marketing images.

cURL
curl https://test.sealink.io/v1/images/generations \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-max",
"prompt": "A clean product photo of a white ceramic mug on a wooden desk",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}'
POST/v1/images/edits

Edit images

Edit an existing image with a prompt. Send image_url in JSON, or upload a local image in multipart form data.

cURL
curl https://test.sealink.io/v1/images/edits \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen-image-edit-max",
"image_url": "https://example.com/photo.png",
"prompt": "Replace the background with a bright studio backdrop",
"n": 1,
"size": "1024x1024"
}'
POST/v1/images/variations

Create image variations

Upload a source image and create one or more variations.

cURL
curl https://test.sealink.io/v1/images/variations \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-F "image=@photo.png" \
-F "model=qwen-image-edit-max" \
-F "n=2" \
-F "size=1024x1024"
POST/v1/images/upscale

Upscale images

Increase image resolution from a URL or base64 input.

cURL
curl https://test.sealink.io/v1/images/upscale \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "real-esrgan-x4",
"image": "https://example.com/low-res.jpg",
"scale": 2
}'
POST/v1/images/style-transfer

Style transfer

Apply a style reference or style prompt to an image.

cURL
curl https://test.sealink.io/v1/images/style-transfer \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-style",
"image": "https://example.com/photo.png",
"style": "watercolor illustration"
}'
POST/v1/images/background-remove

Remove image background

Remove the background from an image and return a transparent result.

cURL
curl https://test.sealink.io/v1/images/background-remove \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "remove-bg-pro",
"image": "https://example.com/photo.png"
}'
POST/v1/video/generations

Generate videos

Video generation is asynchronous. Submit a short task first, store the returned id, then poll the status endpoint.

Submit
curl https://test.sealink.io/v1/video/generations \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "wan2.6-t2v",
"prompt": "A coffee cup on a desk, soft morning light, slow camera move",
"size": "1280x720",
"duration": 5,
"n": 1
}'
Poll
curl https://test.sealink.io/v1/tasks/task_abc123 \
-H "Authorization: Bearer $SEALINK_API_KEY"
Cancel
curl -X DELETE https://test.sealink.io/v1/tasks/task_abc123 \
-H "Authorization: Bearer $SEALINK_API_KEY"
POST/v1/video/edits

Edit videos

Edit an existing video with a prompt. Video editing is also task-based.

Submit
curl https://test.sealink.io/v1/video/edits \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "happyhorse-1.0-video-edit",
"video": "https://example.com/input-video.mp4",
"prompt": "Change the background to a beach sunset",
"resolution": "1280x720",
"duration": 5
}'
POST/v1/audio/speech

Text to speech

Generate audio from text. The response is audio binary; write it to a file.

cURL
curl https://test.sealink.io/v1/audio/speech \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-tts-flash",
"input": "Hello, welcome to SeaLink.",
"voice": "Cherry",
"response_format": "mp3"
}' \
--output speech.mp3
POST/v1/audio/transcriptions

Speech to text

Transcribe audio. Whisper-compatible models support multipart uploads; Alibaba ASR models support JSON file_url/file_urls and long ASR tasks return 202 for /v1/tasks polling.

cURL
curl https://test.sealink.io/v1/audio/transcriptions \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-F "model=qwen3-asr-flash" \
-F "file_url=https://example.com/interview.mp3" \
-F "response_format=json" \
-F "language=en"
POST/v1/audio/translations

Translate audio

Upload audio and receive an English translation transcript.

cURL
curl https://test.sealink.io/v1/audio/translations \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-F "file=@korean_speech.mp3" \
-F "model=whisper-large-v3"
POST/v1/audio/music

Generate music

Generate music from a prompt. Duration, style, and instrumental options depend on the model.

cURL
curl https://test.sealink.io/v1/audio/music \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "udio-v2",
"prompt": "An uplifting orchestral piece with piano and strings",
"duration": 180,
"instrumental": true
}'
POST/v1/audio/sound-effects

Generate sound effects

Generate a short sound effect from a natural-language description.

cURL
curl https://test.sealink.io/v1/audio/sound-effects \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs-sfx",
"prompt": "A soft notification chime",
"duration": 3
}'
POST/v1/audio/voice-clone

Clone a voice

Provide a reference audio file or URL and text to synthesize in that voice. Use a public or private voice-clone model from your catalog snapshot.

cURL
curl https://test.sealink.io/v1/audio/voice-clone \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "elevenlabs-voice-clone",
"audio": "https://example.com/reference.wav",
"text": "This is a SeaLink voice clone sample."
}'
POST/v1/moderations

Moderate text and images

Check user input before sending it into generation flows. Accepts text strings and image content objects.

cURL
curl https://test.sealink.io/v1/moderations \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "omni-moderation-latest",
"input": "Please check this user message."
}'
GET/v1/models

List models

Public — no auth needed. Returns OpenAI-format model list.

cURL
curl https://test.sealink.io/v1/models
POST/anthropic/v1/messages

Anthropic Messages (compat)

Used by Claude Code. Auth via x-api-key or Authorization header.

cURL
curl https://test.sealink.io/anthropic/v1/messages \
-H "x-api-key: $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-4-6",
"max_tokens": 256,
"messages": [{"role":"user","content":"Hi"}]
}'

Want more depth?

Error codes: /docs/error-codes. Rate limits: /docs/rate-limits. Streaming: /docs/streaming.

GET/v1/me

Identity + quota snapshot

Validate an API Key and read its current balance, monthly budget, and RPM/TPM limits. Useful for CLIs and key health checks.

cURL
curl https://test.sealink.io/v1/me \
-H "Authorization: Bearer $SEALINK_API_KEY"

Task tagging — metadata.task_type

v2 preview

Add `metadata.task_type` to your request body to tag a call with a business task ("translation", "summary", "support_reply", etc. — free-form, max 64 chars). SeaLink stores it on the usage_events row; you'll see spend rolled up by task on /dashboard/usage.

cURL with task tag
curl https://test.sealink.io/v1/chat/completions \
-H "Authorization: Bearer $SEALINK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3.6-35b-a3b",
"metadata": { "task_type": "translation" },
"messages": [{"role": "user", "content": "..."}]
}'

The metadata field does not affect model execution. Tagging is optional; calls without a tag work fine.

Key Management

Create, rotate, and revoke API Keys. Keys are access credentials for your account — treat them like passwords.

Create a key

Sign in → /dashboard/keys → 'New API Key' → enter a name and optional monthly budget cap → Create. Keys start with sk-sealink-. The full key is shown once at creation and never again.

Rotate a key

If a key may be compromised: create a new key → update your app config to use it → revoke the old key in /dashboard/keys. Revoked keys stop working immediately; in-flight requests complete. Rotate every 90 days as a best practice.

Revoke a key

Find the key in /dashboard/keys → Revoke → confirm. Revocation is irreversible. All requests with that key will return 401 after revocation. Create a new key to resume access.

Key security best practices

  • Never commit keys to a repo. Use env vars or a secret manager.
  • Use a different key per environment (dev / staging / production).
  • Set a monthly budget cap on keys to prevent surprise bills.
  • Periodically check /dashboard/usage per key for unusual activity.
  • The full key is only visible once at creation; the dashboard shows only the prefix and last 4 chars thereafter.