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.
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
- Create an API Key in the dashboard and confirm your balance or trial credit is available.
- Choose a model ID from /models; match the model to chat, vision, image, video, audio, embedding, or rerank work.
- Set Base URL to https://api.sealink.io/v1, or call the SeaLink API paths below directly.
- Before launch, verify with minimal requests: one chat message, one image, a short video task, and short text/file audio.
- In production, store x-sealink-request-id so you can debug billing, rate limits, and errors.
Chat completion (OpenAI-compatible)
OpenAI-compatible chat completion endpoint. Use stream=true for streaming responses.
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"}]}'
Vision chat (image input)
Use the chat endpoint with OpenAI-compatible image_url content. Pick a model that supports image input.
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" } }]}]}'
Generate embeddings
Use text-embedding-v4 for embedding workloads.
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", "您好", "สวัสดี"]}'
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 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}'
Generate images
Generate images from a prompt. Use image models for product shots, illustrations, design assets, and marketing images.
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"}'
Edit images
Edit an existing image with a prompt. Send image_url in JSON, or upload a local image in multipart form data.
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"}'
Create image variations
Upload a source image and create one or more variations.
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"
Upscale images
Increase image resolution from a URL or base64 input.
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}'
Style transfer
Apply a style reference or style prompt to an image.
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"}'
Remove image background
Remove the background from an image and return a transparent result.
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"}'
Generate videos
Video generation is asynchronous. Submit a short task first, store the returned id, then poll the status endpoint.
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}'
curl https://test.sealink.io/v1/tasks/task_abc123 \-H "Authorization: Bearer $SEALINK_API_KEY"
curl -X DELETE https://test.sealink.io/v1/tasks/task_abc123 \-H "Authorization: Bearer $SEALINK_API_KEY"
Edit videos
Edit an existing video with a prompt. Video editing is also task-based.
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}'
Text to speech
Generate audio from text. The response is audio binary; write it to a file.
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
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 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"
Translate audio
Upload audio and receive an English translation transcript.
curl https://test.sealink.io/v1/audio/translations \-H "Authorization: Bearer $SEALINK_API_KEY" \-F "file=@korean_speech.mp3" \-F "model=whisper-large-v3"
Generate music
Generate music from a prompt. Duration, style, and instrumental options depend on the model.
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}'
Generate sound effects
Generate a short sound effect from a natural-language description.
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}'
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 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."}'
Moderate text and images
Check user input before sending it into generation flows. Accepts text strings and image content objects.
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."}'
List models
Public — no auth needed. Returns OpenAI-format model list.
curl https://test.sealink.io/v1/models
Anthropic Messages (compat)
Used by Claude Code. Auth via x-api-key or Authorization header.
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.
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 https://test.sealink.io/v1/me \-H "Authorization: Bearer $SEALINK_API_KEY"
Task tagging — metadata.task_type
v2 previewAdd `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 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.