SeaLinkSeaLink
/
← Docs

Embeddings

Turn text or supported vision inputs into vectors for RAG, semantic search, clustering, and recommendations. Start text workloads with text-embedding-v4; use /v1/models and the model detail page for vision embedding models.

Supported models

ModelDimCtxPrice / 1MBest for
text-embedding-v410248K$0.13General, English-leaning
tongyi-embedding-vision-plusModel-specificModel-specificSee model detailsVision embedding and image-text retrieval
tongyi-embedding-vision-flashModel-specificModel-specificSee model detailsLower-latency vision embedding
qwen3-vl-embeddingModel-specificModel-specificSee model detailsMultimodal embedding tasks

Example

Python
import os
from openai import OpenAI
client = OpenAI(
base_url="https://test.sealink.io/v1",
api_key=os.environ["SEALINK_API_KEY"],
)
# Single string
res = client.embeddings.create(
model="text-embedding-v4",
input="SeaLink helps SEA developers ship AI faster."
)
vec = res.data[0].embedding # 1024-dimensional vector
# Batch (recommended for performance)
texts = ["Doc 1 content", "Doc 2 content", "Doc 3 content"]
res = client.embeddings.create(model="text-embedding-v4", input=texts)
vectors = [d.embedding for d in res.data]

Parameters

FieldTypeDescription
modelstringtext-embedding-v4, tongyi-embedding-vision-plus, tongyi-embedding-vision-flash, qwen3-vl-embedding
inputstring | string[]Text to embed; arrays must not be empty
encoding_formatstringfloat, base64
dimensionsintegerOptional output dimension override when supported; must be greater than 0

Which one?

  • text-embedding-v4: General-purpose text embedding model for RAG, semantic search, and recommendation baselines. It returns 1024-dimensional vectors.
  • tongyi-embedding-vision-plus / flash: Use for image, image-text retrieval, and visual similarity tasks. Choose input fields from the model detail page.
  • qwen3-vl-embedding: Use for multimodal embedding probes; first probes should use one short input.

Performance tips

  • Prefer batch input (array form) to reduce request overhead and improve throughput.
  • If you use cosine similarity, L2-normalize before storing so retrieval can use dot product.
  • Chunk size: 500-800 tokens with 50-100 token overlap is a safe default.
  • Before launch, evaluate retrieval quality, reranking, and cost with a representative query set.