KURE

Embeddings API

Same format as the OpenAI Embeddings API. The only KURE extension is input_type.

Authentication

Send your API key in the Authorization header with every request.

Authorization: Bearer kure-...

A missing or wrong key returns 401. Create and revoke keys in the Dashboard; each account can have up to 5 active keys.

Create embeddings

POST https://kure.kullm.ai/api/v1/embeddings

Request body

ParameterTypeRequiredDescription
modelstringYeskure-v3, or the snapshot kure-v3-20261016 (Model IDs and versions). For sparse embeddings, use the Sparse Embeddings API.
inputstring | string[]YesText to embed. Arrays may hold up to 8 items; empty strings are not allowed. Each text can be up to 8,192 tokens.
input_type"query" | "document"NoKURE extension. Use query for search queries and document for the documents being searched; the server prepends the prompt the model was trained with. If omitted, the text is embedded as-is.
dimensionsintegerNoOutput size: one of 256, 512, 768, 1024, 2048. Defaults to 2048 (MRL).
encoding_format"float" | "base64"NoDefaults to float. base64 returns a base64 string of little-endian float32 values.

Other fields sent by the OpenAI SDK, such as user, are ignored. Token-ID input (input: [[1, 2, 3]]) is not supported.

Response

{
  "object": "list",
  "model": "kure-v3",
  "data": [
    { "object": "embedding", "index": 0, "embedding": [0.0123, -0.0456, ...] }
  ],
  "usage": { "prompt_tokens": 12, "total_tokens": 12 }
}
  • data follows the order of input; each item's index is its position in input.
  • Vectors are L2-normalized. When you set dimensions, the truncated vector is re-normalized, so the dot product still equals cosine similarity.
  • usage.prompt_tokens includes the prompt added by the server, and is what counts against your rate limits.

When encoding_format is not set, the OpenAI SDKs (Python and Node) request base64 internally and decode it back to floats. It saves bandwidth, so you can keep the SDK default.

Examples

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=[
        "고려대학교는 서울특별시 성북구 안암로 145에 있다.",
        "KURE is a Korean embedding model built by the NLP&AI Lab at Korea University.",
    ],
    dimensions=512,
    extra_body={"input_type": "document"},
)
vectors = [d.embedding for d in res.data]

Embedding many documents

  • Batch up to 8 texts per request. Fewer requests means you hit the RPM limit less often.
  • Texts over 8,192 tokens are rejected with 400 context_length_exceeded; split them beforehand.
  • On 429, wait for the Retry-After header and resend (Limits & errors).

List models

GET https://kure.kullm.ai/api/v1/models
{
  "object": "list",
  "data": [
    { "id": "kure-v3-20261016", "object": "model", "created": 0, "owned_by": "nlpai-lab", "task": "embedding", "alias_for": null, "status": "active", "sunset": null, "replacement": null },
    { "id": "kure-v3", "object": "model", "created": 0, "owned_by": "nlpai-lab", "task": "embedding", "alias_for": "kure-v3-20261016", "status": "active", "sunset": null, "replacement": null }
  ]
}

Snapshots come first, then aliases (excerpt). KURE extension fields: task is the endpoint to use (embedding, sparse-embedding, rerank), alias_for is the snapshot an alias points to, and status, sunset, replacement follow the model lifecycle.

OpenAPI spec

The full spec is available at /api/openapi.json.