ForHosting KIT · Semantic Search & RAG

Embed a whole corpus

Vectorizing ten thousand product descriptions one call at a time is a queueing problem disguised as an embedding problem. This endpoint takes the whole list at once, so you submit a corpus, not a loop, and get every vector back together.

● StablePer request + per 1,000 tokens$0.002
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

The problem with looping a single-item endpoint

Calling a one-item embedding endpoint thousands of times means managing thousands of task_ids, thousands of retries, and thousands of small webhook deliveries for what is conceptually one job: vectorize this dataset. search.embed_batch collapses that into a single submission, a single task_id, and a single result to collect when it's done.

What a batch call looks like

POST /search/embed-batch with an array of text items, get back one task_id covering the whole batch, and receive the full set of vectors — matched back to your original items — by webhook or a signed 24-hour link once processing completes. Internally the batch is parallelized and ordered for you; you don't have to think about how the pieces were scheduled.

Why batching earns a different price shape

Batch processing has always been the efficient path in computing, from overnight mainframe jobs to today's GPU inference queues, because grouping similar work reduces overhead per unit compared to constant one-off requests. That efficiency is why running text through this endpoint as a batch, rather than thousands of individual calls, is the more sensible route whenever you already have the full list in hand.

What it doesn't do for you

This endpoint returns vectors, not a queryable index — if you want to search the corpus by similarity right away without managing storage yourself, search.index_text is the equivalent batch-oriented step that also builds the index. Use this one when you need the raw vectors under your own control, for a custom pipeline, a data warehouse, or a model you're training.

Where it belongs in a data pipeline

Migrating an existing catalog into a new semantic search system starts here: embed everything once, store the vectors, and only embed new or changed items going forward. Data science teams use it to prepare training features from large text datasets without writing their own batching and retry logic. Because it's billed per request plus per 1000 tokens with no minimum job size, a one-time migration of a million records and a small weekly refresh both fit the same endpoint.

Catalog migration to semantic search

An online retailer submits its entire product catalog as one batch to generate vectors before switching its search from keyword matching to similarity ranking.

Nightly incremental refresh

A content platform batches only the articles published that day and re-vectorizes them in a single scheduled job instead of calling the single-item endpoint per article.

Feature preparation for a custom model

A data science team embeds a labeled training set in bulk to use the vectors as input features for a classifier they train separately.

Archive vectorization for research

A research group vectorizes years of historical documents in a handful of batch jobs instead of running a script that calls a single-item endpoint in a loop.

How do I embed many texts at once with the API?

Send an array of items to POST /search/embed-batch, store the returned task_id, and collect all resulting vectors by webhook or a signed link valid for 24 hours.

Is the bulk embeddings API free?

No, there's no free tier or trial; it costs $0.002 per request plus $0.002 per 1000 tokens across the batch, and a failed task is never charged.

Is there a maximum batch size?

Yes, check the endpoint reference for the current item and token limits per batch; larger corpora should be split into multiple batch submissions.

How do I match returned vectors to my original items?

Each vector in the result is returned aligned with the order or identifiers of the items you submitted, so you can map them back without ambiguity.

What's the difference between this and search.embed?

search.embed handles one piece of text per call; search.embed_batch processes an entire list of texts in a single task, which is far more efficient for large corpora.

Should I use this or search.index_text for a search feature?

Use search.embed_batch if you'll store and query the vectors yourself; use search.index_text if you want the chunking, embedding and index all handled for you.

How long does a large batch take to process?

It depends on the batch size and total token count; because it runs asynchronously, you're notified by webhook rather than needing to poll or wait online.

Is the submitted text kept after the batch runs?

No, submitted text and generated results are deleted after the retention window and are never used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/search/embed-batch

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/search/embed-batch \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"…"}'
{
  "text": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "search.embed_batch",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002
Per 1,000 tokens$0.0015

Published price — no tokens, no invented credits. A failed task is never charged.

max_chunks10000
max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Read the full KIT documentation →