연동

임베딩

POST /v1/embeddings는 텍스트를 벡터로 변환하여 시맨틱 검색, RAG, 클러스터링, 중복 제거에 활용할 수 있습니다. 유형이 "Embedding"인 모델을 선택하세요.

curl https://api.link-io.cloud/v1/embeddings \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "text-embedding-3-small",
    "input": ["The quick brown fox", "jumps over the lazy dog"]
  }'
  • input은 문자열 또는 문자열 배열을 사용할 수 있으며, 배치로 묶어 보내면 요청 수를 줄일 수 있습니다.
  • 하나의 인덱스에 담긴 벡터는 반드시 동일한 모델로 생성해야 합니다. 모델을 바꾸면 전체를 다시 임베딩해야 합니다.
  • 모델의 입력 한도를 초과하는 텍스트는 분할하세요.