Quickstart
The KURE API serves Korean retrieval models. Embeddings (KURE-v3) are OpenAI-compatible: point the OpenAI SDK at our base URL with your key and you are ready to go. The same key also works for sparse embeddings (KURE-Sparse) and reranking (KURE-Reranker). This page starts with embeddings.
The API is currently free. The KURE-v3 weights are available on Hugging Face.
1. Get an API key
- Click Sign in at the top right and sign in with GitHub or Google.
- Accept the terms of service to sign up. Allowing us to store your inputs is optional; if you do, per-minute limits double and the daily token limit goes up 10× (Data policy).
- Create a key in Dashboard → API keys. The full key is shown only once, so store it somewhere safe right away.
Pass the key through an environment variable rather than hard-coding it.
export KURE_API_KEY="kure-..."2. Your first request
The base URL is https://kure.kullm.ai/api/v1.
# pip install openai
import os
from openai import OpenAI
client = OpenAI(base_url="https://kure.kullm.ai/api/v1", api_key=os.environ["KURE_API_KEY"])
res = client.embeddings.create(
model="kure-v3",
input="Where is Korea University?",
extra_body={"input_type": "query"},
)
print(len(res.data[0].embedding)) # 20483. Tell queries and documents apart
KURE-v3 is trained to encode search queries and the documents being searched differently. Set input_type to "query" for queries and "document" for documents. Without it, the text is embedded as-is and retrieval quality may drop. See Models for details.
The OpenAI SDK has no input_type argument, so in Python pass it through extra_body.
4. A minimal search
Vectors are L2-normalized, so the dot product equals cosine similarity.
import os
import numpy as np
from openai import OpenAI
client = OpenAI(base_url="https://kure.kullm.ai/api/v1", api_key=os.environ["KURE_API_KEY"])
def embed(texts, input_type):
res = client.embeddings.create(
model="kure-v3",
input=texts,
dimensions=1024,
extra_body={"input_type": input_type},
)
return np.array([d.embedding for d in res.data])
docs = [
"고려대학교는 서울특별시 성북구 안암로 145에 있다.",
"연세대학교는 서울특별시 서대문구 연세로 50에 있다.",
"고려대학교 세종캠퍼스는 세종특별자치시 조치원읍에 있다.",
]
doc_vecs = embed(docs, "document")
query_vec = embed(["What is the address of Korea University's main campus?"], "query")[0]
scores = doc_vecs @ query_vec
for i in np.argsort(-scores):
print(f"{scores[i]:.3f} {docs[i]}")Embed your documents once and keep them in a vector database; at search time, only the query needs embedding. You can also try it without signing in on the Playground.
Next steps
- Embeddings API: every parameter and the response format
- Sparse Embeddings API: sparse vectors, vector databases, hybrid search
- Rerank API: reorder first-stage results
- Models: choosing dimensions (MRL) and the maximum input length
- Limits & errors: rate limits and how to retry
For questions, bug reports, or higher limits, email kure.nlpai@gmail.com.
