Use chat completions for text, tools, structured output, and multimodal messages. Discover the enabled model list from /v1/models before choosing examples for production.
curl https://api.sealink.io/v1/chat/completions \-H "Authorization: Bearer $SEALINK_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "claude-opus-5-5","messages": [{"role": "system", "content": "You are concise."},{"role": "user", "content": "Write one sentence about Singapore."}],"max_tokens": 128}'
import osfrom openai import OpenAIclient = OpenAI(base_url="https://api.sealink.io/v1",api_key=os.environ["SEALINK_API_KEY"],)response = client.chat.completions.create(model="claude-opus-5-5",messages=[{"role": "user", "content": "Write one sentence about Singapore."}],max_tokens=128,)print(response.choices[0].message.content)print(response.usage)
Streaming returns partial output over SSE. SeaLink finalizes usage at the end of the stream, so keep the connection open until the final frame.
curl https://api.sealink.io/v1/chat/completions \-H "Authorization: Bearer $SEALINK_API_KEY" \-H "Content-Type: application/json" \-N \-d '{"model": "claude-opus-5-5","messages": [{"role": "user", "content": "Stream a short checklist."}],"stream": true,"stream_options": {"include_usage": true}}'
Use data URLs for private images. Plain URLs must be publicly downloadable without sign-in or short-lived authorization. Check image capability in /v1/models.
curl https://api.sealink.io/v1/chat/completions \-H "Authorization: Bearer $SEALINK_API_KEY" \-H "Content-Type: application/json" \-d '{"model": "claude-opus-5-5","messages": [{"role": "user","content": [{"type": "text", "text": "Describe this image in one sentence."},{"type": "image_url", "image_url": {"url": "data:image/png;base64,<BASE64_IMAGE>"}}]}],"max_tokens": 128}'